aboutsummaryrefslogtreecommitdiff
path: root/i3/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'i3/scripts')
-rwxr-xr-xi3/scripts/i3/launch.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/i3/scripts/i3/launch.sh b/i3/scripts/i3/launch.sh
new file mode 100755
index 0000000..ddfbee6
--- /dev/null
+++ b/i3/scripts/i3/launch.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+workspace=$1
+shift
+pgrep -U $(whoami) -af "$*" | grep -qv $(basename "$0")
+ret=$?
+if [ $ret = 1 ]; then
+ i3-msg "exec $*; workspace ${workspace}"
+else
+ i3-msg "workspace ${workspace}"
+fi
+killall -USR1 i3status