2024-01-04 14:22:55 +01:00
|
|
|
{ inputs, ... }: {
|
2024-01-05 08:13:22 +01:00
|
|
|
imports = [ ../assets/waybar/scripts.nix ];
|
2024-01-03 14:25:06 +01:00
|
|
|
|
2024-01-04 06:39:52 +01:00
|
|
|
programs.waybar = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
mainBar = {
|
|
|
|
layer = "top";
|
|
|
|
position = "top";
|
|
|
|
modules-left = [
|
|
|
|
"custom/wlogout"
|
|
|
|
"idle_inhibitor"
|
|
|
|
"clock"
|
|
|
|
"mpris"
|
|
|
|
];
|
2024-01-04 14:22:55 +01:00
|
|
|
modules-center = [
|
2024-01-04 06:39:52 +01:00
|
|
|
"hyprland/workspaces"
|
|
|
|
];
|
|
|
|
modules-right = [
|
|
|
|
"pulseaudio"
|
|
|
|
"custom/tailscale"
|
|
|
|
"network"
|
|
|
|
"battery"
|
|
|
|
];
|
|
|
|
|
|
|
|
# Modules
|
|
|
|
"custom/wlogout" = {
|
|
|
|
format = "";
|
|
|
|
on-click = "wlogout";
|
|
|
|
};
|
|
|
|
"custom/tailscale" = {
|
|
|
|
format = "{icon} ";
|
|
|
|
exec = "$HOME/.config/waybar/scripts/tailscale.sh";
|
|
|
|
exec-if = "pgrep tailscaled";
|
|
|
|
return-type = "json";
|
|
|
|
interval = 5;
|
|
|
|
format-icons = {
|
|
|
|
Running = "";
|
|
|
|
Stopped = "";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
idle_inhibitor = {
|
|
|
|
format = "{icon} ";
|
|
|
|
format-icons = {
|
|
|
|
activated = "";
|
|
|
|
deactivated = "";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
mpris = {
|
|
|
|
format = "{player_icon} {dynamic}";
|
|
|
|
format-paused = ''{status_icon} <i>{dynamic}</i>'';
|
2024-01-04 09:11:33 +01:00
|
|
|
player-icons = { default = "▶"; };
|
|
|
|
status-icons = { paused = "⏸"; };
|
2024-01-04 06:39:52 +01:00
|
|
|
max-length = 30;
|
|
|
|
};
|
|
|
|
"hyprland/workspaces" = {
|
|
|
|
on-click = "activate";
|
|
|
|
};
|
|
|
|
clock = {
|
|
|
|
format = " {:%H:%M}";
|
|
|
|
format-alt = " {:%A, %d %b, %Y}";
|
|
|
|
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
|
|
|
calendar = {
|
|
|
|
mode = "month";
|
|
|
|
mode-mon-col = 3;
|
|
|
|
weeks-pos = "left";
|
|
|
|
on-scroll = 1;
|
|
|
|
format = {
|
|
|
|
months = "<b>{}</b>";
|
|
|
|
days = "<b>{}</b>";
|
|
|
|
weeks = "<b>W{}</b>";
|
|
|
|
weekdays = "<b>{}</b>";
|
|
|
|
today = "<b><u>{}</u></b>";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
actions = {
|
|
|
|
on-click-right = "kitty -e calcurse";
|
|
|
|
on-click-middle = "mode";
|
|
|
|
on-scroll-up = "shift_up";
|
|
|
|
on-scroll-down = "shift_down";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
pulseaudio = {
|
|
|
|
scroll-step = 1;
|
|
|
|
format = "{icon} {format_source}";
|
|
|
|
format-bluetooth = "{volume}% {icon} {format_source}";
|
|
|
|
format-bluetooth-muted = " ";
|
|
|
|
format-muted = " {format_source}";
|
|
|
|
format-source = " ";
|
|
|
|
format-source-muted = " ";
|
|
|
|
format-icons = {
|
|
|
|
headphone = " ";
|
|
|
|
headset = " ";
|
|
|
|
default = ["" "" ""];
|
|
|
|
};
|
|
|
|
tooltip = false;
|
|
|
|
on-click = "kitty -e pulsemixer";
|
|
|
|
};
|
|
|
|
network = {
|
|
|
|
format = "{ifname}";
|
|
|
|
format-wifi = " ";
|
|
|
|
format-ethernet = " {ipaddr}";
|
|
|
|
format-disconnected = ""; # Hides the module
|
|
|
|
tooltip-format = "{ifname} via {gwaddr} ";
|
|
|
|
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
|
|
|
|
tooltip-format-ethernet = "{ifname} ";
|
|
|
|
tooltip-format-disconnected = "Disconnected";
|
|
|
|
max-length = 50;
|
|
|
|
on-click = "kitty --class=nmtui -e nmtui";
|
|
|
|
};
|
|
|
|
battery = {
|
|
|
|
tooltip = true;
|
|
|
|
tooltip-format = "{time}";
|
|
|
|
states = {
|
|
|
|
warning = 35;
|
|
|
|
critical = 20;
|
|
|
|
};
|
|
|
|
format = "{icon} {capacity}%";
|
|
|
|
format-charging = " {capacity}%";
|
|
|
|
format-plugged = " {capacity}%";
|
|
|
|
format-icons = [ "" "" "" "" "" ];
|
|
|
|
};
|
|
|
|
};
|
2024-01-03 14:25:06 +01:00
|
|
|
};
|
2024-01-04 09:37:55 +01:00
|
|
|
style = ''
|
|
|
|
* {
|
|
|
|
border: none;
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
2024-01-03 14:25:06 +01:00
|
|
|
|
2024-01-04 09:37:55 +01:00
|
|
|
#waybar {
|
|
|
|
padding: 15px;
|
|
|
|
}
|
|
|
|
|
|
|
|
#workspaces button.visible,
|
|
|
|
#workspaces button {
|
|
|
|
font-size: 15px;
|
|
|
|
border-radius: 50px;
|
|
|
|
padding: 0px 5px;
|
|
|
|
margin: 5px;
|
|
|
|
}
|
2024-01-03 14:25:06 +01:00
|
|
|
|
|
|
|
#workspaces button.active {
|
|
|
|
padding: 0px 15px;
|
|
|
|
}
|
|
|
|
|
|
|
|
#workspaces button:hover,
|
|
|
|
#workspaces button.focused:hover,
|
|
|
|
#workspaces button.visible:hover {
|
|
|
|
}
|
|
|
|
|
|
|
|
#workspaces button.urgent {
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* General background
|
|
|
|
*/
|
|
|
|
#network,
|
|
|
|
#mpris,
|
|
|
|
#memory,
|
|
|
|
#backlight,
|
|
|
|
#cpu,
|
|
|
|
#pulseaudio,
|
|
|
|
#temperature,
|
|
|
|
#battery,
|
|
|
|
#tray,
|
|
|
|
#submap,
|
|
|
|
#clock,
|
|
|
|
#idle_inhibitor,
|
|
|
|
#custom-tailscale,
|
|
|
|
#custom-wlogout,
|
|
|
|
#window {
|
|
|
|
font-size: 16px;
|
2024-01-04 14:26:12 +01:00
|
|
|
padding: 0px 10px;
|
2024-01-03 14:25:06 +01:00
|
|
|
margin: 5px;
|
2024-01-04 14:40:07 +01:00
|
|
|
border-radius: 3px;
|
2024-01-04 14:26:12 +01:00
|
|
|
font-weight: normal;
|
2024-01-03 14:25:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* General background
|
|
|
|
*/
|
|
|
|
#network button:hover,
|
|
|
|
#mpris button:hover,
|
|
|
|
#memory button:hover,
|
|
|
|
#backlight button:hover,
|
|
|
|
#cpu button:hover,
|
|
|
|
#pulseaudio button:hover,
|
|
|
|
#temperature button:hover,
|
|
|
|
#battery button:hover,
|
|
|
|
#tray button:hover,
|
|
|
|
#submap button:hover,
|
|
|
|
#clock button:hover,
|
|
|
|
#idle_inhibitor button:hover,
|
|
|
|
#custom-tailscale button:hover,
|
|
|
|
#custom-wlogout button:hover,
|
|
|
|
#window button:hover{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Warning plugins state
|
|
|
|
*/
|
|
|
|
#battery.warning {
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Critical plugins state
|
|
|
|
*/
|
|
|
|
#idle_inhibitor.activated,
|
|
|
|
#battery.critical,
|
|
|
|
#custom-tailscale.Stopped,
|
|
|
|
#network.disconnected {
|
|
|
|
}
|
|
|
|
#battery.charging {
|
|
|
|
}
|
|
|
|
#battery.plugged {
|
|
|
|
}
|
|
|
|
#pulseaudio.bluetooth {
|
|
|
|
}
|
|
|
|
tooltip {
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
2024-01-04 09:37:55 +01:00
|
|
|
'';
|
|
|
|
};
|
2024-01-03 14:25:06 +01:00
|
|
|
}
|