298 lines
9.4 KiB
Nix
298 lines
9.4 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 = 5;
|
|
margin-bottom = 5;
|
|
margin-left = 5;
|
|
margin-right = 5;
|
|
height = 42;
|
|
layer = "top";
|
|
position = "top";
|
|
# height = 30;
|
|
# output = [
|
|
# "eDP-1"
|
|
# "HDMI-A-1"
|
|
# ];
|
|
modules-left = [
|
|
"hyprland/workspaces"
|
|
"hyprland/window"
|
|
|
|
];
|
|
modules-center = [
|
|
"clock"
|
|
"custom/notification"
|
|
];
|
|
modules-right = [
|
|
# "temperature"
|
|
# "group/expand"
|
|
# "bluetooth"
|
|
"pulseaudio"
|
|
# "network"
|
|
# "mpd"
|
|
"battery"
|
|
"backlight"
|
|
"tray"
|
|
"idle_inhibitor"
|
|
];
|
|
|
|
# module specific settings
|
|
"hyprland/workspaces" = {
|
|
format = "{icon}";
|
|
format-icons = {
|
|
active = "●";
|
|
default = "○";
|
|
};
|
|
};
|
|
|
|
"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 = [ "" "" "" "" "" "" ];
|
|
};
|
|
|
|
"pulseaudio" = {
|
|
format = "{icon} {volume}% {format_source}";
|
|
format-bluetooth = "{volume}% {icon} {format_source}";
|
|
format-bluetooth-muted = " {icon} {format_source}";
|
|
format-muted = " {format_source}";
|
|
format-source = " {volume}%";
|
|
format-source-muted = "";
|
|
format-icons = {
|
|
headphone = "";
|
|
hands-free = "";
|
|
headset = "";
|
|
phone = "";
|
|
portable = "";
|
|
default = [
|
|
""
|
|
""
|
|
""
|
|
];
|
|
};
|
|
on-click = "sleep 0.1 && pavucontrol";
|
|
};
|
|
"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;
|
|
};
|
|
|
|
};
|
|
};
|
|
|
|
style = ''
|
|
* {
|
|
border: none;
|
|
border-radius: 0;
|
|
/* `otf-font-awesome` is required to be installed for icons */
|
|
font-family: FiraCode Nerd Font;
|
|
min-height: 20px;
|
|
}
|
|
|
|
window#waybar {
|
|
background: transparent;
|
|
}
|
|
|
|
window#waybar.hidden {
|
|
opacity: 0.2;
|
|
}
|
|
|
|
.module {
|
|
color: #ffffff;
|
|
border: none;
|
|
}
|
|
|
|
#workspaces {
|
|
margin-right: 8px;
|
|
border-radius: 10px;
|
|
transition: none;
|
|
background: #383c4a;
|
|
}
|
|
|
|
#workspaces button {
|
|
transition: none;
|
|
color: #7c818c;
|
|
background: transparent;
|
|
padding: 5px;
|
|
font-size: 18px;
|
|
}
|
|
|
|
#workspaces button.persistent {
|
|
color: #7c818c;
|
|
font-size: 12px;
|
|
}
|
|
|
|
#workspaces button.focused {
|
|
color: white;
|
|
}
|
|
|
|
#mode {
|
|
padding-left: 16px;
|
|
padding-right: 16px;
|
|
border-radius: 10px;
|
|
transition: none;
|
|
color: #ffffff;
|
|
background: #383c4a;
|
|
}
|
|
|
|
#clock {
|
|
padding-left: 16px;
|
|
padding-right: 16px;
|
|
border-radius: 10px 0px 0px 10px;
|
|
transition: none;
|
|
color: #ffffff;
|
|
background: #383c4a;
|
|
}
|
|
|
|
#pulseaudio {
|
|
margin-right: 8px;
|
|
padding-left: 16px;
|
|
padding-right: 16px;
|
|
border-radius: 10px;
|
|
transition: none;
|
|
color: #ffffff;
|
|
background: #383c4a;
|
|
}
|
|
|
|
#pulseaudio.muted {
|
|
background-color: #90b1b1;
|
|
color: #2a5c45;
|
|
}
|
|
|
|
|
|
|
|
#backlight {
|
|
margin-right: 8px;
|
|
padding-left: 16px;
|
|
padding-right: 16px;
|
|
border-radius: 10px;
|
|
transition: none;
|
|
color: #ffffff;
|
|
background: #383c4a;
|
|
}
|
|
|
|
#battery {
|
|
margin-right: 8px;
|
|
padding-left: 16px;
|
|
padding-right: 16px;
|
|
border-radius: 10px;
|
|
transition: none;
|
|
color: #ffffff;
|
|
background: #383c4a;
|
|
}
|
|
|
|
#battery.charging {
|
|
color: #ffffff;
|
|
background-color: #26A65B;
|
|
}
|
|
|
|
#battery.warning:not(.charging) {
|
|
background-color: #ffbe61;
|
|
color: black;
|
|
}
|
|
|
|
#battery.critical:not(.charging) {
|
|
background-color: #f53c3c;
|
|
color: #ffffff;
|
|
animation-name: blink;
|
|
animation-duration: 0.5s;
|
|
animation-timing-function: linear;
|
|
animation-iteration-count: infinite;
|
|
animation-direction: alternate;
|
|
}
|
|
|
|
#tray {
|
|
padding-left: 16px;
|
|
padding-right: 16px;
|
|
border-radius: 10px;
|
|
transition: none;
|
|
color: #ffffff;
|
|
background: #383c4a;
|
|
}
|
|
|
|
@keyframes blink {
|
|
to {
|
|
background-color: #ffffff;
|
|
color: #000000;
|
|
}
|
|
}
|
|
'';
|
|
};
|
|
}
|
|
|