update from git repo
This commit is contained in:
parent
a0634dc067
commit
4135c67184
1 changed files with 8 additions and 3 deletions
|
@ -3,14 +3,19 @@
|
||||||
# The famous "get a menu of kaomojis to copy" script.
|
# The famous "get a menu of kaomojis to copy" script.
|
||||||
|
|
||||||
# Must have xclip installed to even show menu.
|
# Must have xclip installed to even show menu.
|
||||||
xclip -h 2>/dev/null || exit 1
|
#xclip -h 2>/dev/null || exit 1
|
||||||
|
# If this errors, the user wont be able to know why that is happening as there'll be no error message, why not just let it error normally when trynna run?
|
||||||
|
|
||||||
chosen=$(dmenu -i -l 20 < ~/.local/share/kaomoji | sed "s/ .*//")
|
chosen=$(dmenu -i -l 20 < ~/.local/share/kaomoji | sed "s/ .*//")
|
||||||
|
|
||||||
[ "$chosen" != "" ] || exit
|
#[ "$chosen" != "" ] || exit
|
||||||
|
# The != is a little redundant, just placing the variable itself will check if its non-empty.
|
||||||
|
[ "$chosen" ] || exit
|
||||||
|
|
||||||
# If you run this command with an argument, it will automatically insert the character.
|
# If you run this command with an argument, it will automatically insert the character.
|
||||||
if [ -n "$1" ]; then
|
#if [ -n "$1" ]; then
|
||||||
|
# Same as above, -n and -z arent all that usefull...
|
||||||
|
if [ "$1" ]; then
|
||||||
xdotool key Shift+Insert
|
xdotool key Shift+Insert
|
||||||
else
|
else
|
||||||
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
|
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
|
||||||
|
|
Loading…
Reference in a new issue