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;
};
services.upower = {
enable = true;
};
services.logind = {
powerKey = "ignore";
powerKeyLongPress = "poweroff";

View file

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

View file

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

View file

@ -2,39 +2,20 @@
mainBar = {
layer = "top";
position = "top";
modules-left = [
"network"
];
modules-center = [
"clock"
];
modules-right = [
"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" = {
states = {
good = 80;
warning = 30;
critical = 10;
better = 70;
good = 50;
bad = 30;
worse = 10;
worst = 5;
};
format = "{icon}";
format-alt = "{capacity}%";
format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
format = " ";
format-alt = " ";
tooltip = false;
};
};

View file

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