cleanup and styling with nix-rice

This commit is contained in:
Matt Nish-Lapidus 2025-02-08 10:27:43 -05:00
parent 762be96a71
commit 88fad0ccac
9 changed files with 90 additions and 63 deletions

View file

@ -1,16 +1,9 @@
{ config, pkgs, ... }:
with pkgs.lib.nix-rice;
let strPalette = palette.toRGBHex pkgs.rice.colorPalette;
in {
{
programs = {
waybar = {
enable = true;
package = pkgs.waybar;
};
eww = {
enable = true;
configDir = ../../homes/emenel/dotfiles/dot_config/eww;
};
niri = {
# package = pkgs.niri-unstable;
# enable = true;
@ -59,13 +52,13 @@
width = 2560;
height = 1600;
};
background-color = "#000000";
background-color = strPalette.normal.background;
scale = 1;
variable-refresh-rate = true;
};
"HDMI-A-1" = {
background-color = "#000000";
background-color = strPalette.normal.background;
scale = 1;
};
@ -74,7 +67,7 @@
width = 3840;
height = 2160;
};
background-color = "#000000";
background-color = strPalette.normal.background;
scale = 1;
};
};
@ -117,8 +110,8 @@
focus-ring = {
enable = true;
active.gradient = {
from = "#d8bfffdd";
to = "#BD93FF99";
from = strPalette.normal.magenta;
to = strPalette.bright.magenta;
angle = 180;
in' = "srgb-linear";
};

142
modules/home/waybar.nix Normal file
View file

@ -0,0 +1,142 @@
{ pkgs, ... }:
with pkgs.lib.nix-rice;
let strPalette = palette.toRGBHex pkgs.rice.colorPalette;
in {
programs.waybar = {
enable = true;
package = pkgs.waybar;
style = ''
* {
border: none;
font-size: 12pt;
font-family: "JetBrainsMono Nerd Font" ;
min-height: 25px;
}
window#waybar {
background: ${strPalette.normal.background};
margin: 5px;
}
.modules-right {
padding-left: 5px;
margin-top: 2px;
color: #ccc;
}
.modules-center {
padding: 0 15px;
margin-top: 2px;
color: #ccc;
}
.modules-left {
margin-top: 2px;
color: #ccc;
padding-right: 5px;
}
#network {
padding: 0 10px 0 15px;
}
#battery,
#custom-clipboard,
#custom-colorpicker,
#custom-powerDraw,
#bluetooth,
#pulseaudio,
#wireplumber,
#disk,
#memory,
#taskbar
#cpu,
#temperature,
#custom-weather,
#idle_inhibitor,
#jack,
#upower,
#power-profiles-daemon
#tray,
#window,
#workspaces,
#clock {
padding: 0 20px;
}
#power-profiles-daemon {
min-width: 40px;
}
#temperature.critical,
#pulseaudio.muted {
color: #FF0000;
padding-top: 0;
}
#cpu {
padding-right: 30px;
}
#clock{
color: ${strPalette.normal.magenta};
}
#battery.charging {
color: #ffffff;
background-color: #26A65B;
}
#battery.warning:not(.charging) {
background-color: #ffbe61;
color: black;
}
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#mpris {
margin-left: 15px;
}
#workspaces button {
color: #666;
}
#workspaces button.empty {
color: #222;
}
#workspaces button.focused
{
color: #ccc;
}
#taskbar, #tray {
padding-right: 30px;
}
#taskbar button.active {
background: #333;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
'';
};
xdg.configFile."waybar/config".source = ../../homes/emenel/dotfiles/dot_config/waybar/config;
}