aboutsummaryrefslogtreecommitdiff
path: root/modules/workstation/graphics/i3/dynamic-tags/switch.sh
diff options
context:
space:
mode:
Diffstat (limited to 'modules/workstation/graphics/i3/dynamic-tags/switch.sh')
-rwxr-xr-xmodules/workstation/graphics/i3/dynamic-tags/switch.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/workstation/graphics/i3/dynamic-tags/switch.sh b/modules/workstation/graphics/i3/dynamic-tags/switch.sh
new file mode 100755
index 00000000000..9c50eb48083
--- /dev/null
+++ b/modules/workstation/graphics/i3/dynamic-tags/switch.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+### Move the focus to a particular workspace using dmenu.
+
+set -u
+
+I3MSG=$(command -v i3-msg) || exit 1
+JQ=$(command -v jq) || exit 2
+
+$I3MSG workspace $($I3MSG -t get_workspaces | $JQ -M '.[] | .name' | tr -d '"' | sort -u | dmenu -b -i "$@")