summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinnnus <[email protected]>2024-12-29 15:29:49 +0000
committerLinnnus <[email protected]>2025-01-27 19:48:54 +0000
commit143ae9c5285815b82d5d192c505a842512ba4322 (patch)
treed35d58c4603f3c2f3a1ea972792ed4b0357c8127
parentb1aba2dd924a80fd824d6e046e76493e5a34668c (diff)
hosts/omar: Show battery and clock in DWM bar
-rw-r--r--hosts/omar/desktop-environment/default.nix15
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