From 9f3082ff5a426f9ac649855ccde03b83821d1d4e Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Thu, 27 Jun 2024 19:22:58 -0700 Subject: [PATCH] dwm datetime --- home/scripts/x-root-datetime.sh | 4 ++++ modules/dwm.nix | 6 ++++++ 2 files changed, 10 insertions(+) create mode 100755 home/scripts/x-root-datetime.sh diff --git a/home/scripts/x-root-datetime.sh b/home/scripts/x-root-datetime.sh new file mode 100755 index 0000000..e74443c --- /dev/null +++ b/home/scripts/x-root-datetime.sh @@ -0,0 +1,4 @@ +#!/bin/sh +while true; do + sleep 1 && date +"<-- %A, %B %d -- %H:%M -->" | xargs -I% xsetroot -name % +done diff --git a/modules/dwm.nix b/modules/dwm.nix index 925a1d3..87ecb2c 100644 --- a/modules/dwm.nix +++ b/modules/dwm.nix @@ -23,6 +23,12 @@ in fade = false; }; + systemd.user.services.xrootdatetime = { + script = builtins.readFile ../home/scripts/x-root-datetime.sh; + wantedBy = [ "graphical-session.target" ]; + partOf = [ "graphical-session.target" ]; + }; + environment.systemPackages = with pkgs; [ dmenu ];