Compare commits
2 Commits
a986113a60
...
bd00472f1b
| Author | SHA1 | Date | |
|---|---|---|---|
| bd00472f1b | |||
| 807ad51562 |
+74
-66
@@ -1,6 +1,7 @@
|
||||
{ osConfig, config, pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
font-awesome
|
||||
# font-awesome
|
||||
nerd-fonts.symbols-only
|
||||
playerctl
|
||||
];
|
||||
|
||||
@@ -8,7 +9,7 @@
|
||||
enable = true;
|
||||
|
||||
settings.mainBar = {
|
||||
margin = "8";
|
||||
margin = "8px";
|
||||
spacing = 8;
|
||||
|
||||
modules-left = [
|
||||
@@ -56,22 +57,23 @@
|
||||
};
|
||||
|
||||
battery = {
|
||||
interval = 5;
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{capacity}%";
|
||||
format-charging = "{capacity}% {time}";
|
||||
format-plugged = "{capacity}%";
|
||||
format-alt = "{time}";
|
||||
format-time = "{H}:{m}";
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = {
|
||||
default = ["" "" "" "" "" "" "" "" "" "" ""];
|
||||
charging = ["" "" "" "" "" "" "" "" "" "" ""];
|
||||
};
|
||||
};
|
||||
|
||||
"keyboard-state" = {
|
||||
capslock = true;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
locked = " CUPS";
|
||||
locked = "CAPS";
|
||||
unlocked = "";
|
||||
};
|
||||
};
|
||||
@@ -98,13 +100,10 @@
|
||||
|
||||
network = {
|
||||
format = "{ifname}";
|
||||
format-wifi = "{essid} ({signalStrength}%) ";
|
||||
format-ethernet = "{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";
|
||||
tooltip-format = "{ipaddr}";
|
||||
max-length = 50;
|
||||
on-click = "ghostty --title=nmtui -e nmtui";
|
||||
};
|
||||
@@ -132,7 +131,7 @@
|
||||
|
||||
temperature = {
|
||||
# thermal-zone = 2;
|
||||
# hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
|
||||
hwmon-path = "/sys/class/hwmon/hwmon5/temp1_input";
|
||||
critical-threshold = 80;
|
||||
# format-critical = "{temperatureC}°C {icon}";
|
||||
format = "{temperatureC}°C {icon}";
|
||||
@@ -144,7 +143,7 @@
|
||||
style = let
|
||||
colors = config.lib.stylix.colors.withHashtag;
|
||||
radius = "12px";
|
||||
in /* css */ ''
|
||||
scssFile = pkgs.writeText "waybar.scss" /* scss */ ''
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
color: ${colors.base05};
|
||||
@@ -160,7 +159,7 @@
|
||||
#battery,
|
||||
#cpu,
|
||||
#temperature,
|
||||
#keyboard-state,
|
||||
#keyboard-state label.locked,
|
||||
#custom-mem,
|
||||
#clock {
|
||||
background: ${colors.base00};
|
||||
@@ -175,98 +174,107 @@
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
color: ${colors.base05};
|
||||
padding: 4px;
|
||||
border-radius: ${radius};
|
||||
border: 1pt solid transparent;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
background: ${colors.base01};
|
||||
}
|
||||
#workspaces button.active {
|
||||
|
||||
&:hover { background: ${colors.base01}; }
|
||||
|
||||
&.active {
|
||||
background: ${colors.base0B};
|
||||
color: ${colors.base00};
|
||||
}
|
||||
#workspaces button.active:hover {
|
||||
|
||||
&:hover {
|
||||
border-color: ${colors.base0B};
|
||||
background: ${colors.base01};
|
||||
color: ${colors.base0B};
|
||||
}
|
||||
|
||||
#mpris:hover {
|
||||
background: ${colors.base01};
|
||||
}
|
||||
#mpris.paused {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
#tray widget {
|
||||
#mpris {
|
||||
&:hover { background: ${colors.base01}; }
|
||||
&.paused { opacity: .5; }
|
||||
}
|
||||
|
||||
#tray {
|
||||
widget {
|
||||
border: 1pt solid transparent;
|
||||
border-radius: ${radius};
|
||||
}
|
||||
#tray widget:hover {
|
||||
background: ${colors.base01};
|
||||
}
|
||||
#tray widget>image {
|
||||
padding: 8px;
|
||||
}
|
||||
#tray > .passive {
|
||||
border-color: ${colors.base02};
|
||||
}
|
||||
#tray > .needs-attention {
|
||||
border-color: ${colors.base09};
|
||||
&:hover { background: ${colors.base01}; }
|
||||
& > image { padding: 8px; }
|
||||
}
|
||||
|
||||
#pulseaudio:hover {
|
||||
background: ${colors.base01};
|
||||
& > .passive { border-color: ${colors.base02}; }
|
||||
& > .needs-attention { border-color: ${colors.base09}; }
|
||||
}
|
||||
#pulseaudio.muted {
|
||||
|
||||
#pulseaudio {
|
||||
&:hover { background: ${colors.base01}; }
|
||||
&.muted {
|
||||
background: ${colors.base08};
|
||||
color: ${colors.base00};
|
||||
|
||||
&:hover {
|
||||
color: ${colors.base08};
|
||||
background: ${colors.base01};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#network:hover {
|
||||
background: ${colors.base01};
|
||||
#network {
|
||||
&:hover { background: ${colors.base01}; }
|
||||
&.disconnected {
|
||||
color: ${colors.base00};
|
||||
background: ${colors.base08};
|
||||
}
|
||||
}
|
||||
|
||||
#system .drawer-child > * {
|
||||
margin-right: 4px
|
||||
}
|
||||
|
||||
#language {
|
||||
border-radius: ${radius} 0 0 ${radius};
|
||||
margin-right: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
#keyboard-state {
|
||||
#keyboard-state label.locked {
|
||||
background-color: ${colors.base00};
|
||||
color: ${colors.base08};
|
||||
border-radius: 0 ${radius} ${radius} 0;
|
||||
margin-left: -8px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
color: ${colors.base05};
|
||||
background-color: ${colors.base0B};
|
||||
}
|
||||
#battery.warning:not(.charging) {
|
||||
#battery {
|
||||
&.plugged { color: ${colors.base0D}; }
|
||||
&.charging { color: ${colors.base0B}; }
|
||||
&:not(.charging) {
|
||||
&.warning {
|
||||
color: ${colors.base00};
|
||||
background-color: ${colors.base09};
|
||||
color: black;
|
||||
}
|
||||
#battery.critical:not(.charging) {
|
||||
&.critical {
|
||||
background-color: ${colors.base08};
|
||||
color: ${colors.base05};
|
||||
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.base05};
|
||||
color: #${colors.base00};
|
||||
background-color: ${colors.base00};
|
||||
color: ${colors.base08};
|
||||
}
|
||||
}
|
||||
'';
|
||||
|
||||
cssFile = pkgs.runCommand "waybar.css" {
|
||||
nativeBuildInputs = [ pkgs.dart-sass ];
|
||||
} "sass ${scssFile} $out";
|
||||
in builtins.readFile cssFile;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user