diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2013-06-18 00:16:18 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2013-06-18 00:16:19 +0200 |
commit | 0cf9d15723ab29d1b99e35a570de8bba297f9a6a (patch) | |
tree | 9d27fd3b18822d5669fdc909c1085e4b83de7db6 /.i3/scripts/workspaces.py | |
parent | 8da5fe1e07971fbf5b291737e8b82de7f92f72e0 (diff) | |
download | dotfiles-0cf9d15723ab29d1b99e35a570de8bba297f9a6a.tar.gz dotfiles-0cf9d15723ab29d1b99e35a570de8bba297f9a6a.tar.bz2 dotfiles-0cf9d15723ab29d1b99e35a570de8bba297f9a6a.zip |
i3: Use i3-msg 'exec …' for processes, not sh.Command
Diffstat (limited to '')
-rwxr-xr-x | .i3/scripts/workspaces.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/.i3/scripts/workspaces.py b/.i3/scripts/workspaces.py index 5abfea3..137d5fc 100755 --- a/.i3/scripts/workspaces.py +++ b/.i3/scripts/workspaces.py @@ -44,9 +44,12 @@ def new_ws(cmd, args): cmd(str(i+1)) if exe: - try: - sh.Command(exe)() - except sh.CommandNotFound: + # We use i3.exec_ here instead of sh.Command, as we do not want the + # exe to be a child of this script's process + # Also we get startup notification support for free :-) + if sh.which(exe): # i3 exec always yields 'success' + i3.exec_(exe) + else: nag("Command '%s' not found!" % exe) def to_ws(cmd, prompt, args): |