| 1 | |
| 2 | # clipboard.sh [wipe] — pick an entry from clipboard history (cliphist) |
| 3 | source "$(dirname "$0")/_lib.sh" |
| 4 | has cliphist || { notify clip dialog-error "Clipboard" "cliphist not installed"; exit 1; } |
| 5 | |
| 6 | if [[ $1 == wipe ]]; then |
| 7 | cliphist wipe && notify clip edit-clear "Clipboard history cleared" |
| 8 | exit |
| 9 | fi |
| 10 | |
| 11 | cliphist list | menu "Clipboard" --width 700 --height 450 | cliphist decode | wl-copy |