dotfiles/home/user/.local/bin/i3_switch_workspace.sh
2023-11-20 13:33:26 +03:00

14 lines
284 B
Bash
Executable File

#!/bin/bash
gen_workspaces()
{
i3-msg -t get_workspaces | tr ',' '\n' | grep "name" | sed 's/"name":"\(.*\)"/\1/g'
}
choosed_workspace=$(gen_workspaces | rofi -dmenu -i -p "Select workspace")
if [ -n "${choosed_workspace}" ]
then
i3-msg workspace "${choosed_workspace}"
fi