wtf: replace digitalclock
This commit is contained in:
parent
55edb68ad1
commit
a589df7269
1 changed files with 36 additions and 21 deletions
|
@ -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;
|
||||||
|
@ -224,6 +231,14 @@ let
|
||||||
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;
|
||||||
|
|
Loading…
Reference in a new issue