diff --git a/system/desktop/wtf.nix b/system/desktop/wtf.nix index 2b3280f..f2ca4cf 100644 --- a/system/desktop/wtf.nix +++ b/system/desktop/wtf.nix @@ -83,24 +83,36 @@ let } // (lib.filterAttrs (key: _: lib.all (x: x != key) [ "height" "width" "top" "left" ]) args); - modules = { + # command runner module + cmdRunner = args@{ cmd, ... }: + wtfModule ({ + type = "cmdrunner"; + focusable = false; + refreshInterval = 300; + } // args); - # command runner module - cmdRunner = args@{ cmd, ... }: - wtfModule ({ - type = "cmdrunner"; - focusable = false; - refreshInterval = 300; - } // args); + modules = { + inherit cmdRunner; + + # not working: had no time to investigate + #digitalclock = args@{ top, left, ... }: + # wtfModule ({ + # type = "digitalclock"; + # title = ""; + # color = "white"; + # font = "bigfont"; + # hourFormat = 24; + # refreshInterval = 1; + # } // args); digitalclock = args@{ top, left, ... }: - wtfModule ({ - type = "digitalclock"; + cmdRunner ({ + cmd = pkgs.writers.writeDash "clock" '' + ${pkgs.toilet}/bin/toilet --font future `${pkgs.coreutils}/bin/date +"%a %H:%M"` + ${pkgs.coreutils}/bin/date +"%B %d %Y" + ''; title = ""; - color = "white"; - font = "bigfont"; - hourFormat = 24; - refreshInterval = 1; + refreshInterval = 30; } // args); clocks = args@{ top, left, ... }: @@ -194,14 +206,9 @@ let refreshInterval = 1; mods = with modules; { - clock = cmdRunner { - cmd = pkgs.writers.writeDash "clock" '' - ${pkgs.toilet}/bin/toilet --font future `date +"%a %H:%M"` - ''; + clock = digitalclock { top = 0; - title = ""; left = 0; - refreshInterval = 30; }; weather = prettyweather { top = 1; @@ -221,9 +228,17 @@ let top = 0; left = 2; height = 3; - feeds = [ "https://lobste.rs/rss"]; + feeds = [ "https://lobste.rs/rss" ]; }; + hackernews_tools = feedreader { + title = "Hacker News Tools"; + top = 4; + left = 1; + height = 1; + feeds = + [ "https://latesthackingnews.com/category/hacking-tools/feed/" ]; + }; nixos = feedreader { title = "NixOS Weekly"; top = 3;