Author: Adam Evyčędo <git@apiote.xyz>
fixes
.config/sh/functions | 11 +++++------ .local/bin/bar_battery | 8 +++++++-
diff --git a/.config/sh/functions b/.config/sh/functions index 6bcdc40ea40ef4833bbbc88b3ee2b2c85b560505..124085d692e6bb15f513cf1e49789d33537576ce 100644 --- a/.config/sh/functions +++ b/.config/sh/functions @@ -266,7 +266,7 @@ toAV1() { Q=$(ffmpegQ "$1") set -x - ffmpeg -i "$1" -c:v libsvtav1 -crf "$Q" "${1%%.*}.av1.webm" + ffmpeg -i "$1" -c:v libsvtav1 -crf "$Q" -r 25 "${1%%.*}.av1.webm" # testme ffmpeg -i input.mp4 -c:a copy -c:v libsvtav1 -preset 10 -r 25 -threads 16 -crf 17 svtav1_test.mp4 #ffmpeg -i "$1" -crf "$Q" -threads 16 -b:v 0 -c:v libaom-av1 -r 25 -strict experimental -tile-columns 2 -pix_fmt yuv420p "${1%%.*}.av1.webm" } @@ -728,8 +728,7 @@ echo "$commands" fi done | uniq | fzf -m -d '�' --with-nth 1) - # shellcheck disable=SC2091 - $(echo "$result" | sed 's/.*�//') >/dev/null 2>&1 & + exec $(echo "$result" | sed 's/.*�//') >/dev/null 2>&1 & } view() { @@ -821,7 +820,7 @@ photosArchive() { IFS='' - author="Adam Pioterek <photos@apiote.xyz>" + author="Adam Evyčędo <photos@apiote.xyz>" copyright="CC-BY-SA" while [ $# -gt 0 ] @@ -868,9 +867,9 @@ then printf 'No exif\n' else printf "Setting exif data: %s, %s\n" "$author" "$copyright" + exiv2 -da ./*.jpg exiv2 -M "set Exif.Image.Copyright $copyright" mo ./*.jpg - exiv2 -M "set Xmp.pdf.Author $author" mo ./*.jpg - exiv2 -dc ./*.jpg + exiv2 -M "set Exif.Image.Artist $author" mo ./*.jpg fi printf "Orienting\n" diff --git a/.local/bin/bar_battery b/.local/bin/bar_battery index 98550017069aa8fe4b94829621214ebc9ca1d712..48a45a2fd5dc5b0272eadecd6ee4f78aa8e82879 100755 --- a/.local/bin/bar_battery +++ b/.local/bin/bar_battery @@ -114,7 +114,13 @@ fi if [ "$pc_prev" != "$pc" ] then - if [ "$pc" -le 6 ] && [ "$state" = 'discharging' ] && [ "$last_notify" != '6' ] + if [ "$pc" -le 3 ] && [ "$state" = 'discharging' ] && [ "$last_notify" != '3' ] + then + playerctl pause + swaylock + echo mem > /sys/power/state + last_notify='3' + elif [ "$pc" -le 6 ] && [ "$state" = 'discharging' ] && [ "$last_notify" != '6' ] then notify-send -u critical -i battery-empty-symbolic Battery 'less than <sub>2</sub>6' last_notify='6'