dotfiles

My PC Dotfiles & Website
commit a7b457ccebc8f1876088dfcdea75887d413a0695
parent d842ecb442389c703a4c5c204bc817e9733aba1c
Author: maydayv7 <maydayv7@gmail.com>
Date:   Mon, 13 Oct 2025 12:00:58 +0530

feat(Hyprland): Use Waybar's `workspace-taskbar`

Diffstat:

MREADME.md | 42++++++++++++++++++++----------------------
Mfiles/hyprland/theme/waybar.css | 31++++++++++++-------------------
Mflake.lock | 117+++++++++++++-------------------------------------------------------------------
Mflake.nix | 11++++++-----
Mmodules/gui/desktop/_shared/panel.nix | 2+-
Mmodules/gui/desktop/hyprland/apps/panel.nix | 69+++++++++++++++++++++++++--------------------------------------------
Mmodules/gui/desktop/hyprland/default.nix | 4++--
Mmodules/gui/desktop/hyprland/settings/plugins.nix | 2+-
Mpackages/flake.nix | 7++++---
Mscripts/hyprutils.nix | 29++++++++++++++++++++++++++++-
Mscripts/nixos.nix | 2+-
Mscripts/sysutils.nix | 2+-
Msite/content/now.md | 2+-
13 files changed, 120 insertions(+), 200 deletions(-)

diff --git a/README.md b/README.md @@ -460,28 +460,26 @@ The [`home-manager`](https://github.com/nix-community/home-manager) module is us Here are some repositories that I may have shamelessly rummaged through for building my `dotfiles`: _Thanks a lot! ;)_ -- Example [Configuration](https://github.com/srid/nixos-flake) -- User Configurations - - - [4JX](https://github.com/4JX/nixos-config) - - [balsoft](https://code.balsoft.ru/balsoft/nixos-config) - - [bbigras](https://github.com/bbigras/nix-config) - - [cole-h](https://github.com/cole-h/nixos-config/) - - [colemickens](https://github.com/cole-mickens/nixcfg) - - [davidtwco](https://github.com/davidtwco/veritas) - - [fufexan](https://github.com/fufexan/dotfiles) - - [gvolpe](https://github.com/gvolpe/nix-config) - - [hlissner](https://github.com/hlissner/dotfiles) - - [jordanisaacs](https://github.com/jordanisaacs/dotfiles) - - [kclejeune](https://github.com/kclejeune/system) - - [lovesegfault](https://github.com/lovesegfault/nix-config) - - [lucasew](https://github.com/lucasew/nixcfg) - - [nobbz](https://github.com/NobbZ/nixos-config) - - [rasendubi](https://github.com/rasendubi/dotfiles) - - [sioodmy](https://github.com/sioodmy/dotfiles) - - [tejing1](https://github.com/tejing1/nixos-config) - - [vlaci](https://github.com/vlaci/nixos-config) - - [wiltaylor](https://github.com/wiltaylor/dotfiles) - - [wimpysworld](https://github.com/wimpysworld/nix-config) +- [4JX](https://github.com/4JX/nixos-config) +- [balsoft](https://code.balsoft.ru/balsoft/nixos-config) +- [bbigras](https://github.com/bbigras/nix-config) +- [cole-h](https://github.com/cole-h/nixos-config/) +- [colemickens](https://github.com/cole-mickens/nixcfg) +- [davidtwco](https://github.com/davidtwco/veritas) +- [fufexan](https://github.com/fufexan/dotfiles) +- [gvolpe](https://github.com/gvolpe/nix-config) +- [hlissner](https://github.com/hlissner/dotfiles) +- [jordanisaacs](https://github.com/jordanisaacs/dotfiles) +- [kclejeune](https://github.com/kclejeune/system) +- [lovesegfault](https://github.com/lovesegfault/nix-config) +- [lucasew](https://github.com/lucasew/nixcfg) +- [nobbz](https://github.com/NobbZ/nixos-config) +- [rasendubi](https://github.com/rasendubi/dotfiles) +- [sioodmy](https://github.com/sioodmy/dotfiles) +- [tejing1](https://github.com/tejing1/nixos-config) +- [vlaci](https://github.com/vlaci/nixos-config) +- [wiltaylor](https://github.com/wiltaylor/dotfiles) +- [wimpysworld](https://github.com/wimpysworld/nix-config) --- diff --git a/files/hyprland/theme/waybar.css b/files/hyprland/theme/waybar.css @@ -45,18 +45,23 @@ tooltip { color: @base07; background-color: transparent; } +#workspaces button.empty .workspace-label { + padding-left: 4px; +} #workspaces button.hosting-monitor.visible { border: 2px solid @base04; } #workspaces button.special { opacity: 0.8; - padding-right: 3px; + padding-right: 8px; margin-left: 5px; } +#workspaces .taskbar-window { + padding-left: 4px; +} -#submap { - color: @base00; - background-color: @base08; +#custom-dropdown { + color: #ffffff; } #window { @@ -64,23 +69,11 @@ tooltip { background-color: transparent; } -#taskbar button { - padding: 3px 6px; - margin: 2px; -} -#taskbar button.active { - background: @base0C; -} -#taskbar button.minimized { - border: 2px solid @base0C; -} -#taskbar button.urgent { - border: 2px solid @base08; +#submap { + color: @base00; + background-color: @base08; } -#custom-dropdown { - color: #ffffff; -} #tray { color: #ffffff; margin: 0; diff --git a/flake.lock b/flake.lock @@ -273,16 +273,17 @@ } }, "flake-compat_5": { + "flake": false, "locked": { - "lastModified": 1746162366, - "narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=", - "owner": "nix-community", + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "owner": "edolstra", "repo": "flake-compat", - "rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", "type": "github" }, "original": { - "owner": "nix-community", + "owner": "edolstra", "repo": "flake-compat", "type": "github" } @@ -303,24 +304,6 @@ "type": "github" } }, - "flake-utils": { - "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "flatpak": { "locked": { "lastModified": 1739444422, @@ -909,25 +892,6 @@ "type": "github" } }, - "lib-aggregate": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1754828166, - "narHash": "sha256-i7c+fpXVsnvj2+63Gl3YfU1hVyxbLeqeFj55ZBZACWI=", - "owner": "nix-community", - "repo": "lib-aggregate", - "rev": "f01c8d121a3100230612be96e4ac668e15eafb77", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "lib-aggregate", - "type": "github" - } - }, "minecraft": { "inputs": { "flake-compat": "flake-compat_3", @@ -1048,21 +1012,6 @@ "type": "github" } }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1754788789, - "narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "a73b9c743612e4244d865a2fdee11865283c04e6", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, "nixpkgs-stable": { "locked": { "lastModified": 1730741070, @@ -1111,22 +1060,6 @@ "type": "github" } }, - "nixpkgs_3": { - "locked": { - "lastModified": 1757068644, - "narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "8eb28adfa3dc4de28e792e3bf49fcf9007ca8ac9", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nur": { "inputs": { "flake-parts": [ @@ -1258,7 +1191,7 @@ "unstable": "unstable", "utils": "utils_2", "vscode": "vscode", - "waypkgs": "waypkgs", + "waybar": "waybar", "windows": "windows" } }, @@ -1413,21 +1346,6 @@ "type": "github" } }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tinted-foot": { "flake": false, "locked": { @@ -1628,23 +1546,24 @@ "type": "github" } }, - "waypkgs": { + "waybar": { "inputs": { "flake-compat": "flake-compat_5", - "lib-aggregate": "lib-aggregate", - "nixpkgs": "nixpkgs_3" + "nixpkgs": [ + "unstable" + ] }, "locked": { - "lastModified": 1757211466, - "narHash": "sha256-On7T92Qhcu0Ie5fH0yiwNwndFvz4MOoHrCdEtd0Kwa8=", - "owner": "nix-community", - "repo": "nixpkgs-wayland", - "rev": "90dcf4636d3fc38d0bbe37f1a332b1d322a7b7bf", + "lastModified": 1759654584, + "narHash": "sha256-ttmz2FOvDXNgvOMBXwvYY91yfc1v6n+LOfXCj56QdLo=", + "owner": "Alexays", + "repo": "Waybar", + "rev": "559079e9a6afda77754afaf7c8d3f588c1d6206d", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "nixpkgs-wayland", + "owner": "Alexays", + "repo": "Waybar", "type": "github" } }, diff --git a/flake.nix b/flake.nix @@ -49,9 +49,6 @@ inputs.flake-parts.follows = "framework"; }; - # Wayland Packages - waypkgs.url = "github:nix-community/nixpkgs-wayland"; - # Proprietary Software proprietary = { url = "github:maydayv7/proprietary"; @@ -189,6 +186,12 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + # Waybar Panel + waybar = { + url = "github:Alexays/Waybar"; + inputs.nixpkgs.follows = "unstable"; + }; + ## Hyprland # Core hyprland = { @@ -285,7 +288,6 @@ "https://nixpkgs-unfree.cachix.org" "https://nix-community.cachix.org" "https://nix-gaming.cachix.org" - "https://nixpkgs-wayland.cachix.org" "https://hyprland.cachix.org" "https://hyprshell.cachix.org" "https://niri.cachix.org" @@ -299,7 +301,6 @@ "nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" - "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprshell.cachix.org-1:seKSn/sAyobGjsRqe6deRKP/VZcsTorGt5/QqCeQrvU=" "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" diff --git a/modules/gui/desktop/_shared/panel.nix b/modules/gui/desktop/_shared/panel.nix @@ -31,7 +31,7 @@ in programs.waybar = { enable = true; systemd.enable = true; - package = pkgs.unstable.waybar; + package = pkgs.waypkgs.waybar; }; }; diff --git a/modules/gui/desktop/hyprland/apps/panel.nix b/modules/gui/desktop/hyprland/apps/panel.nix @@ -34,33 +34,8 @@ in }; user = { - height = 20; - width = 20; - }; - - "hyprland/workspaces" = { - all-outputs = false; - show-special = true; - format = "<small>{name}</small>{icon}"; - on-scroll-up = "hyprctl dispatch workspace m+1"; - on-scroll-down = "hyprctl dispatch workspace m-1"; - ignore-workspaces = [ - "special:scratch_.*" - "special:minimized" - ]; - format-icons = { - default = ""; - special = " "; - "1" = " "; - "2" = " "; - "3" = " "; - "4" = " "; - "5" = " "; - "6" = " "; - "7" = " "; - "8" = " "; - "9" = " "; - }; + height = 22; + width = 22; }; "hyprland/submap" = { @@ -76,21 +51,28 @@ in separate-outputs = true; }; - "wlr/taskbar" = { - format = "{icon}"; - icon-size = 20; + "hyprland/workspaces" = { all-outputs = false; - active-first = false; - icon-theme = theme.icons.name; - markup = true; - tooltip-format = "Name: <big><b>{name}</b></big> <i>{short_state}</i>\nTitle: <b>{title}</b>"; - on-click = "activate"; - on-click-middle = "minimize"; - on-click-right = "close"; - ignore-list = [ - "kitty-clip" - "kitty-dropterm" + show-special = true; + format = "<small>{name}</small>{windows}"; + on-scroll-up = "hyprctl dispatch workspace m+1"; + on-scroll-down = "hyprctl dispatch workspace m-1"; + ignore-workspaces = [ + "special:scratch_.*" + "special:minimized" ]; + + workspace-taskbar = { + enable = true; + format = "{icon}"; + icon-size = 22; + icon-theme = theme.icons.name; + on-click-window = "hyprutils click {button} {address}"; + ignore-list = [ + "kitty-clip" + "kitty-dropterm" + ]; + }; }; "custom/minimized" = { @@ -146,13 +128,12 @@ in "custom/logo" "group/users" "hyprland/workspaces" - "hyprland/submap" - "hyprland/window" + "custom/minimized" ]; modules-center = [ - "wlr/taskbar" - "custom/minimized" + "hyprland/window" + "hyprland/submap" ]; }; in diff --git a/modules/gui/desktop/hyprland/default.nix b/modules/gui/desktop/hyprland/default.nix @@ -30,8 +30,8 @@ in enable = true; withUWSM = true; xwayland.enable = true; - package = pkgs.hyprworld.hyprland; - portalPackage = pkgs.hyprworld.xdg-desktop-portal-hyprland; + package = pkgs.waypkgs.hyprland; + portalPackage = pkgs.waypkgs.xdg-desktop-portal-hyprland; }; services = { diff --git a/modules/gui/desktop/hyprland/settings/plugins.nix b/modules/gui/desktop/hyprland/settings/plugins.nix @@ -7,7 +7,7 @@ { ## Plugin Settings wayland.windowManager.hyprland = { - plugins = with pkgs.hyprworld; [ + plugins = with pkgs.waypkgs; [ hyprsplit hypr-dynamic-cursors hyprexpo diff --git a/packages/flake.nix b/packages/flake.nix @@ -38,11 +38,12 @@ in unstable = import unstable { inherit system config; }; gaming = gaming.packages."${system}"; - waypkgs = waypkgs.packages."${system}"; code = vscode.extensions."${system}"; wine = windows.packages."${system}"; - hyprworld = - hyprland.packages."${system}" + waypkgs = + waybar.packages."${system}" + // niri.packages."${system}" + // hyprland.packages."${system}" // hyprplugins.packages."${system}" // hyprsplit.packages."${system}" // hyprcursors.packages."${system}"; diff --git a/scripts/hyprutils.nix b/scripts/hyprutils.nix @@ -14,6 +14,7 @@ let # Usage # help - Show this information temperature [up,down] - Display Temperature Controls + click [button] [address] - Opens [address] with [button] action toggle  fancy - Toggle Compositor Effects float - Toggle window floating in current workspace @@ -116,6 +117,32 @@ recursiveUpdate *) fail "Unexpected Option 'temperature $2'" ;; esac ;; + "click") + BUTTON="$2" + ADDRESS="$3" + if [ -z "$BUTTON" ] || [ -z "$ADDRESS" ] + then + fail "Expected GDK Button event and a window address" + fi + + case "$BUTTON" in + "1") + # Left Click + hyprctl keyword cursor:no_warps true + hyprctl dispatch focuswindow address:"$ADDRESS" + hyprctl dispatch bringactivetotop + hyprctl keyword cursor:no_warps false + ;; + "2") + # Middle Click + hyprctl dispatch movetoworkspacesilent "special:minimized, address:$ADDRESS" + ;; + "3") + # Right Click + hyprctl dispatch closewindow address:"$ADDRESS" + ;; + esac + ;; "toggle") case "$2" in "fancy") @@ -170,7 +197,7 @@ recursiveUpdate hyprshade on "$SHADER" && hyprctl seterror "" ;; "touchpad") - temp touchpad 1 + temp hyprutils_touchpad 1 STATUS="$TEMP/status" touchpad=$(hyprctl devices | grep touchpad | xargs) diff --git a/scripts/nixos.nix b/scripts/nixos.nix @@ -161,7 +161,7 @@ recursiveUpdate ;; "--delta") echo "Building Configuration..." - temp nixos-build 2 + temp nixos_build 2 HOSTNAME=$(cat /etc/hostname) if nom build ${path.system}#nixosConfigurations."$HOSTNAME".config.system.build.toplevel --out-link "$TEMP" then diff --git a/scripts/sysutils.nix b/scripts/sysutils.nix @@ -66,7 +66,7 @@ recursiveUpdate media_icon="audio-speakers" if $show_album_art then - temp media-icon 1 + temp sysutils_media-icon 1 url=$(playerctl -f "{{mpris:artUrl}}" metadata) if [[ "$url" == "file://"* ]] then diff --git a/site/content/now.md b/site/content/now.md @@ -9,7 +9,7 @@ This page is inspired by **[NowNowNow](https://nownownow.com)** Freshman at uni, never gonna get used to it -- Fresh off hosting IITGMUN at [Alcheringa](https://www.alcheringa.in/) +- Fresh off hosting IITGMUN at [Alcheringa](https://www.alcheringa.iitg.ac.in/) - Trying (failing) to study - Trying (failing) to code - Still watching {{ url(path="anime", text="Anime", trail_slash=false) }}