add do-not-disturb
This commit is contained in:
parent
e0b6b2a909
commit
3d2fe5cc9e
10 changed files with 119 additions and 73 deletions
10
nixos/hosts/thalassa/null/home/eww/scripts/do-not-disturb.sh
Executable file
10
nixos/hosts/thalassa/null/home/eww/scripts/do-not-disturb.sh
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -p jq -i bash
|
||||
|
||||
if makoctl mode | grep -Fxq "do-not-disturb"; then
|
||||
eww update dnd=""
|
||||
makoctl mode -r do-not-disturb > /dev/null
|
||||
else
|
||||
eww update dnd=""
|
||||
makoctl mode -a do-not-disturb > /dev/null
|
||||
fi
|
|
@ -1,15 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
if nmcli g | rg -q "\bconnected\b"; then
|
||||
icon=""
|
||||
ssid=$(nmcli -t -f name connection show --active)
|
||||
icon="直"
|
||||
ssid=$(nmcli -t -f name connection show --active | sed -z 's/\n/,/g;s/,$/\n/')
|
||||
if echo $ssid | rg -q "Wired"; then
|
||||
status="Connected via cable"
|
||||
else
|
||||
status="Connected to ${ssid}"
|
||||
fi
|
||||
else
|
||||
icon=""
|
||||
icon="睊"
|
||||
status="offline"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue