1 changed files with 22 additions and 9 deletions
@ -1,9 +1,22 @@ |
|||||||
#!/bin/bash |
#!/usr/bin/env bash |
||||||
## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## |
# |
||||||
# Clipboard Manager. This needed cliphist & wl-copy and of course rofi |
while [[ true ]]; do |
||||||
|
result=$( |
||||||
if [[ ! $(pidof rofi) ]]; then |
cliphist list | rofi -dmenu \ |
||||||
cliphist list | rofi -dmenu -config ~/.config/rofi/config-long.rasi | cliphist decode | wl-copy |
-kb-custom-1 "Control-Delete" \ |
||||||
else |
-config ~/.config/rofi/config-long.rasi |
||||||
pkill rofi |
) |
||||||
fi |
exit_state=$? |
||||||
|
if [[ $exit_state -eq 1 ]]; then |
||||||
|
exit |
||||||
|
fi |
||||||
|
case "$exit_state" in |
||||||
|
0) |
||||||
|
cliphist decode <<<$result | wl-copy |
||||||
|
exit |
||||||
|
;; |
||||||
|
10) |
||||||
|
cliphist delete <<<$result |
||||||
|
;; |
||||||
|
esac |
||||||
|
done |
||||||
|
|||||||
Loading…
Reference in new issue