aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/ClipManager.sh
diff options
context:
space:
mode:
authorJa.KooLit <ejhay.games@gmail.com>2024-01-17 05:39:46 +0900
committerGitHub <noreply@github.com>2024-01-17 05:39:46 +0900
commit82baf3e31dce375f32678117df1522f4cf9756fc (patch)
tree84bd2aa99e7cc4011f2723537baf26c7711e4661 /config/hypr/scripts/ClipManager.sh
parent5c56957b8728d6b5fc513b331d8f1fb7f06f8688 (diff)
Update ClipManager.sh
Diffstat (limited to 'config/hypr/scripts/ClipManager.sh')
-rwxr-xr-xconfig/hypr/scripts/ClipManager.sh60
1 files changed, 39 insertions, 21 deletions
diff --git a/config/hypr/scripts/ClipManager.sh b/config/hypr/scripts/ClipManager.sh
index aebf87ef..682174fc 100755
--- a/config/hypr/scripts/ClipManager.sh
+++ b/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
+
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage