The i3 FAQ has migrated to https://www.reddit.com/r/i3wm/. All content here is read-only.

# Can't get a window to start in the scratchpad - and i3 behaves very oddly

Following the advice in other questions here, I put this in my config:

exec_always urxvtc  -fn xft:Inconsolata:size=11 -fg white -bg black -name scratchurxvt -e /usr/bin/fizsh


urxvtc is the client program for starting a urxvt terminal when urxvtd (the daemon) is running. I start urxvtd with an exec line above these lines in the config.

Later on I have this

bindsym $mod+p scratchpad show  But once I start i3 the scratchpad does not respond. The scratchpad works ok if I manually move a window to it (using another keybinding). If I remove the for_window directive, the terminal window pops up correctly on startup with the right title. When the for_window directive is on, the terminal window does not appear - implying that it should have been moved to the scratchpad - but nothing happens when I press$mod+p. The same problem occurs if I use xterm instead of urxvtc.

The behaviour becomes even weirder if I use urxvt instead of urxvtc:

exec_always urxvt  -fn xft:Inconsolata:size=11 -fg white -bg black -name scratchurxvt -e /usr/bin/fizsh


If I do this I cannot get any program to start. Pressing \$mod + 2 does not open a new workspace either.

I find this very puzzling. How do I get this to work?

edit retag close merge delete

Sort by » oldest newest most voted

The problem seems to be that the scratchpad is not "ready" when i3 starts. Windows moved into it through the for_window directive or even through i3-msg in the initial few seconds just vanish.

I finally got it to work by shifting a lot of my exec commands into a shell script, then ensuring that the script sleeps for 5 seconds before using i3-msg to shift the window into the scratchpad (I've also switched to lilyterm but that seems to be incidental). The script is called using exec_always from the main config file, like so:

exec_always /mnt/docfile/root/my-documents/Software/i3start.sh


The script itself has the following:

i3-msg exec "lilyterm --title scratchlilyterm -e offlineimap"
i3-msg exec --no-startup-id "run_once nm-applet"
# < various utility scripts are also run>
i3-msg exec iceweasel &
i3-msg exec claws-mail &
sleep 5
i3-msg '[ title="scratchlilyterm" ] move scratchpad'


If I get the chance I'll file a bug report in this regard.

more