nixos-config/modules/home/waybar.nix

149 lines
2.1 KiB
Nix
Raw Normal View History

2025-02-08 10:27:43 -05:00
{ pkgs, ... }:
with pkgs.lib.nix-rice;
let strPalette = palette.toRGBHex pkgs.rice.colorPalette;
in {
programs.waybar = {
enable = true;
package = pkgs.waybar;
2025-02-09 12:10:29 -05:00
systemd.enable = false;
2025-02-08 10:27:43 -05:00
style = ''
2025-01-27 15:34:15 -05:00
* {
border: none;
2025-01-30 11:25:14 -05:00
font-size: 12pt;
2025-02-05 00:50:55 -05:00
font-family: "JetBrainsMono Nerd Font" ;
2025-01-27 15:34:15 -05:00
min-height: 25px;
}
window#waybar {
2025-02-08 10:27:43 -05:00
background: ${strPalette.normal.background};
2025-01-27 15:34:15 -05:00
margin: 5px;
}
.modules-right {
padding-left: 5px;
margin-top: 2px;
2025-01-30 11:25:14 -05:00
color: #ccc;
2025-01-27 15:34:15 -05:00
}
.modules-center {
padding: 0 15px;
margin-top: 2px;
2025-01-30 11:25:14 -05:00
color: #ccc;
2025-01-27 15:34:15 -05:00
}
.modules-left {
margin-top: 2px;
2025-01-30 11:25:14 -05:00
color: #ccc;
padding-right: 5px;
}
#network {
padding: 0 10px 0 15px;
2025-01-27 15:34:15 -05:00
}
#battery,
#custom-clipboard,
#custom-colorpicker,
#custom-powerDraw,
#bluetooth,
#pulseaudio,
2025-01-30 11:25:14 -05:00
#wireplumber,
2025-01-27 15:34:15 -05:00
#disk,
#memory,
#taskbar
2025-01-27 15:34:15 -05:00
#cpu,
#temperature,
#custom-weather,
#idle_inhibitor,
#jack,
#upower,
#power-profiles-daemon
2025-01-27 15:34:15 -05:00
#tray,
#window,
#workspaces,
#clock
#custom-notification {
2025-01-30 11:25:14 -05:00
padding: 0 20px;
2025-01-27 15:34:15 -05:00
}
#custom-notification {
min-width: 30px;
}
#power-profiles-daemon {
min-width: 40px;
}
2025-01-27 15:34:15 -05:00
#temperature.critical,
#pulseaudio.muted {
color: #FF0000;
padding-top: 0;
}
#cpu {
padding-right: 30px;
}
2025-01-27 15:34:15 -05:00
#clock{
2025-02-08 10:27:43 -05:00
color: ${strPalette.normal.magenta};
2025-01-27 15:34:15 -05:00
}
#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;
}
2025-01-30 11:25:14 -05:00
#mpris {
margin-left: 15px;
}
#workspaces button {
color: #666;
}
#workspaces button.empty {
color: #222;
}
#workspaces button.focused
{
color: #ccc;
}
#taskbar, #tray {
padding-right: 30px;
}
2025-01-30 11:25:14 -05:00
#taskbar button.active {
background: #333;
}
2025-01-27 15:34:15 -05:00
@keyframes blink {
2025-01-30 11:25:14 -05:00
to {
background-color: #ffffff;
color: #000000;
}
2025-02-08 10:27:43 -05:00
}
'';
};
xdg.configFile."waybar/config".source = ../../homes/emenel/dotfiles/dot_config/waybar/config;
2025-01-27 15:34:15 -05:00
}