reformatting
This commit is contained in:
parent
47f0cd1be2
commit
7f59c589a7
5 changed files with 226 additions and 215 deletions
|
@ -373,118 +373,119 @@ in
|
|||
modules-right = [ "custom/left-arrow-dark" "pulseaudio" "custom/left-arrow-light" "custom/left-arrow-dark" "memory" "custom/left-arrow-light" "custom/left-arrow-dark" "cpu" "custom/left-arrow-light" "custom/left-arrow-dark" ] ++ lib.optionals cfg.battery [ "battery" "custom/left-arrow-light" "custom/left-arrow-dark" ] ++ [ "tray" ];
|
||||
|
||||
modules =
|
||||
let
|
||||
checkWttr = "${pkgs.bash}/bin/bash -c '! (${pkgs.curl}/bin/curl wttr.in/${cfg.location}?format=+ | ${pkgs.gnugrep}/bin/grep \\'^Unknown location;\\')'";
|
||||
in {
|
||||
"custom/left-arrow-dark" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
rotate = 270;
|
||||
};
|
||||
"custom/left-arrow-light" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
rotate = 270;
|
||||
};
|
||||
"custom/right-arrow-dark" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
rotate = 270;
|
||||
};
|
||||
"custom/right-arrow-light" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
rotate = 270;
|
||||
};
|
||||
let
|
||||
checkWttr = "${pkgs.bash}/bin/bash -c '! (${pkgs.curl}/bin/curl wttr.in/${cfg.location}?format=+ | ${pkgs.gnugrep}/bin/grep \\'^Unknown location;\\')'";
|
||||
in
|
||||
{
|
||||
"custom/left-arrow-dark" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
rotate = 270;
|
||||
};
|
||||
"custom/left-arrow-light" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
rotate = 270;
|
||||
};
|
||||
"custom/right-arrow-dark" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
rotate = 270;
|
||||
};
|
||||
"custom/right-arrow-light" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
rotate = 270;
|
||||
};
|
||||
|
||||
"custom/weather-temp" = {
|
||||
exec-if = checkWttr;
|
||||
exec = "${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=%c+%t' || echo ERR";
|
||||
on-click = "${pkgs.xdg-utils}/bin/xdg-open 'https://weather.com/weather/today/l/85625'";
|
||||
on-click-right = "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'";
|
||||
interval = 900;
|
||||
};
|
||||
"custom/weather-precip" = {
|
||||
exec-if = checkWttr;
|
||||
exec = "${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=🌧️+%p'";
|
||||
on-click = "${pkgs.xdg-utils}/bin/xdg-open 'https://www.lightningmaps.org/'";
|
||||
on-click-right = "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'";
|
||||
interval = 900;
|
||||
};
|
||||
"custom/weather-wind" = {
|
||||
exec-if = checkWttr;
|
||||
exec = "${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=🌬️+%w'";
|
||||
on-click = "${pkgs.xdg-utils}/bin/xdg-open 'https://www.ventusky.com/";
|
||||
on-click-right = "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'";
|
||||
interval = 900;
|
||||
};
|
||||
"custom/weather-temp" = {
|
||||
exec-if = checkWttr;
|
||||
exec = "${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=%c+%t' || echo ERR";
|
||||
on-click = "${pkgs.xdg-utils}/bin/xdg-open 'https://weather.com/weather/today/l/85625'";
|
||||
on-click-right = "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'";
|
||||
interval = 900;
|
||||
};
|
||||
"custom/weather-precip" = {
|
||||
exec-if = checkWttr;
|
||||
exec = "${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=🌧️+%p'";
|
||||
on-click = "${pkgs.xdg-utils}/bin/xdg-open 'https://www.lightningmaps.org/'";
|
||||
on-click-right = "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'";
|
||||
interval = 900;
|
||||
};
|
||||
"custom/weather-wind" = {
|
||||
exec-if = checkWttr;
|
||||
exec = "${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=🌬️+%w'";
|
||||
on-click = "${pkgs.xdg-utils}/bin/xdg-open 'https://www.ventusky.com/";
|
||||
on-click-right = "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'";
|
||||
interval = 900;
|
||||
};
|
||||
|
||||
mpd = {
|
||||
rotate = 90;
|
||||
max-length = 60;
|
||||
format = "{stateIcon} {artist} - {title}";
|
||||
format-stopped = "⏹ STOPPED";
|
||||
state-icons = {
|
||||
paused = "";
|
||||
playing = "";
|
||||
mpd = {
|
||||
rotate = 90;
|
||||
max-length = 60;
|
||||
format = "{stateIcon} {artist} - {title}";
|
||||
format-stopped = "⏹ STOPPED";
|
||||
state-icons = {
|
||||
paused = "";
|
||||
playing = "";
|
||||
};
|
||||
};
|
||||
|
||||
"sway/workspaces" = {
|
||||
disable-scroll = true;
|
||||
};
|
||||
|
||||
"clock#1" = {
|
||||
tooltip = false;
|
||||
format = "{:%a}";
|
||||
};
|
||||
"clock#2" = {
|
||||
tooltip = false;
|
||||
format = "{:%m-%d}";
|
||||
};
|
||||
"clock#3" = {
|
||||
tooltip = false;
|
||||
format = "{:%I:%M %p}";
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "{icon} {volume}%";
|
||||
format-bluetooth = "{icon} {volume}%";
|
||||
format-muted = "MUTE";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
default = "";
|
||||
};
|
||||
on-click = "${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
on-click-right = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
};
|
||||
|
||||
memory = {
|
||||
interval = 10;
|
||||
format = " {}%";
|
||||
};
|
||||
|
||||
cpu = {
|
||||
interval = 10;
|
||||
format = " {usage}%";
|
||||
};
|
||||
|
||||
battery = {
|
||||
states = {
|
||||
good = 90;
|
||||
warning = 25;
|
||||
critical = 10;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
};
|
||||
|
||||
tray = {
|
||||
icon-size = 18;
|
||||
spacing = 5;
|
||||
};
|
||||
};
|
||||
|
||||
"sway/workspaces" = {
|
||||
disable-scroll = true;
|
||||
};
|
||||
|
||||
"clock#1" = {
|
||||
tooltip = false;
|
||||
format = "{:%a}";
|
||||
};
|
||||
"clock#2" = {
|
||||
tooltip = false;
|
||||
format = "{:%m-%d}";
|
||||
};
|
||||
"clock#3" = {
|
||||
tooltip = false;
|
||||
format = "{:%I:%M %p}";
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "{icon} {volume}%";
|
||||
format-bluetooth = "{icon} {volume}%";
|
||||
format-muted = "MUTE";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
default = "";
|
||||
};
|
||||
on-click = "${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
on-click-right = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
};
|
||||
|
||||
memory = {
|
||||
interval = 10;
|
||||
format = " {}%";
|
||||
};
|
||||
|
||||
cpu = {
|
||||
interval = 10;
|
||||
format = " {usage}%";
|
||||
};
|
||||
|
||||
battery = {
|
||||
states = {
|
||||
good = 90;
|
||||
warning = 25;
|
||||
critical = 10;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
};
|
||||
|
||||
tray = {
|
||||
icon-size = 18;
|
||||
spacing = 5;
|
||||
};
|
||||
};
|
||||
|
||||
} // cfg.waybarConfig)
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue