diff --git a/configs/default_hooks/sxmo_hook_block_suspend.sh b/configs/default_hooks/sxmo_hook_block_suspend.sh index f347094..f394575 100755 --- a/configs/default_hooks/sxmo_hook_block_suspend.sh +++ b/configs/default_hooks/sxmo_hook_block_suspend.sh @@ -10,7 +10,7 @@ # - Optionally, how to wait for the next check. Currently the only implemented # method is exponential backoff (called delay) which is the default if none # is provided. -# +# # NOTE: If you're trying to extend this hook, skip to the while loop at the bottom # include common definitions diff --git a/configs/default_hooks/sxmo_hook_contextmenu.sh b/configs/default_hooks/sxmo_hook_contextmenu.sh index a01b008..8787897 100755 --- a/configs/default_hooks/sxmo_hook_contextmenu.sh +++ b/configs/default_hooks/sxmo_hook_contextmenu.sh @@ -418,10 +418,10 @@ case "$WMCLASS" in $icon_itm Type complete ^ 0 ^ sxmo_type -M Ctrl -M Shift -k u $icon_cpy Copy complete ^ 0 ^ sxmo_type -M Ctrl -M Shift -k i $icon_itm Selmode $( - [ "$STSELMODEON" = 1 ] && - printf %b "$icon_ton" || - printf %b "$icon_tof" - printf %b '^ 0 ^ sxmo_type -M Ctrl -M Shift -k s' + [ "$STSELMODEON" = 1 ] && + printf %b "$icon_ton" || + printf %b "$icon_tof" + printf %b '^ 0 ^ sxmo_type -M Ctrl -M Shift -k s' ) $([ "$STSELMODEON" = 1 ] && echo 'Copy selection ^ 0 ^ sxmo_type -M Ctrl -M Shift -k c') $icon_pst Paste ^ 0 ^ sxmo_type -M Ctrl -M Shift -k v diff --git a/configs/default_hooks/sxmo_hook_discard.sh b/configs/default_hooks/sxmo_hook_discard.sh index 8ad7365..71bd3ea 100755 --- a/configs/default_hooks/sxmo_hook_discard.sh +++ b/configs/default_hooks/sxmo_hook_discard.sh @@ -3,7 +3,7 @@ # Copyright 2022 Sxmo Contributors # This script is executed (asynchronously) when you discard an incoming call -# i.e., click Hangup on Pickup menu when call is coming in (without picking +# i.e., click Hangup on Pickup menu when call is coming in (without picking # up the call). # kill existing ring playback diff --git a/configs/default_hooks/sxmo_hook_logout.sh b/configs/default_hooks/sxmo_hook_logout.sh index b4b0bf3..15247e1 100755 --- a/configs/default_hooks/sxmo_hook_logout.sh +++ b/configs/default_hooks/sxmo_hook_logout.sh @@ -1,6 +1,6 @@ #!/bin/sh -# This script is called with both toggle wm and when loging out (i.e., restarting) +# This script is called with both toggle wm and when loging out (i.e., restarting) # current window manager. You'll want to give a 5s pause here to let certain apps # "cool off" before we restart wm, but otherwise everything *should* die with the # wm diff --git a/configs/default_hooks/sxmo_hook_mute_ring.sh b/configs/default_hooks/sxmo_hook_mute_ring.sh index 7e28c4f..bab62f3 100755 --- a/configs/default_hooks/sxmo_hook_mute_ring.sh +++ b/configs/default_hooks/sxmo_hook_mute_ring.sh @@ -2,7 +2,7 @@ # SPDX-License-Identifier: AGPL-3.0-only # Copyright 2022 Sxmo Contributors -# This script is executed (asynchronously) when you mute (Ignore) an +# This script is executed (asynchronously) when you mute (Ignore) an # incoming call, i.e., ignore the call ringing in. # kill existing ring playback diff --git a/configs/default_hooks/sxmo_hook_statusbar.sh b/configs/default_hooks/sxmo_hook_statusbar.sh index f31bf3b..cc5344a 100755 --- a/configs/default_hooks/sxmo_hook_statusbar.sh +++ b/configs/default_hooks/sxmo_hook_statusbar.sh @@ -226,7 +226,7 @@ set_wifi() { fi # if they have a vpn nmcli c shown --active should also list: - # tun0 ef5fcce9-fdae-4ffe-a540-b16fc7b42852 tun tun0 + # tun0 ef5fcce9-fdae-4ffe-a540-b16fc7b42852 tun tun0 if printf %b "$CONN" | cut -d':' -f3 | grep -q ^tun$; then wifivpn=1 else @@ -346,9 +346,9 @@ set_battery() { "battery-icon-$power_name" 40 "$BATCMP" if [ -z "$SXMO_BAR_SHOW_BAT_PER" ]; then - sxmobar -d "battery-status-$power_name" + sxmobar -d "battery-status-$power_name" else - sxmobar -a "battery-status-$power_name" 41 "$PCT%" + sxmobar -a "battery-status-$power_name" 41 "$PCT%" fi fi done diff --git a/scripts/appscripts/sxmo_weather.sh b/scripts/appscripts/sxmo_weather.sh index 1a1c8c1..da64350 100755 --- a/scripts/appscripts/sxmo_weather.sh +++ b/scripts/appscripts/sxmo_weather.sh @@ -153,5 +153,5 @@ weathermenu() { if [ -z "$1" ]; then weathermenu else - "$@" + "$@" fi diff --git a/scripts/core/sxmo_migrate.sh b/scripts/core/sxmo_migrate.sh index 666a67e..309987f 100755 --- a/scripts/core/sxmo_migrate.sh +++ b/scripts/core/sxmo_migrate.sh @@ -283,7 +283,7 @@ xorg() { #set default mode [ -z "$*" ] && set -- interactive -# Don't allow running with sudo, or as root +# Don't allow running with sudo, or as root if [ -n "$SUDO_USER" ]; then echo "$0 can't be run with sudo, it must be run as your user" >&2 exit 127 diff --git a/scripts/core/sxmo_setpermissions.sh b/scripts/core/sxmo_setpermissions.sh index b2d5afe..b5f401f 100755 --- a/scripts/core/sxmo_setpermissions.sh +++ b/scripts/core/sxmo_setpermissions.sh @@ -7,7 +7,7 @@ # some device-specific permissions if [ -e /proc/device-tree/compatible ]; then - device="$(tr -c '\0[:alnum:].,-' '_' < /proc/device-tree/compatible | + device="$(tr -c '\0[:alnum:].,-' '_' < /proc/device-tree/compatible | tr '\0' '\n' | head -n1)" deviceprofile="$(command -v "sxmo_deviceprofile_$device.sh")" # shellcheck disable=SC1090 @@ -19,7 +19,7 @@ fi files="${SXMO_SYS_FILES:-"/sys/power/state /sys/power/mem_sleep /dev/rtc0"}" for file in $files /sys/power/wakeup_count; do - [ -e "$file" ] && chmod a+rw "$file" + [ -e "$file" ] && chmod a+rw "$file" done chmod -R a+rw /sys/class/wakeup/* diff --git a/scripts/core/sxmo_swayinitconf.sh b/scripts/core/sxmo_swayinitconf.sh index bd64053..c4afcd6 100755 --- a/scripts/core/sxmo_swayinitconf.sh +++ b/scripts/core/sxmo_swayinitconf.sh @@ -25,7 +25,7 @@ multikey_retrocompat() { powerbutton_two \ powerbutton_three - if ! [ "$vols" = "none" ]; then + if ! [ "$vols" = "none" ]; then for vol in $vols; do swaymsg -- bindsym --locked --input-device="$vol" XF86AudioRaiseVolume exec \ sxmo_multikey.sh \ @@ -41,7 +41,7 @@ multikey_retrocompat() { voldown_two \ voldown_three done - fi + fi } if [ -n "$SXMO_MODEM_GPIO_KEY_RI" ]; then diff --git a/scripts/modem/sxmo_mms.sh b/scripts/modem/sxmo_mms.sh index 62f2f5a..a4bd24c 100755 --- a/scripts/modem/sxmo_mms.sh +++ b/scripts/modem/sxmo_mms.sh @@ -63,7 +63,7 @@ checkforlostmms() { done < "$ALL_MMS_TEMP" if [ "$1" = "--force" ]; then info "Finished." - else + else info "Run $0 checkforlostmms --force to process (if sent or received) or delete (if expired or draft)." fi fi diff --git a/scripts/modem/sxmo_modem.sh b/scripts/modem/sxmo_modem.sh index f4b037c..d5939d4 100755 --- a/scripts/modem/sxmo_modem.sh +++ b/scripts/modem/sxmo_modem.sh @@ -217,7 +217,7 @@ checkfornewtexts() { # later. # # TODO: a user *could* block the sms wap number (which would be user error). But then - # the mms would not be processed. So probably give a warning here if the user has blocked + # the mms would not be processed. So probably give a warning here if the user has blocked # the sms wap number? if cut -f1 "$SXMO_BLOCKFILE" 2>/dev/null | grep -q "^$NUM$"; then mkdir -p "$SXMO_BLOCKDIR/$NUM" diff --git a/scripts/modem/sxmo_modemsendsms.sh b/scripts/modem/sxmo_modemsendsms.sh index 6214259..860b33f 100755 --- a/scripts/modem/sxmo_modemsendsms.sh +++ b/scripts/modem/sxmo_modemsendsms.sh @@ -161,7 +161,7 @@ else SMS_OK="$?" if [ "$SMS_OK" = 1 ]; then - # if we fail to send due to a bad number, + # if we fail to send due to a bad number, # clear it from the modem if echo "$SMS_RES" | grep -q "Invalid number"; then for i in $(mmcli -m any --messaging-list-sms | grep " (unknown)" | cut -f5 -d' '); do diff --git a/scripts/modem/sxmo_modemtext.sh b/scripts/modem/sxmo_modemtext.sh index 2145109..6441cdc 100755 --- a/scripts/modem/sxmo_modemtext.sh +++ b/scripts/modem/sxmo_modemtext.sh @@ -99,7 +99,7 @@ sendtextmenu() { ;; # Remove Attachment " "*) - FILE="$(printf %s "$CONFIRM" | awk -F' :: ' '{print $2}')" + FILE="$(printf %s "$CONFIRM" | awk -F' :: ' '{print $2}')" sed -i "\|$FILE|d" "$SXMO_LOGDIR/$NUMBER/draft.attachments.txt" if [ ! -s "$SXMO_LOGDIR/$NUMBER/draft.attachments.txt" ] ; then rm "$SXMO_LOGDIR/$NUMBER/draft.attachments.txt" diff --git a/scripts/notifications/sxmo_notificationsmenu.sh b/scripts/notifications/sxmo_notificationsmenu.sh index 1aca6d2..aca00f0 100755 --- a/scripts/notifications/sxmo_notificationsmenu.sh +++ b/scripts/notifications/sxmo_notificationsmenu.sh @@ -33,7 +33,7 @@ notificationmenu() { echo "$PICKEDCONTENT" | grep -q "Close Menu" && exit 1 if echo "$PICKEDCONTENT" | grep -q "Clear Notifications"; then # merely removing the notifs won't remove - # the inotifywait notifwatchfile. so to handle that + # the inotifywait notifwatchfile. so to handle that # we need to open each notifwatchfile find "$SXMO_NOTIFDIR" -type f | \ while read -r line; do diff --git a/spec/spec_helper.sh b/spec/spec_helper.sh index 806f3dd..b8b643b 100644 --- a/spec/spec_helper.sh +++ b/spec/spec_helper.sh @@ -9,18 +9,18 @@ # This callback function will be invoked only once before loading specfiles. spec_helper_precheck() { - # Available functions: info, warn, error, abort, setenv, unsetenv - # Available variables: VERSION, SHELL_TYPE, SHELL_VERSION - : minimum_version "0.28.1" + # Available functions: info, warn, error, abort, setenv, unsetenv + # Available variables: VERSION, SHELL_TYPE, SHELL_VERSION + : minimum_version "0.28.1" } # This callback function will be invoked after a specfile has been loaded. spec_helper_loaded() { - : + : } # This callback function will be invoked after core modules has been loaded. spec_helper_configure() { - # Available functions: import, before_each, after_each, before_all, after_all - : import 'support/custom_matcher' + # Available functions: import, before_each, after_each, before_all, after_all + : import 'support/custom_matcher' }