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 =
[(import ./scripts.nix)];
imports = [ (import ./scripts.nix) ];
programs.waybar = {
enable = true;
@ -22,12 +27,15 @@
"position": "top",
"modules-left": [
"sway/workspaces",
"hyprland/workspaces",
"privacy",
"group/network",
"tray",
],
"modules-center": [
"hyprland/workspaces",
],
"modules-right": [
"custom/yubikey#icon",
"custom/yubikey#data",
@ -37,14 +45,16 @@
// "wireplumber",
"group/audio",
"battery",
"custom/notification",
"group/clock"
],
// -------------------------------------------------------------------------
// modules-left
// -------------------------------------------------------------------------
"hyprland/window": {
"format": "{}",
"rewrite": {
"(.*) - zsh": "> [$1]"
},
"separate-outputs": true
},
"sway/workspaces": {
"all-outputs": true,
@ -128,10 +138,6 @@
"tooltip": false
},
// -------------------------------------------------------------------------
// modules-right
// -------------------------------------------------------------------------
"custom/yubikey#icon": {
"exec": "~/.local/bin/waybar-yubikey 0",
"return-type": "json"
@ -278,27 +284,6 @@
"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": {
"orientation": "horizontal",
"modules": [ "custom/clock#minutes", "clock#time", "clock#date" ],
@ -363,7 +348,8 @@
}
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;
color: #eeeeee;
transition-property: background-color;
@ -433,6 +419,13 @@
color: #ffffff;
}
#workspaces button.active {
box-shadow: inherit;
text-shadow: inherit;
background: transparent;
color: #ffffff;
}
#workspaces button.focused {
color: #eeeeee;
}
@ -471,13 +464,7 @@
background: #f9409d;
}
#custom-notification {
padding: 0;
color: #ffffff;
margin: 0px 10px;
}
'';
};
};
}