276 lines
6.1 KiB
Nix
276 lines
6.1 KiB
Nix
|
{ config, lib, ... }:
|
||
|
with lib;
|
||
|
{
|
||
|
programs.waybar = mkIf config.desktop.enableSwayStack {
|
||
|
enable = true;
|
||
|
#systemd.enable = false;
|
||
|
|
||
|
settings = [{
|
||
|
layer = "top";
|
||
|
position = "top";
|
||
|
height = 30;
|
||
|
|
||
|
modules-left = [
|
||
|
"sway/workspaces"
|
||
|
"sway/mode"
|
||
|
];
|
||
|
|
||
|
modules-center = [
|
||
|
"sway/window"
|
||
|
];
|
||
|
|
||
|
modules-right = [
|
||
|
"memory"
|
||
|
"cpu"
|
||
|
"pulseaudio"
|
||
|
"network"
|
||
|
"battery"
|
||
|
"tray"
|
||
|
"sway/language"
|
||
|
"clock"
|
||
|
];
|
||
|
|
||
|
"sway/workspaces" = {
|
||
|
"disable-scroll" = true;
|
||
|
"all-outputs" = false;
|
||
|
"format" = "{icon}";
|
||
|
"format-icons" = {
|
||
|
"1:term" = "";
|
||
|
"2:web" = "";
|
||
|
"3:email" = "";
|
||
|
"4:im" = "";
|
||
|
"5:dev" = "";
|
||
|
"6:music" = "";
|
||
|
"7:graph" = "";
|
||
|
"8:any" = "";
|
||
|
"9:any" = "";
|
||
|
"10:aux" = "";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
"tray" = {
|
||
|
"icon-size" = 18;
|
||
|
"spacing" = 12;
|
||
|
};
|
||
|
|
||
|
"memory" = {
|
||
|
"format" = "{percentage:3}% <big></big>";
|
||
|
"states" = {
|
||
|
"warning" = 70;
|
||
|
"critical" = 90;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
"cpu" = {
|
||
|
"format" = "{usage:3}% <big></big>";
|
||
|
"states" = {
|
||
|
"warning" = 70;
|
||
|
"critical" = 90;
|
||
|
};
|
||
|
};
|
||
|
|
||
|
"pulseaudio" = {
|
||
|
"format" = "{volume:3}% <big>{icon}</big>";
|
||
|
"format-bluetooth" = "<big>{icon}</big>";
|
||
|
"format-muted" = "<big><\big>";
|
||
|
"format-icons" = {
|
||
|
"headphone" = "";
|
||
|
"hands-free" = "";
|
||
|
"headset" = "";
|
||
|
"phone" = "";
|
||
|
"portable" = "";
|
||
|
"car" = "";
|
||
|
"default" = [ "" ];
|
||
|
};
|
||
|
|
||
|
"on-click" = "pavucontrol";
|
||
|
"on-scroll-up" = "pamixer -ui 2 && pamixer --get-volume > $SWAYSOCK.wob";
|
||
|
"on-scroll-down" = "pamixer -ud 2 && pamixer --get-volume > $SWAYSOCK.wob";
|
||
|
};
|
||
|
|
||
|
"network" = {
|
||
|
"format-wifi" = "{essid} <big></big>";
|
||
|
"format-ethernet" = "<big></big>";
|
||
|
"format-disconnected" = "<big></big>";
|
||
|
"format-linked" = "<big>ﯳ</big>";
|
||
|
"format-alt" = "{ifname}: {ipaddr}/{cidr}";
|
||
|
"tooltip-format-ethernet" = "<big></big> {bandwidthDownBits} <big></big> {bandwidthUpBits}";
|
||
|
"tooltip-format-wifi" = "<big></big>{bandwidthDownBits} <big></big> {bandwidthUpBits}";
|
||
|
};
|
||
|
|
||
|
"battery" = {
|
||
|
"states" = {
|
||
|
"5pct" = 5;
|
||
|
"10pct" = 10;
|
||
|
"20pct" = 20;
|
||
|
"30pct" = 30;
|
||
|
"40pct" = 40;
|
||
|
"50pct" = 50;
|
||
|
"60pct" = 60;
|
||
|
"70pct" = 70;
|
||
|
"80pct" = 80;
|
||
|
"90pct" = 90;
|
||
|
"full" = 100;
|
||
|
};
|
||
|
|
||
|
"format" = "{capacity:3}% <big>{icon}</big>";
|
||
|
"format-icons" = {
|
||
|
"5pct" = "";
|
||
|
"10pct" = "";
|
||
|
"20pct" = "";
|
||
|
"30pct" = "";
|
||
|
"40pct" = "";
|
||
|
"50pct" = "";
|
||
|
"60pct" = "";
|
||
|
"70pct" = "";
|
||
|
"80pct" = "";
|
||
|
"90pct" = "";
|
||
|
"full" = "";
|
||
|
};
|
||
|
"on-click" = "notify-send -u low -t 3000 'Battery Status' \"$(acpi)\"";
|
||
|
};
|
||
|
|
||
|
"clock" = {
|
||
|
"format-alt" = "{:%A, %B %d}";
|
||
|
"tooltip-format" = "<big>{:%Y %B}</big>\n<tt>{calendar}</tt>";
|
||
|
};
|
||
|
}];
|
||
|
|
||
|
style = ''
|
||
|
@keyframes blink-warning {
|
||
|
to {
|
||
|
background-color: #bf616a;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@keyframes blink-critical {
|
||
|
to {
|
||
|
color: #2e3440;
|
||
|
background-color: #bf616a;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
* {
|
||
|
border: none;
|
||
|
border-radius: 0;
|
||
|
font-family: JetBrainsMono, JetBrainsMono Nerd Font Mono, monospace;
|
||
|
font-size: 14px;
|
||
|
min-height: 0;
|
||
|
box-shadow: none;
|
||
|
text-shadow: none;
|
||
|
}
|
||
|
|
||
|
window#waybar {
|
||
|
background-color: #3b4252;
|
||
|
color: #e5e9f0;
|
||
|
opacity: 0.9;
|
||
|
}
|
||
|
|
||
|
#window {
|
||
|
font-family: JetBrainsMono, JetBrainsMono Nerd Font Mono, sans-serif;
|
||
|
}
|
||
|
|
||
|
#workspaces {
|
||
|
background-color: #4c566a;
|
||
|
}
|
||
|
|
||
|
#workspaces button {
|
||
|
padding: 3px 9px 0px 9px;
|
||
|
background: transparent;
|
||
|
color: #e5e9f0;
|
||
|
border-bottom: 3px solid transparent;
|
||
|
font-weight: 900;
|
||
|
}
|
||
|
|
||
|
#workspaces button.focused {
|
||
|
background-color: #434c5e;
|
||
|
color: #eceff4;
|
||
|
border-bottom: 3px solid #ebcb8b;
|
||
|
}
|
||
|
|
||
|
#workspaces button:hover {
|
||
|
background-color: #5e81ac;
|
||
|
}
|
||
|
|
||
|
#mode {
|
||
|
padding: 0px 9px;
|
||
|
background-color: #a3be8c;
|
||
|
color: #3b4252;
|
||
|
font-family: JetBrains Mono, sans-serif;
|
||
|
font-size: 14px;
|
||
|
font-weight: bold;
|
||
|
}
|
||
|
|
||
|
#clock, #language, #pulseaudio, #tray, #memory, #cpu, #battery, #network {
|
||
|
padding: 0px 8px;
|
||
|
color: #d8dee9;
|
||
|
font-size: 14px;
|
||
|
}
|
||
|
|
||
|
#clock {
|
||
|
background-color: #4c566a;
|
||
|
font-weight: bold;
|
||
|
}
|
||
|
|
||
|
#language {
|
||
|
color: #d8dee9;
|
||
|
font-weight: bold;
|
||
|
}
|
||
|
|
||
|
#pulseaudio {
|
||
|
}
|
||
|
|
||
|
#pulseaudio.muted {
|
||
|
color: #d08770;
|
||
|
}
|
||
|
|
||
|
#tray {
|
||
|
margin-left: 10px;
|
||
|
}
|
||
|
|
||
|
#cpu {
|
||
|
padding-left: 0px;
|
||
|
font-size: 14px;
|
||
|
}
|
||
|
|
||
|
#cpu.warning {
|
||
|
color: #ebcb8b;
|
||
|
}
|
||
|
|
||
|
#cpu.critical {
|
||
|
color: #d08770;
|
||
|
}
|
||
|
|
||
|
#memory {
|
||
|
padding-left: 0px;
|
||
|
font-size: 14px;
|
||
|
}
|
||
|
|
||
|
#memory.warning {
|
||
|
color: #ebcb8b;
|
||
|
}
|
||
|
|
||
|
#memory.critical {
|
||
|
color: #d08770;
|
||
|
}
|
||
|
|
||
|
#battery {
|
||
|
font-size: 14px;
|
||
|
animation-timing-function: ease-in-out;
|
||
|
animation-iteration-count: infinite;
|
||
|
animation-direction: alternate;
|
||
|
}
|
||
|
|
||
|
#battery.20pct.discharging {
|
||
|
animation-name: blink-warning;
|
||
|
animation-duration: 3s;
|
||
|
}
|
||
|
|
||
|
#battery.10pct.discharging {
|
||
|
animation-name: blink-critical;
|
||
|
animation-duration: 2s;
|
||
|
}
|
||
|
'';
|
||
|
};
|
||
|
}
|