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
|
||||
(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;
|
||||
|
@ -224,6 +231,14 @@ let
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue