Feat: Add new 'toogle' option for Sidepad #1420
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
UPDATED:
This also includes the changes originally proposed by https://github.com/Esscraye in the PR: #1353
This pull request adds some new features to the Sidepad:, a new option called
--togglewhich is stateful and allows a single shortcut to open/close sidepad (if called when sidepad is not initialized, the scripts automatically does so), possibility to have sidepad on the leff tor right side of the screen (and one command to switch from one side to the other), sidepad gets focused when open.Coming from https://github.com/Esscraye in the PR: #1353
In addition to that I have created a smooth transition parameter
--switch-sidesthat allows the sidepad to move to the other edge of the screen without having ti kill it and restart.Changes
Context
I didn't like that it required 3 shortcuts for init -> show -> hide, so I thought this could be a cool improvement of the original one. I have made sure to keep compatibility with the old code just in case you still want to keep the same options.
I didn't change any standard calls to Sidepad from waybar or from the original shortcuts (I have done so in my local system, but I though that would be a little too much for this small PR for now).
The sidepad position idea came from the other PR, i just had the idea of making the side switching more "instant" instead of kill/restart.
How Has This Been Tested?
Checklist
Please ensure your pull request meets the following requirements:
Screenshots
Switch sides and toggle demo: video
Related Issues
N/A
Additional Notes
N/A