configuration.nix/home/wm/addon/waybar/default.nix

103 lines
3.1 KiB
Nix
Raw Normal View History

2024-05-18 10:25:31 +05:30
{ pkgs, ... }:
{
2023-04-07 21:01:48 +05:30
programs.waybar = {
enable = true;
2023-08-27 12:49:39 +05:30
package = pkgs.waybar.override {
hyprlandSupport = true;
swaySupport = false;
};
2023-04-07 21:01:48 +05:30
systemd.enable = true;
style = ./style.css;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 28;
2023-11-04 16:12:45 +05:30
modules-left = [ "hyprland/workspaces" "hyprland/window" "hyprland/submap" ];
modules-center = [ ];
2024-05-18 10:25:31 +05:30
modules-right = [ "tray" "idle_inhibitor" "network" "bluetooth" "wireplumber" "backlight" "battery" "clock" "custom/notification" ];
"hyprland/workspaces" = {
separate-outputs = true;
};
2023-09-09 22:17:45 +05:30
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = "󰈈";
deactivated = "󰈉";
2023-04-07 21:01:48 +05:30
};
2023-09-09 22:17:45 +05:30
tooltip = false;
2023-04-07 21:01:48 +05:30
};
2023-09-09 22:17:45 +05:30
clock = {
tooltip = false;
interval = 1;
format = "{:%H:%M}";
format-alt = "{:%d %B %Y, %A}";
2023-04-07 21:01:48 +05:30
};
2023-09-09 22:17:45 +05:30
backlight = {
format = "{icon}";
2023-11-04 16:12:45 +05:30
format-icons = [ "󰃚" "󰃛" "󰃜" "󰃝" "󰃞" "󰃟" "󰃠" ];
2023-09-28 21:03:52 +05:30
tooltip = false;
2023-04-07 21:01:48 +05:30
};
2023-09-09 22:17:45 +05:30
battery = {
states = {
good = 90;
warning = 30;
2023-09-09 22:17:45 +05:30
critical = 10;
2023-04-07 21:01:48 +05:30
};
2023-09-09 22:17:45 +05:30
format = "{icon}";
format-alt = "{icon} {capacity}% ({time})";
format-charging = "󰂄 {capacity}%";
format-plugged = "󰚥 {capacity}%";
2023-11-04 16:12:45 +05:30
format-icons = [ "󰂃" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
2023-09-09 22:17:45 +05:30
tooltip = false;
2023-04-07 21:01:48 +05:30
};
2023-09-09 22:17:45 +05:30
network = {
format-wifi = "󰖩";
format-ethernet = "󰈀";
format-linked = "󰌷";
format-disconnected = "󰖪";
format-alt = "{ifname}: {ipaddr}/{cidr}";
tooltip = false;
2023-04-07 21:01:48 +05:30
};
2023-10-19 19:53:51 +05:30
wireplumber = {
format = "{icon}";
format-muted = "󰝟";
2023-09-09 22:17:45 +05:30
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
2023-11-04 16:12:45 +05:30
format-icons = [ "󰕿" "󰖀" "󰕾" ];
2023-10-19 22:37:16 +05:30
tooltip = false;
2023-04-07 21:01:48 +05:30
};
2023-09-09 22:17:45 +05:30
bluetooth = {
format = "󰂯";
format-connected = "󰂱";
format-disabled = "󰂲";
format-off = "󰂲";
2024-05-12 22:57:10 +05:30
on-click = "${pkgs.blueberry}/bin/blueberry";
tooltip = false;
2023-04-07 21:01:48 +05:30
};
2023-09-09 22:17:45 +05:30
tray = {
spacing = 4;
2023-03-15 22:11:59 +05:30
};
2024-05-18 10:25:31 +05:30
"custom/notification" = let swaync-client = "${pkgs.swaynotificationcenter}/bin/swaync-client"; in {
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 = "${swaync-client} -swb";
on-click = "${swaync-client} -t -sw";
on-click-right = "${swaync-client} -d -sw";
escape = true;
};
2023-03-15 22:11:59 +05:30
};
};
};
}