Update formatter

This commit is contained in:
Fabian Hauser 2024-04-10 10:53:41 +07:00
parent 4eea2232fb
commit d8235cb2a9
55 changed files with 1031 additions and 664 deletions

View file

@ -1,4 +1,10 @@
{ pkgs, lib, config, ... }: {
{
pkgs,
lib,
config,
...
}:
{
xsession.preferStatusNotifierItems = true;
wayland.windowManager.sway.config.bars = [ ];
@ -8,118 +14,126 @@
enable = true;
target = "tray.target";
};
settings = [{
position = "top";
#height =
modules-left = [ "sway/mode" "sway/workspaces" ];
modules-center = [ "sway/window" ];
modules-right = [
"idle_inhibitor"
"backlight"
"battery"
"pulseaudio"
"tray"
"clock"
];
backlight.format = " {percent}%";
disk.format = " {percentage_used}%";
clock.format = "{:%Y-%m-%d%H:%M}";
"sway/workspaces" = {
disable-scroll-wraparound = true;
enable-bar-scroll = true;
numeric-first = true;
};
battery = {
interval = 60;
states = {
warning = 15;
critical = 10;
};
format = " {capacity}% {time}"; # Icon: bolt
format-discharging = "{icon} {capacity}% {time}";
format-time = "{H}:{M}";
format-icons = [
"" # Icon: battery-full
"" # Icon: battery-three-quarters
"" # Icon: battery-half
"" # Icon: battery-quarter
"" # Icon: battery-empty
settings = [
{
position = "top";
#height =
modules-left = [
"sway/mode"
"sway/workspaces"
];
tooltip = "true";
};
cpu = {
interval = "5";
format = " {usage}% ({load})"; # Icon: microchip
states = {
warning = "70";
critical = "90";
modules-center = [ "sway/window" ];
modules-right = [
"idle_inhibitor"
"backlight"
"battery"
"pulseaudio"
"tray"
"clock"
];
backlight.format = " {percent}%";
disk.format = " {percentage_used}%";
clock.format = "{:%Y-%m-%d%H:%M}";
"sway/workspaces" = {
disable-scroll-wraparound = true;
enable-bar-scroll = true;
numeric-first = true;
};
};
memory = {
interval = "5";
format = " {}%"; # Icon: microchip
states = {
warning = "70";
critical = "90";
battery = {
interval = 60;
states = {
warning = 15;
critical = 10;
};
format = " {capacity}% {time}"; # Icon: bolt
format-discharging = "{icon} {capacity}% {time}";
format-time = "{H}:{M}";
format-icons = [
"" # Icon: battery-full
"" # Icon: battery-three-quarters
"" # Icon: battery-half
"" # Icon: battery-quarter
"" # Icon: battery-empty
];
tooltip = "true";
};
};
"sway/mode" = {
format =
''<span style="italic"> {}</span>''; # Icon: expand-arrows-alt
tooltip = "false";
};
"sway/window" = {
format = "{}";
max-length = "120";
};
"sway/workspaces" = {
all-outputs = false;
disable-scroll = true;
format = "{icon}";
format-icons = {
"10" = " 10";
"11" = " 11";
"12" = " 12";
"13" = " 13";
cpu = {
interval = "5";
format = " {usage}% ({load})"; # Icon: microchip
states = {
warning = "70";
critical = "90";
};
};
};
pulseaudio = {
scroll-step = 3;
format = "{icon} {volume}%";
format-bluetooth = "{icon} {volume}%";
format-muted = "🔇";
format-icons = {
headphones = "";
handsfree = "";
headset = "";
phone = "";
portable = "";
car = "";
default = [ "" "" "" ];
memory = {
interval = "5";
format = " {}%"; # Icon: microchip
states = {
warning = "70";
critical = "90";
};
};
on-click = "pavucontrol";
};
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = " active";
deactivated = "";
"sway/mode" = {
format = ''<span style="italic"> {}</span>''; # Icon: expand-arrows-alt
tooltip = "false";
};
};
tray = {
icon-size = "21";
spacing = "10";
};
}];
"sway/window" = {
format = "{}";
max-length = "120";
};
"sway/workspaces" = {
all-outputs = false;
disable-scroll = true;
format = "{icon}";
format-icons = {
"10" = " 10";
"11" = " 11";
"12" = " 12";
"13" = " 13";
};
};
pulseaudio = {
scroll-step = 3;
format = "{icon} {volume}%";
format-bluetooth = "{icon} {volume}%";
format-muted = "🔇";
format-icons = {
headphones = "";
handsfree = "";
headset = "";
phone = "";
portable = "";
car = "";
default = [
""
""
""
];
};
on-click = "pavucontrol";
};
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = " active";
deactivated = "";
};
};
tray = {
icon-size = "21";
spacing = "10";
};
}
];
style = ''
/* =============================================================================