summaryrefslogtreecommitdiffstats
path: root/Examples
diff options
context:
space:
mode:
authorQC <qball@gmpclient.org>2014-07-21 21:39:24 +0200
committerQC <qball@gmpclient.org>2014-07-21 21:39:24 +0200
commitcd4888a5cfc912720f230c3a550526f4428f83b4 (patch)
treee4f2b79f8f9968197e9547ec8c8e19a6cfa931e2 /Examples
parentd584987c819ce85fc93fe9e8e3c3973f7b9e99cf (diff)
Fix #65, Fix #63 Allow user to select list of modi's
* Add script_dialog, so user can add dialogs using a script. * Add a way to disable modi's * Add -show <modi> option.
Diffstat (limited to 'Examples')
-rwxr-xr-xExamples/i3_switch_workspaces.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/Examples/i3_switch_workspaces.sh b/Examples/i3_switch_workspaces.sh
new file mode 100755
index 00000000..a5920567
--- /dev/null
+++ b/Examples/i3_switch_workspaces.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+if [ -z $@ ]
+then
+function gen_workspaces()
+{
+ i3-msg -t get_workspaces | tr ',' '\n' | grep "name" | sed 's/"name":"\(.*\)"/\1/g' | sort -n
+}
+
+
+echo empty; gen_workspaces
+else
+ WORKSPACE=$@
+
+ if [ x"empty" = x"${WORKSPACE}" ]
+ then
+ i3_empty_workspace.sh >/dev/null
+ elif [ -n "${WORKSPACE}" ]
+ then
+ i3-msg workspace "${WORKSPACE}" >/dev/null
+ fi
+fi