Starting to break out for different XPS systems
This commit is contained in:
229
home-manager/programs/waybar.nix
Normal file
229
home-manager/programs/waybar.nix
Normal file
@@ -0,0 +1,229 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
position = "top";
|
||||
height = 30;
|
||||
spacing = 4;
|
||||
|
||||
modules-left = [ "sway/workspaces" "sway/mode" ];
|
||||
modules-center = [ "sway/window" ];
|
||||
modules-right = [ "idle_inhibitor" "pulseaudio" "network" "cpu" "memory" "temperature" "battery" "tray" "clock" ];
|
||||
|
||||
"sway/workspaces" = {
|
||||
disable-scroll = true;
|
||||
all-outputs = true;
|
||||
format = "{name}: {icon}";
|
||||
format-icons = {
|
||||
"1" = "";
|
||||
"2" = "";
|
||||
"3" = "";
|
||||
"4" = "";
|
||||
"5" = "";
|
||||
"6" = "";
|
||||
"7" = "";
|
||||
"8" = "";
|
||||
"9" = "";
|
||||
"10" = "";
|
||||
urgent = "";
|
||||
focused = "";
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
|
||||
"sway/mode" = {
|
||||
format = "<span style=\"italic\">{}</span>";
|
||||
};
|
||||
|
||||
"sway/window" = {
|
||||
format = "{}";
|
||||
max-length = 50;
|
||||
};
|
||||
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
|
||||
"tray" = {
|
||||
spacing = 10;
|
||||
};
|
||||
|
||||
"clock" = {
|
||||
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||
format-alt = "{:%Y-%m-%d}";
|
||||
};
|
||||
|
||||
"cpu" = {
|
||||
format = "{usage}% ";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"memory" = {
|
||||
format = "{}% ";
|
||||
};
|
||||
|
||||
"temperature" = {
|
||||
thermal-zone = 2;
|
||||
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
|
||||
critical-threshold = 80;
|
||||
format = "{temperatureC}°C {icon}";
|
||||
format-icons = [ "" "" "" ];
|
||||
};
|
||||
|
||||
"battery" = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{capacity}% {icon}";
|
||||
format-charging = " {capacity}%";
|
||||
format-plugged = " {capacity}%";
|
||||
format-alt = "{time} {icon}";
|
||||
format-icons = [ "" "" "" "" "" "" "" "" "" "" "" ];
|
||||
};
|
||||
|
||||
"network" = {
|
||||
format-wifi = "{essid} ({signalStrength}%) ";
|
||||
format-ethernet = "{ipaddr}/{cidr} ";
|
||||
tooltip-format = "{ifname} via {gwaddr} ";
|
||||
format-linked = "{ifname} (No IP) ";
|
||||
format-disconnected = "Disconnected ⚠";
|
||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||
};
|
||||
|
||||
"pulseaudio" = {
|
||||
format = "{volume}% {icon} {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 = "";
|
||||
car = "";
|
||||
default = [ "" "" "" ];
|
||||
};
|
||||
on-click = "pavucontrol";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: "JetBrainsMono Nerd Font", "Font Awesome 6 Free";
|
||||
font-size: 13px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: #1a1b26;
|
||||
color: #c0caf5;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
background: transparent;
|
||||
color: #c0caf5;
|
||||
border-top: 2px solid transparent;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
color: #7aa2f7;
|
||||
border-top: 2px solid #7aa2f7;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
color: #f7768e;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background: #f7768e;
|
||||
color: #1a1b26;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
#clock, #battery, #cpu, #memory, #temperature, #network, #pulseaudio, #tray, #mode, #idle_inhibitor {
|
||||
padding: 0 10px;
|
||||
margin: 0 4px;
|
||||
color: #c0caf5;
|
||||
}
|
||||
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#battery {
|
||||
color: #c0caf5;
|
||||
}
|
||||
|
||||
#battery.charging {
|
||||
color: #9ece6a;
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
color: #f7768e;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
color: #bb9af7;
|
||||
}
|
||||
|
||||
#memory {
|
||||
color: #bb9af7;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
color: #ff9e64;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
color: #f7768e;
|
||||
}
|
||||
|
||||
#network {
|
||||
color: #7aa2f7;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
color: #f7768e;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: #7aa2f7;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
color: #f7768e;
|
||||
}
|
||||
|
||||
#tray {
|
||||
background-color: #1a1b26;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #f7768e;
|
||||
color: #1a1b26;
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user