hyprpanel
This commit is contained in:
1 parent
10080a83ee
commit
5151ac24da
322 files changed
+38276
No files matched your search
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
outputDir="$HOME/Pictures/Screenshots/"
|
||||
outputFile="snapshot_$(date +%Y-%m-%d_%H-%M-%S).png"
|
||||
outputPath="$outputDir/$outputFile"
|
||||
mkdir -p "$outputDir"
|
||||
|
||||
mode=${1:-area}
|
||||
|
||||
case "$mode" in
|
||||
active)
|
||||
command="grimblast copysave active $outputPath"
|
||||
;;
|
||||
output)
|
||||
command="grimblast copysave output $outputPath"
|
||||
;;
|
||||
area)
|
||||
command="grimblast copysave area $outputPath"
|
||||
;;
|
||||
*)
|
||||
echo "Invalid option: $mode"
|
||||
echo "Usage: $0 {active|output|area}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if eval "$command"; then
|
||||
recentFile=$(find "$outputDir" -name 'snapshot_*.png' -printf '%T+ %p\n' | sort -r | head -n 1 | cut -d' ' -f2-)
|
||||
notify-send "Grimblast" "Your snapshot has been saved." \
|
||||
-i video-x-generic \
|
||||
-a "Grimblast" \
|
||||
-t 7000 \
|
||||
-u normal \
|
||||
--action="scriptAction:-xdg-open $outputDir=Directory" \
|
||||
--action="scriptAction:-xdg-open $recentFile=View"
|
||||
fi
|
||||
Reference in new issue
Block a user