Simple(?) scratchpad toggle or create script #1460
RayZ0rr
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What
The example scratchpad script from hlwm has a warning on resources used. So, here is a (hopefully) simple script that will toggle a scratchpad if present or create a new one if you accidentally kill it. The script accepts two arguments.
instance
,class
,title
. For examples below, I will useinstance
.st -n <scratchpad_name>
in examples (-n
flag inst
is the option for specifyinginstance
name. If usingclass
ortitle
or another terminal then change accordingly).Dependency
xdotool
( maybe this can be eliminated by using herbstclient itself to list currently visible windows )
USAGE
Put the following into your herbstluftwm config (
~/.config/herbstluftwm/autostart
)NOTE
WM_CLASS(STRING)
fromxprop
). For eg in alacritty,alacritty --class hlwmScratch4
instance
totitle
orclass
then make necessary changes to the example given above for hlwm config file, scratchpad create command, and the scratchpad.sh script.scratchpad.sh
Beta Was this translation helpful? Give feedback.
All reactions