Change eww to sb

This commit is contained in:
2025-11-28 17:05:55 -08:00
parent 2990b54902
commit e222fc8f33
6 changed files with 0 additions and 0 deletions

22
status-bar/sb-network Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env zsh
let bluetooth=1
if [[ "${1}" == '--no-bluetooth' ]] || [[ "${1}" == '-n' ]]; then
bluetooth=0
fi
if [[ "$(uname)" = 'Linux' ]]; then
local active_networks="$(nmcli --fields type c s --active)"
local output=''
[[ "${active_networks}" = *'wifi'* ]] && output="${output}󰖩 "
[[ "${active_networks}" = *'ethernet'* ]] && output="${output}󰈁"
[[ "${active_networks}" = *'wireguard'* ]] && output="${output}󰖂 "
(( ${#output} == 0 )) && output='󰈂'
if (( bluetooth )); then
bluetoothctl show | grep 'Powered: yes' >/dev/null && output="${output}  "
fi
printf '%s\n' "${output}"
else
echo "${0}: error: unknown os: \"$(uname)\"" >&2
exit 1
fi