1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-11 13:50:48 -05:00
rofi/Examples/i3_empty_workspace.sh

11 lines
299 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2018-11-01 04:32:00 -04:00
MAX_DESKTOPS=20
WORKSPACES=$(seq -s '\n' 1 1 "${MAX_DESKTOPS}")
2018-11-01 04:32:00 -04:00
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)
2018-11-01 04:32:00 -04:00
i3-msg workspace "${EMPTY_WORKSPACE}"