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",
"unfocus": "hide"
},
"volume": {
"command": "pavucontrol",
"class": "pavucontrol",
"animation": "fromTop",
"offset": 1200
}
}
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
number of pixels for the animation.
class
class of the created window
unfocus
allow to hide the window when the focus is lost when set to "hide"
Changelog
0.3.0 (WIP)
- 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
- reload command
- allow automatic hiding on focus
0.1.0
- first version, close to no options
TODO
- Add some period of grace after a dropdown is shown, so the window can't be closed by unfocus in the fist X seconds
- Better handling of fast repetitions
- Allow different "poles" for scratchpads instead of always sliding from the top
- Make the usage of an explicit offset not needed
- study avoiding the usage of classes to track the windows (once registered)
- 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.3.0.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for hpr_scratcher-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b23b77c2d17067a17b93a6e7598c63c7074c33a1dbc270d27d0515ff99d7a339 |
|
MD5 | 18bc893fb94d5fdf920997b9f8892764 |
|
BLAKE2b-256 | 281453c7ee43c11b0d860add74876a247572de59bd3f1f88dcbd5367c68ebafd |