adding emoji script

This commit is contained in:
2024-08-23 11:21:55 -07:00
parent c19dbb03d1
commit 68c8455073
2 changed files with 22 additions and 1 deletions

View File

@@ -165,13 +165,16 @@ bindsym $mod+Mod1+g exec grimshot save output
bindsym $mod+Ctrl+g exec grimshot save window bindsym $mod+Ctrl+g exec grimshot save window
# Turn the system off # Turn the system off
bindsym $mod+Shift+e exec wlogout -p layer-shell #bindsym $mod+Shift+e exec wlogout -p layer-shell
# Bookmarks # Bookmarks
bindsym $mod+Insert exec wtype $(grep -v '^#' ~/.local/share/bookmarks/bookmarks | bemenu -p Bookmark: -l 50 -c -M 500 --fn 'Terminus 16' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00' | cut -d ' ' -f1) bindsym $mod+Insert exec wtype $(grep -v '^#' ~/.local/share/bookmarks/bookmarks | bemenu -p Bookmark: -l 50 -c -M 500 --fn 'Terminus 16' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00' | cut -d ' ' -f1)
bindsym $mod+Shift+Insert exec ~/.local/bin/bookmark_insert bindsym $mod+Shift+Insert exec ~/.local/bin/bookmark_insert
# Emojis
bindsym $mod+Shift+e exec wtype $(awk '{print $1, $0}' ~/.local/share/chars/emojis* | bemenu -p Emoji: -l 25 -c -M 500 --fn 'Noto Color Emoji,Terminus 16' --tf '#ff4e00' --ff '#dbc077' --hf '#ff4e00' | awk '{print $1}')
####################### #######################
# EXECS # EXECS

18
.local/bin/emoji_insert Normal file
View File

@@ -0,0 +1,18 @@
#!/bin/sh
# Check dependencies
for cmd in bemenu wl-copy notify-send; do
command -v $cmd >/dev/null 2>&1 || { echo "$cmd is required but not installed. Aborting."; exit 1; }
done
# Get user selection via bemenu from emoji file.
chosen=$(awk '{print $1, $0}' ~/.local/share/chars/emojis* | bemenu -i -l 30 | awk '{print $1}')
# Exit if none chosen.
[ -z "$chosen" ] && exit
# Copy selected emoji to clipboard.
echo -n "$chosen" | wl-copy
# Send notification that the emoji has been copied.
notify-send "'$chosen' copied to clipboard."