aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-02-17 09:04:36 -0300
committerEuAndreh <eu@euandre.org>2023-02-17 09:04:36 -0300
commitaec4f054285b469167c283e0c588647891b36c36 (patch)
tree952af9f614e8b81f26906a54ffcdc32957ab8f44
parentbin/wms: Fix ShellCheck offenses (diff)
downloaddotfiles-aec4f054285b469167c283e0c588647891b36c36.tar.gz
dotfiles-aec4f054285b469167c283e0c588647891b36c36.tar.xz
bin/menu: Show notification when emoji is copied to clipboard
-rwxr-xr-xbin/menu8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/menu b/bin/menu
index fde0b43..3fd3095 100755
--- a/bin/menu
+++ b/bin/menu
@@ -110,7 +110,13 @@ clip_list() {
case "$ACTION" in
emoji)
- DATA | show 'emoji' | awk '{print $(NF)}' | copy -n
+ CHOICE="$(DATA | show 'emoji')"
+ if [ -n "$CHOICE" ]; then
+ EMOJI="$(echo "$CHOICE" | awk '{print $(NF)}')"
+ echo "$EMOJI" | copy -n
+ notify-send -t 5000 -u normal -- \
+ "$EMOJI" 'emoji copied to clipboard'
+ fi
;;
username)
CHOICE="$(pass_list | show 'username')"