dotfiles/de/home/.config/sway/scripts/shortcuts.sh
2024-03-27 15:15:01 -06:00

15 lines
419 B
Bash
Executable file

#!/bin/bash
current_ws=$(swaymsg -t get_workspaces | jq '.[] | select(.focused==true)|.name')
current_ws="${current_ws//[[:digit:]\"]/}"
#echo "'${current_ws}'"
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}"