Removed explicit font from most dmenu calls, dmenu font is read from Xresources now and kept as uniform as possible

master
Maarten van Gompel 4 years ago
parent 9d1527218a
commit 24905884ee
  1. 3
      configs/appcfg/xresources_dmenu.xr
  2. 2
      scripts/appscripts/sxmo_files.sh
  3. 6
      scripts/appscripts/sxmo_record.sh
  4. 2
      scripts/appscripts/sxmo_reddit.sh
  5. 2
      scripts/appscripts/sxmo_rss.sh
  6. 2
      scripts/appscripts/sxmo_timer.sh
  7. 2
      scripts/appscripts/sxmo_weather.sh
  8. 2
      scripts/appscripts/sxmo_websearch.sh
  9. 4
      scripts/appscripts/sxmo_youtube.sh
  10. 2
      scripts/core/sxmo_appmenu.sh
  11. 6
      scripts/core/sxmo_gpsutil.sh
  12. 12
      scripts/core/sxmo_networks.sh
  13. 2
      scripts/core/sxmo_pipecomplete.sh
  14. 2
      scripts/core/sxmo_timezonechange.sh
  15. 1
      scripts/core/sxmo_xinit.sh
  16. 4
      scripts/modem/sxmo_modemcall.sh
  17. 4
      scripts/modem/sxmo_modemdial.sh
  18. 2
      scripts/modem/sxmo_modeminfo.sh
  19. 10
      scripts/modem/sxmo_modemtext.sh
  20. 2
      scripts/notifications/sxmo_notificationsmenu.sh

@ -0,0 +1,3 @@
dmenu.font: Terminus-30

@ -14,7 +14,7 @@ while true; do
PICKED="$( PICKED="$(
echo "$CHOICES" | echo "$CHOICES" |
dmenu -fn Terminus-18 -c -p "$DIR" -l 20 -i dmenu -c -p "$DIR" -l 20 -i
)" )"
echo "$PICKED" | grep "Close Menu" && exit 0 echo "$PICKED" | grep "Close Menu" && exit 0

@ -38,13 +38,13 @@ recordconfirm() {
Delete Recording Delete Recording
" | " |
xargs -0 echo | sed '/^[[:space:]]*$/d' | awk '{$1=$1};1' | xargs -0 echo | sed '/^[[:space:]]*$/d' | awk '{$1=$1};1' |
dmenu -p "$DUR" -fn Terminus-18 -c -l 10 dmenu -p "$DUR" -c -l 10
)" )"
if echo "$PICK" | grep "Playback"; then if echo "$PICK" | grep "Playback"; then
st -e mpv -ao=alsa -v "$FILE" st -e mpv -ao=alsa -v "$FILE"
elif echo "$PICK" | grep "Delete Recording"; then elif echo "$PICK" | grep "Delete Recording"; then
rm "$FILE" rm "$FILE"
echo "File deleted." | dmenu -fn Terminus-18 -c -l 10 echo "File deleted." | dmenu -c -l 10
return return
else else
return return
@ -67,7 +67,7 @@ recordmenu() {
xargs -0 echo | xargs -0 echo |
sed '/^[[:space:]]*$/d' | sed '/^[[:space:]]*$/d' |
awk '{$1=$1};1' | awk '{$1=$1};1' |
dmenu -fn Terminus-30 -c -p "Record" -l 20 dmenu -c -p "Record" -l 20
)" )"
if [ "$OPTION" = "Line Jack" ]; then if [ "$OPTION" = "Line Jack" ]; then

@ -5,7 +5,7 @@ menu() {
pidof "$KEYBOARD" || "$KEYBOARD" & pidof "$KEYBOARD" || "$KEYBOARD" &
SUBREDDIT="$( SUBREDDIT="$(
printf %b "Close Menu\n$(echo "$SXMO_SUBREDDITS" | tr " " '\n')" | printf %b "Close Menu\n$(echo "$SXMO_SUBREDDITS" | tr " " '\n')" |
dmenu -p "Subreddit:" -c -l 10 -fn Terminus-20 dmenu -p "Subreddit:" -c -l 10
)" )"
pkill "$KEYBOARD" pkill "$KEYBOARD"
[ "Close Menu" = "$SUBREDDIT" ] && exit 0 [ "Close Menu" = "$SUBREDDIT" ] && exit 0

@ -61,7 +61,7 @@ rsstimespanmenu() {
echo "$CHOICES" | echo "$CHOICES" |
sed '/^[[:space:]]*$/d' | sed '/^[[:space:]]*$/d' |
awk '{$1=$1};1' | awk '{$1=$1};1' |
dmenu -p "RSS Timespan" -c -l 10 -fn Terminus-20 dmenu -p "RSS Timespan" -c -l 10
)" )"
if echo "$CHOICE" | grep "Fetch"; then if echo "$CHOICE" | grep "Fetch"; then

@ -40,7 +40,7 @@ menu() {
1m 1m
30s 30s
Close Menu Close Menu
" | awk 'NF' | awk '{$1=$1};1' | dmenu -p Timer -c -fn "Terminus-30" -l 20 " | awk 'NF' | awk '{$1=$1};1' | dmenu -p Timer -c -l 20
)" )"
pkill "$KEYBOARD" pkill "$KEYBOARD"
[ "Close Menu" = "$TIMEINPUT" ] && exit 0 [ "Close Menu" = "$TIMEINPUT" ] && exit 0

@ -130,7 +130,7 @@ weathermenu() {
)" | )" |
grep -vE '^#' | grep -vE '^#' |
sed "s/\t/: /g" | sed "s/\t/: /g" |
sxmo_dmenu_with_kb.sh -i -c -l 10 -fn Terminus-18 -p "Locations" sxmo_dmenu_with_kb.sh -i -c -l 10 -p "Locations"
)" )"
if [ "$CHOICE" = "Close Menu" ]; then if [ "$CHOICE" = "Close Menu" ]; then
exit 0 exit 0

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

@ -31,7 +31,7 @@ searchmenu() {
xargs -0 echo | xargs -0 echo |
sed '/^[[:space:]]*$/d' | sed '/^[[:space:]]*$/d' |
awk '{$1=$1};1' | awk '{$1=$1};1' |
sxmo_dmenu_with_kb.sh -p "Yt Search" -c -l 10 -fn Terminus-20 sxmo_dmenu_with_kb.sh -p "Yt Search" -c -l 10
)" )"
if [ "Close Menu" = "$ENTRY" ]; then if [ "Close Menu" = "$ENTRY" ]; then
@ -59,7 +59,7 @@ resultsmenu() {
xargs -0 echo | xargs -0 echo |
sed '/^[[:space:]]*$/d' | sed '/^[[:space:]]*$/d' |
awk '{$1=$1};1' | awk '{$1=$1};1' |
dmenu -c -l 10 -p "Yt Results" -fn Terminus-20 dmenu -c -l 10 -p "Results" -fn Terminus-20
)" )"
if [ "Change Search" = "$PICKED" ]; then if [ "Change Search" = "$PICKED" ]; then

@ -440,7 +440,7 @@ mainloop() {
getprogchoices "$ARGS" getprogchoices "$ARGS"
echo "$PROGCHOICES" | echo "$PROGCHOICES" |
cut -d'^' -f1 | cut -d'^' -f1 |
dmenu -idx "$DMENUIDX" -l 16 -c -fn "Terminus-30" -p "$WINNAME" | ( dmenu -idx "$DMENUIDX" -l 16 -c -p "$WINNAME" | (
PICKED="$(cat)" PICKED="$(cat)"
echo "$PICKED" | grep . || quit echo "$PICKED" | grep . || quit
LOOP="$(echo "$PROGCHOICES" | grep -m1 -F "$PICKED" | cut -d '^' -f2)" LOOP="$(echo "$PROGCHOICES" | grep -m1 -F "$PICKED" | cut -d '^' -f2)"

@ -166,7 +166,7 @@ menuregionsearch() {
printf %b "$POIS" | printf %b "$POIS" |
sed '/^[[:space:]]*$/d' | sed '/^[[:space:]]*$/d' |
awk '{$1=$1};1' | awk '{$1=$1};1' |
sxmo_dmenu_with_kb.sh -i -c -l 10 -fn Terminus-18 -p Search sxmo_dmenu_with_kb.sh -i -c -l 10 -p Search
)" )"
if [ "$QUERY" = "Close Menu" ]; then if [ "$QUERY" = "Close Menu" ]; then
@ -192,7 +192,7 @@ menulocations() {
)" | )" |
grep -vE '^#' | grep -vE '^#' |
sed "s/\t/: /g" | sed "s/\t/: /g" |
sxmo_dmenu_with_kb.sh -i -c -l 10 -fn Terminus-18 -p "Locations" sxmo_dmenu_with_kb.sh -i -c -l 10 -p "Locations"
)" )"
ZOOM=14 ZOOM=14
if [ "$CHOICE" = "Close Menu" ]; then if [ "$CHOICE" = "Close Menu" ]; then
@ -218,7 +218,7 @@ menumaptype() {
CHOICE="$( CHOICE="$(
echo "$CHOICES" | echo "$CHOICES" |
awk -F^ '{ print $1 }' | awk -F^ '{ print $1 }' |
dmenu -idx "$IDX" -c -l 10 -fn Terminus-18 -p "Map Type" | dmenu -idx "$IDX" -c -l 10 -p "Map Type" |
awk '{$1=$1};1' awk '{$1=$1};1'
)" )"
echo "$CHOICE" | grep "Close Menu" && exit 0 echo "$CHOICE" | grep "Close Menu" && exit 0

@ -20,7 +20,7 @@ toggleconnection() {
deletenetworkmenu() { deletenetworkmenu() {
CHOICE="$( CHOICE="$(
printf %b "Close Menu\n$(connections)" | printf %b "Close Menu\n$(connections)" |
dmenu -c -p "Delete Network" -l 14 -fn "Terminus-20" dmenu -c -p "Delete Network" -l 14
)" )"
if [ "$CHOICE" = "Close Menu" ]; then if [ "$CHOICE" = "Close Menu" ]; then
return return
@ -34,13 +34,13 @@ deletenetworkmenu() {
addnetworkgsmmenu() { addnetworkgsmmenu() {
CONNNAME="$( CONNNAME="$(
echo "Close Menu" | echo "Close Menu" |
sxmo_dmenu_with_kb.sh -c -p "Add GSM: Alias" -fn "Terminus-20" -l 20 sxmo_dmenu_with_kb.sh -c -p "Add GSM: Alias" -l 20
)" )"
[ "$CONNNAME" = "Close Menu" ] && return [ "$CONNNAME" = "Close Menu" ] && return
APN="$( APN="$(
echo "Close Menu" | echo "Close Menu" |
sxmo_dmenu_with_kb.sh -c -p "Add GSM: APN" -fn "Terminus-20" -l 20 sxmo_dmenu_with_kb.sh -c -p "Add GSM: APN" -l 20
)" )"
[ "$APN" = "Close Menu" ] && return [ "$APN" = "Close Menu" ] && return
@ -56,13 +56,13 @@ addnetworkwpamenu() {
SSID="$( SSID="$(
nmcli d wifi list | tail -n +2 | grep -v '^\*' | awk -F' ' '{ print $6 }' | grep -v '\-\-' | nmcli d wifi list | tail -n +2 | grep -v '^\*' | awk -F' ' '{ print $6 }' | grep -v '\-\-' |
xargs -0 printf 'Close Menu\n%s' | xargs -0 printf 'Close Menu\n%s' |
sxmo_dmenu_with_kb.sh -c -p "Add WPA: SSID" -fn "Terminus-20" -l 20 sxmo_dmenu_with_kb.sh -c -p "Add WPA: SSID" -l 20
)" )"
[ "$SSID" = "Close Menu" ] && return [ "$SSID" = "Close Menu" ] && return
PASSPHRASE="$( PASSPHRASE="$(
echo "Close Menu" | echo "Close Menu" |
sxmo_dmenu_with_kb.sh -c -p "Add WPA: Passpharse" -fn "Terminus-20" -l 20 sxmo_dmenu_with_kb.sh -c -p "Add WPA: Passphrase" -l 20
)" )"
[ "$PASSPHRASE" = "Close Menu" ] && return [ "$PASSPHRASE" = "Close Menu" ] && return
@ -89,7 +89,7 @@ networksmenu() {
Scan Wifi Networks Scan Wifi Networks
Close Menu Close Menu
" | " |
awk '{$1=$1};1' | grep '\w' | dmenu -c -p 'Networks' -l 14 -fn 'Terminus-20' awk '{$1=$1};1' | grep '\w' | dmenu -c -p 'Networks' -l 14
)" )"
if [ "$CHOICE" = "Close Menu" ]; then if [ "$CHOICE" = "Close Menu" ]; then
exit exit

@ -8,7 +8,7 @@ menu() {
printf %b "$( printf %b "$(
echo "Close Menu"; echo "Close Menu";
echo "$INPUT" | grep -Eo '\S+' | tr -d '[:blank:]' | sort | uniq echo "$INPUT" | grep -Eo '\S+' | tr -d '[:blank:]' | sort | uniq
)" | dmenu -p "$PROMPT" -l 10 -i -c -fn Terminus-20 )" | dmenu -p "$PROMPT" -l 10 -i -c
)" )"
pkill "$KEYBOARD" pkill "$KEYBOARD"
} }

@ -13,7 +13,7 @@ menu() {
find /usr/share/zoneinfo -type f | find /usr/share/zoneinfo -type f |
sed 's#^/usr/share/zoneinfo/##g' | sed 's#^/usr/share/zoneinfo/##g' |
sort | sort |
sxmo_dmenu_with_kb.sh -p Timezone -c -l 10 -fn Terminus-20 -i sxmo_dmenu_with_kb.sh -p Timezone -c -l 10 -i
)" )"
st -e "$0" change "$T" st -e "$0" change "$T"
} }

@ -35,6 +35,7 @@ xdefaults() {
xsetroot -mod 29 29 -fg '#0b3a4c' -bg '#082430' xsetroot -mod 29 29 -fg '#0b3a4c' -bg '#082430'
xset s off -dpms xset s off -dpms
xrdb /usr/share/sxmo/appcfg/xresources_xcalc.xr xrdb /usr/share/sxmo/appcfg/xresources_xcalc.xr
xrdb /usr/share/sxmo/appcfg/xresources_dmenu.xr
synclient TapButton1=1 TapButton2=3 TapButton3=2 MinSpeed=0.25 synclient TapButton1=1 TapButton2=3 TapButton3=2 MinSpeed=0.25
} }

@ -192,7 +192,7 @@ incallmenuloop() {
cut -d'^' -f1 | cut -d'^' -f1 |
sed '/^[[:space:]]*$/d' | sed '/^[[:space:]]*$/d' |
awk '{$1=$1};1' | #this cryptic statement trims leading/trailing whitespace from a string awk '{$1=$1};1' | #this cryptic statement trims leading/trailing whitespace from a string
dmenu -idx $DMENUIDX -l 14 "$([ "$WINDOWIFIED" = 0 ] && echo "-c" || echo "-wm")" -fn "Terminus-30" -p "$NUMBER" | dmenu -idx $DMENUIDX -l 14 "$([ "$WINDOWIFIED" = 0 ] && echo "-c" || echo "-wm")" -p "$NUMBER" |
( (
PICKED="$(cat)"; PICKED="$(cat)";
echo "sxmo_modemcall: Picked is $PICKED">&2 echo "sxmo_modemcall: Picked is $PICKED">&2
@ -213,7 +213,7 @@ dtmfmenu() {
while true; do while true; do
PICKED="$( PICKED="$(
echo "$NUMS" | grep -o . | sed '1 iReturn to Call Menu' | echo "$NUMS" | grep -o . | sed '1 iReturn to Call Menu' |
dmenu "$([ "$WINDOWIFIED" = 0 ] && echo "-c" || echo "-wm")" -l 20 -fn Terminus-20 -c -idx $DTMFINDEX -p "DTMF Tone" dmenu "$([ "$WINDOWIFIED" = 0 ] && echo "-c" || echo "-wm")" -l 20 -c -idx $DTMFINDEX -p "DTMF Tone"
)" )"
echo "$PICKED" | grep "Return to Call Menu" && return echo "$PICKED" | grep "Return to Call Menu" && return
DTMFINDEX=$(echo "$NUMS" | grep -bo "$PICKED" | cut -d: -f1 | xargs -IN echo 2+N | bc) DTMFINDEX=$(echo "$NUMS" | grep -bo "$PICKED" | cut -d: -f1 | xargs -IN echo 2+N | bc)

@ -21,14 +21,14 @@ dialmenu() {
NUMBER="$( NUMBER="$(
printf %b "Close Menu\nMore contacts\n$CONTACTS" | printf %b "Close Menu\nMore contacts\n$CONTACTS" |
grep . | grep . |
sxmo_dmenu_with_kb.sh -l 10 -p Number -c -fn Terminus-20 -i sxmo_dmenu_with_kb.sh -l 10 -p Number -c -i
)" )"
echo "$NUMBER" | grep "Close Menu" && kill -9 0 echo "$NUMBER" | grep "Close Menu" && kill -9 0
echo "$NUMBER" | grep -q "More contacts" && NUMBER="$( echo "$NUMBER" | grep -q "More contacts" && NUMBER="$(
printf %b "Close Menu\n$(sxmo_contacts.sh --all)" | printf %b "Close Menu\n$(sxmo_contacts.sh --all)" |
grep . | grep . |
sxmo_dmenu_with_kb.sh -l 10 -p Number -c -fn Terminus-20 -i sxmo_dmenu_with_kb.sh -l 10 -p Number -c -i
)" )"
NUMBER="$(echo "$NUMBER" | cut -d: -f1 | tr -d -- '- ')" NUMBER="$(echo "$NUMBER" | cut -d: -f1 | tr -d -- '- ')"
if [ -z "$NUMBER" ] || [ "$NUMBER" = "CloseMenu" ]; then if [ -z "$NUMBER" ] || [ "$NUMBER" = "CloseMenu" ]; then

@ -1,7 +1,7 @@
#!/usr/bin/env sh #!/usr/bin/env sh
err() { err() {
printf %b "$1" | dmenu -fn Terminus-20 -c -l 10 printf %b "$1" | dmenu -c -l 10
exit exit
} }

@ -41,14 +41,14 @@ choosenumbermenu() {
NUMBER="$( NUMBER="$(
printf %b "\nCancel\nMore contacts\n$(sxmo_contacts.sh | grep -E "^\+?[0-9]+:")" | printf %b "\nCancel\nMore contacts\n$(sxmo_contacts.sh | grep -E "^\+?[0-9]+:")" |
awk NF | awk NF |
menu sxmo_dmenu_with_kb.sh -p "Number" -fn "Terminus-20" -l 10 -c -i | menu sxmo_dmenu_with_kb.sh -p "Number" -l 10 -c -i |
cut -d: -f1 | cut -d: -f1 |
tr -d -- '- ' tr -d -- '- '
)" )"
echo "$NUMBER" | grep -qE "^Morecontacts$" && NUMBER="$( #joined words without space is not a bug echo "$NUMBER" | grep -qE "^Morecontacts$" && NUMBER="$( #joined words without space is not a bug
printf %b "\nCancel\n$(sxmo_contacts.sh --all)" | printf %b "\nCancel\n$(sxmo_contacts.sh --all)" |
grep . | grep . |
menu sxmo_dmenu_with_kb.sh -l 10 -p "Number" -c -fn Terminus-20 -i | menu sxmo_dmenu_with_kb.sh -l 10 -p "Number" -c -i |
cut -d: -f1 | cut -d: -f1 |
tr -d -- '- ' tr -d -- '- '
)" )"
@ -71,7 +71,7 @@ sendtextmenu() {
do do
CONFIRM="$( CONFIRM="$(
printf %b "Edit Message ($(echo "$TEXT" | head -n1))\nSend to → $NUMBER\nSave as Draft\nCancel" | printf %b "Edit Message ($(echo "$TEXT" | head -n1))\nSend to → $NUMBER\nSave as Draft\nCancel" |
menu dmenu -c -idx 1 -p "Confirm" -fn "Terminus-20" -l 10 menu dmenu -c -idx 1 -p "Confirm" -l 10
)" )"
echo "$CONFIRM" | grep -E "^Send" && (echo "$TEXT" | sxmo_modemsendsms.sh "$NUMBER" -) && echo "Sent text to $NUMBER">&2 && exit 0 echo "$CONFIRM" | grep -E "^Send" && (echo "$TEXT" | sxmo_modemsendsms.sh "$NUMBER" -) && echo "Sent text to $NUMBER">&2 && exit 0
echo "$CONFIRM" | grep -E "^Cancel$" && exit 1 echo "$CONFIRM" | grep -E "^Cancel$" && exit 1
@ -92,7 +92,7 @@ draft() {
senddrafttextmenu() { senddrafttextmenu() {
CONFIRM="$( CONFIRM="$(
printf %b "Cancel\n$(ls "$DRAFT_DIR")" | printf %b "Cancel\n$(ls "$DRAFT_DIR")" |
menu sxmo_dmenu_with_kb.sh -p "Draft Message" -fn "Terminus-20" -l 10 -c -i menu sxmo_dmenu_with_kb.sh -p "Draft Message" -l 10 -c -i
)" )"
echo "$CONFIRM" | grep -E "^Cancel$" && exit 1 echo "$CONFIRM" | grep -E "^Cancel$" && exit 1
FILE="$DRAFT_DIR/$CONFIRM" FILE="$DRAFT_DIR/$CONFIRM"
@ -120,7 +120,7 @@ main() {
printf %b "$CONTACT" | xargs -IL echo "L logfile" printf %b "$CONTACT" | xargs -IL echo "L logfile"
done done
)" )"
CONTACTIDANDNUM="$(printf %b "$ENTRIES" | menu dmenu -p Texts -c -fn Terminus-20 -l 10 -i)" CONTACTIDANDNUM="$(printf %b "$ENTRIES" | menu dmenu -p Texts -c -l 10 -i)"
echo "$CONTACTIDANDNUM" | grep "Close Menu" && exit 1 echo "$CONTACTIDANDNUM" | grep "Close Menu" && exit 1
echo "$CONTACTIDANDNUM" | grep "Send a Text" && sendnewtextmenu && exit 1 echo "$CONTACTIDANDNUM" | grep "Send a Text" && sendnewtextmenu && exit 1
echo "$CONTACTIDANDNUM" | grep "Send a Draft Text" && senddrafttextmenu && exit 1 echo "$CONTACTIDANDNUM" | grep "Send a Draft Text" && senddrafttextmenu && exit 1

@ -19,7 +19,7 @@ notificationmenu() {
sed '/^[[:space:]]*$/d' | sed '/^[[:space:]]*$/d' |
awk '{$1=$1};1' | awk '{$1=$1};1' |
cut -d^ -f1 | cut -d^ -f1 |
dmenu -c -i -fn "Terminus-18" -p "Notifs" -l 10 dmenu -c -i -p "Notifs" -l 20
)" )"
[ "$PICKEDCONTENT" = "Close Menu" ] && exit 1 [ "$PICKEDCONTENT" = "Close Menu" ] && exit 1

Loading…
Cancel
Save