about summary refs log tree commit diff stats
path: root/pkgs/by-name/sc/screenshot_persistent/screenshot_persistent.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xpkgs/by-name/sc/screenshot_persistent/screenshot_persistent.sh18
1 files changed, 12 insertions, 6 deletions
diff --git a/pkgs/by-name/sc/screenshot_persistent/screenshot_persistent.sh b/pkgs/by-name/sc/screenshot_persistent/screenshot_persistent.sh
index 4308b8d2..0eeb75c0 100755
--- a/pkgs/by-name/sc/screenshot_persistent/screenshot_persistent.sh
+++ b/pkgs/by-name/sc/screenshot_persistent/screenshot_persistent.sh
@@ -1,10 +1,16 @@
-#! /usr/bin/env dash
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 
-# shellcheck source=/dev/null
-SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH
+# shellcheck shell=bash
 
-# only generate a path (this could lead to a time-of-check/time-of-use bug)
-tmp="$(mktmp --dry-run)"
+tmp="$(mktemp)"
 
 if grim -g "$(slurp)" "$tmp"; then
     name="$(rofi -dmenu -p "Name of screenshot: " -l 0)"
@@ -16,7 +22,7 @@ if grim -g "$(slurp)" "$tmp"; then
     done
 
     mv "$tmp" "$screen_shot_path"
-    alacritty -e lf -command ":{{ set sortby atime; set reverse!; }}"
+    alacritty --title "floating please" --command lf -command ":{{ set sortby atime; set reverse!; set info time; }}" "$screen_shot_path"
 fi
 
 # vim: ft=sh