add do-not-disturb

This commit is contained in:
Vivian 2022-09-24 13:57:01 +02:00
parent e0b6b2a909
commit 3d2fe5cc9e
10 changed files with 119 additions and 73 deletions

View 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

View file

@ -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