toggle script & .local/bin support

This commit is contained in:
Cheri 2021-02-13 14:49:36 +02:00 committed by vibikim
parent 38e7cddb84
commit 79f275dfcd
6 changed files with 70 additions and 22 deletions

18
bin/dmenukaomoji Executable file
View file

@ -0,0 +1,18 @@
#!/bin/sh
# The famous "get a menu of kaomojis to copy" script.
# Must have xclip installed to even show menu.
xclip -h 2>/dev/null || exit 1
chosen=$(dmenu -i -l 20 < ~/.local/share/kaomoji | sed "s/ .*//")
[ "$chosen" != "" ] || exit
# If you run this command with an argument, it will automatically insert the character.
if [ -n "$1" ]; then
xdotool key Shift+Insert
else
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
notify-send "'$chosen' copied to clipboard." &
fi

9
bin/toggle Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
if [ -z "`pgrep -x $1`" ]; then
$@ &
notify-send $1 "is now enabled"
else
notify-send $1 "is now disabled"
pkill $1
fi