Fix weather display, remove arrows from waybar

This commit is contained in:
notgne2 2021-12-17 02:16:23 -07:00
parent da62a58fb4
commit 9e9aeb3b40
No known key found for this signature in database
GPG Key ID: BB661E172B42A7F8

View File

@ -368,124 +368,96 @@ in
position = "left"; position = "left";
height = null; height = null;
modules-left = [ "sway/workspaces" "custom/right-arrow-dark" "custom/right-arrow-light" "custom/weather-temp" "custom/weather-precip" "custom/weather-wind" "custom/right-arrow-dark" ]; modules-left = [ "sway/workspaces" "custom/weather-temp" "custom/weather-precip" "custom/weather-wind" ];
modules-center = [ "custom/left-arrow-dark" "clock#1" "clock#2" "custom/left-arrow-light" "custom/left-arrow-dark" "mpd" "custom/right-arrow-dark" "custom/right-arrow-light" "clock#3" "custom/right-arrow-dark" ]; modules-center = [ "clock#1" "clock#2" "mpd" "clock#3" ];
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-right = [ "pulseaudio" "memory" "cpu" ] ++ lib.optionals cfg.battery [ "battery" ] ++ [ "tray" ];
modules = modules = {
let "custom/weather-temp" = {
checkWttr = "${pkgs.bash}/bin/bash -c '! (${pkgs.curl}/bin/curl wttr.in/${cfg.location}?format=+ | ${pkgs.gnugrep}/bin/grep \\'^Unknown location;\\')'"; exec = "${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=%c+%t' || echo ERR";
in 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}'";
"custom/left-arrow-dark" = { interval = 900;
format = ""; };
tooltip = false; "custom/weather-precip" = {
rotate = 270; exec = "${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=🌧+%p'";
}; on-click = "${pkgs.xdg-utils}/bin/xdg-open 'https://www.lightningmaps.org/'";
"custom/left-arrow-light" = { on-click-right = "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'";
format = ""; interval = 900;
tooltip = false; };
rotate = 270; "custom/weather-wind" = {
}; exec = "${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=🌬+%w'";
"custom/right-arrow-dark" = { on-click = "${pkgs.xdg-utils}/bin/xdg-open 'https://www.ventusky.com/";
format = ""; on-click-right = "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'";
tooltip = false; interval = 900;
rotate = 270; };
};
"custom/right-arrow-light" = {
format = "";
tooltip = false;
rotate = 270;
};
"custom/weather-temp" = { mpd = {
exec-if = checkWttr; rotate = 90;
exec = "${pkgs.curl}/bin/curl 'wttr.in/${cfg.location}?format=%c+%t' || echo ERR"; max-length = 60;
on-click = "${pkgs.xdg-utils}/bin/xdg-open 'https://weather.com/weather/today/l/85625'"; format = "{stateIcon} {artist} - {title}";
on-click-right = "${pkgs.xdg-utils}/bin/xdg-open 'https://wttr.in/${cfg.location}'"; format-stopped = " STOPPED";
interval = 900; state-icons = {
}; paused = "";
"custom/weather-precip" = { playing = "";
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 = "";
};
};
"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) } // cfg.waybarConfig)
]; ];
@ -495,18 +467,6 @@ in
color: #${config.colors.base16.base06}; color: #${config.colors.base16.base06};
} }
#custom-right-arrow-dark,
#custom-left-arrow-dark {
color: #${config.colors.base16.base00};
font-size: 15px;
}
#custom-right-arrow-light,
#custom-left-arrow-light {
color: #${config.colors.base16.base01};
background: #${config.colors.base16.base00};
font-size: 15px;
}
#workspaces, #workspaces,
#clock.1, #clock.1,
#clock.2, #clock.2,