1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-09 20:43:57 +00:00
ultima/modules/home/wm/misc/waybar/default.nix

166 lines
5.1 KiB
Nix
Raw Normal View History

2024-12-03 14:20:37 +00:00
{ lib, config, True, ... }:
2024-11-21 09:24:15 +00:00
with lib;
let cfg = config.module.wm.misc.waybar;
in {
options = { module.wm.misc.waybar = { enable = mkEnableOption ""; }; };
imports = [ ./style.nix ];
config = mkIf cfg.enable {
programs.waybar = with config.lib.stylix.colors;
True // {
settings = {
# BAR AT BOTTOM
2024-12-03 14:20:37 +00:00
mainBar = let
Tool = { tooltip = false; };
wm_icons = {
"1" = "";
"2" = "";
"3" = "";
"4" = "";
"5" = "";
"6" = "";
"7" = "";
"8" = "";
"9" = "";
"10" = "";
};
2024-11-21 09:24:15 +00:00
in {
layer = "top";
position = "bottom";
height = 1;
modules-left = [
"custom/launcher"
"custom/separatorL"
"pulseaudio"
"custom/separatorL"
"backlight"
"custom/separatorL"
"network"
"custom/separatorL"
2024-12-03 14:20:37 +00:00
"hyprland/language"
2024-11-21 09:24:15 +00:00
];
2024-12-03 14:20:37 +00:00
modules-center = [ "hyprland/workspaces" ];
2024-11-21 09:24:15 +00:00
modules-right = [
"tray"
"custom/separatorR"
"disk"
"custom/separatorR"
"clock#time"
"custom/separatorR"
"battery"
];
# LEFT MODULES
2024-12-03 14:20:37 +00:00
"custom/launcher" = Tool // {
2024-11-21 09:24:15 +00:00
format = "<span color='#${base0C}' font='17'></span> {}";
on-click = "nwg-drawer -ovl -nocats -nofs -d -c 7 -mb -49";
};
2024-12-03 14:20:37 +00:00
"custom/separatorL" = Tool // {
2024-11-21 09:24:15 +00:00
format = "|";
interval = 1;
};
2024-12-03 14:20:37 +00:00
"pulseaudio" = Tool // {
2024-11-21 09:24:15 +00:00
format = "{icon} {volume}%";
format-icons = {
default = [ "" " " " " ];
headphone = [ "" ];
headset = [ "" ];
};
format-muted = " muted";
scroll-step = 3;
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
on-click-right = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
};
2024-12-03 14:20:37 +00:00
"backlight" = Tool // {
2024-11-21 09:24:15 +00:00
device = "intel_backlight";
format = "{icon}{percent}%";
format-icons =
[ "󱩎 " "󱩏 " "󱩐 " "󱩑 " "󱩒 " "󱩓 " "󱩔 " "󱩕 " "󱩖 " "󰛨 " ];
scroll-step = 1;
};
2024-12-03 14:20:37 +00:00
"network" = Tool // {
2024-11-21 09:24:15 +00:00
format-icons = [ "󰤯" "󰤟" "󰤢" "󰤥" "󰤨" ];
format-wifi = "{icon} CON";
format-ethernet = "󰈀 ETH";
format-disconnected = " ERR";
on-click = "kitty nmtui";
interval = 5;
};
2024-12-03 14:20:37 +00:00
"hyprland/language" = Tool // {
2024-11-21 09:24:15 +00:00
format = "󰌌 {}";
format-en = "EN";
format-ru = "RU";
keyboard-name = "at-translated-set-2-keyboard";
};
2024-12-03 14:20:37 +00:00
"cava" = Tool // {
2024-11-21 09:24:15 +00:00
framerate = 24;
autosens = 1;
bars = 12;
source = "auto";
format-icons = [ "" "" "" "" "" "" "" "" ];
actions = { on-click-right = "mode"; };
};
# CENTER MODULES
2024-12-03 14:20:37 +00:00
"hyprland/workspaces" = Tool // {
2024-11-21 09:24:15 +00:00
disable-scroll = false;
on-click = "activate";
format = "{icon}";
2024-12-03 14:20:37 +00:00
format-icons = wm_icons;
2024-11-21 09:24:15 +00:00
persistent-workspaces = { "*" = [ 1 2 3 4 5 6 7 8 9 10 ]; };
};
2024-12-03 14:20:37 +00:00
"sway/workspaces" = Tool // {
2024-11-21 09:24:15 +00:00
disable-scroll = false;
on-click = "activate";
format = "{icon}";
2024-12-03 14:20:37 +00:00
format-icons = wm_icons;
2024-11-21 09:24:15 +00:00
persistent-workspaces = {
"1" = [ ];
"2" = [ ];
"3" = [ ];
"4" = [ ];
"5" = [ ];
"6" = [ ];
"7" = [ ];
};
};
# RIGHT MODULES
2024-12-03 14:20:37 +00:00
"custom/separatorR" = Tool // {
2024-11-21 09:24:15 +00:00
format = "|";
interval = 1;
};
2024-12-03 14:20:37 +00:00
"tray" = Tool // {
2024-11-21 09:24:15 +00:00
icon-size = 18;
show-passive-items = true;
spacing = 8;
};
2024-12-03 14:20:37 +00:00
"disk" = Tool // {
2024-11-21 09:24:15 +00:00
format = "{used} of {total} 󰋊";
interval = 30;
path = "/";
unit = "GB";
};
2024-12-03 14:20:37 +00:00
"clock#time" = Tool // {
2024-11-21 09:24:15 +00:00
format = "{:%H:%M} ";
interval = 1;
};
2024-12-03 14:20:37 +00:00
"battery" = Tool // {
2024-11-21 09:24:15 +00:00
format = "{capacity}% {icon}";
format-alt = "{time} {icon}";
format-charging = "{capacity}% 󱐋";
format-icons = [ "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
states = {
critical = 15;
warning = 30;
};
};
};
};
};
};
}