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

keybinding to open more than one program

asked 2014-11-27 03:09:06 +0000

Marcelo gravatar image

updated 2014-11-27 03:18:56 +0000

Hi. I'd like to set a single key to make i3 perform several actions one by one. So, let's say I want Mod4+j to do this:

"Open gimp /this/file.xcf, pcmanfm and inkscape /this/file.svg in workspace 2."

This is what I was doing with Fluxbox until now I switched to i3. It then looked like this: Mod4 Shift Alt j :MacroCmd {Workspace 3}{Exec soundgrain /bla/bla/circles.sg}{Exec din}{Exec slgui -L /bla/bla/mar.slsess}

However, what I was trying for ages was little more complicated. If I can get i3 to do it in one hit, I kiss your feet :)

"Open qjackctl and Catia in workspace 2; switch to workspace 3 and open wine /home/usr/.wine/reaper.exe; wait 20 seconds (to avoid Reaper opening in next workspace, since it takes a lot); switch to workspace 4 and open two files with their default programmes."

Thanks very much in advance. Regards.

edit retag flag offensive close merge delete

Comments

Do you always open these programs on those workspaces? If so, just use `for_window` rules and you won't even have to worry about waiting 20 seconds.

airblader gravatar imageairblader ( 2014-11-27 16:10:50 +0000 )edit

2 answers

Sort by » oldest newest most voted
0

answered 2014-12-07 01:23:09 +0000

smlb gravatar image

You can simply bind it to a shortcut, example:

bindsym $mod+b exec i3-msg 'workspace 2; exec gimp file.xcf; workspace 9; exec urxvt -e something; workspace 5; exec firefox; workspace 1'

Sidenote: the last workspace 1 take you automatically to workspace 1. That's all. As Micheal said, there is the Save Layouts feature.

edit flag offensive delete link more
0

answered 2014-12-06 22:29:49 +0000

Michael gravatar image

I think you’re looking for http://i3wm.org/docs/layout-saving.html

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-11-27 03:09:06 +0000

Seen: 234 times

Last updated: Dec 07 '14