updated screenshot tools to add editor
This commit is contained in:
+5
-1
@@ -23,6 +23,9 @@ REQUIRED_PKGS=(
|
|||||||
jq
|
jq
|
||||||
inetutils
|
inetutils
|
||||||
tmux
|
tmux
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
wl-clipboard
|
||||||
)
|
)
|
||||||
|
|
||||||
OPTIONAL_PKGS=(
|
OPTIONAL_PKGS=(
|
||||||
@@ -38,7 +41,8 @@ OPTIONAL_PKGS=(
|
|||||||
imagemagick "Image tools" OFF
|
imagemagick "Image tools" OFF
|
||||||
playerctl "Media control" OFF
|
playerctl "Media control" OFF
|
||||||
wlopm "Monitor power" OFF
|
wlopm "Monitor power" OFF
|
||||||
hyprshot "Screenshot tool" OFF
|
swappy "Screenshot editor" OFF
|
||||||
|
oxipng "PNG compressor" OFF
|
||||||
matugen "Theme generator" OFF
|
matugen "Theme generator" OFF
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -19,3 +19,14 @@ wl-copy -t image/png < "$dir/$file"
|
|||||||
if command -v notify-send >/dev/null 2>&1; then
|
if command -v notify-send >/dev/null 2>&1; then
|
||||||
notify-send -a Screenshot -i camera-photo "Screenshot saved" "$file"
|
notify-send -a Screenshot -i camera-photo "Screenshot saved" "$file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Open the editor if swappy is available (blocks until it is closed)
|
||||||
|
if command -v swappy >/dev/null 2>&1; then
|
||||||
|
swappy -f "$dir/$file"
|
||||||
|
wl-copy -t image/png < "$dir/$file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Compress the resulting image in the background if oxipng is available
|
||||||
|
if command -v oxipng >/dev/null 2>&1; then
|
||||||
|
oxipng --strip safe -o 4 "$dir/$file" &
|
||||||
|
fi
|
||||||
|
|||||||
@@ -20,3 +20,14 @@ wl-copy -t image/png < "$dir/$file"
|
|||||||
if command -v notify-send >/dev/null 2>&1; then
|
if command -v notify-send >/dev/null 2>&1; then
|
||||||
notify-send -a Screenshot -i camera-photo "Screenshot saved" "$file"
|
notify-send -a Screenshot -i camera-photo "Screenshot saved" "$file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Open the editor if swappy is available (blocks until it is closed)
|
||||||
|
if command -v swappy >/dev/null 2>&1; then
|
||||||
|
swappy -f "$dir/$file"
|
||||||
|
wl-copy -t image/png < "$dir/$file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Compress the resulting image in the background if oxipng is available
|
||||||
|
if command -v oxipng >/dev/null 2>&1; then
|
||||||
|
oxipng --strip safe -o 4 "$dir/$file" &
|
||||||
|
fi
|
||||||
|
|||||||
@@ -39,3 +39,14 @@ wl-copy -t image/png < "$dir/$file"
|
|||||||
if command -v notify-send >/dev/null 2>&1; then
|
if command -v notify-send >/dev/null 2>&1; then
|
||||||
notify-send -a Screenshot -i camera-photo "Screenshot saved" "$file"
|
notify-send -a Screenshot -i camera-photo "Screenshot saved" "$file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Open the editor if swappy is available (blocks until it is closed)
|
||||||
|
if command -v swappy >/dev/null 2>&1; then
|
||||||
|
swappy -f "$dir/$file"
|
||||||
|
wl-copy -t image/png < "$dir/$file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Compress the resulting image in the background if oxipng is available
|
||||||
|
if command -v oxipng >/dev/null 2>&1; then
|
||||||
|
oxipng --strip safe -o 4 "$dir/$file" &
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user