New backup 2024-04-11 20:45:03

This commit is contained in:
Penelope Gwen 2024-04-11 20:45:03 -06:00
parent 146967f8db
commit c55122e9fc
2 changed files with 12 additions and 9 deletions

View file

@ -26,7 +26,7 @@
# Clipboard # Clipboard
# bindsym $mod+shift+v exec clipman pick --tool="wofi" --max-items=30 # bindsym $mod+shift+v exec clipman pick --tool="wofi" --max-items=30
bindsym $mod+Shift+v exec copyq toggle bindsym $mod+Shift+v exec $HOME/.config/sway/scripts/clipboard
# Shortcuts # Shortcuts
bindsym $mod+shift+o exec $HOME/.config/sway/scripts/shortcuts.sh bindsym $mod+shift+o exec $HOME/.config/sway/scripts/shortcuts.sh

View file

@ -1,17 +1,20 @@
#!/bin/bash #!/bin/bash
#cb_count=$(copyq count) cb_count=$(copyq count)
cb_count=2 cb_count=10
wofilist="" wofilist=""
for i in $(seq $cb_count);do for i in $(seq $cb_count);do
o="$((${i}-1))" cb_line="$( copyq read $((${i}-1)) | tr '\n' ' ' )"
cb_item="$( copyq read ${o} )"
echo "${cb_item}"
cb_line="$( echo ${cb_item} | tr '\n' ' ' )"
echo "${cb_line}" echo "${cb_line}"
wofilist="${wofilist}\n${i}. ${cb_line}" if [[ "${cb_line}" == "" ]];then
cb_line=$( copyq read ? "$((${i}-1))" | head -n 1 )
fi
wofilist="${wofilist}${setnl}${i}. ${cb_line}"
setnl="\n"
done done
echo -e "${wofilist}" | wofi -i --dmenu selected=$( echo -e "${wofilist}" | wofi -i --dmenu -k /dev/null | cut -d. -f1)
copyq select "$(( ${selected}-1)) "