Modularized notification toast and menu components.

This commit is contained in:
Jas Singh
2024-07-13 14:43:13 -07:00
parent db118a0746
commit 04ed432b32
28 changed files with 591 additions and 530 deletions

View File

@@ -1,18 +1,17 @@
#!/bin/bash
outputDir="$HOME/Pictures/Screenshots/"
outputFile="snapshot_$(date +%Y-%m-%d_%H-%M-%S).png"
outputPath="$outputDir/$outputFile"
mkdir -p "$outputDir"
grimblast copysave area "$outputPath"
recentFile=$(ls -t "$outputDir"/snapshot_*.png | head -n 1)
notify-send "Grimblast" "Your snapshot has been saved." \
-i video-x-generic \
-a "Grimblast" \
-t 7000 \
-u normal \
--action="scriptAction:-dolphin $outputDir=Directory" \
--action="scriptAction:-xdg-open $recentFile=View"
if grimblast copysave area "$outputPath"; then
recentFile=$(ls -t "$outputDir"/snapshot_*.png | head -n 1)
notify-send "Grimblast" "Your snapshot has been saved." \
-i video-x-generic \
-a "Grimblast" \
-t 7000 \
-u normal \
--action="scriptAction:-dolphin $outputDir=Directory" \
--action="scriptAction:-xdg-open $recentFile=View"
fi