mirror of
https://github.com/kmein/niveum
synced 2026-03-19 11:31:09 +01:00
feat(i3): add mail to bar, make into dock
This commit is contained in:
@@ -103,7 +103,8 @@ in with config.niveum; {
|
|||||||
bars = [{
|
bars = [{
|
||||||
workspaceButtons = false;
|
workspaceButtons = false;
|
||||||
fonts = [ "Monospace ${toString (config.niveum.fonts.size - 1)}" ];
|
fonts = [ "Monospace ${toString (config.niveum.fonts.size - 1)}" ];
|
||||||
mode = "hide";
|
mode = "dock";
|
||||||
|
position = "top";
|
||||||
colors = rec {
|
colors = rec {
|
||||||
background = colours.background;
|
background = colours.background;
|
||||||
separator = background;
|
separator = background;
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
net_vpn = "🛡 ";
|
net_vpn = "🛡 ";
|
||||||
toggle_off = "👎";
|
toggle_off = "👎";
|
||||||
toggle_on = "👍";
|
toggle_on = "👍";
|
||||||
|
mail = "📧 ";
|
||||||
volume_full = "🔊 ";
|
volume_full = "🔊 ";
|
||||||
volume_half = "🔉 ";
|
volume_half = "🔉 ";
|
||||||
volume_muted = "⛔";
|
volume_muted = "⛔";
|
||||||
@@ -60,7 +61,7 @@
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
block = "custom";
|
block = "custom";
|
||||||
interval = 60 * 60 * 60; # hourly
|
interval = 60 * 2; # every two minutes
|
||||||
command = pkgs.writers.writeDash "corona" ''
|
command = pkgs.writers.writeDash "corona" ''
|
||||||
${pkgs.curl}/bin/curl https://corona-stats.online/germany \
|
${pkgs.curl}/bin/curl https://corona-stats.online/germany \
|
||||||
| ${pkgs.gnugrep}/bin/grep Germany \
|
| ${pkgs.gnugrep}/bin/grep Germany \
|
||||||
@@ -69,16 +70,6 @@
|
|||||||
| ${pkgs.gawk}/bin/awk -F'│' '{print "🤒 " $3 " 💀 " $5}'
|
| ${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";
|
block = "custom";
|
||||||
interval = 20;
|
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"
|
${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";
|
block = "net";
|
||||||
device = wifi-interface;
|
device = wifi-interface;
|
||||||
|
|||||||
Reference in New Issue
Block a user