1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-25 14:06:08 -05:00

picom-trans: remove a no-longer-needed workaround

This commit is contained in:
Subhaditya Nath 2021-05-31 12:32:12 +05:30
parent df1c6159fc
commit 5394b2c2bc

View file

@ -77,11 +77,6 @@ lineno=
option=
v=
# Workaround: replace '-5' with '~5' so as not to confuse getopts.
for v in "$@"; do
shift && set -- "$@" "$(echo "$v" | sed -E 's/^-([0-9]+%?)$/~\1/')"
done
# We make getopts stop on any argument it doesn't recognize
# or errors on. This allows for things like `picom-trans -5`
# as well as `picom-trans -c +5 -s` (contrived example).
@ -136,7 +131,7 @@ while test $# -gt 0; do
done
# clean up opacity. xargs == a poor man's trim.
opacity=$(echo "$opacity" | xargs | sed 's/%//g' | sed -E 's/^~([0-9]+)$/-\1/')
opacity=$(echo "$opacity" | xargs | sed 's/%//g')
# Validate opacity value
if test -z "$action" && ! echo "$opacity" | grep -qE '^[+-]?[0-9]+$'; then