waybar.nix
1 { 2 pkgs, 3 lib, 4 config, 5 ... 6 }: let 7 cfg = config.programs.waybar; 8 inherit(lib) mkIf mkEnableOption; 9 in { 10 options.programs.waybar.enable = mkEnableOption "waybar"; 11 12 config = mkIf cfg.enable{ 13 14 hm = { 15 16 17 programs.waybar = { 18 enable = true; 19 20 settings = { 21 22 mainBar = { 23 layer = "top"; 24 position = "bottom"; 25 height = 15; 26 27 modules-center = ["hyprland/workspaces"]; 28 29 30 "hyprland/workspaces" = { 31 # active-only = true; 32 33 format = "{icon}"; 34 35 format-icons = { 36 active = ""; 37 empty = ""; 38 default = ""; 39 }; 40 41 persistent-workspaces = { 42 "*" = 5; 43 }; 44 45 }; 46 }; 47 48 }; 49 50 51 style = '' 52 * { 53 border: none; 54 border-radius: 16px; 55 font-family: "Torus Nerd Font"; 56 font-size: 16px; 57 min-height: 0; 58 } 59 60 61 #workspaces button { 62 padding: 0.5rem; 63 margin: 0.25rem; 64 background-color:@base02; 65 color: @base10; 66 } 67 68 69 #workspaces button.empty { 70 color: @base09; 71 } 72 ''; 73 74 75 }; 76 }; 77 }; 78 }