From 53873256f4f7c27eed115fd2ed1edb68a4c03ee6 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Thu, 22 Aug 2024 21:48:11 -0600 Subject: [PATCH] emoji picker -> tofi --- wofi/wofi-emoji.sh => tofi/tofi-emoji.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename wofi/wofi-emoji.sh => tofi/tofi-emoji.sh (99%) diff --git a/wofi/wofi-emoji.sh b/tofi/tofi-emoji.sh similarity index 99% rename from wofi/wofi-emoji.sh rename to tofi/tofi-emoji.sh index 8487e6d..828fefb 100755 --- a/wofi/wofi-emoji.sh +++ b/tofi/tofi-emoji.sh @@ -2,7 +2,8 @@ # Modified from: https://github.com/dln/wofi-emoji -sed '1,/^### DATA ###$/d' $0 | wofi --show dmenu -i -c $HOME/.dotfiles/wofi/sidebar -s $HOME/.dotfiles/wofi/style.css | cut -d ' ' -f 1 | tr -d '\n' | wl-copy --primary +HEIGHT=$(swaymsg -t get_outputs | tr '\n' ' ' | sed -e 's/ */ /g' | sed -e 's/\(.*"focused": [a-z]*\),/\1\n/' | less | grep '"focused": true' | sed -e 's/.*"rect": {[^}]*"height": \([0-9]*\).*/\1/') +sed '1,/^### DATA ###$/d' $0 | ${HOME}/.local/bin/tofi --prompt-text "❓" --config $HOME/.dotfiles/tofi/sidebar.toml --height $HEIGHT --width 400 | cut -d ' ' -f 1 | tr -d '\n' | wl-copy --primary exit ### DATA ### 😀 grinning face face smile happy joy :D grin