configure waybar
This commit is contained in:
parent
a0cebb8101
commit
0c48f50a19
@ -20,28 +20,25 @@
|
|||||||
home-manager.users.${user} = { # Home-manager waybar config
|
home-manager.users.${user} = { # Home-manager waybar config
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd = {
|
#systemd = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
target = "sway-session.target"; # Needed for waybar to start automatically
|
# target = "sway-session.target"; # Needed for waybar to start automatically
|
||||||
};
|
#};
|
||||||
|
|
||||||
style = ''
|
style = ''
|
||||||
* {
|
* {
|
||||||
border: none;
|
border: none;
|
||||||
font-family: FiraCode Nerd Font Mono;
|
font-family: FiraCode Nerd Font Mono;
|
||||||
font-weight: bold;
|
font-size: 13px;
|
||||||
|
min-height: 0;
|
||||||
}
|
}
|
||||||
window#waybar {
|
window#waybar {
|
||||||
background-color: rgba(0,0,0,0.5);
|
background-color: rgba(43,48,59,0.3);
|
||||||
background: transparent;
|
border-bottom: 3px solid transparent;
|
||||||
transition-property: background-color;
|
color: white;
|
||||||
transition-duration: .5s;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
window#waybar.hidden {
|
|
||||||
opacity: 0.2;
|
|
||||||
}
|
}
|
||||||
workspace,
|
workspace,
|
||||||
|
idle_inhibitor,
|
||||||
mode,
|
mode,
|
||||||
clock,
|
clock,
|
||||||
pulseaudio,
|
pulseaudio,
|
||||||
@ -52,24 +49,23 @@
|
|||||||
window,
|
window,
|
||||||
cpu,
|
cpu,
|
||||||
disk,
|
disk,
|
||||||
battery,
|
battery {
|
||||||
tray {
|
margin: 15px;
|
||||||
color: #999999;
|
padding: 5px;
|
||||||
margin: 2px 16px 2px 16px;
|
|
||||||
background-clip: padding-box;
|
|
||||||
}
|
}
|
||||||
workspaces button {
|
workspaces button {
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
min-width: 15px;
|
margin: 0 3px;
|
||||||
|
color: white;
|
||||||
|
border-bottom: 3px solid transparent;
|
||||||
}
|
}
|
||||||
workspaces button:hover {
|
workspaces button:hover {
|
||||||
background-color: rgba(0,0,0,0.2);
|
background-color: rgba(100,100,100,0.8);
|
||||||
|
color: #808080;
|
||||||
}
|
}
|
||||||
workspaces button.focused {
|
workspaces button.focused {
|
||||||
color: #ccffff;
|
background: rgba(100, 114, 125, 0.2);
|
||||||
}
|
border-bottom: 2px solid gray;
|
||||||
battery.warning {
|
|
||||||
color: #ff5d17;
|
|
||||||
}
|
}
|
||||||
battery.critical {
|
battery.critical {
|
||||||
color: #ff200c;
|
color: #ff200c;
|
||||||
@ -77,25 +73,33 @@
|
|||||||
battery.charging {
|
battery.charging {
|
||||||
color: #9ece6a;
|
color: #9ece6a;
|
||||||
}
|
}
|
||||||
|
battery.warning:not(.charging) {
|
||||||
|
background: #f53c3c;
|
||||||
|
color: white;
|
||||||
|
animation-name: blink;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
pulseaudio.muted {
|
||||||
|
border-bottom: 2px solid red;
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
settings = [{
|
settings = [{
|
||||||
layer = "top";
|
layer = "top";
|
||||||
position = "top";
|
position = "top";
|
||||||
height = 16;
|
height = 22;
|
||||||
output = [
|
spacing = 10;
|
||||||
"eDP-1"
|
|
||||||
#"DP-2"
|
|
||||||
#"HDMI-A-2"
|
|
||||||
];
|
|
||||||
tray = { spacing = 10; };
|
tray = { spacing = 10; };
|
||||||
modules-center = [ "clock" ];
|
modules-center = [ "clock" ];
|
||||||
modules-left = [ "sway/workspaces" "sway/window" "sway/mode" ];
|
#modules-left = [ "wlr/mode" "wlr/workspaces" "wlr/window" ];
|
||||||
#modules-left = [ "wlr/workspaces" ];
|
modules-left = [ "wlr/workspaces" ];
|
||||||
modules-right = [ "cpu" "memory" "disk" "pulseaudio" "battery" "network" "tray" ];
|
modules-right = [ "idle_inhibitor" "pulseaudio" "network" "cpu" "memory" "temperature" "battery" "tray" ];
|
||||||
#modules-right = [ "cpu" "memory" "pulseaudio" "clock" "tray" ];
|
#modules-right = [ "cpu" "memory" "pulseaudio" "clock" "tray" ];
|
||||||
|
|
||||||
"sway/workspaces" = {
|
"sway/workspaces" = {
|
||||||
format = "<span font='12'>{icon}</span>";
|
format = "<span font='14'>{icon}</span>";
|
||||||
format-icons = {
|
format-icons = {
|
||||||
"1"="";
|
"1"="";
|
||||||
"2"="";
|
"2"="";
|
||||||
@ -103,7 +107,7 @@
|
|||||||
"4"="";
|
"4"="";
|
||||||
"5"="";
|
"5"="";
|
||||||
};
|
};
|
||||||
all-outputs = true;
|
all-outputs = false;
|
||||||
persistent_workspaces = {
|
persistent_workspaces = {
|
||||||
"1" = [];
|
"1" = [];
|
||||||
"2" = [];
|
"2" = [];
|
||||||
@ -113,7 +117,8 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
"wlr/workspaces" = {
|
"wlr/workspaces" = {
|
||||||
format = "<span font='12'>{icon}</span>";
|
format = "{icon}";
|
||||||
|
color = "white";
|
||||||
format-icons = {
|
format-icons = {
|
||||||
"1"="";
|
"1"="";
|
||||||
"2"="";
|
"2"="";
|
||||||
@ -122,72 +127,91 @@
|
|||||||
"5"="";
|
"5"="";
|
||||||
};
|
};
|
||||||
all-outputs = true;
|
all-outputs = true;
|
||||||
active-only = false;
|
active-only = true;
|
||||||
on-click = "activate";
|
on-click = "activate";
|
||||||
};
|
};
|
||||||
clock = {
|
clock = {
|
||||||
format = "{:%b %d %H:%M}";
|
format = "{:%b %d %H:%M}";
|
||||||
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||||
format-alt = "{:%A, %B %d, %Y} ";
|
format-alt = "{:%A, %B %d, %Y}";
|
||||||
|
};
|
||||||
|
idle_inhibitor = {
|
||||||
|
format = "{icon}";
|
||||||
|
format-icons = {
|
||||||
|
activated = "";
|
||||||
|
deactivated = "";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
cpu = {
|
cpu = {
|
||||||
format = "{usage}% <span font='11'></span>";
|
format = "{usage}%";
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
interval = 1;
|
interval = 2;
|
||||||
};
|
};
|
||||||
disk = {
|
disk = {
|
||||||
format = "{percentage_used}% <span font='11'></span>";
|
format = "{percentage_used}%";
|
||||||
path = "/";
|
path = "/";
|
||||||
interval = 30;
|
interval = 30;
|
||||||
};
|
};
|
||||||
memory = {
|
memory = {
|
||||||
format = "{}% <span font='11'></span>";
|
format = "{}%";
|
||||||
interval = 1;
|
interval = 5;
|
||||||
|
};
|
||||||
|
temperature = {
|
||||||
|
states = {
|
||||||
|
"good" = 50;
|
||||||
|
"warning" = 70;
|
||||||
|
"critical" = 80;
|
||||||
|
};
|
||||||
|
"thermal-zone" = 2;
|
||||||
|
"hwmon-path" = "/sys/class/hwmon/hwmon3/temp1_input";
|
||||||
|
"format" = "{icon}{temperatureC}°C";
|
||||||
|
"format-icons" = ["" "" "" "" ""];
|
||||||
|
};
|
||||||
|
backlight = {
|
||||||
|
"format" = "{icon}{percent}%";
|
||||||
|
"format-icons" = ["" ""];
|
||||||
|
"on-scroll-up" = "light -A +5%";
|
||||||
|
"on-scroll-down" = "light -U -5%";
|
||||||
};
|
};
|
||||||
battery = {
|
battery = {
|
||||||
interval = 60;
|
interval = 60;
|
||||||
states = {
|
states = {
|
||||||
warning = 30;
|
good = 95;
|
||||||
critical = 15;
|
warning = 20;
|
||||||
|
critical = 5;
|
||||||
};
|
};
|
||||||
format = "{capacity}% <span font='11'>{icon}</span>";
|
format = "{icon}{capacity}%";
|
||||||
format-charging = "{capacity}% <span font='11'></span>";
|
format-charging = "{capacity}%";
|
||||||
|
format-plugged = "{capacity}%";
|
||||||
|
format-alt = "{icon}{time}";
|
||||||
format-icons = ["" "" "" "" ""];
|
format-icons = ["" "" "" "" ""];
|
||||||
max-length = 25;
|
|
||||||
};
|
};
|
||||||
network = {
|
network = {
|
||||||
format-wifi = "<span font='11'></span>";
|
format-wifi = "";
|
||||||
format-ethernet = "<span font='11'></span> {ifname}: {ipaddr}/{cidr}";
|
format-ethernet = " {ifname}: {ipaddr}/{cidr}";
|
||||||
format-linked = "<span font='11'>睊</span> {ifname} (No IP)";
|
format-linked = "睊{ifname} (No IP)";
|
||||||
format-disconnected = "<span font='11'>睊</span> Not connected";
|
format-disconnected = "睊Not connected";
|
||||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||||
tooltip-format = "{essid} {signalStrength}%";
|
tooltip-format = "{essid} {signalStrength}%";
|
||||||
on-click-right = "${pkgs.alacritty}/bin/alacritty -e nmtui";
|
on-click-right = "${pkgs.alacritty}/bin/alacritty -e nmtui";
|
||||||
};
|
};
|
||||||
pulseaudio = {
|
pulseaudio = {
|
||||||
format = "<span font='11'>{icon}</span> {volume}% {format_source}";
|
format = "{icon}{volume}% {format_source}";
|
||||||
format-bluetooth = "<span font='11'>{icon}</span> {volume}% {format_source}";
|
format-bluetooth = "{icon}{volume}% {format_source}";
|
||||||
format-bluetooth-muted = "<span font='11'></span> {volume}% {format_source}";
|
format-bluetooth-muted = "{volume}% {format_source}";
|
||||||
format-muted = "<span font='11'></span> {format_source}";
|
format-muted = "{format_source}";
|
||||||
#format-source = "{volume}% <span font='11'></span>";
|
format-source = "{volume}%";
|
||||||
format-source = "<span font='11'></span>";
|
#format-source = "<span font='14'></span>";
|
||||||
format-source-muted = "<span font='11'></span>";
|
format-source-muted = "";
|
||||||
format-icons = {
|
format-icons = {
|
||||||
default = [ "" "" "" ];
|
default = [ "" "" "" ];
|
||||||
headphone = "";
|
headphones = "";
|
||||||
#hands-free = "";
|
handsfree = "";
|
||||||
#headset = "";
|
headset = "";
|
||||||
#phone = "";
|
|
||||||
#portable = "";
|
|
||||||
#car = "";
|
|
||||||
};
|
};
|
||||||
tooltip-format = "{desc}, {volume}%";
|
tooltip-format = "{desc}, {volume}%";
|
||||||
on-click = "${pkgs.pamixer}/bin/pamixer -t";
|
|
||||||
on-click-right = "${pkgs.pamixer}/bin/pamixer --default-source -t";
|
on-click-right = "${pkgs.pamixer}/bin/pamixer --default-source -t";
|
||||||
on-click-middle = "${pkgs.pavucontrol}/bin/pavucontrol";
|
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||||
};
|
|
||||||
tray = {
|
|
||||||
icon-size = 11;
|
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user