Browse Source

Use correct sound file for screen capture

Use screen-capture instead of camera-shutter for screenshots
pull/142/head
KKV9 2 years ago
parent
commit
ed716d91bc
  1. 6
      config/hypr/UserScripts/Sounds.sh
  2. 6
      config/hypr/scripts/ScreenShot.sh

6
config/hypr/UserScripts/Sounds.sh

@ -15,18 +15,18 @@ if [[ "$muted" = true ]]; then
fi fi
# Choose the sound to play. # Choose the sound to play.
if [[ "$1" == "--shutter" ]]; then if [[ "$1" == "--screenshot" ]]; then
if [[ "$mutedScreenshots" = true ]]; then if [[ "$mutedScreenshots" = true ]]; then
exit 0 exit 0
fi fi
soundoption="camera-shutter.*" soundoption="screen-capture.*"
elif [[ "$1" == "--volume" ]]; then elif [[ "$1" == "--volume" ]]; then
if [[ "$muteVolume" = true ]]; then if [[ "$muteVolume" = true ]]; then
exit 0 exit 0
fi fi
soundoption="audio-volume-change.*" soundoption="audio-volume-change.*"
else else
echo -e "Available sounds: --shutter, --volume" echo -e "Available sounds: --screenshot, --volume"
exit 0 exit 0
fi fi

6
config/hypr/scripts/ScreenShot.sh

@ -19,7 +19,7 @@ notify_view() {
if [[ "$1" == "active" ]]; then if [[ "$1" == "active" ]]; then
if [[ -e "${active_window_path}" ]]; then if [[ -e "${active_window_path}" ]]; then
${notify_cmd_shot} "Screenshot of '${active_window_class}' Saved." ${notify_cmd_shot} "Screenshot of '${active_window_class}' Saved."
"${sDIR}/Sounds.sh" --shutter "${sDIR}/Sounds.sh" --screenshot
else else
${notify_cmd_shot} "Screenshot of '${active_window_class}' not Saved" ${notify_cmd_shot} "Screenshot of '${active_window_class}' not Saved"
fi fi
@ -29,7 +29,7 @@ notify_view() {
local check_file="$dir/$file" local check_file="$dir/$file"
if [[ -e "$check_file" ]]; then if [[ -e "$check_file" ]]; then
${notify_cmd_shot} "Screenshot Saved." ${notify_cmd_shot} "Screenshot Saved."
"${sDIR}/Sounds.sh" --shutter "${sDIR}/Sounds.sh" --screenshot
else else
${notify_cmd_shot} "Screenshot NOT Saved." ${notify_cmd_shot} "Screenshot NOT Saved."
fi fi
@ -91,7 +91,7 @@ shotactive() {
shotswappy() { shotswappy() {
tmpfile=$(mktemp) tmpfile=$(mktemp)
grim -g "$(slurp)" - >"$tmpfile" && "${sDIR}/Sounds.sh" --shutter && notify_view "swappy" grim -g "$(slurp)" - >"$tmpfile" && "${sDIR}/Sounds.sh" --screenshot && notify_view "swappy"
swappy -f - <"$tmpfile" swappy -f - <"$tmpfile"
rm "$tmpfile" rm "$tmpfile"
} }

Loading…
Cancel
Save