diff options
author | Linnnus <[email protected]> | 2024-12-29 15:29:49 +0000 |
---|---|---|
committer | Linnnus <[email protected]> | 2025-01-27 19:48:54 +0000 |
commit | 143ae9c5285815b82d5d192c505a842512ba4322 (patch) | |
tree | d35d58c4603f3c2f3a1ea972792ed4b0357c8127 /hosts | |
parent | b1aba2dd924a80fd824d6e046e76493e5a34668c (diff) |
hosts/omar: Show battery and clock in DWM bar
Diffstat (limited to 'hosts')
-rw-r--r-- | hosts/omar/desktop-environment/default.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/hosts/omar/desktop-environment/default.nix b/hosts/omar/desktop-environment/default.nix index 78961b6..f187404 100644 --- a/hosts/omar/desktop-environment/default.nix +++ b/hosts/omar/desktop-environment/default.nix @@ -8,6 +8,21 @@ services.xserver.windowManager.dwm.enable = true; + systemd.services.dwm-battery = { + description = "Battery status update"; + after = ["graphical-session.target"]; + wantedBy = ["graphical-session.target"]; + + serviceConfig = { + script = '' + while true; do + echo "$(date +%H:%M) - $(cat /sys/class/power_supply/BAT0/capacity)" + sleep 5 + done | ${pkgs.dwm-setstatus}/bin/dwm-setstatus + ''; + }; + }; + environment.systemPackages = with pkgs; [ st dmenu |