Multiple scratchpad
Hi, I use the scartchpad to quickly show my music player, but is it possible to have different scratchpad binded to a key. For example Super+m open the music player, Super+n open my mail client, etc.
Hi, I use the scartchpad to quickly show my music player, but is it possible to have different scratchpad binded to a key. For example Super+m open the music player, Super+n open my mail client, etc.
Yes, it is.
I use a config like this:
bindsym Mod4+c [instance="cmus"] scratchpad show
bindsym Mod4+n [instance="mail"] scratchpad show
To start terminals which fulfill these criteria, run:
urxvt -name cmus
urxvt -name mail
And move them to the scratchpad (you could automate this step using for_window
).
@teto: Pressing Mod4+c repeatedly should hide, then show the scratchpad window. If not, please report a bug at http://bugs.i3wm.org/
@teto, solution for ya since I had the same obnoxious issue as I like to run 3 or 4 terminals in scratchpads...
here's my bindsym for three of my scratchpadded items.
# quake style terminals
# top
exec .local/bin/urxvtq scratchpad_urxvt_top 180x28
for_window [instance="scratchpad_urxvt_top"] move to scratchpad, border 1pixel
bindsym Mod1+i exec .local/bin/urxvtq scratchpad_urxvt_top 180x28, [instance="scratchpad_urxvt_left"] move to scratchpad, border 1pixel, [instance="scratchpad_urxvt_bottom"] move to scratchpad, border 1pixel, [instance="scratchpad_urxvt_top"] scratchpad show, move position 45px 0px
# left
exec .local/bin/urxvtq scratchpad_urxvt_left 100x50
for_window [instance="scratchpad_urxvt_left"] move to scratchpad, border 1pixel
bindsym Mod1+a exec .local/bin/urxvtq scratchpad_urxvt_left 100x50, [instance="scratchpad_urxvt_top"] move to scratchpad, border 1pixel, [instance="scratchpad_urxvt_bottom"] move to scratchpad, border 1pixel, [instance="scratchpad_urxvt_left"] scratchpad show, move position 0px 25px
# bottom
exec .local/bin/urxvtq scratchpad_urxvt_bottom 180x28 "journalctl -f --full"
for_window [instance="scratchpad_urxvt_bottom"] move to scratchpad, border 1pixel
bindsym Mod1+j exec .local/bin/urxvtq scratchpad_urxvt_bottom 180x28 "journalctl -f --full", [instance="scratchpad_urxvt_left"] move to scratchpad, border 1pixel, [instance="scratchpad_urxvt_top"] move to scratchpad, border 1pixel, [instance="scratchpad_urxvt_bottom"] scratchpad show, move position 45px 350px
The key here is adding the extra:
[instance="item_a"] move to scratchpad, border 1pixel,
BEFORE you trigger the show event. Mine is setup currently to hide either of the other two and then show the selected scratchpad!
good idea I think you can further refine it by using regexp. something like for [instance="scratchpad*"] move ...; [instance ... ] show .... I believe having scratchpads behave as workspaces could be nice. I mean having several scratchpads, except windows there would be in floating mode.
Asked: 2012-06-17 16:37:03 +0000
Seen: 4,533 times
Last updated: May 07 '13