This commit is contained in:
Jeffrey Serio 2025-01-19 02:18:19 -06:00
parent c6f5fc44fa
commit f623e1dcd4
2 changed files with 12 additions and 7 deletions

View File

@ -1,8 +1,13 @@
#!/usr/bin/env bash
DNF_UPDATES=$(sudo dnf check-update | wc -l)
FLATPAK_UPDATES=$(flatpak remote-ls --updates | wc -l)
echo "[ DNF: $DNF_UPDATES ] [ Flatpak: $FLATPAK_UPDATES ]"
if [[ -f /etc/debian_version ]]; then
APT_UPDATES=$(sudo apt update >/dev/null && sudo apt list --upgradable | tr -d '\n' | wc -l)
echo "[ APT: $APT_UPDATES ] [ Flatpak: $FLATPAK_UPDATES ]"
elif [[ -f /etc/redhat-release ]]; then
DNF_UPDATES=$(sudo dnf check-update | wc -l)
echo "[ DNF: $DNF_UPDATES ] [ Flatpak: $FLATPAK_UPDATES ]"
fi
exit 0

View File

@ -25,14 +25,14 @@ chosen=$(printf '%s;%s;%s' "$screen" "$area" "$window" |
-selected-row 1)
case "$chosen" in
"$screen") extra_args='--delay=1' ;;
"$area") extra_args='--delay=0.1 --select --highlight --color=0.85,0.87,0.91,0.2' ;;
"$window") extra_args="--delay=1 --window=$(xdotool getactivewindow)" ;;
*) exit 1 ;;
"$screen") extra_args='--delay=1' ;;
"$area") extra_args='--delay=0.1 --select --highlight --color=0.85,0.87,0.91,0.2' ;;
"$window") extra_args="--delay=1 --window=$(xdotool getactivewindow)" ;;
*) exit 1 ;;
esac
# The variable is used as a command's options, so it shouldn't be quoted.
# shellcheck disable=2086
maim --hidecursor --quiet --quality=3 --format='png' $extra_args "$screenshot_path" && {
maim --hidecursor --quiet --quality=10 --format='png' $extra_args "$screenshot_path" && {
notify-send --icon=org.xfce.screenshooter "Screenshot saved as $screenshot_path"
}