laptop, large refactor and some new stuff

This commit is contained in:
Vivian 2022-08-27 23:58:28 +02:00
parent 525f4ce03b
commit 99bbbbeb1e
15 changed files with 307 additions and 492 deletions

View file

@ -0,0 +1,16 @@
#!/bin/sh
if nmcli g | rg -q "\bconnected\b"; then
icon="󰤨"
ssid=$(nmcli -t -f name connection show --active)
if echo $ssid | rg -q "Wired"; then
status="Connected via cable"
else
status="Connected to ${ssid}"
fi
else
icon="󰤭"
status="offline"
fi
printf "{\"icon\": \"${icon}\", \"status\": \"${status}\"}"