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
1 changed files with 1 additions and 6 deletions

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