1 changed files with 39 additions and 21 deletions
@ -1,22 +1,40 @@ |
|||||||
#!/usr/bin/env bash |
#!/bin/bash |
||||||
# |
## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## |
||||||
while [[ true ]]; do |
# Clipboard Manager. This script uses cliphist, rofi, and wl-copy. |
||||||
result=$( |
|
||||||
cliphist list | rofi -dmenu \ |
# Actions: |
||||||
-kb-custom-1 "Control-Delete" \ |
# CTRL Del to delete an entry |
||||||
-config ~/.config/rofi/config-long.rasi |
# ALT Del to wipe clipboard contents |
||||||
) |
|
||||||
exit_state=$? |
while true; do |
||||||
if [[ $exit_state -eq 1 ]]; then |
result=$( |
||||||
exit |
rofi -dmenu \ |
||||||
fi |
-kb-custom-1 "Control-Delete" \ |
||||||
case "$exit_state" in |
-kb-custom-2 "Alt-Delete" \ |
||||||
0) |
-config ~/.config/rofi/config-clipboard.rasi < <(cliphist list) |
||||||
cliphist decode <<<$result | wl-copy |
) |
||||||
exit |
|
||||||
;; |
case "$?" in |
||||||
10) |
1) |
||||||
cliphist delete <<<$result |
exit |
||||||
;; |
;; |
||||||
esac |
0) |
||||||
|
case "$result" in |
||||||
|
"") |
||||||
|
continue |
||||||
|
;; |
||||||
|
*) |
||||||
|
cliphist decode <<<"$result" | wl-copy |
||||||
|
exit |
||||||
|
;; |
||||||
|
esac |
||||||
|
;; |
||||||
|
10) |
||||||
|
cliphist delete <<<"$result" |
||||||
|
;; |
||||||
|
11) |
||||||
|
cliphist wipe |
||||||
|
;; |
||||||
|
esac |
||||||
done |
done |
||||||
|
|
||||||
|
|||||||
Loading…
Reference in new issue