From 089dd8a448c12e1066486892de096590cddb4195 Mon Sep 17 00:00:00 2001 From: Stephen Degler Date: Tue, 10 Feb 2026 14:17:44 -0500 Subject: [PATCH 1/8] core: Include to make pickier compilers happy. (#148) --- src/hyprpicker.cpp | 1 + src/hyprpicker.hpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/hyprpicker.cpp b/src/hyprpicker.cpp index 90f0228..d46959d 100644 --- a/src/hyprpicker.cpp +++ b/src/hyprpicker.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/src/hyprpicker.hpp b/src/hyprpicker.hpp index 77ab060..cad8f02 100644 --- a/src/hyprpicker.hpp +++ b/src/hyprpicker.hpp @@ -1,5 +1,6 @@ #pragma once +#include #include "defines.hpp" #include "helpers/LayerSurface.hpp" #include "helpers/PoolBuffer.hpp" From dd4d7b808aab292d46b41418d440db80fdbb5aad Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Wed, 25 Feb 2026 19:21:03 +0200 Subject: [PATCH 2/8] nix: drop xorg package set --- nix/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/default.nix b/nix/default.nix index 59cf94c..61afcac 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -13,6 +13,7 @@ libselinux, libsepol, libthai, + libXdmcp, libxkbcommon, pango, pcre, @@ -21,7 +22,6 @@ wayland, wayland-protocols, wayland-scanner, - xorg, debug ? false, version ? "git", }: @@ -52,6 +52,7 @@ stdenv.mkDerivation { libselinux libsepol libthai + libXdmcp libxkbcommon pango pcre @@ -60,7 +61,6 @@ stdenv.mkDerivation { wayland wayland-protocols wayland-scanner - xorg.libXdmcp ]; outputs = [ From 467c3d88b40b1fc0c64652adc323fc87f02640f9 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Mon, 2 Mar 2026 18:36:39 +0200 Subject: [PATCH 3/8] treewide: alejandra -> nixfmt --- flake.nix | 92 ++++++++++++++++++++++++++++--------------------- nix/default.nix | 5 +-- 2 files changed, 53 insertions(+), 44 deletions(-) diff --git a/flake.nix b/flake.nix index c75867e..463f1ce 100644 --- a/flake.nix +++ b/flake.nix @@ -18,46 +18,58 @@ }; }; - outputs = { - self, - nixpkgs, - systems, - ... - } @ inputs: let - inherit (nixpkgs) lib; - eachSystem = lib.genAttrs (import systems); - pkgsFor = eachSystem (system: - import nixpkgs { - localSystem.system = system; - overlays = with self.overlays; [hyprpicker]; + outputs = + { + self, + nixpkgs, + systems, + ... + }@inputs: + let + inherit (nixpkgs) lib; + eachSystem = lib.genAttrs (import systems); + pkgsFor = eachSystem ( + system: + import nixpkgs { + localSystem.system = system; + overlays = with self.overlays; [ hyprpicker ]; + } + ); + mkDate = + longDate: + (lib.concatStringsSep "-" [ + (builtins.substring 0 4 longDate) + (builtins.substring 4 2 longDate) + (builtins.substring 6 2 longDate) + ]); + version = lib.removeSuffix "\n" (builtins.readFile ./VERSION); + in + { + overlays = { + default = self.overlays.hyprpicker; + hyprpicker = lib.composeManyExtensions [ + inputs.hyprutils.overlays.default + inputs.hyprwayland-scanner.overlays.default + (final: prev: { + hyprpicker = prev.callPackage ./nix/default.nix { + stdenv = prev.gcc15Stdenv; + version = + version + + "+date=" + + (mkDate (self.lastModifiedDate or "19700101")) + + "_" + + (self.shortRev or "dirty"); + }; + hyprpicker-debug = final.hyprpicker.override { debug = true; }; + }) + ]; + }; + + packages = eachSystem (system: { + default = self.packages.${system}.hyprpicker; + inherit (pkgsFor.${system}) hyprpicker hyprpicker-debug; }); - mkDate = longDate: (lib.concatStringsSep "-" [ - (builtins.substring 0 4 longDate) - (builtins.substring 4 2 longDate) - (builtins.substring 6 2 longDate) - ]); - version = lib.removeSuffix "\n" (builtins.readFile ./VERSION); - in { - overlays = { - default = self.overlays.hyprpicker; - hyprpicker = lib.composeManyExtensions [ - inputs.hyprutils.overlays.default - inputs.hyprwayland-scanner.overlays.default - (final: prev: { - hyprpicker = prev.callPackage ./nix/default.nix { - stdenv = prev.gcc15Stdenv; - version = version + "+date=" + (mkDate (self.lastModifiedDate or "19700101")) + "_" + (self.shortRev or "dirty"); - }; - hyprpicker-debug = final.hyprpicker.override {debug = true;}; - }) - ]; + + formatter = eachSystem (system: pkgsFor.${system}.nixfmt-tree); }; - - packages = eachSystem (system: { - default = self.packages.${system}.hyprpicker; - inherit (pkgsFor.${system}) hyprpicker hyprpicker-debug; - }); - - formatter = eachSystem (system: pkgsFor.${system}.alejandra); - }; } diff --git a/nix/default.nix b/nix/default.nix index 61afcac..7c30814 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -31,10 +31,7 @@ stdenv.mkDerivation { src = ../.; - cmakeBuildType = - if debug - then "Debug" - else "Release"; + cmakeBuildType = if debug then "Debug" else "Release"; nativeBuildInputs = [ cmake From 19fcc8689fd8bd914bb0ab0b1c727d308debbc37 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Mon, 2 Mar 2026 18:38:33 +0200 Subject: [PATCH 4/8] nix: separate overlay with deps --- flake.nix | 30 ++---------------------------- nix/overlays.nix | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 28 deletions(-) create mode 100644 nix/overlays.nix diff --git a/flake.nix b/flake.nix index 463f1ce..490297e 100644 --- a/flake.nix +++ b/flake.nix @@ -32,38 +32,12 @@ system: import nixpkgs { localSystem.system = system; - overlays = with self.overlays; [ hyprpicker ]; + overlays = with self.overlays; [ hyprpicker-with-deps ]; } ); - mkDate = - longDate: - (lib.concatStringsSep "-" [ - (builtins.substring 0 4 longDate) - (builtins.substring 4 2 longDate) - (builtins.substring 6 2 longDate) - ]); - version = lib.removeSuffix "\n" (builtins.readFile ./VERSION); in { - overlays = { - default = self.overlays.hyprpicker; - hyprpicker = lib.composeManyExtensions [ - inputs.hyprutils.overlays.default - inputs.hyprwayland-scanner.overlays.default - (final: prev: { - hyprpicker = prev.callPackage ./nix/default.nix { - stdenv = prev.gcc15Stdenv; - version = - version - + "+date=" - + (mkDate (self.lastModifiedDate or "19700101")) - + "_" - + (self.shortRev or "dirty"); - }; - hyprpicker-debug = final.hyprpicker.override { debug = true; }; - }) - ]; - }; + overlays = import ./nix/overlays.nix { inherit inputs lib self; }; packages = eachSystem (system: { default = self.packages.${system}.hyprpicker; diff --git a/nix/overlays.nix b/nix/overlays.nix new file mode 100644 index 0000000..ecced7c --- /dev/null +++ b/nix/overlays.nix @@ -0,0 +1,37 @@ +{ + lib, + inputs, + self, + ... +}: +let + mkDate = + longDate: + (lib.concatStringsSep "-" [ + (builtins.substring 0 4 longDate) + (builtins.substring 4 2 longDate) + (builtins.substring 6 2 longDate) + ]); + version = lib.removeSuffix "\n" (builtins.readFile ../VERSION); +in +{ + default = self.overlays.hyprpicker; + hyprpicker-with-deps = lib.composeManyExtensions [ + inputs.hyprutils.overlays.default + inputs.hyprwayland-scanner.overlays.default + self.overlays.hyprpicker + ]; + + hyprpicker = final: prev: { + hyprpicker = prev.callPackage ./default.nix { + stdenv = prev.gcc15Stdenv; + version = + version + + "+date=" + + (mkDate (self.lastModifiedDate or "19700101")) + + "_" + + (self.shortRev or "dirty"); + }; + hyprpicker-debug = final.hyprpicker.override { debug = true; }; + }; +} From 7ba3edd96702ab6897cdaa82547894589a553e4f Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Mon, 2 Mar 2026 18:38:49 +0200 Subject: [PATCH 5/8] flake.lock: update --- flake.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 4487f9d..850a16b 100644 --- a/flake.lock +++ b/flake.lock @@ -10,11 +10,11 @@ ] }, "locked": { - "lastModified": 1749135356, - "narHash": "sha256-Q8mAKMDsFbCEuq7zoSlcTuxgbIBVhfIYpX0RjE32PS0=", + "lastModified": 1772459870, + "narHash": "sha256-xxkK2Cvqxpf/4UGcJ/TyCwrvmiNWsKsJfFzHMp2bxis=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "e36db00dfb3a3d3fdcc4069cb292ff60d2699ccb", + "rev": "e63f3a79334dec49f8eb1691f66f18115df04085", "type": "github" }, "original": { @@ -33,11 +33,11 @@ ] }, "locked": { - "lastModified": 1749145760, - "narHash": "sha256-IHaGWpGrv7seFWdw/1A+wHtTsPlOGIKMrk1TUIYJEFI=", + "lastModified": 1772459835, + "narHash": "sha256-978jRz/y/9TKmZb/qD4lEYHCQGHpEXGqy+8X2lFZsak=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "817918315ea016cc2d94004bfb3223b5fd9dfcc6", + "rev": "0a692d4a645165eebd65f109146b8861e3a925e7", "type": "github" }, "original": { @@ -48,11 +48,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1748929857, - "narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=", + "lastModified": 1772433332, + "narHash": "sha256-izhTDFKsg6KeVBxJS9EblGeQ8y+O8eCa6RcW874vxEc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4", + "rev": "cf59864ef8aa2e178cccedbe2c178185b0365705", "type": "github" }, "original": { From 2558659107b9f1231105ed630ece2c18f699a800 Mon Sep 17 00:00:00 2001 From: Mia <74467627+Jojerames@users.noreply.github.com> Date: Sun, 15 Mar 2026 13:19:41 -0700 Subject: [PATCH 6/8] Input: Made Scroll Zooming More Natural (#149) Linear zooming in the color picker felt a little bit off, so I made the zooming work by taking one subtrated from e to the power of the current zoom level divided by 100 as a velocity and clamping the "delta" value. This makes the zoom feel a lot more natural, and easier to access the lower range of zoom levels. --- src/hyprpicker.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/hyprpicker.cpp b/src/hyprpicker.cpp index d46959d..4059c85 100644 --- a/src/hyprpicker.cpp +++ b/src/hyprpicker.cpp @@ -1,6 +1,7 @@ #include "hyprpicker.hpp" #include "src/debug/Log.hpp" #include "src/notify/Notify.hpp" +#include #include #include #include @@ -787,10 +788,19 @@ void CHyprpicker::initMouse() { double delta = wl_fixed_to_double(value); - if (delta < 0) - m_fZoomScale = std::min(m_fZoomScale + 1.0, 100.0); + double velocity = std::pow(M_E, m_fZoomScale * 0.01) - 1.; + + delta *= velocity; + + if (delta > 0) + delta = std::min(delta, 1.); else - m_fZoomScale = std::max(m_fZoomScale - 1.0, 1.0); + delta = std::max(delta, -1.); + + if (delta > 0) + m_fZoomScale = std::max(m_fZoomScale - delta, 1.); + else + m_fZoomScale = std::min(m_fZoomScale - delta, 100.); markDirty(); }); From 75f730c94e67bfd79e97e64d38b0fffd67cb666b Mon Sep 17 00:00:00 2001 From: supermikea Date: Sun, 22 Mar 2026 17:57:01 +0100 Subject: [PATCH 7/8] internal: include for musl builds (#150) --- src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.cpp b/src/main.cpp index 4a7f472..004e307 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include From 90dc13b428f9965f48b00017573c314cd923fccb Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Fri, 17 Apr 2026 15:20:47 +0300 Subject: [PATCH 8/8] CI: use org-wide actions --- .github/workflows/nix-build.yaml | 53 +++++--------------------------- 1 file changed, 7 insertions(+), 46 deletions(-) diff --git a/.github/workflows/nix-build.yaml b/.github/workflows/nix-build.yaml index 319a8cb..714d8b4 100644 --- a/.github/workflows/nix-build.yaml +++ b/.github/workflows/nix-build.yaml @@ -1,50 +1,11 @@ -name: Build Hyprpicker (Nix) +name: Build on: [push, pull_request, workflow_dispatch] + jobs: nix: - name: "Build" - runs-on: ubuntu-latest - steps: - - name: Clone repository - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Install Nix - uses: nixbuild/nix-quick-install-action@v31 - with: - nix_conf: | - keep-env-derivations = true - keep-outputs = true - - - name: Restore and save Nix store - uses: nix-community/cache-nix-action@v6 - with: - # restore and save a cache using this key - primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} - # if there's no cache hit, restore a cache by this prefix - restore-prefixes-first-match: nix-${{ runner.os }}- - # collect garbage until the Nix store size (in bytes) is at most this number - # before trying to save a new cache - # 1G = 1073741824 - gc-max-store-size-linux: 1G - # do purge caches - purge: true - # purge all versions of the cache - purge-prefixes: nix-${{ runner.os }}- - # created more than this number of seconds ago - purge-created: 0 - # or, last accessed more than this number of seconds ago - # relative to the start of the `Post Restore and save Nix store` phase - purge-last-accessed: 0 - # except any version with the key that is the same as the `primary-key` - purge-primary-key: never - - - uses: cachix/cachix-action@v16 - with: - name: hyprland - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - - name: Build Hyprpicker with default settings - run: nix build --print-build-logs --accept-flake-config + if: (github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork) + uses: hyprwm/actions/.github/workflows/nix.yml@main + secrets: inherit + with: + command: nix build --print-build-logs --accept-flake-config