From e8113946038f59be9b6762ac428c9f648cdd38c5 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sat, 21 Jan 2023 02:26:29 +0200 Subject: [PATCH] Nix: update waybar-hyprland, add hyprland-nvidia (#1409) Also add them to CI --- .github/workflows/nix-build.yaml | 1 + .github/workflows/nix-update.yaml | 6 ++++++ flake.nix | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/nix-build.yaml b/.github/workflows/nix-build.yaml index d0b58c6f..825feda5 100644 --- a/.github/workflows/nix-build.yaml +++ b/.github/workflows/nix-build.yaml @@ -10,6 +10,7 @@ jobs: package: - default - hyprland-no-hidpi + - hyprland-nvidia - xdg-desktop-portal-hyprland steps: - name: Clone repository diff --git a/.github/workflows/nix-update.yaml b/.github/workflows/nix-update.yaml index 60d15d70..5555382b 100644 --- a/.github/workflows/nix-update.yaml +++ b/.github/workflows/nix-update.yaml @@ -17,6 +17,12 @@ jobs: experimental-features = nix-command flakes - name: Update lockfile run: nix/update-inputs.sh + - uses: cachix/cachix-action@v12 + with: + name: hyprland + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Build Waybar-Hyprland + run: nix build .#waybar-hyprland --print-build-logs - uses: stefanzweifel/git-auto-commit-action@v4 with: commit_message: "[gha] bump flake inputs" diff --git a/flake.nix b/flake.nix index dbd7f8f9..3f2b6940 100644 --- a/flake.nix +++ b/flake.nix @@ -55,8 +55,13 @@ }; hyprland-debug = hyprland.override {debug = true;}; hyprland-no-hidpi = hyprland.override {hidpiXWayland = false;}; + hyprland-nvidia = hyprland.override {nvidiaPatches = true;}; waybar-hyprland = prev.waybar.overrideAttrs (oldAttrs: { + postPatch = '' + # use hyprctl to switch workspaces + sed -i 's/zext_workspace_handle_v1_activate(workspace_handle_);/const std::string command = "hyprctl dispatch workspace " + name_;\n\tsystem(command.c_str());/g' src/modules/wlr/workspace_manager.cpp + ''; mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"]; });