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