Nixfiles! :3
0

Configure Feed

Select the types of activity you want to include in your feed.

waybar got restored from an old backup :eyes:


Signed-off-by: MLC Bloeiman <mar@strawmelonjuice.com>

MLC Bloeiman (May 20, 2026, 9:55 PM +0200) d6ec91e1 ac7c5182

+578 -81
+578 -81
home/modules/niri/waybar.nix
··· 7 7 config = { 8 8 home.packages = [ 9 9 pkgs.waybar 10 + pkgs.waybar-mpris 10 11 pkgs.swaybg 11 12 pkgs.wlsunset 12 - pkgs.networkmanagerapplet 13 + # pkgs.networkmanagerapplet 13 14 pkgs.pavucontrol 14 15 pkgs.kdePackages.kwallet 15 16 pkgs.kdePackages.kwalletmanager ··· 39 40 { 40 41 layer = "top"; 41 42 position = "top"; 42 - margin = "10 15 0 15"; 43 - spacing = 8; 43 + height = 30; 44 + # margin = "10 15 0 15"; 45 + spacing = 0; 44 46 45 47 modules-left = [ 46 48 "niri/workspaces" 47 49 "niri/window" 48 50 ]; 49 - modules-center = [ "clock" ]; 51 + modules-center = [ 52 + "custom/osktoggle" 53 + "battery" 54 + "clock" 55 + "custom/exit" 56 + ]; 50 57 modules-right = [ 51 58 "tray" 59 + "mpd" 52 60 "pulseaudio" 53 - "backlight" 54 - "battery" 55 - "custom/power" 61 + "network" 62 + "cpu" 63 + "memory" 64 + "keyboard-state" 56 65 ]; 57 66 58 67 "niri/workspaces" = { 59 - format = "{name}"; 60 - all-outputs = true; 68 + rewrite = { 69 + "(.*) - Discord" = "# Discord: $1"; 70 + "Element \\| (.*)" = "# Element: $1"; 71 + "(.*) - ArmCord" = "# Discord: $1"; 72 + "Revolt" = "# Revolt"; 73 + "(.*) — LibreWolf" = "$1"; 74 + "(.*) — Mozilla Firefox" = "$1"; 75 + "(.*) — Zen Browser" = "$1"; 76 + "(.*) - Chromium" = "$1"; 77 + "(.*) - Vivaldi" = "$1"; 78 + "Spotify (.*)" = "Spotify"; 79 + "(.*) - Tidal" = "Tidal"; 80 + "(.*) - TIDAL" = "Tidal"; 81 + }; 82 + 83 + # format = "{name}"; 84 + # all-outputs = true; 85 + separate-outputs = true; 61 86 }; 62 87 63 - "clock" = { 64 - format = "{:%H:%M}"; 65 - format-alt = "{:%A, %B %d, %Y (%R)}"; 66 - tooltip-format = "<tt><small>{calendar}</small></tt>"; 88 + "custom/osktoggle" = { 89 + format = "  "; 90 + on-click = "~/.config/hypr/scripts/keyboard-relaunch.sh"; 91 + tooltip-format = "Toggle the on-screen keyboard (restarts the keyboard if needed.)"; 92 + }; 93 + "custom/waybar-mpris" = { 94 + return-type = "json"; 95 + exec = "waybar-mpris --position --autofocus"; 96 + on-click = "waybar-mpris --send toggle"; 97 + # This option will switch between players on right click. 98 + on-click-right = "waybar-mpris --send player-next"; 99 + # The options below will switch the selected player on scroll 100 + # "on-scroll-up"= "waybar-mpris --send player-next"; 101 + # "on-scroll-down"= "waybar-mpris --send player-prev"; 102 + # The options below will go to next/previous track on scroll 103 + # "on-scroll-up"= "waybar-mpris --send next"; 104 + # "on-scroll-down"= "waybar-mpris --send prev"; 105 + escape = true; 67 106 }; 68 107 69 - "pulseaudio" = { 70 - format = "{icon} {volume}%"; 71 - format-muted = "󰝟"; 72 - format-icons = { 73 - default = [ 74 - "󰕿" 75 - "󰖀" 76 - "󰕾" 77 - ]; 108 + "custom/exit" = { 109 + "format" = ""; 110 + "tooltip-format" = "Powermenu"; 111 + "on-click" = "wlogout -b 4"; 112 + "tooltip" = false; 113 + }; 114 + # Keyboard State 115 + "keyboard-state" = { 116 + "numlock" = true; 117 + "capslock" = true; 118 + "format" = "{name} {icon}"; 119 + "format-icons" = { 120 + "locked" = ""; 121 + "unlocked" = ""; 122 + }; 123 + }; 124 + # System tray 125 + "tray" = { 126 + # "icon-size"= 21; 127 + "spacing" = 10; 128 + }; 129 + # Clock 130 + clock = { 131 + "timezone" = "Europe/Berlin"; 132 + "tooltip-format" = "<big>{=%Y %B}</big>\n<tt><small>{calendar}</small></tt>"; 133 + "format-alt" = "{=%Y-%m-%d}"; 134 + }; 135 + # System 136 + "custom/system" = { 137 + "format" = ""; 138 + "tooltip" = false; 139 + }; 140 + # CPU 141 + "cpu" = { 142 + "format" = " {usage}% "; 143 + "on-click" = "wezterm -e htop"; 144 + }; 145 + # Memory 146 + "memory" = { 147 + "format" = " {}% "; 148 + "on-click" = "wezterm -e btop"; 149 + }; 150 + # Harddisc space used 151 + "disk" = { 152 + "interval" = 30; 153 + "format" = "D {percentage_used}% "; 154 + "path" = "/"; 155 + "on-click" = "wezterm -e htop"; 156 + }; 157 + "hyprland/language" = { 158 + "format" = "/ K {short}"; 159 + }; 160 + # Group Hardware 161 + "group/hardware" = { 162 + "orientation" = "inherit"; 163 + "drawer" = { 164 + "transition-duration" = 300; 165 + "children-class" = "not-memory"; 166 + "transition-left-to-right" = false; 78 167 }; 79 - on-click = "pavucontrol"; 168 + "modules" = [ 169 + "custom/system" 170 + "disk" 171 + "cpu" 172 + "memory" 173 + ]; 174 + }; 175 + # Network 176 + "network" = { 177 + "format" = "{ifname}"; 178 + "format-wifi" = " "; 179 + "format-ethernet" = "  "; 180 + "format-disconnected" = "Not connected"; 181 + "tooltip-format" = " {ifname} via {gwaddri}"; 182 + "tooltip-format-wifi" = " {essid} ({signalStrength}%)"; 183 + "tooltip-format-ethernet" = " {ifname} ({ipaddr}/{cidr})"; 184 + "tooltip-format-disconnected" = "Disconnected"; 185 + "max-length" = 50; 186 + "on-click" = "wezterm -e nmtui connect"; 80 187 }; 81 - 188 + # Battery 82 189 "battery" = { 83 - states = { 84 - warning = 30; 85 - critical = 15; 190 + "states" = { 191 + "good" = 80; 192 + "warning" = 30; 193 + "critical" = 15; 86 194 }; 87 - format = "{icon} {capacity}%"; 88 - format-icons = [ 89 - "󰁺" 90 - "󰁻" 91 - "󰁼" 92 - "󰁽" 93 - "󰁾" 94 - "󰁿" 95 - "󰂀" 96 - "󰂁" 97 - "󰂂" 98 - "󰁹" 195 + "format-alt" = "{icon} {capacity}%"; 196 + "format" = "{icon} {time}"; 197 + "format-charging" = " {capacity}%"; 198 + "format-plugged" = " {capacity}%"; 199 + # "format-good"= " "; 200 + "format-full" = ""; 201 + "format-icons" = [ 202 + " " 203 + " " 204 + " " 205 + " " 206 + " " 99 207 ]; 100 208 }; 101 - 102 - "custom/power" = { 103 - format = " 󰐥 "; 104 - on-click = "wlogout"; 209 + # Pulseaudio 210 + "pulseaudio" = { 211 + # "scroll-step"= 1; // %, can be a float 212 + "format" = "{icon} {volume}%"; 213 + "format-bluetooth" = "{volume}% {icon} {format_source}"; 214 + "format-bluetooth-muted" = "{icon}"; 215 + "format-muted" = ""; 216 + "format-source" = "{volume}% "; 217 + "format-source-muted" = ""; 218 + "format-icons" = { 219 + "headphone" = ""; 220 + "hands-free" = ""; 221 + "headset" = ""; 222 + "phone" = ""; 223 + "portable" = ""; 224 + "car" = ""; 225 + "default" = [ 226 + "" 227 + " " 228 + " " 229 + ]; 230 + }; 231 + "on-click" = "pavucontrol"; 232 + }; 233 + # Bluetooth 234 + "bluetooth" = { 235 + "format-disabled" = ""; 236 + "format-off" = ""; 237 + "interval" = 30; 238 + "on-click" = "blueman-manager"; 239 + "format-no-controller" = ""; 240 + }; 241 + # Other 242 + "user" = { 243 + "format" = "{user}"; 244 + "interval" = 60; 245 + "icon" = false; 105 246 }; 106 247 } 107 248 ]; 108 249 109 250 style = '' 110 - * { 111 - font-family: "Font Awesome 6 Free", "Hermit", "Roboto"; 112 - font-size: 13px; 113 - color: #e8a0a5; 114 - border: none; 115 - border-radius: 0; 116 - } 251 + @define-color backgroundlight #e06666; 252 + @define-color backgrounddark #f4cccc; 253 + @define-color workspacesbackground1 #f4cccc; 254 + @define-color workspacesbackground2 #fa8071; 255 + @define-color workspacesbackground3 rgba(250, 128, 113, 0.3); 256 + @define-color bordercolor #f4cccc; 257 + @define-color textcolor1 #000000; 258 + @define-color textcolor2 #000000; 259 + @define-color textcolor3 #f4cccc; 260 + @define-color iconcolor #9b4457; 261 + 262 + /* ----------------------------------------------------- 263 + * General 264 + * ----------------------------------------------------- */ 265 + 266 + * { 267 + font-family: Hermit, "Font Awesome 6 Free", FontAwesome, Ubuntu, Arial, 268 + sans-serif; 269 + border: none; 270 + border-radius: 0px; 271 + } 272 + 273 + window#waybar { 274 + background-color: transparent; 275 + /* border-bottom: 3px groove rgb(255,204,255); */ 276 + /* color: #FFFFFF; */ 277 + transition-property: background-color; 278 + transition-duration: 0.5s; 279 + } 280 + 281 + /* ----------------------------------------------------- 282 + * Workspaces 283 + * ----------------------------------------------------- */ 284 + 285 + #workspaces { 286 + margin: 5px 6px 6px 3px; 287 + padding: 0px 1px; 288 + border-radius: 5px; 289 + background-color: @workspacesbackground3; 290 + border: 0px; 291 + font-weight: bold; 292 + font-style: normal; 293 + font-size: 12px; 294 + color: @textcolor1; 295 + } 296 + 297 + #workspaces button { 298 + padding: 0px 5px; 299 + margin: 4px 3px; 300 + border-radius: 5px; 301 + border: 0px; 302 + color: @textcolor1; 303 + transition: all 0.3s ease-in-out; 304 + background: @workspacesbackground1; 305 + } 306 + 307 + #workspaces button.active, #workspaces button.focused { 308 + color: @textcolor1; 309 + background: @workspacesbackground2; 310 + border-radius: 5px; 311 + min-width: 40px; 312 + transition: all 1.0s ease-in-out; 313 + border: 2px rgb(255,77,77) solid; 314 + } 315 + 316 + #workspaces button:hover { 317 + color: @textcolor1; 318 + background: @workspacesbackground2; 319 + border-radius: 6px; 320 + } 321 + 322 + /* ----------------------------------------------------- 323 + * Tooltips 324 + * ----------------------------------------------------- */ 325 + 326 + tooltip { 327 + border-radius: 10px; 328 + background-color: @backgroundlight; 329 + opacity: 0.8; 330 + padding: 20px; 331 + margin: 0px; 332 + } 333 + 334 + tooltip label { 335 + color: @textcolor2; 336 + } 337 + 338 + /* ----------------------------------------------------- 339 + * Window 340 + * ----------------------------------------------------- */ 341 + 342 + #window { 343 + background: @backgroundlight; 344 + margin: 10px 15px 10px 0px; 345 + padding: 2px 10px 0px 10px; 346 + border-radius: 12px; 347 + color: @textcolor2; 348 + font-size: 16px; 349 + font-weight: normal; 350 + } 351 + 352 + window#waybar.empty #window { 353 + background-color: transparent; 354 + } 355 + 356 + /* ----------------------------------------------------- 357 + * Taskbar 358 + * ----------------------------------------------------- */ 359 + #taskbar, .niri-taskbar { 360 + background: @backgroundlight; 361 + margin: 10px 15px 10px 18px; 362 + padding: 0px; 363 + border-radius: 5px; 364 + font-weight: normal; 365 + font-style: normal; 366 + border: 3px dotted @backgroundlight; 367 + } 368 + #taskbar button, .niri-taskbar button { 369 + margin: 3px; 370 + border-radius: 5px; 371 + padding: 1px 1px 1px 1px; 372 + border: 1px transparent; 373 + } 374 + 375 + #taskbar button.unread, .niri-taskbar button { 376 + border: 2px dotted @textcolor3; 377 + border-radius: 5px; 378 + padding: 2px 2px 2px 2px; 379 + } 380 + 381 + /* ----------------------------------------------------- 382 + * Modules 383 + * ----------------------------------------------------- */ 384 + 385 + .modules-left > widget:first-child > #workspaces { 386 + margin-left: 0; 387 + } 388 + 389 + .modules-right > widget:last-child > #workspaces { 390 + margin-right: 0; 391 + } 392 + 393 + /* ----------------------------------------------------- 394 + * Custom Quicklinks 395 + * ----------------------------------------------------- */ 396 + 397 + #custom-browser, 398 + #custom-filemanager, 399 + #network, 400 + #pulseaudio, 401 + #battery, 402 + #clock { 403 + margin-right: 20px; 404 + font-size: 20px; 405 + font-weight: bold; 406 + color: @iconcolor; 407 + padding: 4px 10px 2px 10px; 408 + font-size: 16px; 409 + } 410 + 411 + #custom-quicklink1, 412 + #custom-quicklink2, 413 + #custom-quicklink3, 414 + #custom-quicklink4, 415 + #custom-quicklink5, 416 + #custom-quicklink6, 417 + #custom-quicklink7, 418 + #custom-quicklink8, 419 + #custom-quicklink9, 420 + #custom-quicklink10 { 421 + padding: 0px; 422 + margin-right: 7px; 423 + font-size: 20px; 424 + color: @iconcolor; 425 + } 426 + 427 + #custom-osktoggle { 428 + border-radius: 5px; 429 + font-size: 20px; 430 + padding: 4px; 431 + background-color: @backgroundlight; 432 + color: @textcolor1; 433 + margin: 10px 20px 10px 20px; 434 + border-radius: 5px; 435 + border: 0px; 436 + font-weight: bold; 437 + font-style: normal; 438 + } 439 + 440 + 441 + #custom-exit { 442 + margin: 10px 20px 10px 10px; 443 + padding: 5px 10px 5px 10px; 444 + /* Add a little extra padding to the right. to make it look more centered. */ 445 + padding-right: 15px; 446 + font-size: 20px; 447 + color: @iconcolor; 448 + border-radius: 5px; 449 + background-color: @backgroundlight; 450 + } 451 + 452 + 453 + #disk, 454 + #memory, 455 + #cpu, 456 + #language { 457 + margin: 10px; 458 + padding: 0px; 459 + font-size: 14px; 460 + color: #000000; 461 + border-radius: 5px; 462 + background-color: @backgroundlight; 463 + } 464 + /* glue cpu and memory together */ 465 + #cpu { 466 + margin-right: 0px; 467 + border-radius: 5px 0px 0px 5px; 468 + padding: 0px 10px 0px 10px; 469 + } 470 + #memory { 471 + margin-left: 0px; 472 + border-radius: 0px 5px 5px 0px; 473 + padding: 0px 10px 0px 10px; 474 + } 475 + 476 + #keyboard-state { 477 + background-color: @backgroundlight; 478 + font-size: 12px; 479 + color: @textcolor2; 480 + border-radius: 5px; 481 + margin: 10px 10px 10px 0px; 482 + } 483 + 484 + #language { 485 + margin-right: 10px; 486 + } 487 + 488 + /* ----------------------------------------------------- 489 + * Clock 490 + * ----------------------------------------------------- */ 491 + 492 + #clock { 493 + background-color: @backgroundlight; 494 + font-size: 16px; 495 + color: @textcolor1; 496 + border-radius: 5px; 497 + margin: 10px 7px 10px 0px; 498 + } 499 + 500 + /* ----------------------------------------------------- 501 + * Pulseaudio 502 + * ----------------------------------------------------- */ 503 + 504 + #pulseaudio { 505 + font-size: 16px; 506 + border-radius: 5px; 507 + margin: 10px 10px 10px 0px; 508 + background-color: #e06666; 509 + color: #000000; 510 + 511 + } 512 + 513 + #pulseaudio.muted { 514 + color: #ffa07a; 515 + background-color: #fadfb0; 516 + } 517 + 518 + /* ----------------------------------------------------- 519 + * Network 520 + * ----------------------------------------------------- */ 117 521 118 - window#waybar { 119 - background: transparent; 120 - } 522 + #network { 523 + background-color: @backgroundlight; 524 + font-size: 16px; 525 + color: @textcolor2; 526 + border-radius: 5px; 527 + margin: 10px 10px 10px 0px; 528 + } 121 529 122 - .modules-left, .modules-center, .modules-right { 123 - background: rgba(30, 30, 35, 0.8); 124 - border-radius: 12px; 125 - padding: 2px 10px; 126 - border: 1px solid rgba(255, 255, 255, 0.1); 127 - } 530 + #network.ethernet { 531 + background-color: @backgroundlight; 532 + color: @textcolor2; 533 + } 128 534 129 - #workspaces button { 130 - border-radius: 12px; 131 - border: dotted 2px #bfa6a8; 132 - padding: 0 5px; 133 - margin: 0 5px; 134 - color: #f1c4c7; 135 - } 535 + #network.wifi { 536 + background-color: @backgroundlight; 537 + color: @textcolor2; 538 + } 136 539 137 - #workspaces button.focused { 138 - border: dotted 2px #1e8b44; 139 - color: #1e8b44; 140 - font-weight: bold; 141 - } 540 + /* ----------------------------------------------------- 541 + * Bluetooth 542 + * ----------------------------------------------------- */ 543 + 544 + #bluetooth, 545 + #bluetooth.on, 546 + #bluetooth.connected { 547 + background-color: @backgroundlight; 548 + font-size: 16px; 549 + color: @textcolor2; 550 + border-radius: 5px; 551 + margin: 10px 15px 10px 0px; 552 + } 142 553 143 - #clock { 144 - color: #e8a0a5; 145 - } 554 + #bluetooth.off { 555 + background-color: transparent; 556 + padding: 0px; 557 + margin: 0px; 558 + } 146 559 147 - #battery.critical { 148 - color: #cf6679; 149 - animation: blink 0.5s linear infinite alternate; 150 - } 560 + /* ----------------------------------------------------- 561 + * Battery 562 + * ----------------------------------------------------- */ 151 563 152 - @keyframes blink { 153 - to { color: white; } 154 - } 564 + #battery { 565 + background-color: @backgroundlight; 566 + font-size: 16px; 567 + color: @textcolor2; 568 + border: 2px rgb(255,77,77) dotted; 569 + border-radius: 5px; 570 + margin: 10px 15px 10px 0px; 571 + } 572 + 573 + #battery.charging, 574 + #battery.plugged { 575 + color: @textcolor2; 576 + background-color: @backgroundlight; 577 + } 578 + 579 + @keyframes blink { 580 + to { 581 + background-color: @backgroundlight; 582 + color: @textcolor2; 583 + } 584 + } 585 + 586 + #battery.warning:not(.charging) { 587 + background-color: #f1c40f; 588 + color: @textcolor3; 589 + } 590 + 591 + #battery.full { 592 + color: @textcolor3; 593 + background-color: #2ecc71; 594 + } 595 + 596 + #battery.good:not(.charging) { 597 + background-color: #3498db; 598 + color: @textcolor3; 599 + } 600 + 601 + #battery.critical:not(.charging) { 602 + color: #ffa07a; 603 + background-color: #fadfb0; 604 + animation-name: blink; 605 + animation-duration: 0.5s; 606 + animation-timing-function: linear; 607 + animation-iteration-count: infinite; 608 + animation-direction: alternate; 609 + } 610 + 611 + /* ----------------------------------------------------- 612 + * Tray 613 + * ----------------------------------------------------- */ 614 + 615 + #tray { 616 + background-color: rgba(250, 128, 113, 0.3); 617 + border-radius: 5px; 618 + border: 2px rgb(255,77,77) dotted; 619 + padding: 4px; 620 + margin: 10px 15px 10px 0px; 621 + } 622 + 623 + #tray > .passive { 624 + -gtk-icon-effect: dim; 625 + } 626 + 627 + #tray > .needs-attention { 628 + -gtk-icon-effect: highlight; 629 + background-color: #eb4d4b; 630 + } 631 + 632 + /* ----------------------------------------------------- 633 + * Other 634 + * ----------------------------------------------------- */ 635 + 636 + label:focus { 637 + background-color: #000000; 638 + } 639 + 640 + #backlight { 641 + background-color: #90b1b1; 642 + } 643 + 644 + #network { 645 + background-color: #2980b9; 646 + } 647 + 648 + #network.disconnected { 649 + color: #ffa07a; 650 + background-color: #fadfb0; 651 + } 155 652 ''; 156 653 }; 157 654