Move eww scripts

This commit is contained in:
2024-04-28 23:26:31 -07:00
parent db9e04378d
commit fa4f74301b
7 changed files with 254 additions and 0 deletions

15
eww/eww-network Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env zsh
if [[ "$(uname)" = 'Linux' ]]; then
local active_networks="$(nmcli c s --active)"
local output=''
[[ "${active_networks}" = *' wifi '* ]] && output="${output}󰖩 "
[[ "${active_networks}" = *' ethernet '* ]] && 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