aboutsummaryrefslogtreecommitdiff
path: root/i3/scripts
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2018-02-25 12:09:44 +0100
committerSébastien Dailly <sebastien@chimrod.com>2018-02-25 12:09:44 +0100
commitfb8e4dff30d84d0c81d4b7762bacf5c57ea6e1e2 (patch)
treebaaa4fcb47dc0806b4045f774d29c4705c00de38 /i3/scripts
parent68b91fae3b623d719ada6d5d15b5ced4871ec0b0 (diff)
Update configuration
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