2024-02-08 23:21:10 +03:00
|
|
|
{ config, pkgs, ... }:
|
2022-11-21 02:53:20 +03:00
|
|
|
with config.deviceSpecific; {
|
2022-12-10 22:34:39 +03:00
|
|
|
home-manager.users.${config.mainuser}.programs.waybar = {
|
2022-08-18 18:00:14 +03:00
|
|
|
enable = true;
|
2024-02-08 23:32:56 +03:00
|
|
|
style = builtins.readFile ./style.css;
|
|
|
|
systemd.enable = true;
|
|
|
|
systemd.target = "hyprland-session.target";
|
2022-08-18 18:00:14 +03:00
|
|
|
settings = {
|
|
|
|
mainBar = {
|
|
|
|
layer = "top";
|
|
|
|
position = "top";
|
2022-09-23 21:26:59 +03:00
|
|
|
margin = "10 10 0 8";
|
2022-08-18 18:00:14 +03:00
|
|
|
modules-left = [ "wlr/workspaces" ];
|
2022-11-21 02:53:20 +03:00
|
|
|
modules-right = if isLaptop then [
|
|
|
|
"cpu"
|
2022-08-18 18:00:14 +03:00
|
|
|
"disk"
|
2022-09-23 21:26:59 +03:00
|
|
|
"temperature"
|
|
|
|
"custom/mem"
|
|
|
|
"backlight"
|
|
|
|
"battery"
|
2022-08-18 18:00:14 +03:00
|
|
|
"clock"
|
|
|
|
"tray"
|
2022-11-21 02:53:20 +03:00
|
|
|
] else [
|
|
|
|
"cpu"
|
|
|
|
"disk"
|
|
|
|
"temperature"
|
|
|
|
"custom/mem"
|
|
|
|
"clock"
|
|
|
|
"tray"
|
2022-08-18 18:00:14 +03:00
|
|
|
];
|
|
|
|
cpu = {
|
|
|
|
interval = 4;
|
2022-11-21 02:53:20 +03:00
|
|
|
format = "{usage}%";
|
2022-08-18 18:00:14 +03:00
|
|
|
};
|
|
|
|
disk = {
|
|
|
|
interval = 60;
|
|
|
|
format = "{free}";
|
2023-04-08 18:00:13 +03:00
|
|
|
path = "/home";
|
2022-08-18 18:00:14 +03:00
|
|
|
};
|
|
|
|
"custom/separator" = {
|
|
|
|
format = "|";
|
|
|
|
interval = "once";
|
|
|
|
tooltip = false;
|
|
|
|
};
|
|
|
|
"wlr/workspaces" = {
|
|
|
|
format = "{icon}";
|
|
|
|
on-click = "activate";
|
|
|
|
format-icons = {
|
|
|
|
"10" = "0";
|
|
|
|
"Messengers" = "Msg";
|
|
|
|
"Music" = "Mus";
|
|
|
|
};
|
|
|
|
};
|
2022-09-23 21:26:59 +03:00
|
|
|
temperature = {
|
|
|
|
critical-threshold = 80;
|
|
|
|
format = "{temperatureC}°C {icon}";
|
|
|
|
format-icons = [ "" "" "" "" "" ];
|
|
|
|
tooltip = false;
|
|
|
|
};
|
|
|
|
"custom/mem" = {
|
|
|
|
format = "{} ";
|
|
|
|
interval = 3;
|
2022-11-21 02:53:20 +03:00
|
|
|
exec = "${pkgs.procps}/bin/free -h | ${pkgs.gawk}/bin/awk '/Mem:/{printf $7}'";
|
2022-09-23 21:26:59 +03:00
|
|
|
tooltip = false;
|
|
|
|
};
|
|
|
|
backlight = {
|
|
|
|
device = "intel_backlight";
|
|
|
|
format = "{percent}% {icon}";
|
|
|
|
format-icons = [ "" "" "" "" "" "" "" ];
|
|
|
|
min-length = 7;
|
|
|
|
};
|
|
|
|
battery = {
|
|
|
|
states = {
|
|
|
|
warning = 30;
|
|
|
|
critical = 15;
|
|
|
|
};
|
|
|
|
format = "{capacity}% {icon}";
|
|
|
|
format-charging = "{capacity}% ";
|
|
|
|
format-plugged = "{capacity}% ";
|
|
|
|
format-alt = "{time} {icon}";
|
|
|
|
format-icons = [
|
|
|
|
"" "" "" "" "" "" "" "" "" ""
|
|
|
|
];
|
|
|
|
on-update = "$HOME/.config/waybar/scripts/check_battery.sh";
|
|
|
|
};
|
|
|
|
clock = {
|
|
|
|
format = "{:%a, %d %b, %H:%M}";
|
|
|
|
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
|
|
|
};
|
|
|
|
tray = {
|
|
|
|
icon-size = 16;
|
|
|
|
spacing = 0;
|
|
|
|
};
|
2022-08-18 18:00:14 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|