Initial commit
This commit is contained in:
14
scripts/dwmblocks-network
Executable file
14
scripts/dwmblocks-network
Executable file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
if [[ "$(uname)" = 'Linux' ]]; then
|
||||
local active_networks="$(nmcli c s --active)"
|
||||
local output=''
|
||||
[[ "${active_networks}" = *' wifi '* ]] && output="${output}直 "
|
||||
[[ "${active_networks}" = *' wireguard '* ]] && output="${output}嬨 "
|
||||
(( ${#output} == 0 )) && output=''
|
||||
bluetoothctl show | grep 'Powered: yes' >/dev/null && output="${output} "
|
||||
printf '%s\n' "${output}"
|
||||
else
|
||||
echo "${0}: error: unknown os: \"$(uname)\"" >&2
|
||||
exit 1
|
||||
fi
|
Reference in New Issue
Block a user