diff --git a/.config/i3/lock.sh b/.config/i3/lock.sh index 53217ca..43c383c 100755 --- a/.config/i3/lock.sh +++ b/.config/i3/lock.sh @@ -5,9 +5,6 @@ tmpbg='/tmp/screen.png' (( $# )) && { icon=$1; } -# screenshot -scrot "$tmpbg" - PX=0 PY=0 # lockscreen image info @@ -25,17 +22,19 @@ SROY=$(echo $RES | cut -d'x' -f 2 | cut -d'+' -f 3) # y offset PX=$(($SROX + $SRX/2 - $RX/2)) PY=$(($SROY + $SRY/2 - $RY/2)) +# screenshot, pixelise and overlay +maim | convert - -scale 5% -scale 2000% $icon -geometry +$PX+$PY -composite -matte $tmpbg -# pixelize and add lock icon -convert $tmpbg -scale 5% -scale 2000% $tmpbg -convert $tmpbg $icon -geometry +$PX+$PY -composite -matte $tmpbg - -playing=$(mpc status | grep playing | wc -l) -[[ $playing == 1 ]] && mpc pause +if command mpc 2>&1 1>/dev/null; then + playing=$(mpc status | grep playing | wc -l) + [[ $playing == 1 ]] && mpc pause +fi i3lock -i "$tmpbg" -n -e -[[ $playing == 1 ]] && mpc play +if command mpc 2>&1 1>/dev/null; then + [[ $playing == 1 ]] && mpc play +fi rm "$tmpbg" diff --git a/.config/imgur-screenshot/settings.conf b/.config/imgur-screenshot/settings.conf index 1eeddc4..301164f 100644 --- a/.config/imgur-screenshot/settings.conf +++ b/.config/imgur-screenshot/settings.conf @@ -4,10 +4,10 @@ imgur_secret="" login="false" log_file="$HOME/.config/imgur-screenshot/imgur-screenshot.log" credentials_file="$HOME/.config/imgur-screenshot/credentials.conf" -file_name_format="scrot-%Y-%m-%d--%H:%M:%S.png" # when using scrot, must end with .png! +file_name_format="screenshot-%Y-%m-%d-%H%M%S.png" # when using scrot, must end with .png! file_dir="$HOME/pictures/screenshots" -screenshot_select_command="scrot -q 0 -s %img" -screenshot_window_command="scrot -q 0 -b %img" +screenshot_select_command="maim -m 10 -us %img" +screenshot_window_command="maim -m 10 -uw %img" edit_command="gimp %img" edit="false" exit_on_selection_fail="true"