fixup! fixup! fixup! Replace AGS with waybar

This commit is contained in:
2026-03-13 17:24:00 +03:00
parent 807ad51562
commit bd00472f1b
+131 -114
View File
@@ -1,6 +1,7 @@
{ osConfig, config, pkgs, ... }: { { osConfig, config, pkgs, ... }: {
home.packages = with pkgs; [ home.packages = with pkgs; [
font-awesome # font-awesome
nerd-fonts.symbols-only
playerctl playerctl
]; ];
@@ -8,7 +9,7 @@
enable = true; enable = true;
settings.mainBar = { settings.mainBar = {
margin = "8"; margin = "8px";
spacing = 8; spacing = 8;
modules-left = [ modules-left = [
@@ -56,12 +57,16 @@
}; };
battery = { battery = {
interval = 5;
states = { states = {
warning = 30; warning = 30;
critical = 15; critical = 15;
}; };
format = "{icon} {capacity}%"; format = "{icon} {capacity}%";
format-icons = ["" "" "" "" ""]; format-icons = {
default = ["󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"];
charging = ["󰢟" "󰢜" "󰂆" "󰂇" "󰂈" "󰢝" "󰂉" "󰢞" "󰂊" "󰂋" "󰂅"];
};
}; };
"keyboard-state" = { "keyboard-state" = {
@@ -95,13 +100,10 @@
network = { network = {
format = "{ifname}"; format = "{ifname}";
format-wifi = "{essid} ({signalStrength}%) "; format-wifi = " {essid} ({signalStrength}%)";
format-ethernet = "{ifname} "; format-ethernet = "{ifname}";
format-disconnected = ""; format-disconnected = "";
tooltip-format = "{ifname}"; tooltip-format = "{ipaddr}";
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
tooltip-format-ethernet = "{ifname} ";
tooltip-format-disconnected = "Disconnected";
max-length = 50; max-length = 50;
on-click = "ghostty --title=nmtui -e nmtui"; on-click = "ghostty --title=nmtui -e nmtui";
}; };
@@ -141,123 +143,138 @@
style = let style = let
colors = config.lib.stylix.colors.withHashtag; colors = config.lib.stylix.colors.withHashtag;
radius = "12px"; radius = "12px";
in /* css */ '' scssFile = pkgs.writeText "waybar.scss" /* scss */ ''
window#waybar { window#waybar {
background: transparent; background: transparent;
color: ${colors.base05}; color: ${colors.base05};
border-radius: ${radius}; border-radius: ${radius};
font-weight: bold; font-weight: bold;
font-size: 1.1em; font-size: 1.1em;
} }
#language, #language,
#mpris, #mpris,
#pulseaudio, #pulseaudio,
#network, #network,
#battery, #battery,
#cpu, #cpu,
#temperature, #temperature,
#keyboard-state label.locked, #keyboard-state label.locked,
#custom-mem, #custom-mem,
#clock { #clock {
background: ${colors.base00}; background: ${colors.base00};
border-radius: ${radius}; border-radius: ${radius};
padding: 8px; padding: 8px;
} }
#workspaces, #workspaces,
#tray { #tray {
background: ${colors.base00}; background: ${colors.base00};
border-radius: ${radius}; border-radius: ${radius};
} }
#workspaces button { #workspaces button {
color: ${colors.base05}; color: ${colors.base05};
padding: 4px; padding: 4px;
border-radius: ${radius}; border-radius: ${radius};
border: 1pt solid transparent; border: 1pt solid transparent;
}
#workspaces button:hover {
background: ${colors.base01};
}
#workspaces button.active {
background: ${colors.base0B};
color: ${colors.base00};
}
#workspaces button.active:hover {
border-color: ${colors.base0B};
background: ${colors.base01};
color: ${colors.base0B};
}
#mpris:hover { &:hover { background: ${colors.base01}; }
background: ${colors.base01};
}
#mpris.paused {
opacity: .5;
}
#tray widget { &.active {
border: 1pt solid transparent; background: ${colors.base0B};
border-radius: ${radius}; color: ${colors.base00};
}
#tray widget:hover {
background: ${colors.base01};
}
#tray widget>image {
padding: 8px;
}
#tray > .passive {
border-color: ${colors.base02};
}
#tray > .needs-attention {
border-color: ${colors.base09};
}
#pulseaudio:hover, &:hover {
#pulseaudio.muted:hover { border-color: ${colors.base0B};
background: ${colors.base01}; background: ${colors.base01};
} color: ${colors.base0B};
#pulseaudio.muted { }
background: ${colors.base08}; }
color: ${colors.base00}; }
}
#network:hover { #mpris {
background: ${colors.base01}; &:hover { background: ${colors.base01}; }
} &.paused { opacity: .5; }
}
#system .drawer-child > * { #tray {
margin-right: 4px widget {
} border: 1pt solid transparent;
border-radius: ${radius};
&:hover { background: ${colors.base01}; }
& > image { padding: 8px; }
}
#keyboard-state label.locked { & > .passive { border-color: ${colors.base02}; }
background-color: ${colors.base00}; & > .needs-attention { border-color: ${colors.base09}; }
color: ${colors.base08}; }
}
#battery.charging { #pulseaudio {
color: ${colors.base0B}; &:hover { background: ${colors.base01}; }
} &.muted {
#battery.warning:not(.charging) { background: ${colors.base08};
color: ${colors.base00}; color: ${colors.base00};
background-color: ${colors.base09};
} &:hover {
#battery.critical:not(.charging) { color: ${colors.base08};
background-color: ${colors.base08}; background: ${colors.base01};
color: ${colors.base00}; }
animation-name: blink; }
animation-duration: 0.5s; }
animation-timing-function: linear;
animation-iteration-count: infinite; #network {
animation-direction: alternate; &:hover { background: ${colors.base01}; }
} &.disconnected {
@keyframes blink { color: ${colors.base00};
to { background: ${colors.base08};
}
}
#system .drawer-child > * {
margin-right: 4px
}
#keyboard-state label.locked {
background-color: ${colors.base00};
color: ${colors.base08};
}
#battery {
&.plugged { color: ${colors.base0D}; }
&.charging { color: ${colors.base0B}; }
&:not(.charging) {
&.warning {
color: ${colors.base00};
background-color: ${colors.base09};
}
&.critical {
background-color: ${colors.base08};
color: ${colors.base00};
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
}
&.full {
color: ${colors.base00};
background: ${colors.base0B};
}
}
@keyframes blink {
to {
background-color: ${colors.base00}; background-color: ${colors.base00};
color: ${colors.base08}; color: ${colors.base08};
}
} }
} '';
'';
cssFile = pkgs.runCommand "waybar.css" {
nativeBuildInputs = [ pkgs.dart-sass ];
} "sass ${scssFile} $out";
in builtins.readFile cssFile;
}; };
} }