blob: 1237148aae7342931c14edd9887cfd56531c68ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
{pkgs, ...}:
{
services.xserver.windowManager.dwm.enable = true;
# Show battery and clock in status bar. This is a background daemon which
# updates the root window, which DWM uses for status.
systemd.user.services.dwm-battery = {
description = "Battery status update";
partOf = ["graphical-session.target"];
wantedBy = ["graphical-session.target"];
serviceConfig.ExecStart = pkgs.writeShellScript "dwm-battery" ''
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
];
}
|