diff --git a/Examples/i3_empty_workspace.sh b/Examples/i3_empty_workspace.sh new file mode 100755 index 00000000..b4c28dc0 --- /dev/null +++ b/Examples/i3_empty_workspace.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +MAX_DESKTOPS=20 + +WORKSPACES=$(seq -s '\n' 1 1 ${MAX_DESKTOPS}) + +EMPTY_WORKSPACE=$( (i3-msg -t get_workspaces | tr ',' '\n' | grep num | awk -F: '{print int($2)}' ; \ + echo -e ${WORKSPACES} ) | sort -n | uniq -u | head -n 1) + +i3-msg workspace ${EMPTY_WORKSPACE} diff --git a/Makefile.am b/Makefile.am index 95a82192..532cf790 100644 --- a/Makefile.am +++ b/Makefile.am @@ -240,6 +240,9 @@ EXTRA_DIST+=\ $(markdown_FILES)\ $(markdown_SC_FILES)\ Examples/i3_switch_workspaces.sh\ + Examples/i3_empty_workspace.sh\ + Examples/test_script_mode.sh\ + Examples/rofi-file-browser.sh\ INSTALL.md\ AUTHORS\ doc/rofi.doxy.in\