Cleanup calling - mostly working; misc cleanup scripts; add vibrate program
This commit is contained in:
parent
fd286101d8
commit
22d974f22f
17 changed files with 366 additions and 176 deletions
39
scripts/core/sxmo_pipecomplete.sh
Executable file
39
scripts/core/sxmo_pipecomplete.sh
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/env sh
|
||||
INPUT="$(cat)"
|
||||
|
||||
pidof svkbd-sxmo || svkbd-sxmo &
|
||||
|
||||
capfirstchar() {
|
||||
awk -F -vOFS= {$1=toupper($1);print $0}
|
||||
}
|
||||
|
||||
RESULT="$(
|
||||
echo "$(
|
||||
echo "Close Menu" &&
|
||||
echo "$INPUT" |\
|
||||
grep -Eo '\S+' |\
|
||||
tr -d '[:blank:]' |\
|
||||
sort |\
|
||||
uniq
|
||||
)" | dmenu -p $(echo $1 | capfirstchar) -l 10 -i -c -fn Terminus-20
|
||||
)"
|
||||
|
||||
pkill svkbd-sxmo
|
||||
|
||||
copy() {
|
||||
if [[ "$RESULT" = "Close Menu" ]]; then
|
||||
exit 0
|
||||
else
|
||||
echo "$RESULT" | xsel -i
|
||||
fi
|
||||
}
|
||||
|
||||
type() {
|
||||
if [[ "$RESULT" = "Close Menu" ]]; then
|
||||
exit 0
|
||||
else
|
||||
xdotool type "$RESULT"
|
||||
fi
|
||||
}
|
||||
|
||||
$@
|
Loading…
Add table
Add a link
Reference in a new issue