agsdotfilesdotshyprlandhyprland-configricerofirofi-configshell-scriptsswwwwallustwaybarwaybar-modulewaybar-themes
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
907 B
40 lines
907 B
#!/bin/bash |
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## |
|
# Clipboard Manager. This script uses cliphist, rofi, and wl-copy. |
|
|
|
# Actions: |
|
# CTRL Del to delete an entry |
|
# ALT Del to wipe clipboard contents |
|
|
|
while true; do |
|
result=$( |
|
rofi -i -dmenu \ |
|
-kb-custom-1 "Control-Delete" \ |
|
-kb-custom-2 "Alt-Delete" \ |
|
-config ~/.config/rofi/config-clipboard.rasi < <(cliphist list) |
|
) |
|
|
|
case "$?" in |
|
1) |
|
exit |
|
;; |
|
0) |
|
case "$result" in |
|
"") |
|
continue |
|
;; |
|
*) |
|
cliphist decode <<<"$result" | wl-copy |
|
exit |
|
;; |
|
esac |
|
;; |
|
10) |
|
cliphist delete <<<"$result" |
|
;; |
|
11) |
|
cliphist wipe |
|
;; |
|
esac |
|
done |
|
|
|
|