Formatting + update
This commit is contained in:
parent
93de64c64e
commit
9c895e9cc0
61 changed files with 2350 additions and 2100 deletions
|
|
@ -1,70 +1,79 @@
|
|||
{ pkgs, lib, hwconfig, ... }:
|
||||
let
|
||||
battery = (import ./battery-status.nix {inherit pkgs; inherit hwconfig;});
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
hwconfig,
|
||||
...
|
||||
}: let
|
||||
battery = import ./battery-status.nix {
|
||||
inherit pkgs;
|
||||
inherit hwconfig;
|
||||
};
|
||||
in {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
#systemd.enable = true;
|
||||
|
||||
#window#waybar {
|
||||
# background: transparent;
|
||||
#border-bottom: none;
|
||||
#}
|
||||
#${builtins.readFile "${pkgs.waybar}/etc/xdg/waybar/style.css"}
|
||||
style = ''
|
||||
${builtins.readFile ./waybarstyle.css}
|
||||
|
||||
* {
|
||||
font-size: 15px;
|
||||
}
|
||||
'';
|
||||
settings = [{
|
||||
# background: transparent;
|
||||
#border-bottom: none;
|
||||
#}
|
||||
#${builtins.readFile "${pkgs.waybar}/etc/xdg/waybar/style.css"}
|
||||
style = ''
|
||||
${builtins.readFile ./waybarstyle.css}
|
||||
|
||||
* {
|
||||
font-size: 15px;
|
||||
}
|
||||
'';
|
||||
settings = [
|
||||
{
|
||||
height = 36;
|
||||
layer = "top";
|
||||
position = "top";
|
||||
tray = { spacing = 3; };
|
||||
modules-center = [
|
||||
#"hyprland/window"
|
||||
"clock"
|
||||
];
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
# "hyprland/window"
|
||||
tray = {spacing = 3;};
|
||||
modules-center = [
|
||||
#"hyprland/window"
|
||||
"clock"
|
||||
];
|
||||
modules-right = lib.optional hwconfig.isLaptop "backlight"
|
||||
++ [
|
||||
"pulseaudio"
|
||||
#"network"
|
||||
#"cpu"
|
||||
"memory"
|
||||
#"temperature"
|
||||
"hyprland/language"
|
||||
] ++ lib.optional battery.available "custom/battery"
|
||||
++ [
|
||||
"tray"
|
||||
"custom/notification"
|
||||
#"custom/disablehypridle"
|
||||
"custom/power"
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
# "hyprland/window"
|
||||
];
|
||||
modules-right =
|
||||
lib.optional hwconfig.isLaptop "backlight"
|
||||
++ [
|
||||
"pulseaudio"
|
||||
#"network"
|
||||
#"cpu"
|
||||
"memory"
|
||||
#"temperature"
|
||||
"hyprland/language"
|
||||
]
|
||||
++ lib.optional battery.available "custom/battery"
|
||||
++ [
|
||||
"tray"
|
||||
"custom/notification"
|
||||
#"custom/disablehypridle"
|
||||
"custom/power"
|
||||
];
|
||||
battery = {
|
||||
format = " {time} {icon} ";
|
||||
format-alt = " {capacity}% {icon} ";
|
||||
format-charging = " {capacity}% ";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
format-icons = ["" "" "" "" ""];
|
||||
format-plugged = " {capacity}% ";
|
||||
states = {
|
||||
critical = 10;
|
||||
warning = 20;
|
||||
};
|
||||
};
|
||||
backlight = {
|
||||
format = "{percent}% ";
|
||||
on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl s 5%+";
|
||||
on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
|
||||
};
|
||||
backlight = {
|
||||
format = "{percent}% ";
|
||||
on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl s 5%+";
|
||||
on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
|
||||
};
|
||||
"custom/battery" = {
|
||||
exec ="${pkgs.writeShellScriptBin "battery-widget" ''
|
||||
exec = "${pkgs.writeShellScriptBin "battery-widget" ''
|
||||
${battery.labelAdaptive}
|
||||
${battery.labelPercent}
|
||||
''}/bin/battery-widget";
|
||||
|
|
@ -80,12 +89,12 @@ in
|
|||
tooltip = false;
|
||||
};
|
||||
"hyprland/language" = {
|
||||
format = " {}";
|
||||
format = " {}";
|
||||
};
|
||||
memory = {
|
||||
interval = 1;
|
||||
format = "{used}/{total}Gb ";
|
||||
};
|
||||
memory = {
|
||||
interval = 1;
|
||||
format = "{used}/{total}Gb ";
|
||||
};
|
||||
network = {
|
||||
interval = 1;
|
||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||
|
|
@ -102,7 +111,7 @@ in
|
|||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-icons = {
|
||||
car = "";
|
||||
default = [ "" "" "" ];
|
||||
default = ["" "" ""];
|
||||
handsfree = "";
|
||||
headphones = "";
|
||||
headset = "";
|
||||
|
|
@ -114,57 +123,57 @@ in
|
|||
format-source-muted = "";
|
||||
on-click = "${pkgs.pwvucontrol}/bin/pwvucontrol";
|
||||
};
|
||||
"hyprland/submap" = { format = ''<span style="italic">{}</span>''; };
|
||||
"hyprland/submap" = {format = ''<span style="italic">{}</span>'';};
|
||||
temperature = {
|
||||
critical-threshold = 80;
|
||||
format = "{temperatureC}°C {icon}";
|
||||
format-icons = [ "" "" "" ];
|
||||
format-icons = ["" "" ""];
|
||||
};
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
disable-scroll = true;
|
||||
all-outputs = false;
|
||||
warp-on-scroll = true;
|
||||
format = "{name}{icon} ";
|
||||
format-icons = {
|
||||
urgent = "";
|
||||
active = "";
|
||||
default = "";
|
||||
};
|
||||
#persistent-workspaces = {
|
||||
# "*" = 3;
|
||||
#};
|
||||
disable-scroll = true;
|
||||
all-outputs = false;
|
||||
warp-on-scroll = true;
|
||||
format = "{name}{icon} ";
|
||||
format-icons = {
|
||||
urgent = "";
|
||||
active = "";
|
||||
default = "";
|
||||
};
|
||||
#persistent-workspaces = {
|
||||
# "*" = 3;
|
||||
#};
|
||||
};
|
||||
|
||||
"custom/power" = {
|
||||
format = "⏻ ";
|
||||
tooltip = false;
|
||||
#menu = "on-click";
|
||||
#menu-file = ./power_menu.xml;
|
||||
#menu-actions = {
|
||||
# shutdown = "shutdown -h now";
|
||||
# reboot = "reboot";
|
||||
# suspend = "systemctl suspend";
|
||||
# hibernate = "systemctl hibernate";
|
||||
#};
|
||||
on-click = "wlogout";
|
||||
format = "⏻ ";
|
||||
tooltip = false;
|
||||
#menu = "on-click";
|
||||
#menu-file = ./power_menu.xml;
|
||||
#menu-actions = {
|
||||
# shutdown = "shutdown -h now";
|
||||
# reboot = "reboot";
|
||||
# suspend = "systemctl suspend";
|
||||
# hibernate = "systemctl hibernate";
|
||||
#};
|
||||
on-click = "wlogout";
|
||||
};
|
||||
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
notification = " <span foreground='red'><small><sup>⬤</sup></small></span>";
|
||||
none = " ";
|
||||
dnd-notification = " <span foreground='red'><small><sup>⬤</sup></small></span>";
|
||||
dnd-none = " ";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "sleep 0.1 && swaync-client -t -sw";
|
||||
on-click-right = "sleep 0.1 && swaync-client -d -sw";
|
||||
escape = true;
|
||||
tooltip = false;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
notification = " <span foreground='red'><small><sup>⬤</sup></small></span>";
|
||||
none = " ";
|
||||
dnd-notification = " <span foreground='red'><small><sup>⬤</sup></small></span>";
|
||||
dnd-none = " ";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "sleep 0.1 && swaync-client -t -sw";
|
||||
on-click-right = "sleep 0.1 && swaync-client -d -sw";
|
||||
escape = true;
|
||||
};
|
||||
|
||||
"custom/disablehypridle" = {
|
||||
|
|
@ -184,6 +193,7 @@ in
|
|||
fi
|
||||
'';
|
||||
};
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue