aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap.sh3
-rwxr-xr-xdot_config/waybar/executable_wifi-status.sh16
2 files changed, 10 insertions, 9 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
index dbc49a9..65a9343 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -91,7 +91,8 @@ if [ -d /sys/firmware/efi ]; then
warn 'no Arch Linux EFI boot entry found'
warn 'after first kernel install, run: sudo mkinitcpio -P'
warn 'then register the UKI with efibootmgr, for example:'
- warn " sudo efibootmgr --create --disk /dev/nvme0n1 --part 1 \\"
+ # shellcheck disable=SC1003 # backslash is literal text shown to the user
+ warn ' sudo efibootmgr --create --disk /dev/nvme0n1 --part 1 \'
warn " --label 'Arch UKI' --loader '\\EFI\\Linux\\arch-linux.efi'"
fi
fi
diff --git a/dot_config/waybar/executable_wifi-status.sh b/dot_config/waybar/executable_wifi-status.sh
index eae2ff3..b0cd214 100755
--- a/dot_config/waybar/executable_wifi-status.sh
+++ b/dot_config/waybar/executable_wifi-status.sh
@@ -10,14 +10,14 @@ iface=wlan0
svc=net.connman.iwd
down() {
- printf '{"text":"wifi off","class":"down"}\n'
- exit 0
+ printf '{"text":"wifi off","class":"down"}\n'
+ exit 0
}
# Locate the iwd object path for this interface.
station=$(busctl --system --json=short call "$svc" / \
- org.freedesktop.DBus.ObjectManager GetManagedObjects 2>/dev/null |
- jq -r --arg iface "$iface" '
+ org.freedesktop.DBus.ObjectManager GetManagedObjects 2>/dev/null |
+ jq -r --arg iface "$iface" '
(.data[0] // .data) as $objs
| $objs | to_entries[]
| select(.value["net.connman.iwd.Device"].Name.data == $iface)
@@ -25,13 +25,13 @@ station=$(busctl --system --json=short call "$svc" / \
[ -n "$station" ] || down
state=$(busctl --system --json=short get-property "$svc" "$station" \
- net.connman.iwd.Station State 2>/dev/null | jq -r '.data' 2>/dev/null || true)
+ net.connman.iwd.Station State 2>/dev/null | jq -r '.data' 2>/dev/null || true)
[ "$state" = "connected" ] || down
netpath=$(busctl --system --json=short get-property "$svc" "$station" \
- net.connman.iwd.Station ConnectedNetwork | jq -r '.data')
+ net.connman.iwd.Station ConnectedNetwork | jq -r '.data')
ssid=$(busctl --system --json=short get-property "$svc" "$netpath" \
- net.connman.iwd.Network Name | jq -r '.data')
+ net.connman.iwd.Network Name | jq -r '.data')
# /proc/net/wireless: "<iface>: <status> <qual>. <level>. <noise>. ..."
# We want <level> (column 4), which is dBm. Strip trailing dot.
@@ -47,4 +47,4 @@ color=$(awk -v p="$pct" 'BEGIN{
}')
printf '{"text":"%s <span color=\x27%s\x27>%s%%</span>","class":"up","tooltip":"%s ยท %s dBm"}\n' \
- "$ssid" "$color" "$pct" "$iface" "$rssi"
+ "$ssid" "$color" "$pct" "$iface" "$rssi"