From 7b4d461ba14ef9e9ad7d1a1dce6e34bc5e64393a Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Sat, 5 Oct 2024 21:54:33 +0200 Subject: [PATCH] wayland: use hyprshot-gui instead of grimblast --- modules/home/hyprland/default.nix | 5 ++-- packages/hyprshot-gui/default.nix | 42 +++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 packages/hyprshot-gui/default.nix diff --git a/modules/home/hyprland/default.nix b/modules/home/hyprland/default.nix index 74dd262..f390250 100644 --- a/modules/home/hyprland/default.nix +++ b/modules/home/hyprland/default.nix @@ -46,7 +46,8 @@ in # hyprpicker # TODO # hyprcursor # TODO brightnessctl - grimblast + # grimblast + frajul.hyprshot-gui ]; # services.hypridle = { @@ -216,7 +217,7 @@ in "$mod, Escape, exec, wlogout -p layer-shell" "$mod, TAB, exec, hyprlock" "$mod SHIFT, R, exec, hyprctl reload" - ", Print, exec, grimblast --notify copysave area" + ", Print, exec, hyprshot-gui" # "$mod SHIFT, E, exec, pkill Hyprland" # "$mod, G, togglegroup," diff --git a/packages/hyprshot-gui/default.nix b/packages/hyprshot-gui/default.nix new file mode 100644 index 0000000..279e9fa --- /dev/null +++ b/packages/hyprshot-gui/default.nix @@ -0,0 +1,42 @@ +{ + lib, + stdenv, + fetchFromGitHub, + pkgs, + ... +}: + +stdenv.mkDerivation rec { + pname = "hyprshot-gui"; + version = "2023-10-20"; + + src = fetchFromGitHub { + owner = "ThatOneCalculator"; + repo = pname; + rev = "30a9bc377c1c0a3ad05c63945f2fe92709a99d7b"; + sha256 = "sha256-XUy6+mFbNL+3zDfS4tWva4DiJeLnRM9S8ECRayTcPfI="; + }; + + nativeBuildInputs = with pkgs; [ makeWrapper ]; + + buildInputs = with pkgs; [ + bash + hyprshot + gnome.zenity + ]; + + dontBuild = true; + installPhase = '' + mkdir -p $out/bin + cp hyprshot-gui $out/bin/hyprshot-gui + wrapProgram $out/bin/hyprshot-gui --prefix PATH : '${lib.makeBinPath buildInputs}' + ''; + + meta = with lib; { + description = "A simple shell script"; + homepage = "https://github.com/ThatOneCalculator/hyprshot-gui"; + platforms = platforms.all; + mainProgram = "hyprshot-gui"; + # maintainers + }; +}