feat: make waybar setup a little more perfect

This commit is contained in:
Ahwx 2025-03-31 17:34:56 +02:00
parent 76406ed0cf
commit 82f4faadad

View file

@ -1,8 +1,13 @@
{ config, lib, pkgs, username, ... }: {
config,
lib,
pkgs,
username,
...
}:
{ {
imports = imports = [ (import ./scripts.nix) ];
[(import ./scripts.nix)];
programs.waybar = { programs.waybar = {
enable = true; enable = true;
@ -22,12 +27,15 @@
"position": "top", "position": "top",
"modules-left": [ "modules-left": [
"sway/workspaces",
"hyprland/workspaces",
"privacy", "privacy",
"group/network", "group/network",
"tray", "tray",
], ],
"modules-center": [
"hyprland/workspaces",
],
"modules-right": [ "modules-right": [
"custom/yubikey#icon", "custom/yubikey#icon",
"custom/yubikey#data", "custom/yubikey#data",
@ -37,14 +45,16 @@
// "wireplumber", // "wireplumber",
"group/audio", "group/audio",
"battery", "battery",
"custom/notification",
"group/clock" "group/clock"
], ],
"hyprland/window": {
// ------------------------------------------------------------------------- "format": "{}",
// modules-left "rewrite": {
// ------------------------------------------------------------------------- "(.*) - zsh": "> [$1]"
},
"separate-outputs": true
},
"sway/workspaces": { "sway/workspaces": {
"all-outputs": true, "all-outputs": true,
@ -128,10 +138,6 @@
"tooltip": false "tooltip": false
}, },
// -------------------------------------------------------------------------
// modules-right
// -------------------------------------------------------------------------
"custom/yubikey#icon": { "custom/yubikey#icon": {
"exec": "~/.local/bin/waybar-yubikey 0", "exec": "~/.local/bin/waybar-yubikey 0",
"return-type": "json" "return-type": "json"
@ -278,27 +284,6 @@
"format-icons": [" ", " ", " ", " ", " "], "format-icons": [" ", " ", " ", " ", " "],
}, },
"custom/notification": {
"tooltip": false,
"format": "{icon} ",
"format-icons": {
"notification": "",
"none": "",
"dnd-notification": "",
"dnd-none": "",
"inhibited-notification": "",
"inhibited-none": "",
"dnd-inhibited-notification": "",
"dnd-inhibited-none": ""
},
"return-type": "json",
"exec-if": "which swaync-client",
"exec": "swaync-client -swb",
"on-click": "swaync-client -t -sw",
"on-click-right": "swaync-client -d -sw",
"escape": true
},
"group/clock": { "group/clock": {
"orientation": "horizontal", "orientation": "horizontal",
"modules": [ "custom/clock#minutes", "clock#time", "clock#date" ], "modules": [ "custom/clock#minutes", "clock#time", "clock#date" ],
@ -363,7 +348,8 @@
} }
window#waybar.top { window#waybar.top {
background-color: rgba(115, 116, 116, 0.22); /* background-color: rgba(115, 116, 116, 0.22); */
background-color: rgba(0, 0, 0, 0.75);
border-bottom: none; border-bottom: none;
color: #eeeeee; color: #eeeeee;
transition-property: background-color; transition-property: background-color;
@ -433,6 +419,13 @@
color: #ffffff; color: #ffffff;
} }
#workspaces button.active {
box-shadow: inherit;
text-shadow: inherit;
background: transparent;
color: #ffffff;
}
#workspaces button.focused { #workspaces button.focused {
color: #eeeeee; color: #eeeeee;
} }
@ -471,13 +464,7 @@
background: #f9409d; background: #f9409d;
} }
#custom-notification {
padding: 0;
color: #ffffff;
margin: 0px 10px;
}
''; '';
}; };
}; };
} }