From cd4888a5cfc912720f230c3a550526f4428f83b4 Mon Sep 17 00:00:00 2001 From: QC Date: Mon, 21 Jul 2014 21:39:24 +0200 Subject: 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 option. --- Examples/i3_switch_workspaces.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 Examples/i3_switch_workspaces.sh (limited to 'Examples') 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 -- cgit v1.2.3