Specify waybar config in nix.
This is to facilitate having different waybar configs for each machine.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
./distributed_build.nix
|
||||
./hardware-configuration.nix
|
||||
./power_management.nix
|
||||
./waybar.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
75
nix/configuration/hosts/quark/waybar.nix
Normal file
75
nix/configuration/hosts/quark/waybar.nix
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
config = {
|
||||
me.waybar.config = lib.mkForce {
|
||||
# "height": 10, # Waybar height (to be removed for auto height)
|
||||
"modules-left" = [
|
||||
"sway/workspaces"
|
||||
"sway/mode"
|
||||
];
|
||||
"modules-center" = [ "sway/window" ];
|
||||
"modules-right" = [
|
||||
"custom/night_mode"
|
||||
# "custom/temperature" # /sys/class/thermal/thermal_zone* does not currently exist on quark
|
||||
"custom/sound"
|
||||
"custom/available_memory"
|
||||
"idle_inhibitor"
|
||||
"custom/clock"
|
||||
"tray"
|
||||
];
|
||||
"sway/workspaces" = {
|
||||
"disable-scroll" = true;
|
||||
};
|
||||
"sway/mode" = {
|
||||
"format" = "<span style=\"italic\">{}</span>";
|
||||
};
|
||||
"sway/window" = {
|
||||
"format" = "{title}";
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
"format" = "{icon}";
|
||||
"format-icons" = {
|
||||
"activated" = "☕"; # ☕
|
||||
"deactivated" = "💤"; # ☾☁⛾⛔⏾⌛⏳💤
|
||||
};
|
||||
};
|
||||
"tray" = {
|
||||
# "icon-size" = 21;
|
||||
"spacing" = 10;
|
||||
};
|
||||
"custom/clock" = {
|
||||
"exec" = "waybar_custom_clock";
|
||||
"return-type" = "json";
|
||||
"restart-interval" = 30;
|
||||
};
|
||||
"custom/available_memory" = {
|
||||
"exec" = "waybar_custom_available_memory";
|
||||
"return-type" = "json";
|
||||
"restart-interval" = 30;
|
||||
};
|
||||
"custom/sound" = {
|
||||
"exec" = "waybar_custom_sound";
|
||||
"return-type" = "json";
|
||||
"restart-interval" = 30;
|
||||
};
|
||||
# "custom/temperature" = {
|
||||
# "exec" = "waybar_custom_temperature";
|
||||
# "return-type" = "json";
|
||||
# "restart-interval" = 30;
|
||||
# };
|
||||
"custom/night_mode" = {
|
||||
"exec" = "waybar_night_mode";
|
||||
"return-type" = "json";
|
||||
"restart-interval" = 30;
|
||||
"on-click" = "pkill -USR1 -f waybar_night_mode";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user