Browse Source

Update ClipManager.sh

pull/130/head
Ja.KooLit 2 years ago committed by GitHub
parent
commit
82baf3e31d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 60
      config/hypr/scripts/ClipManager.sh

60
config/hypr/scripts/ClipManager.sh

@ -1,22 +1,40 @@
#!/usr/bin/env bash
#
while [[ true ]]; do
result=$(
cliphist list | rofi -dmenu \
-kb-custom-1 "Control-Delete" \
-config ~/.config/rofi/config-long.rasi
)
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
#!/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 -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

Loading…
Cancel
Save