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.
This commit is contained in:
parent
293bf69871
commit
ace9960926
9 changed files with 21 additions and 20 deletions
|
@ -2,20 +2,20 @@
|
|||
[ -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="$(
|
||||
reddit-cli "$SUBREDDIT" |
|
||||
grep -E '^((created_utc|ups|title|url):|===)' |
|
||||
sed -E 's/^(created_utc|ups|title|url):\s+/\t/g' |
|
||||
tr -d '\n' |
|
||||
sed 's/===/\n/g' |
|
||||
tr -d '\n' |
|
||||
sed 's/===/\n/g' |
|
||||
sed 's/^\t//g' |
|
||||
sort -t"$(printf '%b' '\t')" -rnk4 |
|
||||
awk -F'\t' '{ printf "↑%4s", $3; print " " $4 " " $1 " " $2 }'
|
||||
|
@ -23,7 +23,7 @@ menu() {
|
|||
|
||||
while true; do
|
||||
RESULT="$(
|
||||
printf %b "Close Menu\n$REDDITRESULTS" |
|
||||
printf %b "Close Menu\n$REDDITRESULTS" |
|
||||
dmenu -c -l 10 -fn Terminus-20
|
||||
)"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue