tvl-depot/users/tazjin/dotfiles/waybar/config.nix
Vincent Ambo 70a0fc0297 feat(tazjin/dotfiles): configure wlr/taskbar for waybar
I think that's the last module I was missing for this to be "feature-complete".

I think ideally the things displayed by the taskbar would have the same order as
the current Niri layout, but I can tackle this later. This might require a patch
in Niri.

Change-Id: I67cc2366b6c510830021954372e29ce0be7d8363
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12543
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
2024-09-29 15:14:34 +00:00

64 lines
1.2 KiB
Nix

{ depot, pkgs, ... }:
let
launcher = "${pkgs.xfce4-appfinder}/bin/xfce4-appfinder --disable-server";
in
{
mainBar = {
layer = "top";
position = "bottom";
modules-left = [ "custom/start" "wlr/taskbar" ];
"custom/start" = {
format = " Start";
on-click = "xfce4-appfinder --disable-server";
};
modules-right = [ "tray" "backlight" "battery" "pulseaudio" "clock" ];
pulseaudio = {
on-click = "pavucontrol";
format = " "; #styling only
states = {
low = 1;
medium = 40;
high = 75;
};
};
battery = {
format = " "; # styling only
interval = 10;
states = {
full = 100;
good = 85;
medium = 60;
low = 40;
warning = 20;
critical = 10;
};
};
backlight = {
format = "{percent}%"; # styling only
on-scroll-up = "light -A 1";
on-scroll-down = "light -U 1";
};
clock.format-alt = "{:%a, %d. %b %H:%M}";
tray = {
icon-size = 20;
spacing = 10;
};
"wlr/taskbar" = {
format = "{icon} {title}";
on-click = "activate";
rewrite = {
# Truncate any format over 16 characters.
"^(.{16}).+$" = "$1";
};
};
};
}