dotfiles/de/home/.config/sway/scripts/shortcuts.sh
2024-04-09 00:30:57 -06:00

13 lines
394 B
Bash
Executable file

#!/bin/bash
current_ws=$(swaymsg -t get_workspaces | jq '.[] | select(.focused==true)|.name')
current_ws="${current_ws//[[:digit:]\"]/}"
if [[ -z "${current_ws}" ]];then current_ws="Personal";fi
options=$( ls "$HOME/.config/sway/scripts/shortcuts/${current_ws}" )
op=$( echo -e "${options}" | wofi -i --dmenu | awk '{print}' )
"$HOME/.config/sway/scripts/shortcuts/${current_ws}"/"${op}"