feat: convert the rest of the configs to hjem
This commit is contained in:
parent
689c291762
commit
63d99f2062
10 changed files with 361 additions and 293 deletions
|
@ -5,93 +5,92 @@
|
|||
...
|
||||
}:
|
||||
{
|
||||
hm.programs.waybar = {
|
||||
enable = true;
|
||||
style = ./style.css;
|
||||
environment.systemPackages = [ pkgs.waybar ];
|
||||
|
||||
settings = [
|
||||
{
|
||||
position = "bottom";
|
||||
layer = "top";
|
||||
height = 24;
|
||||
spacing = 2;
|
||||
hj = {
|
||||
".config/waybar/style.css".source = ./style.css;
|
||||
|
||||
modules-left = [ "hyprland/workspaces" ];
|
||||
modules-center = [ ];
|
||||
modules-right =
|
||||
[ "memory" ]
|
||||
++ lib.optionals (builtins.elem "amdgpu" config.services.xserver.videoDrivers) [
|
||||
"custom/gpu-usage"
|
||||
]
|
||||
++ [
|
||||
"cpu"
|
||||
"wireplumber"
|
||||
]
|
||||
++ lib.optionals config.services.power-profiles-daemon.enable [ "battery" ]
|
||||
++ lib.optionals config.programs.light.enable [ "backlight" ]
|
||||
++ [
|
||||
"clock"
|
||||
"tray"
|
||||
];
|
||||
".config/waybar/config".text = builtins.toJSON {
|
||||
position = "bottom";
|
||||
layer = "top";
|
||||
height = 24;
|
||||
spacing = 2;
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{name}";
|
||||
on-click = "activate";
|
||||
sort-by-number = true;
|
||||
modules-left = [ "hyprland/workspaces" ];
|
||||
modules-center = [ ];
|
||||
modules-right =
|
||||
[ "memory" ]
|
||||
++ lib.optionals (builtins.elem "amdgpu" config.services.xserver.videoDrivers) [
|
||||
"custom/gpu-usage"
|
||||
]
|
||||
++ [
|
||||
"cpu"
|
||||
"wireplumber"
|
||||
]
|
||||
++ lib.optionals config.services.power-profiles-daemon.enable [ "battery" ]
|
||||
++ lib.optionals config.programs.light.enable [ "backlight" ]
|
||||
++ [
|
||||
"clock"
|
||||
"tray"
|
||||
];
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{name}";
|
||||
on-click = "activate";
|
||||
sort-by-number = true;
|
||||
};
|
||||
|
||||
tray = {
|
||||
icon-size = 16;
|
||||
spacing = 10;
|
||||
};
|
||||
|
||||
clock = {
|
||||
format-alt = "{:%Y-%m-%d %H:%M:%S}";
|
||||
interval = 1;
|
||||
};
|
||||
|
||||
cpu = {
|
||||
format = "CPU {usage}%";
|
||||
tooltip = false;
|
||||
interval = 2;
|
||||
};
|
||||
|
||||
memory = {
|
||||
format = "RAM {}%";
|
||||
interval = 2;
|
||||
};
|
||||
|
||||
backlight = {
|
||||
format = "LGT {percent}%";
|
||||
scroll-step = 5;
|
||||
};
|
||||
|
||||
battery = {
|
||||
states = {
|
||||
low = 15;
|
||||
};
|
||||
format = "BAT {capacity}%";
|
||||
format-charging = "BAT+ {capacity}%";
|
||||
format-plugged = "BAT+ {capacity}%";
|
||||
format-low = "BAT! {capacity}%";
|
||||
interval = 5;
|
||||
};
|
||||
|
||||
tray = {
|
||||
icon-size = 16;
|
||||
spacing = 10;
|
||||
};
|
||||
wireplumber = {
|
||||
scroll-step = 5;
|
||||
format = "VOL {volume}%";
|
||||
format-muted = "muted";
|
||||
on-click = "${lib.getExe' pkgs.wireplumber "wpctl"} set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
on-click-right = "${lib.getExe pkgs.pavucontrol}";
|
||||
};
|
||||
|
||||
clock = {
|
||||
format-alt = "{:%Y-%m-%d %H:%M:%S}";
|
||||
interval = 1;
|
||||
};
|
||||
|
||||
cpu = {
|
||||
format = "CPU {usage}%";
|
||||
tooltip = false;
|
||||
interval = 2;
|
||||
};
|
||||
|
||||
memory = {
|
||||
format = "RAM {}%";
|
||||
interval = 2;
|
||||
};
|
||||
|
||||
backlight = {
|
||||
format = "LGT {percent}%";
|
||||
scroll-step = 5;
|
||||
};
|
||||
|
||||
battery = {
|
||||
states = {
|
||||
low = 15;
|
||||
};
|
||||
format = "BAT {capacity}%";
|
||||
format-charging = "BAT+ {capacity}%";
|
||||
format-plugged = "BAT+ {capacity}%";
|
||||
format-low = "BAT! {capacity}%";
|
||||
interval = 5;
|
||||
};
|
||||
|
||||
wireplumber = {
|
||||
scroll-step = 5;
|
||||
format = "VOL {volume}%";
|
||||
format-muted = "muted";
|
||||
on-click = "${lib.getExe' pkgs.wireplumber "wpctl"} set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
on-click-right = "${lib.getExe pkgs.pavucontrol}";
|
||||
};
|
||||
|
||||
"custom/gpu-usage" = {
|
||||
exec = "cat /sys/class/hwmon/hwmon*/device/gpu_busy_percent";
|
||||
format = "GPU {}%";
|
||||
return-type = "";
|
||||
interval = 2;
|
||||
};
|
||||
}
|
||||
];
|
||||
"custom/gpu-usage" = {
|
||||
exec = "cat /sys/class/hwmon/hwmon*/device/gpu_busy_percent";
|
||||
format = "GPU {}%";
|
||||
return-type = "";
|
||||
interval = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue