switch datetime module to xmobar

This commit is contained in:
Schrottkatze 2023-12-06 20:07:14 +01:00
parent 31ba7cac22
commit b7987a87b4
4 changed files with 33 additions and 41 deletions

View file

@ -45,7 +45,7 @@
separator-foreground = "\${colors.disabled}";
font-0 = "FiraCode Nerd Font";
modules-left = "xworkspaces xwindow";
modules-right = "memory cpu wlan battery date";
modules-right = "memory cpu wlan battery";
cursor-click = "pointer";
cursor-scroll = "ns-resize";
enable-ipc = true;
@ -138,14 +138,6 @@
];
};
"module/date" = {
type = "internal/date";
interval = 1;
date = "%Y%{F#7c6f64}-%{F#ebdbb2}%m%{F#7c6f64}-%{F#ebdbb2}%d";
time = "%H%{F#7c6f64}:%{F#ebdbb2}%M%{F#7c6f64}:%{F#ebdbb2}%S";
label = "%{F#d65d0e}󰃭%{F#ebdbb2} %date% %{F#d65d0e}󱑌%{F#ebdbb2} %time%";
};
"settings" = {
screenchange-reload = true;
pseudo-transparency = true;

View file

@ -14,12 +14,12 @@
programs.xmobar = {
enable = true;
};
home.file."xmobar.hs" = {
home.file."xmobar.hs" = rec {
source = ../../haskell/xmobar/xmobar.hs;
target = ".config/xmobar/xmobar.hs";
onChange = ''
export PATH=${lib.makeBinPath [xmobarGhc]}:$PATH
${pkgs.xmobar}/bin/xmobar --recompile
${xmobarGhc}/bin/ghc -threaded ${target}
${pkgs.busybox}/bin/pkill xmobar
${pkgs.haskellPackages.xmonad}/bin/xmonad --restart
'';
};