summaryrefslogtreecommitdiff
path: root/home-modules/desktop/wayland/waybar.nix
diff options
context:
space:
mode:
authorJakub Stachurski <j.stachurski@student.utwente.nl>2025-11-19 21:02:52 +0100
committerJakub Stachurski <j.stachurski@student.utwente.nl>2025-11-19 21:02:52 +0100
commit892de67a9f64d0b0cdb023d830a019d8feec0a57 (patch)
tree0c5fd0c60ef93bb5cdc5f83c8cade0c5dddb4899 /home-modules/desktop/wayland/waybar.nix
parentf5b37610b3835ea26757ef36d554ec598d53100c (diff)
Nix fmt
Diffstat (limited to 'home-modules/desktop/wayland/waybar.nix')
-rw-r--r--home-modules/desktop/wayland/waybar.nix220
1 files changed, 124 insertions, 96 deletions
diff --git a/home-modules/desktop/wayland/waybar.nix b/home-modules/desktop/wayland/waybar.nix
index 5f3c532..6088cee 100644
--- a/home-modules/desktop/wayland/waybar.nix
+++ b/home-modules/desktop/wayland/waybar.nix
@@ -1,120 +1,141 @@
-{pkgs, hostconfig, lib, config,...}: {
+{
+ pkgs,
+ hostconfig,
+ lib,
+ config,
+ ...
+}:
+{
options.homeprogs.waybar.enable = lib.mkEnableOption "Enable waybar";
config = lib.mkIf config.homeprogs.waybar.enable {
- programs.waybar = {
- enable = true;
- settings = [{
- layer = "top";
- position = "top";
- height = 30;
- spacing = 6;
- modules-left = [
- "hyprland/workspaces"
- "hyprland/window"
- ];
+ programs.waybar = {
+ enable = true;
+ settings = [
+ {
+ layer = "top";
+ position = "top";
+ height = 30;
+ spacing = 6;
+ modules-left = [
+ "hyprland/workspaces"
+ "hyprland/window"
+ ];
- modules-center = [
- "clock"
- "hyprland/language"
- "tray"
- "battery"
- ];
+ modules-center = [
+ "clock"
+ "hyprland/language"
+ "tray"
+ "battery"
+ ];
- modules-right = [
- "idle_inhibitor"
- "wireplumber"
- "network"
- "cpu"
- "memory"
- "disk"
- "temperature"
- "backlight"
- ];
- wireplumber = {
- scroll-step = 1; #%, can be a float
+ modules-right = [
+ "idle_inhibitor"
+ "wireplumber"
+ "network"
+ "cpu"
+ "memory"
+ "disk"
+ "temperature"
+ "backlight"
+ ];
+ wireplumber = {
+ scroll-step = 1; # %, can be a float
format = "{volume}% ";
format-muted = "Muted";
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
- on-click-right = "pavucontrol";
- };
+ on-click-right = "pavucontrol";
+ };
- network = {
+ network = {
# interface = "wlp2*"; # (Optional) To force the use of this interface
format-wifi = "({signalStrength}%) ";
format-ethernet = "{ifname} ";
tooltip-format = "{ifname} via {gwaddr} ";
format-linked = "{ifname} (No IP) ";
format-disconnected = "Disconnected ⚠";
- format-alt= "{essid}: {ipaddr}/{cidr}";
- };
+ format-alt = "{essid}: {ipaddr}/{cidr}";
+ };
- "hyprland/workspaces" = {
- all-outputs = false;
- active-only = false;
- format = "{name}";
- format-icons = {
- urgent = "";
- focused = "";
- default = "";
- };
- };
-
- "hyprland/window" = {
- max-length = 200;
- separate-outputs = true;
- };
+ "hyprland/workspaces" = {
+ all-outputs = false;
+ active-only = false;
+ format = "{name}";
+ format-icons = {
+ urgent = "";
+ focused = "";
+ default = "";
+ };
+ };
+ "hyprland/window" = {
+ max-length = 200;
+ separate-outputs = true;
+ };
- keyboard-state = {
- numlock = false;
- format = "{name} {icon}";
- format-icons = {
+ keyboard-state = {
+ numlock = false;
+ format = "{name} {icon}";
+ format-icons = {
locked = "";
unlocked = "";
+ };
};
- };
- idle_inhibitor = {
- format = "{icon}";
- format-icons = {
+ idle_inhibitor = {
+ format = "{icon}";
+ format-icons = {
activated = "";
deactivated = "";
+ };
};
- };
- tray = {
- icon-size = 21;
- spacing = 10;
- };
- clock = {
- timezone = "Europe/Amsterdam";
- tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
- format-alt = "{:%Y-%m-%d}";
- };
- cpu = {
- format = "{usage}% ";
- tooltip = false;
- };
- memory = {
- format = "{}% ";
- };
- temperature = {
- thermal-zone = 1;
- # hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
- critical-threshold = 80;
- # format-critical = "{temperatureC}°C {icon}";
- format = "{temperatureC}°C {icon}";
- format-icons = ["" "" ""];
- };
- "backlight" = {
- # device = "acpi_video1";
- format = "{percent}{icon}";
- format-icons = ["" "" "" "" "" "" "" "" ""];
- };
- battery = {
+ tray = {
+ icon-size = 21;
+ spacing = 10;
+ };
+ clock = {
+ timezone = "Europe/Amsterdam";
+ tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
+ format-alt = "{:%Y-%m-%d}";
+ };
+ cpu = {
+ format = "{usage}% ";
+ tooltip = false;
+ };
+ memory = {
+ format = "{}% ";
+ };
+ temperature = {
+ thermal-zone = 1;
+ # hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
+ critical-threshold = 80;
+ # format-critical = "{temperatureC}°C {icon}";
+ format = "{temperatureC}°C {icon}";
+ format-icons = [
+ ""
+ ""
+ ""
+ ];
+ };
+ "backlight" = {
+ # device = "acpi_video1";
+ format = "{percent}{icon}";
+ format-icons = [
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ];
+ };
+ battery = {
states = {
- # good = 95;
- warning = 30;
- critical = 15;
+ # good = 95;
+ warning = 30;
+ critical = 15;
};
format = "{capacity}% {icon}";
format-charging = "{capacity}% ";
@@ -122,10 +143,17 @@
format-alt = "{time} {icon}";
# format-good = ""; // An empty format will hide the module
# format-full = "";
- format-icons = ["" "" "" "" ""];
- };
- }];
+ format-icons = [
+ ""
+ ""
+ ""
+ ""
+ ""
+ ];
+ };
+ }
+ ];
style = ./waybar.css;
- };
+ };
};
}