A scratchpad manager for hyprland
Project description
Installation
pip install hpr-scratcher
OR
- copy and rename the
__init__.py
file to some accessible path, do not forget to add +x to it
Features
- Allow showing & hiding sliding scratchpads
- Allow auto-hide when the focus is lost
Usage
In your hyprland.conf
add something like this:
exec-once = hpr-scratcher
# Repeat this for each scratchpad you need
bind = $mainMod,V,exec,hpr-scratcher toggle volume
windowrule = float,^(pavucontrol)$
windowrule = workspace special silent,^(pavucontrol)$
bind = $mainMod,A,exec,hpr-scratcher toggle term
$dropterm = ^(kitty-dropterm)$
windowrule = float,$dropterm
windowrule = workspace special silent,$dropterm
windowrule = size 75% 60%,$dropterm
Then in $HOME/.config/hypr/scratchpads.json add:
{
"term": {
"command": "kitty --class kitty-dropterm",
"class": "kitty-dropterm",
"offset": 800,
"animation": "fromTop",
"margin": 50,
"unfocus": "hide"
},
"volume": {
"command": "pavucontrol",
"class": "pavucontrol",
"animation": "fromTop"
}
}
And you'll be able to toggle pavucontrol with MOD + V.
Options
animation
Type of animation to use
null
/""
"fromTop"
TODO:
fromBottom
fromLeft
fromRight
offset (optional)
number of pixels for the animation.
class
class of the created window
unfocus (optional)
allow to hide the window when the focus is lost when set to "hide"
margin (optional)
number of pixels for the margin
Changelog
0.4.0
- the offset is now optional
- the margin can be configured now
- FIX: fast repetition of show/hide sequences
- FIX: automatic hide on focus lost doesn't trigger before the window takes the focus
0.3.0
- add animation (only "fromTop" now, but can be switched off)
- pid used in most commands (more reliable)
- FIX: stop pinning the windows
- FIX: debug traces
- FIX: close processes on exit (should be configurable ?)
0.2.0
- add a "reload" command re-reading the configuration
- allow automatic hiding on focus
0.1.0
- first version, close to no options
TODO
- Allow different "poles" for scratchpads instead of always sliding from the top
- Allow auto-restart of applications (if closed)
- Allow closing the app on unfocus
- Move to socket instead of hyprctl when possible
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hpr_scratcher-0.4.0.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for hpr_scratcher-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0d33861aab26e1642c48a5d1f0bada60413aba86c70f602cd73116b8d328f7c |
|
MD5 | ac931969af191fa6bb595c9003686a16 |
|
BLAKE2b-256 | b4ba3618c0320570ff33b26e86db55c554bd697b168a7e4b84d38839a3be8f1f |