The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
2

Multiple scratchpad

asked 2012-06-17 16:37:03 +0000

anonymous user

Anonymous

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.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
4

answered 2012-06-17 17:19:51 +0000

Michael gravatar image

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).

edit flag offensive delete link more

Comments

dang! i never even thought of that. dig it!

sysadamin gravatar imagesysadamin ( 2012-06-19 04:25:18 +0000 )edit

but then with i3 4.5.1 if I do Mod4+c and Mod4+n I keep alterning the focus between the 2 scratch windows without being able to hide them again. Is that normal ?

teto gravatar imageteto ( 2013-04-21 11:35:28 +0000 )edit

@Michael, as @teto mentioned, this doesn't really solve the problem -- only one scratchpad can be visible at a time, otherwise it becomes chaotic. Is there a way to have different scratchpads really independent from each other? (as an example use-case, I have one for htop and one for ipython).

yoav gravatar imageyoav ( 2013-09-23 00:49:24 +0000 )edit

@teto: Pressing Mod4+c repeatedly should hide, then show the scratchpad window. If not, please report a bug at http://bugs.i3wm.org/

Michael gravatar imageMichael ( 2013-09-26 16:45:57 +0000 )edit
1

answered 2013-05-02 19:55:29 +0000

updated 2013-05-07 05:32:08 +0000

@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!

edit flag offensive delete link more

Comments

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.

teto gravatar imageteto ( 2013-05-14 15:50:50 +0000 )edit

Question Tools

3 followers

Stats

Asked: 2012-06-17 16:37:03 +0000

Seen: 4,533 times

Last updated: May 07 '13