[wayland]: Add network to bar

This commit is contained in:
Sweetbread 2024-04-23 00:01:50 +03:00
parent 3c5f61ddc1
commit 3186e8c275

View File

@ -9,7 +9,7 @@
modules-left = ["hyprland/workspaces" "hyprland/language" "keyboard-state" "hyprland/submap"]; modules-left = ["hyprland/workspaces" "hyprland/language" "keyboard-state" "hyprland/submap"];
modules-center = ["clock" "custom/weather"]; modules-center = ["clock" "custom/weather"];
modules-right = ["pulseaudio" "custom/mem" "cpu" "backlight" "battery" "tray"]; modules-right = ["pulseaudio" "backlight" "network" "battery" "tray"];
"hyprland/workspaces" = { "hyprland/workspaces" = {
disable-scroll = true; disable-scroll = true;
@ -35,14 +35,14 @@
"clock" = { "clock" = {
# timezone = "America/New_York"; # timezone = "America/New_York";
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"; tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
format = "{:%a; %d %b, %I:%M %p}"; format = "{:%a; %d %b, %R}";
}; };
"custom/weather" = { "custom/weather" = {
format = "{}"; format = "{}";
tooltip = true; tooltip = true;
interval = 1800; interval = 1800;
exec = "$HOME/.config/waybar/scripts/wttr.py"; exec = "python3 $HOME/.config/waybar/scripts/wttr.py";
return-type = "json"; return-type = "json";
}; };
@ -91,6 +91,20 @@
tooltip = false; tooltip = false;
}; };
"network" = {
interface = "wlo1";
format = "{ifname}";
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "{ifname} ";
format-disconnected = "";
tooltip-format = "{ifname}";
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
tooltip-format-ethernet = "{ifname} ";
tooltip-format-disconnected = "Disconnected";
max-length = 50;
on-click = "alacritty -e sh -c nmtui";
};
"backlight" = { "backlight" = {
device = "intel_backlight"; device = "intel_backlight";
format = "{percent}% {icon}"; format = "{percent}% {icon}";
@ -228,6 +242,16 @@ window#waybar.hidden {
background: #383c4a; background: #383c4a;
} }
#network {
margin-right: 8px;
padding-left: 16px;
padding-right: 16px;
border-radius: 10px;
transition: none;
color: #ffffff;
background: #383c4a;
}
#custom-weather { #custom-weather {
padding-right: 16px; padding-right: 16px;
border-radius: 0px 10px 10px 0px; border-radius: 0px 10px 10px 0px;