218 lines
8.0 KiB
Nix
218 lines
8.0 KiB
Nix
{inputs, pkgs, ...}:
|
|
{
|
|
# required to autoload fonts from packages installed via Home Manager
|
|
fonts.fontconfig.enable = true;
|
|
|
|
# waybar requires font-awesome
|
|
home.packages = [
|
|
pkgs.pavucontrol
|
|
# fira code now contains ligatures and font-awesome
|
|
# TODO - this only works after nixpkgs 25.05
|
|
# nerd-fonts.fira-code
|
|
(pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; })
|
|
pkgs.fira-code
|
|
|
|
];
|
|
|
|
# enable waybar
|
|
programs.waybar.enable = true;
|
|
programs.waybar = {
|
|
settings = {
|
|
|
|
mainBar = {
|
|
margin-top = 2;
|
|
margin-bottom = 2;
|
|
margin-left = 5;
|
|
margin-right = 5;
|
|
layer = "top";
|
|
position = "top";
|
|
spacing = 5;
|
|
|
|
modules-left = [
|
|
"hyprland/workspaces"
|
|
"hyprland/window"
|
|
];
|
|
|
|
modules-center = [
|
|
"clock"
|
|
"custom/notification"
|
|
];
|
|
|
|
modules-right = [
|
|
"tray"
|
|
# "temperature"
|
|
# "group/expand"
|
|
# "bluetooth"
|
|
"wireplumber"
|
|
"network"
|
|
# "mpd"
|
|
"battery"
|
|
"backlight"
|
|
"idle_inhibitor"
|
|
];
|
|
|
|
|
|
# module specific settings
|
|
"hyprland/workspaces" = {
|
|
format = "{icon}";
|
|
format-icons = {
|
|
active = "●";
|
|
default = "○";
|
|
};
|
|
};
|
|
"hyprland/window"= {
|
|
"icon" = false;
|
|
"separate-outputs" = true;
|
|
"format" = "{}";
|
|
};
|
|
"clock" = {
|
|
format = "{:%H:%M}";
|
|
interval = 1;
|
|
tooltip-format = "<tt>{calendar}</tt>";
|
|
calendar = {
|
|
"format" = {
|
|
"today" = "<span color='#fAfBfC'><b>{}</b></span>";
|
|
};
|
|
};
|
|
};
|
|
"idle_inhibitor" = {
|
|
format = "{icon}";
|
|
format-icons = {
|
|
activated = "";
|
|
deactivated = "";
|
|
};
|
|
tooltip = "true";
|
|
};
|
|
|
|
"bluetooth" = {
|
|
format-on = "";
|
|
format-off = "BT-off";
|
|
format-disabled = "";
|
|
format-connected-battery = "{device_battery_percentage}% ";
|
|
format-alt = "{device_alias} ";
|
|
tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected";
|
|
tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}";
|
|
tooltip-format-enumerate-connected = "{device_alias}\n{device_address}";
|
|
tooltip-format-enumerate-connected-battery = "{device_alias}\n{device_address}\n{device_battery_percentage}%";
|
|
on-click-right = "blueman-manager";
|
|
};
|
|
"battery" = {
|
|
interval = 60;
|
|
states = {
|
|
good = 80;
|
|
warning = 30;
|
|
critical = 10;
|
|
};
|
|
format = "{capacity}% {icon}";
|
|
format-charging = "{capacity}% ";
|
|
format-plugged = "{capacity}% ";
|
|
format-icons = [ "" "" "" "" "" "" ];
|
|
};
|
|
"backlight" = {
|
|
"format" = "{percent}% {icon}";
|
|
"format-icons" = ["" "" "" "" "" "" "" "" ""];
|
|
};
|
|
"wireplumber" = {
|
|
scroll-step = 10;
|
|
format = "{icon} {volume}%";# {format_source}";
|
|
format-bluetooth = "{volume}% {icon}";# {format_source}";
|
|
format-bluetooth-muted = " {icon}";# {format_source}";
|
|
format-muted = " Muted";# {format_source}";
|
|
# format-source = " {volume}%";
|
|
# format-source-muted = "";
|
|
format-icons = {
|
|
headphone = "";
|
|
hands-free = "";
|
|
headset = "";
|
|
phone = "";
|
|
portable = "";
|
|
default = [
|
|
""
|
|
""
|
|
""
|
|
];
|
|
};
|
|
on-click = "XDG_CURRENT_DESKTOP=GNOME gnome-control-center sound";
|
|
};
|
|
"tray" = {
|
|
spacing = 5;
|
|
};
|
|
"custom/notification" = {
|
|
tooltip = false;
|
|
format = "{icon} {}";
|
|
format-icons = {
|
|
notification = "<span foreground='red'><sup></sup></span>";
|
|
none = "";
|
|
dnd-notification = "<span foreground='red'><sup></sup></span>";
|
|
dnd-none = "";
|
|
inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
|
inhibited-none = "";
|
|
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
|
dnd-inhibited-none = "";
|
|
};
|
|
return-type = "json";
|
|
exec-if = "which swaync-client";
|
|
exec = "swaync-client -swb";
|
|
on-click = "sleep 0.1 && task-waybar";
|
|
escape = true;
|
|
};
|
|
"network" = {
|
|
format = "";
|
|
format-wifi = "{icon} {essid}";
|
|
format-icons = [ "" "" "" "" "" ];
|
|
format-ethernet = " {ipaddr}/{cidr}";
|
|
format-disconnected = "";
|
|
tooltip-format = " {ifname} via {gwaddr}";
|
|
tooltip-format-wifi = "SSID: {essid}({signalStrength}%), {frequency} MHz\nInterface: {ifname}\nIP: {ipaddr}\nGW: {gwaddr}\n\n<span color='#a6da95'>{bandwidthUpBits}</span>\t<span color='#ee99a0'>{bandwidthDownBits}</span>\t<span color='#c6a0f6'>{bandwidthTotalBits}</span>";
|
|
tooltip-format-ethernet = "{ifname} ";
|
|
tooltip-format-disconnected = "Disconnected";
|
|
on-click = "XDG_CURRENT_DESKTOP=GNOME gnome-control-center wifi";
|
|
};
|
|
};
|
|
};
|
|
|
|
style = ''
|
|
* {
|
|
font-family: "FiraCode Nerd Font";
|
|
font-weight: bold;
|
|
font-size: 22px;
|
|
}
|
|
|
|
window#waybar {
|
|
background-color: transparent;
|
|
}
|
|
|
|
|
|
.module {
|
|
background: rgba(0, 0, 0, 0.6);
|
|
color: white;
|
|
border-radius: 5px;
|
|
padding: 5px 5px 5px 5px;
|
|
margin: 5px 0;
|
|
}
|
|
box.module button:hover {
|
|
box-shadow: inset 0 -3px #ffffff;
|
|
}
|
|
|
|
.modules-left {
|
|
padding: 3px;
|
|
}
|
|
|
|
.modules-right {
|
|
padding: 3px;
|
|
}
|
|
|
|
.modules-center {
|
|
padding: 3px;
|
|
}
|
|
|
|
#battery.warning {
|
|
background:rgba(240, 165, 0, 0.6);
|
|
}
|
|
#battery.critical {
|
|
background:rgba(255, 0, 0, 0.6);
|
|
}
|
|
'';
|
|
};
|
|
}
|