nichts/hosts/dragyx/common/waybar.nix

198 lines
5.3 KiB
Nix
Raw Normal View History

2024-04-14 22:14:28 +02:00
{ config, lib, pkgs, ... }:
with lib;
let
username = config.modules.other.system.username;
in
{
environment.systemPackages = with pkgs; [ waybar ];
home-manager.users.${username} = {
programs.waybar = {
systemd.enable = true;
settings = {
main = {
layer = "top";
position = "top";
modules-left = [
2024-04-29 13:17:46 +02:00
# "custom/os-icon"
2024-04-14 22:14:28 +02:00
"hyprland/workspaces"
];
modules-center = [
"backlight"
"clock#time"
"wireplumber"
];
modules-right = [
"tray"
"network"
"battery"
];
# Modules
"custom/os-icon" = {
2024-04-29 13:17:46 +02:00
format = ""; #NixOS logo
2024-04-14 22:14:28 +02:00
};
battery = {
interval = 10;
states = {
warning = 30;
critical = 15;
};
format-time = "{H}:{M:02}";
format = "{icon} {capacity}%";
format-charging = " {capacity}%";
format-charging-full = " {capacity}%";
format-full = "{icon} {capacity}%";
format-icons = [
""
""
""
""
""
];
tooltip = false;
};
"clock#time" = {
interval = 10;
format = "{:%H:%M}";
tooltip = false;
};
"clock#date" = {
interval = 20;
format = "{:%d.%m.%Y}";
tooltip = false;
};
memory = {
interval = 5;
format = " {used:0.1f}G/{total:0.1f}G";
states = {
warning = 70;
critical = 90;
};
tooltip = false;
};
network = {
interval = 5;
format-wifi = "{icon} {essid}";
2024-04-29 13:17:46 +02:00
format-ethernet = "󰈁 {ifname}";
format-disconnected = "2 Offline";
format-alt = "󰇚 {bandwidthDownBytes} 󰕒 {bandwidthUpBytes} 󰩟 {ipaddr}/{cidr}";
2024-04-14 22:14:28 +02:00
format-icons = [
2024-04-29 13:17:46 +02:00
"󰤨 "
"󰤥 "
"󰤢 "
"󰤟 "
"󰤯 "
2024-04-14 22:14:28 +02:00
];
tooltip = false;
};
"hyprland/mode" = {
format = "test{}";
tooltip = false;
};
"hyprland/window" = {
format = "{}";
max-length = 30;
tooltip = false;
rewrite = {
2024-04-29 13:17:46 +02:00
"([Aa]lacritty|kitty)" = " $1";
"(.*) .{15} Mozilla Firefox" = " $1";
"(^Spotify.*)" = " $1";
2024-04-14 22:14:28 +02:00
};
};
"hyprland/workspaces" = {
disable-scroll-wraparound = true;
smooth-scrolling-threshold = 4;
enable-bar-scroll = true;
format = "{icon}";
format-icons = {
"1" = "";
"2" = "";
"3" = "";
"4" = "";
"5" = "";
"6" = "";
"7" = "";
"8" = "";
"9" = "";
"10" = "";
"11" = "";
"12" = "";
};
};
"pulseaudio/slider" = {
min = 0;
max = 100;
orientation = "horizontal";
};
pulseaudio = {
format = "{icon} {volume}%";
format-bluetooth = "{icon} {volume}%";
format-muted = "";
format-icons = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
portable = "";
car = "";
default = [
""
""
];
};
scroll-step = 1;
on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
tooltip = false;
};
user = {};
temperature = {
critical-threshold = 90;
interval = 5;
format = " {icon} {temperatureC}°";
format-icons = [
""
""
""
""
""
];
tooltip = false;
};
backlight = {
format = "{percent}% {icon} ";
format-icons = [
2024-04-29 13:17:46 +02:00
"󰌶"
"󱩎"
"󱩏"
"󱩐"
"󱩑"
"󱩒"
"󱩓"
"󱩔"
"󱩕"
"󱩖"
"󰛨"
2024-04-14 22:14:28 +02:00
];
};
wireplumber = {
format = "{icon} {volume}%";
2024-04-29 13:17:46 +02:00
format-muted = "󰖁";
2024-04-14 22:14:28 +02:00
format-icons = [
2024-04-29 13:17:46 +02:00
""
""
"󰕾"
2024-04-14 22:14:28 +02:00
];
};
tray = {
icon-size = 18;
};
};
};
};
};
}