mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 16:21:34 +01:00
Modularize the DE config
This commit is contained in:
parent
38a5b3cbb1
commit
4b650721b0
11 changed files with 285 additions and 252 deletions
81
modules/home/de/waybar.nix
Normal file
81
modules/home/de/waybar.nix
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options.myConfig.de.waybar.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.de.waybar.enable {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
spacing = 10;
|
||||
|
||||
modules-left = ["clock"];
|
||||
modules-center = ["hyprland/workspaces"];
|
||||
modules-right = ["tray" "wireplumber" "backlight" "battery"];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
active-only = false;
|
||||
all-outputs = true;
|
||||
};
|
||||
|
||||
clock = {
|
||||
format = " {:%H.%M}";
|
||||
tooltip-format = "{:%d.%m.%Y}";
|
||||
};
|
||||
|
||||
wireplumber = {
|
||||
format = "{icon} {volume}%";
|
||||
format-muted = "";
|
||||
format-icons = ["" "" ""];
|
||||
scroll-step = "5";
|
||||
};
|
||||
|
||||
tray = {
|
||||
icon-size = 20;
|
||||
spacing = 6;
|
||||
};
|
||||
|
||||
backlight = {
|
||||
device = "amdgpu_bl1";
|
||||
format = "{icon} {percent}%";
|
||||
format-icons = ["" "" ""];
|
||||
};
|
||||
|
||||
battery = {
|
||||
states = {
|
||||
warning = 15;
|
||||
critical = 5;
|
||||
};
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = ["" "" "" "" "" "" "" "" "" "" ""];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
font-family: "Open Sans, Symbols Nerd Font Mono";
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: rgba(43, 48, 59, 0.5);
|
||||
color: #ffffff;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.configFile."waybar/config".onChange = lib.mkForce "${lib.getExe' pkgs.systemd "systemctl"} restart --user waybar";
|
||||
xdg.configFile."waybar/style.css".onChange = lib.mkForce "${lib.getExe' pkgs.systemd "systemctl"} restart --user waybar";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue