Made choice for virtual keyboard configurable through the $KEYBOARD environment variable.

This implements what was suggested in the discussion regarding the svkbd
patch, it makes the choice of virtual keyboard configurable using the
$KEYBOARD variable, rather than hard-coding it.
master
Maarten van Gompel 4 years ago committed by Miles Alan
parent 293bf69871
commit ace9960926
  1. 4
      scripts/appscripts/sxmo_reddit.sh
  2. 4
      scripts/appscripts/sxmo_timer.sh
  3. 4
      scripts/appscripts/sxmo_websearch.sh
  4. 4
      scripts/appscripts/sxmo_youtube.sh
  5. 4
      scripts/core/sxmo_dmenu_with_kb.sh
  6. 4
      scripts/core/sxmo_lisgdstart.sh
  7. 4
      scripts/core/sxmo_pipecomplete.sh
  8. 4
      scripts/core/sxmo_surf_linkselect.sh
  9. 1
      scripts/core/sxmo_xinit.sh

@ -2,12 +2,12 @@
[ -z "$SXMO_SUBREDDITS" ] && SXMO_SUBREDDITS="pine64official pinephoneofficial unixporn postmarketos linux"
menu() {
pidof svkbd-sxmo || svkbd-sxmo &
pidof "$KEYBOARD" || "$KEYBOARD" &
SUBREDDIT="$(
printf %b "Close Menu\n$(echo "$SXMO_SUBREDDITS" | tr " " '\n')" |
dmenu -p "Subreddit:" -c -l 10 -fn Terminus-20
)"
pkill svkbd-sxmo
pkill "$KEYBOARD"
[ "Close Menu" = "$SUBREDDIT" ] && exit 0
REDDITRESULTS="$(

@ -24,7 +24,7 @@ timerrun() {
}
menu() {
pidof svkbd-sxmo || svkbd-sxmo &
pidof "$KEYBOARD" || "$KEYBOARD" &
TIMEINPUT="$(
echo "
1h
@ -42,7 +42,7 @@ menu() {
Close Menu
" | awk 'NF' | awk '{$1=$1};1' | dmenu -p Timer -c -fn "Terminus-30" -l 20
)"
pkill svkbd-sxmo
pkill "$KEYBOARD"
[ "Close Menu" = "$TIMEINPUT" ] && exit 0
st -f Monospace-50 -e "$0" timerrun "$TIMEINPUT"
}

@ -1,9 +1,9 @@
#!/usr/bin/env sh
pidof svkbd-sxmo || svkbd-sxmo &
pidof "$KEYBOARD" || "$KEYBOARD" &
SEARCHQUERY="$(
echo "Close Menu" | dmenu -t -p "Search Query:" -c -fn "Terminus-20" -l 20
)"
pkill svkbd-sxmo
pkill "$KEYBOARD"
[ "Close Menu" = "$SEARCHQUERY" ] && exit 0
echo "$SEARCHQUERY" | grep . || exit 0

@ -1,11 +1,11 @@
#!/usr/bin/env sh
menu() {
pidof svkbd-sxmo || svkbd-sxmo &
pidof "$KEYBOARD" || "$KEYBOARD" &
SEARCHTERMS="$(
echo "Close Menu" |
dmenu -p "Yt Search" -c -l 10 -fn Terminus-20
)"
pkill svkbd-sxmo
pkill "$KEYBOARD"
[ "Close Menu" = "$SEARCHTERMS" ] && exit 0
IDIOTRESULTS="$(youtube-cli "$SEARCHTERMS")"

@ -1,6 +1,6 @@
#!/usr/bin/env sh
pidof svkbd-sxmo >&2 || svkbd-sxmo &
pidof "$KEYBOARD" >&2 || "$KEYBOARD" &
OUTPUT="$(cat | dmenu "$@")"
pkill svkbd-sxmo >&2
pkill "$KEYBOARD" >&2
echo "$OUTPUT"

@ -10,6 +10,6 @@ lisgd "$@" \
-g '1,ULDR,sxmo_lisgdonefingercheck.sh sxmo_brightness.sh down' \
-g '2,LR,xdotool key --clearmodifiers Alt+e' \
-g '2,RL,xdotool key --clearmodifiers Alt+r' \
-g '2,DU,pidof svkbd-sxmo || svkbd-sxmo &' \
-g '2,UD,pkill -9 svkbd-sxmo' \
-g "2,DU,pidof $KEYBOARD || $KEYBOARD &" \
-g "2,UD,pkill -9 $KEYBOARD" \
&

@ -3,14 +3,14 @@ INPUT="$(cat)"
STWIN="$(xprop -root | sed -n '/^_NET_ACTIVE_WINDOW/ s/.* //p')"
menu() {
pidof svkbd-sxmo || svkbd-sxmo &
pidof "$KEYBOARD" || "$KEYBOARD" &
RESULT="$(
printf %b "$(
echo "Close Menu";
echo "$INPUT" | grep -Eo '\S+' | tr -d '[:blank:]' | sort | uniq
)" | dmenu -p "$PROMPT" -l 10 -i -c -fn Terminus-20
)"
pkill svkbd-sxmo
pkill "$KEYBOARD"
}
copy() {

@ -73,7 +73,7 @@ link_select() {
link_normalize "$(xprop -id "$SURF_WINDOW" _SURF_URI | cut -d '"' -f 2)"
}
pidof svkbd-sxmo || svkbd-sxmo &
pidof "$KEYBOARD" || "$KEYBOARD" &
VAL="$(link_select)"
pkill svkbd-sxmo
pkill "$KEYBOARD"
echo "$VAL"

@ -6,6 +6,7 @@ envvars() {
command -v "$TERM" || export TERM=st
command -v "$BROWSER" || export BROWSER=surf
command -v "$EDITOR" || export EDITOR=vis
command -v "$KEYBOARD" || export KEYBOARD=svkbd-sxmo
[ -z "$MOZ_USE_XINPUT2" ] && export MOZ_USE_XINPUT2=1
[ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME=~/.config
[ -z "$XDG_CACHE_HOME" ] && export XDG_CACHE_HOME=~/.cache

Loading…
Cancel
Save