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

104 lines
3.2 KiB
Nix
Raw Normal View History

2023-06-10 14:07:42 +05:30
{pkgs, ...}: {
2023-04-07 21:01:48 +05:30
programs.waybar = {
enable = true;
2023-08-19 17:00:40 +05:30
package =
(pkgs.waybar.overrideAttrs (oldAttrs: rec {
version = "ed0f7453c986a80cdee59c436288084fcc444277";
src = pkgs.fetchFromGitHub {
owner = "Alexays";
repo = "Waybar";
rev = version;
hash = "sha256-aVWWfAzf38bDBkFDQoYzB7si9yd2pjVGDeSF4PX8KmM=";
};
}))
.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-08-19 16:47:03 +05:30
modules-left = ["wlr/workspaces" "hyprland/window" "hyprland/submap"];
2023-05-18 16:11:26 +05:30
modules-center = [];
modules-right = ["tray" "idle_inhibitor" "network" "bluetooth" "pulseaudio" "backlight" "battery" "clock"];
2023-04-07 21:01:48 +05:30
"sway/mode" = {
"format" = "{}";
2023-03-15 22:11:59 +05:30
};
2023-04-07 21:01:48 +05:30
"sway/window" = {
"tooltip" = false;
2023-03-15 22:11:59 +05:30
};
2023-04-07 21:01:48 +05:30
"idle_inhibitor" = {
"format" = "{icon}";
"format-icons" = {
2023-05-07 18:28:04 +05:30
"activated" = "󰈈";
"deactivated" = "󰈉";
2023-04-07 21:01:48 +05:30
};
"tooltip" = false;
};
"clock" = {
"tooltip" = false;
"interval" = 1;
2023-06-10 13:08:26 +05:30
"format" = "{:%H:%M}";
2023-04-07 21:01:48 +05:30
"format-alt" = "{:%d %B %Y, %A}";
};
"backlight" = {
"format" = "{icon}";
2023-05-18 16:11:26 +05:30
"format-icons" = ["󰃚" "󰃛" "󰃜" "󰃝" "󰃞" "󰃟" "󰃠"];
2023-04-07 21:01:48 +05:30
};
"battery" = {
"states" = {
"good" = 90;
"warning" = 20;
"critical" = 10;
};
"format" = "{icon}";
"format-alt" = "{icon} {capacity}% ({time})";
2023-05-07 18:28:04 +05:30
"format-charging" = "󰂄 {capacity}%";
"format-plugged" = "󰚥 {capacity}%";
2023-05-18 16:11:26 +05:30
"format-icons" = ["󰂃" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"];
2023-04-07 21:01:48 +05:30
"tooltip" = false;
};
"network" = {
2023-05-07 18:28:04 +05:30
"format-wifi" = "󰖩";
"format-ethernet" = "󰈀";
"format-linked" = "󰌷";
"format-disconnected" = "󰖪";
2023-04-07 21:01:48 +05:30
"format-alt" = "{ifname}: {ipaddr}/{cidr}";
"tooltip" = false;
};
"pulseaudio" = {
"tooltip" = false;
"format" = "{icon} {format_source}";
2023-05-07 18:28:04 +05:30
"format-muted" = "󰝟 {format_source}";
"format-bluetooth" = "󰂰 {icon} {format_source}";
"format-bluetooth-muted" = "󰂰 󰝟 {format_source}";
"format-source" = "󰍬";
"format-source-muted" = "󰍭";
2023-04-07 21:01:48 +05:30
"format-icons" = {
2023-05-07 18:28:04 +05:30
"headphones" = "󰋋";
"headset" = "󰋎";
"car" = "󰄋";
2023-05-18 16:11:26 +05:30
"default" = ["󰕿" "󰖀" "󰕾"];
2023-04-07 21:01:48 +05:30
};
"on-click" = "${pkgs.pavucontrol}/bin/pavucontrol";
};
"bluetooth" = {
2023-05-07 18:28:04 +05:30
"format" = "󰂯";
"format-connected" = "󰂱";
"format-disabled" = "󰂲";
"format-off" = "󰂲";
"format-connected-battery" = "󰂱 {device_battery_percentage}%";
2023-04-07 21:01:48 +05:30
"on-click" = "${pkgs.blueman}/bin/blueman-manager";
};
"tray" = {
"spacing" = 4;
2023-03-15 22:11:59 +05:30
};
};
};
};
}