dotfiles/home/user/.local/bin/i3_switch_workspace.sh
2024-11-02 11:14:41 +03:00

13 lines
287 B
Bash
Executable File

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