From 282a085718b6cba16913771a80256040351d1746 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Sat, 25 Jul 2026 13:15:12 +0530 Subject: feat(waybar): add waybar module, refine hyprland config, add private configs - Add waybar with base16-themed bar, modules (workspaces, window, volume, battery, network, vpn, cpu, memory, date, time), and CSS style - Replace polybar with waybar in desktop imports - Launch waybar + hyprpaper on hyprland startup - Extract hyprpaper into its own module with eDP-2 output target - Tweak border colors (active: base07→base03, inactive: base03→base00) - Enable Nordzy cursor theme with hyprcursor support - Add private email (neomutt) and git (signing key) configs - Remove chromium force-device-scale-factor flag - Drop explicit desktop.hyprland.enable from user config - Add result to gitignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/desktop/waybar/module/battery.nix | 20 ++++++++++++++++++++ modules/desktop/waybar/module/cpu.nix | 6 ++++++ modules/desktop/waybar/module/date.nix | 6 ++++++ modules/desktop/waybar/module/default.nix | 19 +++++++++++++++++++ modules/desktop/waybar/module/memory.nix | 6 ++++++ modules/desktop/waybar/module/network.nix | 16 ++++++++++++++++ modules/desktop/waybar/module/time.nix | 6 ++++++ modules/desktop/waybar/module/volume.nix | 14 ++++++++++++++ modules/desktop/waybar/module/vpn.nix | 11 +++++++++++ modules/desktop/waybar/module/window.nix | 5 +++++ modules/desktop/waybar/module/workspaces.nix | 6 ++++++ 11 files changed, 115 insertions(+) create mode 100644 modules/desktop/waybar/module/battery.nix create mode 100644 modules/desktop/waybar/module/cpu.nix create mode 100644 modules/desktop/waybar/module/date.nix create mode 100644 modules/desktop/waybar/module/default.nix create mode 100644 modules/desktop/waybar/module/memory.nix create mode 100644 modules/desktop/waybar/module/network.nix create mode 100644 modules/desktop/waybar/module/time.nix create mode 100644 modules/desktop/waybar/module/volume.nix create mode 100644 modules/desktop/waybar/module/vpn.nix create mode 100644 modules/desktop/waybar/module/window.nix create mode 100644 modules/desktop/waybar/module/workspaces.nix (limited to 'modules/desktop/waybar/module') diff --git a/modules/desktop/waybar/module/battery.nix b/modules/desktop/waybar/module/battery.nix new file mode 100644 index 0000000..bf3527c --- /dev/null +++ b/modules/desktop/waybar/module/battery.nix @@ -0,0 +1,20 @@ +{ config }: +with config.scheme.withHashtag; +{ + format = "{icon} {capacity}%"; + format-charging = "󰂄 {capacity}%"; + format-plugged = "󰁹 {capacity}%"; + format-alt = "{time} {icon}"; + format-icons = [ + "󰁺" + "󰁻" + "󰁼" + "󰁽" + "󰁾" + "󰁿" + "󰂀" + "󰂁" + "󰂂" + "󰁹" + ]; +} diff --git a/modules/desktop/waybar/module/cpu.nix b/modules/desktop/waybar/module/cpu.nix new file mode 100644 index 0000000..06f5af6 --- /dev/null +++ b/modules/desktop/waybar/module/cpu.nix @@ -0,0 +1,6 @@ +{ config }: +with config.scheme.withHashtag; +{ + format = " {usage}%"; + interval = 2; +} diff --git a/modules/desktop/waybar/module/date.nix b/modules/desktop/waybar/module/date.nix new file mode 100644 index 0000000..efdccc4 --- /dev/null +++ b/modules/desktop/waybar/module/date.nix @@ -0,0 +1,6 @@ +{ config }: +with config.scheme.withHashtag; +{ + format = " {:%d/%m/%Y}"; + interval = 60; +} diff --git a/modules/desktop/waybar/module/default.nix b/modules/desktop/waybar/module/default.nix new file mode 100644 index 0000000..2fa6ef8 --- /dev/null +++ b/modules/desktop/waybar/module/default.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + pkgs, +}: +{ + mainBar = { + "hyprland/workspaces" = import ./workspaces.nix { inherit config; }; + "hyprland/window" = import ./window.nix { inherit config; }; + "pulseaudio" = import ./volume.nix { inherit config; }; + "battery" = import ./battery.nix { inherit config; }; + "custom/vpn" = import ./vpn.nix { inherit config lib pkgs; }; + "network" = import ./network.nix { inherit config; }; + "clock#time" = import ./time.nix { inherit config; }; + "memory" = import ./memory.nix { inherit config; }; + "cpu" = import ./cpu.nix { inherit config; }; + "clock#date" = import ./date.nix { inherit config; }; + }; +} diff --git a/modules/desktop/waybar/module/memory.nix b/modules/desktop/waybar/module/memory.nix new file mode 100644 index 0000000..b9a45a4 --- /dev/null +++ b/modules/desktop/waybar/module/memory.nix @@ -0,0 +1,6 @@ +{ config }: +with config.scheme.withHashtag; +{ + format = " {usedGb} GB"; + interval = 2; +} diff --git a/modules/desktop/waybar/module/network.nix b/modules/desktop/waybar/module/network.nix new file mode 100644 index 0000000..e1036ed --- /dev/null +++ b/modules/desktop/waybar/module/network.nix @@ -0,0 +1,16 @@ +{ config }: +with config.scheme.withHashtag; +{ + format-wifi = "{icon} {signalStrength}%"; + format-ethernet = " {ipaddr}"; + format-disconnected = ""; + tooltip-format = "{ifname}"; + tooltip-format-wifi = "{essid} ({signalStrength}%)"; + tooltip-format-ethernet = "Wired: {ipaddr}"; + tooltip-format-disconnected = "Disconnected"; + format-icons = [ + "󰢼" + "󰢽" + "󰢾" + ]; +} diff --git a/modules/desktop/waybar/module/time.nix b/modules/desktop/waybar/module/time.nix new file mode 100644 index 0000000..e097c9c --- /dev/null +++ b/modules/desktop/waybar/module/time.nix @@ -0,0 +1,6 @@ +{ config }: +with config.scheme.withHashtag; +{ + format = " {:%I:%M %p}"; + interval = 30; +} diff --git a/modules/desktop/waybar/module/volume.nix b/modules/desktop/waybar/module/volume.nix new file mode 100644 index 0000000..ee3f2f3 --- /dev/null +++ b/modules/desktop/waybar/module/volume.nix @@ -0,0 +1,14 @@ +{ config }: +with config.scheme.withHashtag; +{ + format = "{icon} {volume}%"; + format-muted = "󰻨"; + format-icons = [ + "" + "" + "" + ]; + on-click = "pamixer -t"; + on-scroll-up = "pamixer -i 5"; + on-scroll-down = "pamixer -d 5"; +} diff --git a/modules/desktop/waybar/module/vpn.nix b/modules/desktop/waybar/module/vpn.nix new file mode 100644 index 0000000..04366e1 --- /dev/null +++ b/modules/desktop/waybar/module/vpn.nix @@ -0,0 +1,11 @@ +{ + config, + lib, + pkgs, +}: +with config.scheme.withHashtag; +{ + exec = "${pkgs.runtimeShell} -c '${lib.getExe' pkgs.iproute2 "ip"} a | ${lib.getExe pkgs.gnugrep} -q tun0 && printf \" VPN\"'"; + interval = 5; + format = "{}"; +} diff --git a/modules/desktop/waybar/module/window.nix b/modules/desktop/waybar/module/window.nix new file mode 100644 index 0000000..c4e54c3 --- /dev/null +++ b/modules/desktop/waybar/module/window.nix @@ -0,0 +1,5 @@ +{ config }: +with config.scheme.withHashtag; +{ + max-length = 20; +} diff --git a/modules/desktop/waybar/module/workspaces.nix b/modules/desktop/waybar/module/workspaces.nix new file mode 100644 index 0000000..bb5a6ee --- /dev/null +++ b/modules/desktop/waybar/module/workspaces.nix @@ -0,0 +1,6 @@ +{ config }: +with config.scheme.withHashtag; +{ + format = "{name}"; + on-click = "hyprctl dispatch workspace {name}"; +} -- cgit v1.2.3