various indentation fixes (spaces to tabs and stripping trailing whitespace)
This commit is contained in:
parent
24380603a4
commit
7fb7cd70f3
15 changed files with 107 additions and 107 deletions
|
@ -27,8 +27,8 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
color = argv[argc--];
|
color = argv[argc--];
|
||||||
if (
|
if (
|
||||||
strcmp(color, "red") &&
|
strcmp(color, "red") &&
|
||||||
strcmp(color, "blue") &&
|
strcmp(color, "blue") &&
|
||||||
strcmp(color, "green") &&
|
strcmp(color, "green") &&
|
||||||
strcmp(color, "white")
|
strcmp(color, "white")
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
mkdir -p "$SXMO_RECDIR"
|
mkdir -p "$SXMO_RECDIR"
|
||||||
|
|
||||||
getdur() {
|
getdur() {
|
||||||
mediainfo "$1" |
|
mediainfo "$1" |
|
||||||
grep ^Duration |
|
grep ^Duration |
|
||||||
head -n1 |
|
head -n1 |
|
||||||
cut -d: -f2 |
|
cut -d: -f2 |
|
||||||
tr -d " " |
|
tr -d " " |
|
||||||
sed -E 's/[0-9]+ms//'
|
sed -E 's/[0-9]+ms//'
|
||||||
}
|
}
|
||||||
|
@ -65,11 +65,11 @@ recordmenu() {
|
||||||
OPTION="$(
|
OPTION="$(
|
||||||
printf %b "$OPTIONS" |
|
printf %b "$OPTIONS" |
|
||||||
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 -fn Terminus-30 -c -p "Record" -l 20
|
||||||
)"
|
)"
|
||||||
|
|
||||||
if [ "$OPTION" = "Line Jack" ]; then
|
if [ "$OPTION" = "Line Jack" ]; then
|
||||||
OLDAUDIOF="$(mktemp)"
|
OLDAUDIOF="$(mktemp)"
|
||||||
alsactl --file "$OLDAUDIOF" store
|
alsactl --file "$OLDAUDIOF" store
|
||||||
|
@ -95,7 +95,7 @@ recordmenu() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
recordmenu
|
recordmenu
|
||||||
else
|
else
|
||||||
"$@"
|
"$@"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -5,7 +5,7 @@ WEATHERXML=""
|
||||||
|
|
||||||
downloadweatherxml() {
|
downloadweatherxml() {
|
||||||
WEATHERXML="$(
|
WEATHERXML="$(
|
||||||
curl "https://forecast.weather.gov/MapClick.php?lat=$LAT&lon=$LON&FcstType=digitalDWML"
|
curl "https://forecast.weather.gov/MapClick.php?lat=$LAT&lon=$LON&FcstType=digitalDWML"
|
||||||
)"
|
)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ getweathertexttable() {
|
||||||
WIND="$(weatherdata "//wind-speed" ".")"
|
WIND="$(weatherdata "//wind-speed" ".")"
|
||||||
#LOCATION="$(weatherdata "//location/description" ".")"
|
#LOCATION="$(weatherdata "//location/description" ".")"
|
||||||
TIME="$(
|
TIME="$(
|
||||||
weatherdata "//start-valid-time" "." |
|
weatherdata "//start-valid-time" "." |
|
||||||
grep -oE 'T[0-9]{2}' | tr -d 'T' | tr '\n' ' '
|
grep -oE 'T[0-9]{2}' | tr -d 'T' | tr '\n' ' '
|
||||||
)"
|
)"
|
||||||
tput rev; echo "$PLACE"; tput sgr0
|
tput rev; echo "$PLACE"; tput sgr0
|
||||||
|
@ -133,7 +133,7 @@ weathermenu() {
|
||||||
sxmo_dmenu_with_kb.sh -i -c -l 10 -fn Terminus-18 -p "Locations"
|
sxmo_dmenu_with_kb.sh -i -c -l 10 -fn Terminus-18 -p "Locations"
|
||||||
)"
|
)"
|
||||||
if [ "$CHOICE" = "Close Menu" ]; then
|
if [ "$CHOICE" = "Close Menu" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
PLACE="$(printf %b "$CHOICE" | cut -d: -f1 | awk '{$1=$1};1')"
|
PLACE="$(printf %b "$CHOICE" | cut -d: -f1 | awk '{$1=$1};1')"
|
||||||
LAT="$(printf %b "$CHOICE" | cut -d: -f2- | awk '{$1=$1};1' | cut -d ' ' -f1)"
|
LAT="$(printf %b "$CHOICE" | cut -d: -f2- | awk '{$1=$1};1' | cut -d ' ' -f1)"
|
||||||
|
@ -143,7 +143,7 @@ weathermenu() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
weathermenu
|
weathermenu
|
||||||
else
|
else
|
||||||
"$@"
|
"$@"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -30,7 +30,7 @@ programchoicesinit() {
|
||||||
find "$XDG_CONFIG_HOME/sxmo/userscripts" \( -type f -o -type l \) -print0 |
|
find "$XDG_CONFIG_HOME/sxmo/userscripts" \( -type f -o -type l \) -print0 |
|
||||||
xargs -IF basename F |
|
xargs -IF basename F |
|
||||||
awk '{printf "%s\t^ 0 ^ $XDG_CONFIG_HOME/sxmo/userscripts/%s \n", $0, $0}' |
|
awk '{printf "%s\t^ 0 ^ $XDG_CONFIG_HOME/sxmo/userscripts/%s \n", $0, $0}' |
|
||||||
sort -f
|
sort -f
|
||||||
)
|
)
|
||||||
$CHOICES
|
$CHOICES
|
||||||
Edit Userscripts ^ 0 ^ sxmo_files.sh $XDG_CONFIG_HOME/sxmo/userscripts
|
Edit Userscripts ^ 0 ^ sxmo_files.sh $XDG_CONFIG_HOME/sxmo/userscripts
|
||||||
|
@ -137,47 +137,47 @@ programchoicesinit() {
|
||||||
elif echo "$WMCLASS" | grep -i "mpv"; then
|
elif echo "$WMCLASS" | grep -i "mpv"; then
|
||||||
# MPV
|
# MPV
|
||||||
CHOICES="
|
CHOICES="
|
||||||
Pause ^ 0 ^ key space
|
Pause ^ 0 ^ key space
|
||||||
Seek ← ^ 1 ^ key Left
|
Seek ← ^ 1 ^ key Left
|
||||||
Seek → ^ 1 ^ key Right
|
Seek → ^ 1 ^ key Right
|
||||||
App Volume ↑ ^ 1 ^ key 0
|
App Volume ↑ ^ 1 ^ key 0
|
||||||
App Volume ↓ ^ 1 ^ key 9
|
App Volume ↓ ^ 1 ^ key 9
|
||||||
Speed ↑ ^ 1 ^ key bracketright
|
Speed ↑ ^ 1 ^ key bracketright
|
||||||
Speed ↓ ^ 1 ^ key bracketleft
|
Speed ↓ ^ 1 ^ key bracketleft
|
||||||
Screenshot ^ 1 ^ key s
|
Screenshot ^ 1 ^ key s
|
||||||
Loopmark ^ 1 ^ key l
|
Loopmark ^ 1 ^ key l
|
||||||
Info ^ 1 ^ key i
|
Info ^ 1 ^ key i
|
||||||
Seek Info ^ 1 ^ key o
|
Seek Info ^ 1 ^ key o
|
||||||
"
|
"
|
||||||
WINNAME=Mpv && return
|
WINNAME=Mpv && return
|
||||||
elif echo "$WMCLASS" | grep -i "feh"; then
|
elif echo "$WMCLASS" | grep -i "feh"; then
|
||||||
# Feh
|
# Feh
|
||||||
CHOICES="
|
CHOICES="
|
||||||
Next → ^ 1 ^ key space
|
Next → ^ 1 ^ key space
|
||||||
Previous ← ^ 1 ^ key BackSpace
|
Previous ← ^ 1 ^ key BackSpace
|
||||||
Zoom + ^ 1 ^ key up
|
Zoom + ^ 1 ^ key up
|
||||||
Zoom - ^ 1 ^ key down
|
Zoom - ^ 1 ^ key down
|
||||||
Zoom to fit ^ 1 ^ key slash
|
Zoom to fit ^ 1 ^ key slash
|
||||||
Zoom to fill ^ 1 ^ key exlam
|
Zoom to fill ^ 1 ^ key exlam
|
||||||
Rotate ↺ ^ 1 ^ key less
|
Rotate ↺ ^ 1 ^ key less
|
||||||
Rotate ↻ ^ 1 ^ key greater
|
Rotate ↻ ^ 1 ^ key greater
|
||||||
Flip ⇅ ^ 1 ^ key underscore
|
Flip ⇅ ^ 1 ^ key underscore
|
||||||
Mirror ⇄ ^ 1 ^ key bar
|
Mirror ⇄ ^ 1 ^ key bar
|
||||||
Toggle filename ^ 1 ^ key d
|
Toggle filename ^ 1 ^ key d
|
||||||
"
|
"
|
||||||
WINNAME=Feh && return
|
WINNAME=Feh && return
|
||||||
elif echo "$WMCLASS" | grep -i "sxiv"; then
|
elif echo "$WMCLASS" | grep -i "sxiv"; then
|
||||||
# Sxiv
|
# Sxiv
|
||||||
CHOICES="
|
CHOICES="
|
||||||
Next → ^ 1 ^ key space
|
Next → ^ 1 ^ key space
|
||||||
Previous ← ^ 1 ^ key BackSpace
|
Previous ← ^ 1 ^ key BackSpace
|
||||||
Zoom + ^ 1 ^ key equal
|
Zoom + ^ 1 ^ key equal
|
||||||
Zoom - ^ 1 ^ key minus
|
Zoom - ^ 1 ^ key minus
|
||||||
Rotate ↺ ^ 1 ^ key less
|
Rotate ↺ ^ 1 ^ key less
|
||||||
Rotate ↻ ^ 1 ^ key greater
|
Rotate ↻ ^ 1 ^ key greater
|
||||||
Flip ⇄ ^ 1 ^ key question
|
Flip ⇄ ^ 1 ^ key question
|
||||||
Flip ⇅ ^ 1 ^ key bar
|
Flip ⇅ ^ 1 ^ key bar
|
||||||
Thumbnail ⊡ ^ 0 ^ key Return
|
Thumbnail ⊡ ^ 0 ^ key Return
|
||||||
"
|
"
|
||||||
WINNAME=Sxiv && return
|
WINNAME=Sxiv && return
|
||||||
elif echo "$WMCLASS" | grep -i "st-256color"; then
|
elif echo "$WMCLASS" | grep -i "st-256color"; then
|
||||||
|
@ -344,10 +344,10 @@ programchoicesinit() {
|
||||||
elif echo "$WMCLASS" | grep -i foxtrot; then
|
elif echo "$WMCLASS" | grep -i foxtrot; then
|
||||||
# Foxtrot GPS
|
# Foxtrot GPS
|
||||||
CHOICES='
|
CHOICES='
|
||||||
Locations ^ 0 ^ sxmo_gpsutil.sh menulocations
|
Locations ^ 0 ^ sxmo_gpsutil.sh menulocations
|
||||||
Copy ^ 1 ^ sxmo_gpsutil.sh copy
|
Copy ^ 1 ^ sxmo_gpsutil.sh copy
|
||||||
Paste ^ 0 ^ sxmo_gpsutil.sh paste
|
Paste ^ 0 ^ sxmo_gpsutil.sh paste
|
||||||
Drop Pin ^ 0 ^ sxmo_gpsutil.sh droppin
|
Drop Pin ^ 0 ^ sxmo_gpsutil.sh droppin
|
||||||
Region Search ^ 0 ^ sxmo_gpsutil.sh menuregionsearch
|
Region Search ^ 0 ^ sxmo_gpsutil.sh menuregionsearch
|
||||||
Region Details ^ 0 ^ sxmo_gpsutil.sh details
|
Region Details ^ 0 ^ sxmo_gpsutil.sh details
|
||||||
Zoom + ^ 1 ^ key i
|
Zoom + ^ 1 ^ key i
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
sxmo_setpineled white "$(
|
sxmo_setpineled white "$(
|
||||||
grep -qE '^0$' /sys/class/leds/white:flash/brightness &&
|
grep -qE '^0$' /sys/class/leds/white:flash/brightness &&
|
||||||
echo 255 || echo 0
|
echo 255 || echo 0
|
||||||
)"
|
)"
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,9 @@ CTILESIZE=256
|
||||||
CLN2=0.693147180559945309417
|
CLN2=0.693147180559945309417
|
||||||
CPI=3.14159265358979323846
|
CPI=3.14159265358979323846
|
||||||
|
|
||||||
# The following {lat,px}2{px,lat} were derived from the foxtrotgps source
|
# The following {lat,px}2{px,lat} were derived from the foxtrotgps source
|
||||||
# functions of similar names only just translated from C to bc all because...
|
# functions of similar names only just translated from C to bc all because...
|
||||||
# foxtrotgps doesn't support autocentering on restored lat/lon instead it
|
# foxtrotgps doesn't support autocentering on restored lat/lon instead it
|
||||||
# stores internally X/Y pixel values; so we need conversion fns
|
# stores internally X/Y pixel values; so we need conversion fns
|
||||||
lat2px() {
|
lat2px() {
|
||||||
DEGREES="$1"; ZOOM="$2"
|
DEGREES="$1"; ZOOM="$2"
|
||||||
|
@ -27,7 +27,7 @@ lon2px() {
|
||||||
($DEGREES * $CPI / 180) * $CTILESIZE * \
|
($DEGREES * $CPI / 180) * $CTILESIZE * \
|
||||||
e($ZOOM * $CLN2) / (2 * $CPI) \
|
e($ZOOM * $CLN2) / (2 * $CPI) \
|
||||||
) + (e($ZOOM * $CLN2) * ($CTILESIZE / 2))
|
) + (e($ZOOM * $CLN2) * ($CTILESIZE / 2))
|
||||||
" | bc -l
|
" | bc -l
|
||||||
}
|
}
|
||||||
px2lat() {
|
px2lat() {
|
||||||
PX="$1"; ZOOM="$2"
|
PX="$1"; ZOOM="$2"
|
||||||
|
@ -40,8 +40,8 @@ px2lat() {
|
||||||
asin(tanh( \
|
asin(tanh( \
|
||||||
(-( $PX - ( e( $ZOOM * $CLN2 ) * ( $CTILESIZE / 2 ) ) ) * ( 2 * $CPI )) / \
|
(-( $PX - ( e( $ZOOM * $CLN2 ) * ( $CTILESIZE / 2 ) ) ) * ( 2 * $CPI )) / \
|
||||||
( $CTILESIZE * e( $ZOOM * $CLN2)) \
|
( $CTILESIZE * e( $ZOOM * $CLN2)) \
|
||||||
)) / $CPI * 180
|
)) / $CPI * 180
|
||||||
" | bc -l
|
" | bc -l
|
||||||
}
|
}
|
||||||
px2lon() {
|
px2lon() {
|
||||||
PX="$1"; ZOOM="$2"
|
PX="$1"; ZOOM="$2"
|
||||||
|
@ -196,7 +196,7 @@ menulocations() {
|
||||||
)"
|
)"
|
||||||
ZOOM=14
|
ZOOM=14
|
||||||
if [ "$CHOICE" = "Close Menu" ]; then
|
if [ "$CHOICE" = "Close Menu" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
LATLON="$(printf %b "$CHOICE" | cut -d: -f2- )"
|
LATLON="$(printf %b "$CHOICE" | cut -d: -f2- )"
|
||||||
gpslatlonset "$LATLON $ZOOM"
|
gpslatlonset "$LATLON $ZOOM"
|
||||||
|
|
|
@ -4,39 +4,39 @@ pkill -9 lisgd
|
||||||
if [ -x "$XDG_CONFIG_HOME"/sxmo/hooks/lisgdstart ]; then
|
if [ -x "$XDG_CONFIG_HOME"/sxmo/hooks/lisgdstart ]; then
|
||||||
"$XDG_CONFIG_HOME"/sxmo/hooks/lisgdstart &
|
"$XDG_CONFIG_HOME"/sxmo/hooks/lisgdstart &
|
||||||
else
|
else
|
||||||
#-g format:
|
#-g format:
|
||||||
# fingers,swipe,edge,distance,command
|
# fingers,swipe,edge,distance,command
|
||||||
#order matters, only the first match gets executed
|
#order matters, only the first match gets executed
|
||||||
lisgd "$@" -t 200 \
|
lisgd "$@" -t 200 \
|
||||||
-g '1,DRUL,BR,*,sxmo_hotcorner.sh bottomright' \
|
-g '1,DRUL,BR,*,sxmo_hotcorner.sh bottomright' \
|
||||||
-g '1,DLUR,BL,*,sxmo_hotcorner.sh bottomleft' \
|
-g '1,DLUR,BL,*,sxmo_hotcorner.sh bottomleft' \
|
||||||
-g '1,ULDR,TL,*,sxmo_hotcorner.sh topleft' \
|
-g '1,ULDR,TL,*,sxmo_hotcorner.sh topleft' \
|
||||||
-g '1,DRUL,TR,*,sxmo_hotcorner.sh topright' \
|
-g '1,DRUL,TR,*,sxmo_hotcorner.sh topright' \
|
||||||
-g '1,LR,B,L,sxmo_gesturehandler.sh enter' \
|
-g '1,LR,B,L,sxmo_gesturehandler.sh enter' \
|
||||||
-g '1,RL,B,L,sxmo_gesturehandler.sh back' \
|
-g '1,RL,B,L,sxmo_gesturehandler.sh back' \
|
||||||
-g '1,LR,L,*,sxmo_gesturehandler.sh prevdesktop' \
|
-g '1,LR,L,*,sxmo_gesturehandler.sh prevdesktop' \
|
||||||
-g '1,RL,R,*,sxmo_gesturehandler.sh nextdesktop' \
|
-g '1,RL,R,*,sxmo_gesturehandler.sh nextdesktop' \
|
||||||
-g '1,DU,L,L,sxmo_gesturehandler.sh unmute' \
|
-g '1,DU,L,L,sxmo_gesturehandler.sh unmute' \
|
||||||
-g '1,UD,L,L,sxmo_gesturehandler.sh mute' \
|
-g '1,UD,L,L,sxmo_gesturehandler.sh mute' \
|
||||||
-g '1,DU,L,*,sxmo_gesturehandler.sh volup' \
|
-g '1,DU,L,*,sxmo_gesturehandler.sh volup' \
|
||||||
-g '1,UD,L,*,sxmo_gesturehandler.sh voldown' \
|
-g '1,UD,L,*,sxmo_gesturehandler.sh voldown' \
|
||||||
-g '1,LR,T,*,sxmo_gesturehandler.sh brightnessup' \
|
-g '1,LR,T,*,sxmo_gesturehandler.sh brightnessup' \
|
||||||
-g '1,RL,T,*,sxmo_gesturehandler.sh brightnessdown' \
|
-g '1,RL,T,*,sxmo_gesturehandler.sh brightnessdown' \
|
||||||
-g "1,DU,B,*,sxmo_gesturehandler.sh showkeyboard" \
|
-g "1,DU,B,*,sxmo_gesturehandler.sh showkeyboard" \
|
||||||
-g "1,UD,B,*,sxmo_gesturehandler.sh hidekeyboard" \
|
-g "1,UD,B,*,sxmo_gesturehandler.sh hidekeyboard" \
|
||||||
-g "1,UD,T,*,sxmo_gesturehandler.sh showmenu" \
|
-g "1,UD,T,*,sxmo_gesturehandler.sh showmenu" \
|
||||||
-g "1,DU,T,*,sxmo_gesturehandler.sh hidemenu" \
|
-g "1,DU,T,*,sxmo_gesturehandler.sh hidemenu" \
|
||||||
-g "2,UD,T,*,sxmo_gesturehandler.sh showsysmenu" \
|
-g "2,UD,T,*,sxmo_gesturehandler.sh showsysmenu" \
|
||||||
-g "2,UD,B,*,sxmo_gesturehandler.sh killwindow" \
|
-g "2,UD,B,*,sxmo_gesturehandler.sh killwindow" \
|
||||||
-g '2,RL,*,*,sxmo_gesturehandler.sh moveprevdesktop' \
|
-g '2,RL,*,*,sxmo_gesturehandler.sh moveprevdesktop' \
|
||||||
-g '2,LR,*,*,sxmo_gesturehandler.sh movenextdesktop' \
|
-g '2,LR,*,*,sxmo_gesturehandler.sh movenextdesktop' \
|
||||||
-g '1,DU,R,L,sxmo_gesturehandler.sh scrollup_long' \
|
-g '1,DU,R,L,sxmo_gesturehandler.sh scrollup_long' \
|
||||||
-g '1,UD,R,L,sxmo_gesturehandler.sh scrolldown_long' \
|
-g '1,UD,R,L,sxmo_gesturehandler.sh scrolldown_long' \
|
||||||
-g '1,DU,R,M,sxmo_gesturehandler.sh scrollup_med' \
|
-g '1,DU,R,M,sxmo_gesturehandler.sh scrollup_med' \
|
||||||
-g '1,UD,R,M,sxmo_gesturehandler.sh scrolldown_med' \
|
-g '1,UD,R,M,sxmo_gesturehandler.sh scrolldown_med' \
|
||||||
-g '1,DU,R,S,sxmo_gesturehandler.sh scrollup_short' \
|
-g '1,DU,R,S,sxmo_gesturehandler.sh scrollup_short' \
|
||||||
-g '1,UD,R,S,sxmo_gesturehandler.sh scrolldown_short' \
|
-g '1,UD,R,S,sxmo_gesturehandler.sh scrolldown_short' \
|
||||||
-g '1,LR,R,S,sxmo_gesturehandler.sh scrollright_short' \
|
-g '1,LR,R,S,sxmo_gesturehandler.sh scrollright_short' \
|
||||||
-g '1,RL,L,S,sxmo_gesturehandler.sh scrollleft_short' \
|
-g '1,RL,L,S,sxmo_gesturehandler.sh scrollleft_short' \
|
||||||
&
|
&
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -96,7 +96,7 @@ networksmenu() {
|
||||||
elif [ "$CHOICE" = "Add a GSM Network" ]; then
|
elif [ "$CHOICE" = "Add a GSM Network" ]; then
|
||||||
addnetworkgsmmenu
|
addnetworkgsmmenu
|
||||||
elif [ "$CHOICE" = "Add a WPA Network" ]; then
|
elif [ "$CHOICE" = "Add a WPA Network" ]; then
|
||||||
addnetworkwpamenu
|
addnetworkwpamenu
|
||||||
elif [ "$CHOICE" = "Delete a Network" ]; then
|
elif [ "$CHOICE" = "Delete a Network" ]; then
|
||||||
deletenetworkmenu
|
deletenetworkmenu
|
||||||
elif [ "$CHOICE" = "Launch Nmtui" ]; then
|
elif [ "$CHOICE" = "Launch Nmtui" ]; then
|
||||||
|
|
|
@ -6,7 +6,7 @@ menu() {
|
||||||
pidof "$KEYBOARD" || "$KEYBOARD" &
|
pidof "$KEYBOARD" || "$KEYBOARD" &
|
||||||
RESULT="$(
|
RESULT="$(
|
||||||
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 -fn Terminus-20
|
||||||
)"
|
)"
|
||||||
|
|
|
@ -22,7 +22,7 @@ update() {
|
||||||
if [ "$WLANSTATE" = "up" ]; then
|
if [ "$WLANSTATE" = "up" ]; then
|
||||||
WIRELESS="W "
|
WIRELESS="W "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# M symbol if modem monitoring is on & modem present
|
# M symbol if modem monitoring is on & modem present
|
||||||
MODEMMON=""
|
MODEMMON=""
|
||||||
pgrep -f sxmo_modemmonitor.sh && MODEMMON="M "
|
pgrep -f sxmo_modemmonitor.sh && MODEMMON="M "
|
||||||
|
|
|
@ -10,7 +10,7 @@ change() {
|
||||||
|
|
||||||
menu() {
|
menu() {
|
||||||
T="$(
|
T="$(
|
||||||
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 -fn Terminus-20 -i
|
||||||
|
|
|
@ -48,7 +48,7 @@ COMMAND=$(
|
||||||
[ -z "$COMMAND" ] && exit 1
|
[ -z "$COMMAND" ] && exit 1
|
||||||
RUN=$(echo "$URL" | xargs -IURL echo "$COMMAND")
|
RUN=$(echo "$URL" | xargs -IURL echo "$COMMAND")
|
||||||
if [ "$FORK" = fork ]; then
|
if [ "$FORK" = fork ]; then
|
||||||
st -e sh -c "$RUN" &
|
st -e sh -c "$RUN" &
|
||||||
else
|
else
|
||||||
st -e sh -c "$RUN"
|
st -e sh -c "$RUN"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -38,9 +38,9 @@ modem_cmd_errcheck() {
|
||||||
}
|
}
|
||||||
|
|
||||||
vid_to_number() {
|
vid_to_number() {
|
||||||
mmcli -m "$(modem_n)" -o "$1" -K |
|
mmcli -m "$(modem_n)" -o "$1" -K |
|
||||||
grep call.properties.number |
|
grep call.properties.number |
|
||||||
cut -d ':' -f2 |
|
cut -d ':' -f2 |
|
||||||
tr -d ' '
|
tr -d ' '
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ toggleflag() {
|
||||||
shift
|
shift
|
||||||
FLAGS="$*"
|
FLAGS="$*"
|
||||||
|
|
||||||
echo -- "$FLAGS" | grep -- "$TOGGLEFLAG" >&2 &&
|
echo -- "$FLAGS" | grep -- "$TOGGLEFLAG" >&2 &&
|
||||||
NEWFLAGS="$(echo -- "$FLAGS" | sed "s/$TOGGLEFLAG//g")" ||
|
NEWFLAGS="$(echo -- "$FLAGS" | sed "s/$TOGGLEFLAG//g")" ||
|
||||||
NEWFLAGS="$(echo -- "$FLAGS $TOGGLEFLAG")"
|
NEWFLAGS="$(echo -- "$FLAGS $TOGGLEFLAG")"
|
||||||
|
|
||||||
|
@ -157,9 +157,9 @@ incallmenuloop() {
|
||||||
"
|
"
|
||||||
|
|
||||||
pkill -9 dmenu # E.g. just incase user is playing with btns or hits a menu by mistake
|
pkill -9 dmenu # E.g. just incase user is playing with btns or hits a menu by mistake
|
||||||
echo "$CHOICES" |
|
echo "$CHOICES" |
|
||||||
xargs -0 echo |
|
xargs -0 echo |
|
||||||
cut -d'^' -f1 |
|
cut -d'^' -f1 |
|
||||||
sed '/^[[:space:]]*$/d' |
|
sed '/^[[:space:]]*$/d' |
|
||||||
awk '{$1=$1};1' |
|
awk '{$1=$1};1' |
|
||||||
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")" -fn "Terminus-30" -p "$NUMBER" |
|
||||||
|
|
|
@ -44,7 +44,7 @@ SMSNO="$(
|
||||||
)"
|
)"
|
||||||
mmcli -s "${SMSNO}" --send || err "Couldn't send text message"
|
mmcli -s "${SMSNO}" --send || err "Couldn't send text message"
|
||||||
for i in $(mmcli -m "$MODEM" --messaging-list-sms | grep " (sent)" | cut -f5 -d' ') ; do
|
for i in $(mmcli -m "$MODEM" --messaging-list-sms | grep " (sent)" | cut -f5 -d' ') ; do
|
||||||
mmcli -m "$MODEM" --messaging-delete-sms="$i"
|
mmcli -m "$MODEM" --messaging-delete-sms="$i"
|
||||||
done
|
done
|
||||||
|
|
||||||
TIME="$(date --iso-8601=seconds)"
|
TIME="$(date --iso-8601=seconds)"
|
||||||
|
|
|
@ -18,7 +18,7 @@ notificationhook() {
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
VIBI=$(echo $VIBI+1 | bc)
|
VIBI=$(echo $VIBI+1 | bc)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
handlenewnotiffile(){
|
handlenewnotiffile(){
|
||||||
|
@ -41,7 +41,7 @@ handlenewnotiffile(){
|
||||||
) &
|
) &
|
||||||
|
|
||||||
[ -e "$NOTIFWATCHFILE" ] && (
|
[ -e "$NOTIFWATCHFILE" ] && (
|
||||||
inotifywait "$NOTIFWATCHFILE" && rm -f "$NOTIFFILE"
|
inotifywait "$NOTIFWATCHFILE" && rm -f "$NOTIFFILE"
|
||||||
) &
|
) &
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue