From 54c7e25e17c1adf0817e65336d0bc2a399d6187f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 12 Aug 2024 09:13:48 +0200 Subject: ... --- accounts/gkleen@sif/hyprland.nix | 13 +++++++++++++ accounts/gkleen@sif/systemd.nix | 4 ++++ 2 files changed, 17 insertions(+) (limited to 'accounts/gkleen@sif') diff --git a/accounts/gkleen@sif/hyprland.nix b/accounts/gkleen@sif/hyprland.nix index 4e4eb091..06d146a0 100644 --- a/accounts/gkleen@sif/hyprland.nix +++ b/accounts/gkleen@sif/hyprland.nix @@ -203,6 +203,19 @@ grim -g "$(slurp -b 00000080 -c FFFFFFFF -s 00000000 -w 1)" "$outFile" wl-copy --type image/png <"$outFile" ''}" + "SHIFT, Print, exec, ${pkgs.writeShellScript "screenshot" '' + export PATH="${lib.makeBinPath (with pkgs; [ grim jq wl-clipboard-rs coreutils ])}:$PATH" + + outFile="$HOME/screenshots/$(date +"%Y-%m-%dT%H:%M:%S").png" + grim -o "$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .name')" "$outFile" + wl-copy --type image/png <"$outFile" + ''}" + "CTRL SHIFT, Print, exec, ${pkgs.runCommand "picker" { + buildInputs = [ pkgs.makeWrapper ]; + } '' + makeWrapper ${lib.getExe pkgs.hyprpicker} $out \ + --prefix PATH : ${lib.makeBinPath [pkgs.wl-clipboard-rs]} + ''} -a" "$mainMod CTRL, return, togglespecialworkspace, term" "$mainMod CTRL, e, togglespecialworkspace, edit" diff --git a/accounts/gkleen@sif/systemd.nix b/accounts/gkleen@sif/systemd.nix index 1397ca62..94dacc58 100644 --- a/accounts/gkleen@sif/systemd.nix +++ b/accounts/gkleen@sif/systemd.nix @@ -42,6 +42,10 @@ let wait "''${pid}" "''${newpid}" ''; in { + tmpfiles.rules = [ + e /home/gkleen/screenshots - - - 365d - + ]; + services = { sync-keepass = { Service = { -- cgit v1.2.3