1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00

feat(i3): add mail to bar, make into dock

This commit is contained in:
Kierán Meinhardt
2020-05-03 00:17:09 +02:00
parent 89b176b251
commit 4ba5a08a26
2 changed files with 32 additions and 12 deletions

View File

@@ -103,7 +103,8 @@ in with config.niveum; {
bars = [{
workspaceButtons = false;
fonts = [ "Monospace ${toString (config.niveum.fonts.size - 1)}" ];
mode = "hide";
mode = "dock";
position = "top";
colors = rec {
background = colours.background;
separator = background;

View File

@@ -43,6 +43,7 @@
net_vpn = "🛡 ";
toggle_off = "👎";
toggle_on = "👍";
mail = "📧 ";
volume_full = "🔊 ";
volume_half = "🔉 ";
volume_muted = "";
@@ -60,7 +61,7 @@
}
{
block = "custom";
interval = 60 * 60 * 60; # hourly
interval = 60 * 2; # every two minutes
command = pkgs.writers.writeDash "corona" ''
${pkgs.curl}/bin/curl https://corona-stats.online/germany \
| ${pkgs.gnugrep}/bin/grep Germany \
@@ -69,16 +70,6 @@
| ${pkgs.gawk}/bin/awk -F'' '{print "🤒 " $3 " 💀 " $5}'
'';
}
{
block = "custom";
interval = 2 * 60;
command = pkgs.writers.writeDash "rss" ''
${pkgs.newsboat}/bin/newsboat -x print-unread | ${pkgs.gawk}/bin/awk '{ print "📰 " $1 }'
'';
on_click = pkgs.writers.writeDash "updateNewsboat" ''
${pkgs.newsboat}/bin/newsboat -x reload && ${pkgs.libnotify}/bin/notify-send newsboat "Feeds updated."
'';
}
{
block = "custom";
interval = 20;
@@ -91,6 +82,34 @@
${pkgs.st}/bin/st -c floating -e ${pkgs.dash}/bin/dash -c "${pkgs.todo-txt-cli}/bin/todo.sh list && sleep 2"
'';
}
{
block = "custom";
interval = 30;
command = pkgs.writers.writeDash "rss-new" ''
${pkgs.newsboat}/bin/newsboat --execute=print-unread | ${pkgs.gawk}/bin/awk '{ print "📰 " $1 }'
'';
on_click = pkgs.writers.writeDash "rss-update" ''
${pkgs.libnotify}/bin/notify-send newsboat "Updating feeds. " \
&& ${pkgs.newsboat}/bin/newsboat --execute=reload \
&& ${pkgs.libnotify}/bin/notify-send newsboat "Feeds updated. 📰"
'';
}
{
block = "custom";
interval = 30;
command = pkgs.writers.writeDash "mail-new" ''
printf "%s " "📧"
for dir in /home/kfm/mail/*/Inbox/new
do
find "$dir" -type f | wc --lines
done | paste --serial --delimiters='/' -
'';
on_click = pkgs.writers.writeDash "mail-update" ''
${pkgs.libnotify}/bin/notify-send newsboat "Updating mail. " \
&& ${pkgs.isync}/bin/mbsync -a \
&& ${pkgs.libnotify}/bin/notify-send newsboat "Mail updated. 📧"
'';
}
{
block = "net";
device = wifi-interface;