style: use alejandra formatter on all nix files
This commit is contained in:
parent
d563805909
commit
0d8a394dcf
76 changed files with 1287 additions and 935 deletions
|
@ -1,9 +1,12 @@
|
|||
{lib, config, pkgs, ...}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.sway;
|
||||
in
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.desktop.sway;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
|
@ -23,41 +26,45 @@ in
|
|||
"sway/workspaces"
|
||||
"sway/mode"
|
||||
];
|
||||
modules-right = [
|
||||
"network"
|
||||
"custom/sep"
|
||||
] ++ (
|
||||
if cfg.waybar.laptop then [
|
||||
modules-right =
|
||||
[
|
||||
"network"
|
||||
"custom/sep"
|
||||
]
|
||||
++ (
|
||||
if cfg.waybar.laptop
|
||||
then [
|
||||
"backlight"
|
||||
"battery"
|
||||
"custom/sep"
|
||||
]
|
||||
else [
|
||||
]
|
||||
) ++
|
||||
[
|
||||
|
||||
"memory"
|
||||
"cpu"
|
||||
"temperature"
|
||||
"custom/sep"
|
||||
] ++ (
|
||||
if cfg.waybar.gpuThermal.enable then [
|
||||
)
|
||||
++ [
|
||||
"memory"
|
||||
"cpu"
|
||||
"temperature"
|
||||
"custom/sep"
|
||||
]
|
||||
++ (
|
||||
if cfg.waybar.gpuThermal.enable
|
||||
then [
|
||||
"temperature#gpu"
|
||||
"custom/sep"
|
||||
]
|
||||
else [
|
||||
]
|
||||
) ++
|
||||
[
|
||||
"pulseaudio#input"
|
||||
"pulseaudio#output"
|
||||
"custom/sep"
|
||||
"clock"
|
||||
"custom/sep"
|
||||
"privacy"
|
||||
"tray"
|
||||
];
|
||||
)
|
||||
++ [
|
||||
"pulseaudio#input"
|
||||
"pulseaudio#output"
|
||||
"custom/sep"
|
||||
"clock"
|
||||
"custom/sep"
|
||||
"privacy"
|
||||
"tray"
|
||||
];
|
||||
"clock" = {
|
||||
"format-alt" = "{:%Y-%m-%d}";
|
||||
"timezone" = "Europe/Paris";
|
||||
|
@ -65,7 +72,7 @@ in
|
|||
};
|
||||
"cpu" = {
|
||||
"format" = "{usage}% {icon}";
|
||||
"format-icons" = [ "" ];
|
||||
"format-icons" = [""];
|
||||
"states" = {
|
||||
"critical" = 90;
|
||||
"warning" = 70;
|
||||
|
@ -77,19 +84,19 @@ in
|
|||
"tooltip" = false;
|
||||
};
|
||||
"custom/screenrecord" = {
|
||||
"format" = " [rec.] ";
|
||||
"interval" = 1;
|
||||
"exec" = "echo '{\"class\": \"recording\"}'";
|
||||
"exec-if" = "${pkgs.procps}/bin/pgrep wl-screenrec";
|
||||
"format" = " [rec.] ";
|
||||
"interval" = 1;
|
||||
"exec" = "echo '{\"class\": \"recording\"}'";
|
||||
"exec-if" = "${pkgs.procps}/bin/pgrep wl-screenrec";
|
||||
"on-click" = "exec ${pkgs.coreutils}/bin/kill -s SIGINT $(${pkgs.procps}/bin/pgrep wl-screenrec)";
|
||||
"tooltype" = false;
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
"format" = "{icon}";
|
||||
"format-icons" = {
|
||||
"activated" = "";
|
||||
"deactivated" = "";
|
||||
};
|
||||
"format" = "{icon}";
|
||||
"format-icons" = {
|
||||
"activated" = "";
|
||||
"deactivated" = "";
|
||||
};
|
||||
};
|
||||
"memory" = {
|
||||
"format" = "{used:0.0f}/{total:0.0f}G ";
|
||||
|
@ -107,11 +114,11 @@ in
|
|||
"format-wifi" = "{signalStrength}% ";
|
||||
"tooltip" = false;
|
||||
};
|
||||
"privacy"= {
|
||||
"privacy" = {
|
||||
"icon-spacing" = 6;
|
||||
"icon-size" = 11;
|
||||
"transition-duration" = 250;
|
||||
"modules"= [
|
||||
"modules" = [
|
||||
{
|
||||
"type" = "screenshare";
|
||||
"tooltip" = false;
|
||||
|
@ -149,19 +156,22 @@ in
|
|||
"tooltip" = false;
|
||||
};
|
||||
"sway/mode" = {
|
||||
"format" = "<span style=\"italic\">{}</span>";
|
||||
"format" = "<span style=\"italic\">{}</span>";
|
||||
};
|
||||
"sway/workspace" = {
|
||||
"disable-scroll" = true;
|
||||
"disable-scroll" = true;
|
||||
};
|
||||
"temperature" = {
|
||||
"critical-threshold" = 80;
|
||||
"format" = " {temperatureC}°C ";
|
||||
"thermal-zone" = mkIf ( cfg.waybar.cpuThermal.thermalZone != null )
|
||||
"thermal-zone" =
|
||||
mkIf (cfg.waybar.cpuThermal.thermalZone != null)
|
||||
cfg.waybar.cpuThermal.thermalZone;
|
||||
"hwmon-path-abs" = mkIf ( cfg.waybar.cpuThermal.hwmonPathAbs != "" )
|
||||
"hwmon-path-abs" =
|
||||
mkIf (cfg.waybar.cpuThermal.hwmonPathAbs != "")
|
||||
"${cfg.waybar.cpuThermal.hwmonPathAbs}";
|
||||
"input-filename" = mkIf ( cfg.waybar.cpuThermal.inputFilename != "" )
|
||||
"input-filename" =
|
||||
mkIf (cfg.waybar.cpuThermal.inputFilename != "")
|
||||
"${cfg.waybar.cpuThermal.inputFilename}";
|
||||
};
|
||||
"temperature#gpu" = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue