wtf: replace digitalclock

This commit is contained in:
Ingolf Wagner 2020-01-11 08:16:59 +13:00
parent 55edb68ad1
commit a589df7269
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -83,8 +83,6 @@ let
} // (lib.filterAttrs } // (lib.filterAttrs
(key: _: lib.all (x: x != key) [ "height" "width" "top" "left" ]) args); (key: _: lib.all (x: x != key) [ "height" "width" "top" "left" ]) args);
modules = {
# command runner module # command runner module
cmdRunner = args@{ cmd, ... }: cmdRunner = args@{ cmd, ... }:
wtfModule ({ wtfModule ({
@ -93,14 +91,28 @@ let
refreshInterval = 300; refreshInterval = 300;
} // args); } // 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, ... }: digitalclock = args@{ top, left, ... }:
wtfModule ({ cmdRunner ({
type = "digitalclock"; 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 = ""; title = "";
color = "white"; refreshInterval = 30;
font = "bigfont";
hourFormat = 24;
refreshInterval = 1;
} // args); } // args);
clocks = args@{ top, left, ... }: clocks = args@{ top, left, ... }:
@ -194,14 +206,9 @@ let
refreshInterval = 1; refreshInterval = 1;
mods = with modules; { mods = with modules; {
clock = cmdRunner { clock = digitalclock {
cmd = pkgs.writers.writeDash "clock" ''
${pkgs.toilet}/bin/toilet --font future `date +"%a %H:%M"`
'';
top = 0; top = 0;
title = "";
left = 0; left = 0;
refreshInterval = 30;
}; };
weather = prettyweather { weather = prettyweather {
top = 1; top = 1;
@ -221,9 +228,17 @@ let
top = 0; top = 0;
left = 2; left = 2;
height = 3; 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 { nixos = feedreader {
title = "NixOS Weekly"; title = "NixOS Weekly";
top = 3; top = 3;