trying new waybar

This commit is contained in:
twoneis 2024-08-23 16:36:16 +02:00
parent c912f2cf06
commit 44af87820c
5 changed files with 58 additions and 60 deletions

View file

@ -23,6 +23,10 @@ in {
package = pkgs.niri-unstable; package = pkgs.niri-unstable;
}; };
services.upower = {
enable = true;
};
services.logind = { services.logind = {
powerKey = "ignore"; powerKey = "ignore";
powerKeyLongPress = "poweroff"; powerKeyLongPress = "poweroff";

View file

@ -3,7 +3,7 @@
inherit (config) theme; inherit (config) theme;
in { in {
main = { main = {
font = "FiraCodeNerdFont:size=18"; font = "FiraCodeNerdFont:size=8";
icons-enabled = false; icons-enabled = false;
terminal = "alacritty -e"; terminal = "alacritty -e";
prompt = "'󱄅 '"; prompt = "'󱄅 '";

View file

@ -38,7 +38,7 @@ in {
layout = { layout = {
focus-ring = { focus-ring = {
width = 4; width = 2;
active.gradient = { active.gradient = {
to = config.theme.rose; to = config.theme.rose;
from = config.theme.pine; from = config.theme.pine;
@ -57,6 +57,9 @@ in {
default-column-width = { proportion = 0.5; }; default-column-width = { proportion = 0.5; };
gaps = 2; gaps = 2;
struts = {
top = 4;
};
}; };
window-rules = [ window-rules = [

View file

@ -2,39 +2,20 @@
mainBar = { mainBar = {
layer = "top"; layer = "top";
position = "top"; position = "top";
modules-left = [
"network"
];
modules-center = [ modules-center = [
"clock"
];
modules-right = [
"battery" "battery"
]; ];
"clock" = {
format = "{:%H:%M}";
format-alt = "{:%a, %Y-%m-%d}";
tooltip = false;
};
"network" = {
format-wifi = "{icon}";
format-alt = "{essid}";
format-ethernet = "󰈁";
format-disconnected = "󰤭 ";
format-icons = ["󰤯 " "󰤟 " "󰤢 " "󰤥 " "󰤨 "];
tooltip = false;
};
"battery" = { "battery" = {
states = { states = {
good = 80; better = 70;
warning = 30; good = 50;
critical = 10; bad = 30;
worse = 10;
worst = 5;
}; };
format = "{icon}"; format = " ";
format-alt = "{capacity}%"; format-alt = " ";
format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
tooltip = false; tooltip = false;
}; };
}; };

View file

@ -1,52 +1,62 @@
{ config, ... }: let { config, ... }: let
background = config.theme.base; best = config.theme.pine;
font = config.theme.text; better = config.theme.foam;
charging = config.theme.pine; good = config.theme.iris;
warning = config.theme.rose; bad = config.theme.rose;
critical = config.theme.love; worse = config.theme.gold;
worst = config.theme.love;
charging = config.theme.highlight-high;
in { in {
style = '' style = ''
* { * {
border: none; font-size: 1px;
font-family: FiraCodeNerdFont;
font-size: 18px;
color: ${font};
border-radius: 20px;
} }
window#waybar { window#waybar {
background: rgba(0, 0, 0, 0); background: rgba(0, 0, 0, 0);
} }
/*-----module groups----*/ #battery {
.modules-right { border: none;
background-color: ${background}; border-radius: 4px;
margin: 2px 10px 0 0; min-height: 4px;
min-width: 720px;
margin: 2px;
background: ${best};
} }
.modules-center { #battery.better {
background-color: ${background}; background: ${better};
margin: 2px 0 0 0;
} }
.modules-left { #battery.good {
margin: 2px 0 0 10px; background: ${good};
background-color: ${background}; }
#battery.bad {
background: ${bad};
}
#battery.worse {
background: ${worse};
}
#battery.worst {
background: ${worst};
} }
#battery,
#clock,
#network {
padding: 0 15px;
}
/*-----Indicators----*/
#battery.charging { #battery.charging {
color: ${charging}; background: linear-gradient(0deg, ${charging}, ${best});
} }
#battery.warning:not(.charging) { #battery.better.charging {
color: ${warning}; background: linear-gradient(0deg, ${best}, ${better});
} }
#battery.critical:not(.charging) { #battery.good.charging {
color: ${critical}; background: linear-gradient(0deg, ${better}, ${good});
}
#battery.bad.charging {
background: linear-gradient(0deg, ${good}, ${bad});
}
#battery.worse.charging {
background: linear-gradient(0deg, ${bad}, ${worse});
}
#battery.worst.charging {
background: linear-gradient(0deg, ${worse}, ${worst});
} }
''; '';
} }