New backup 2024-04-10 17:15:03
This commit is contained in:
parent
7a15143039
commit
60e20e190a
2 changed files with 8 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
profiles=( "Personal" "Development" "School" "Work" )
|
||||
icons=( "~" "" "" "" )
|
||||
profiles=( "Personal" "Development" "School" "Work" "a" )
|
||||
icons=( "~" "" "" "" "a" )
|
||||
|
||||
#echo ${profiles[@]/School//} | cut -d/ -f1 | wc -w | tr -d ' '
|
||||
profilem=$((${#profiles[@]}-1))
|
||||
|
@ -36,6 +36,7 @@ case $1 in
|
|||
;;
|
||||
esac
|
||||
|
||||
[[ "$op" -gt "$profilem" ]] && exit
|
||||
[[ $op -eq "0" ]] && p_num="" || p_num="$op"
|
||||
p_icon="${icons[$op]}"
|
||||
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
active_wsname=$(swaymsg -t get_workspaces | jq '.[] | select(.focused==true) | .name')
|
||||
ws_prefix=$(echo $active_wsname | tr -d '"' | grep -o "[1-9]*:[^a-zA-Z1-9]")
|
||||
new_wsname="${ws_prefix}$(wofi -i --dmenu --height 1)"
|
||||
wsname=$(echo "${active_wsname}" | sed 's/'"${ws_prefix}"'//'| tr -d '"')
|
||||
|
||||
echo $wsname
|
||||
|
||||
new_wsname="${ws_prefix}$(wofi -i --dmenu --height 1 --search ${wsname})"
|
||||
|
||||
swaymsg 'rename workspace "'"${active_wsname}"'" to "'"${new_wsname}"'"'
|
||||
|
|
Loading…
Add table
Reference in a new issue