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
(key: _: lib.all (x: x != key) [ "height" "width" "top" "left" ]) args);
modules = {
# command runner module
cmdRunner = args@{ cmd, ... }:
wtfModule ({
@ -93,14 +91,28 @@ let
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;