nixos/home/hyprland/waybar/default.nix

183 lines
5.2 KiB
Nix
Raw Normal View History

{ config, ... }: {
systemd.user.targets.tray.Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session-pre.target" ];
};
2023-07-10 11:24:42 +01:00
programs.waybar = {
enable = true;
style = ./style.css;
2023-10-13 15:00:40 +01:00
systemd = {
enable = true;
target = "hyprland-session.target";
};
settings.main = {
layer = "top";
position = "top";
# Layout
"modules-left" = [ "hyprland/workspaces" ];
"modules-center" = [ "mpris" ];
"modules-right" = [
"battery"
"pulseaudio"
"disk"
"cpu"
"memory"
"clock"
2024-01-03 19:18:40 +00:00
"custom/notification"
"custom/separator"
"tray"
];
# Module config
2023-11-13 20:13:20 +00:00
"custom/separator" = { format = "|"; };
"hyprland/workspaces" = {
format = "{icon}";
format-icons = {
"1" = "󰫃";
"2" = "󰫄";
"3" = "󰫅";
"4" = "󰫆";
"5" = "󰫇";
"6" = "󰫈";
"emacs" = "";
2023-12-17 18:32:56 +00:00
"term" = "󰆍";
"system" = "";
"web" = "󰀹";
"chat" = "󰭹";
"games" = "󰊗";
"remote" = "󰢹";
default = "󰋙";
special = "󰁡";
};
persistent-workspaces = {
"emacs" = [ ];
"term" = [ ];
"system" = [ ];
"web" = [ ];
"chat" = [ ];
"games" = [ ];
"remote" = [ ];
};
show-special = true;
sort-by = "id";
};
mpris = {
2023-12-28 10:20:30 +00:00
"format" = "{player_icon} <b>{artist} - {title}</b>";
"tooltip-format" = "{player_icon} ({player}) {dynamic}";
"interval" = 1;
2023-12-28 10:20:30 +00:00
"dynamic-order" = [ "album" "artist" "title" "position" "length" ];
"player-icons" = {
"default" = "󰲸";
"emms" = "";
"kdeconnect" = "󱀟";
};
"status-icons" = {
"playing" = "󰐊";
"paused" = "󰏤";
"stopped" = "󰓛";
};
"ignored-players" = [ "firefox" "chromium" "mpv" ];
};
pulseaudio = {
scroll-step = 5;
2023-12-18 11:23:14 +00:00
format = "{format_source} {icon} {volume}%";
format-muted = "{format_source} 󰝟 ";
format-source = "󰍬 {volume}%";
format-source-muted = "󰍭";
format-icons = {
car = "󰄍";
default = [ "󰕿" "󰖀" "󰕾" ];
hands-free = "󰥰";
headset = "󰋎";
phone = "󰏲";
portable = "󰏳";
headphone = "󰋋";
};
on-click = "pavucontrol";
on-click-middle = "volumectl -m %";
on-click-right = "volumectl %";
on-scroll-up = "volumectl -u + 5";
on-scroll-down = "volumectl -u - 5";
};
disk = {
format = "󰋊 {percentage_used}%";
path = config.home.homeDirectory;
};
cpu = {
format = "󰻠 {usage}%";
tooltip = false;
};
memory = { format = "󰍛 {}%"; };
temperature = {
critical-threshold = 80;
format = "{icon} {temperatureC}°C";
format-icons = [ "󱃃" "󰔏" "󱃂" ];
};
clock = {
format = "{:󰥔 %R}";
format-alt = "{:󰃭 %Y-%m-%d 󰥔 %R}";
tooltip-format = "<tt><small>{calendar}</small></tt>";
calendar = {
mode = "month";
mode-mon-col = 3;
weeks-pos = "left";
on-scroll = 1;
on-click-right = "mode";
format = {
months = "<span color='#ffead3'><b>{}</b></span>";
days = "<span color='#ecc6d9'><b>{}</b></span>";
weeks = "<span color='#99ffdd'><b>W{}</b></span>";
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
today = "<span color='#ff6699'><b><u>{}</u></b></span>";
};
};
actions = {
on-click-right = "mode";
on-scroll-up = "shift_up";
on-scroll-down = "shift_down";
};
};
backlight = {
format = "{icon}";
tooltip-format = "{percent}%";
format-icons = [ "" "" "" "" "" "" "" "" "" ];
};
battery = {
states = {
warning = 30;
critical = 15;
};
2023-12-17 17:42:52 +00:00
format = "{icon} {capacity}%";
format-charging = "󰂄 {capacity}%";
format-plugged = "󰚥";
2023-12-17 17:42:52 +00:00
tooltip-format = "{time}";
format-icons = [ "󱃍" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
};
2024-01-03 19:18:40 +00:00
"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;
};
tray = {
icon-size = 16;
show-passive-items = true;
spacing = 5;
};
};
2023-07-10 11:24:42 +01:00
};
}