这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@FalconSN
Copy link

@FalconSN FalconSN commented Nov 12, 2023

Additions in termux-wallpaper:

show_usage () {
	echo "-c         crop image from center"
	echo "-n         fit full image to screen"
}
...
OPT_CENTER=""
OPT_NOCROP=""
...
while getopts :h,:c,:n,:l,f:,u: option
do
	case "$option" in
		c) OPT_CENTER="true" ;;
		n) OPT_NOCROP="true" ;;
	esac
done
...
[[ -n $OPT_CENTER ]] && [[ -n $OPT_NOCROP ]] && echo "$SCRIPTNAME: must specify either -c or -n" && exit 1 ;
...
set --
[ -n "$OPT_CENTER" ] && set -- "$@" --ez center "$OPT_CENTER"
[ -n "$OPT_NOCROP" ] && set -- "$@" --ez nocrop "$OPT_NOCROP"
/data/data/com.termux/files/usr/libexec/termux-api Wallpaper "$@"

Tested images:

Vertical image

Vertical in portrait -c
Vertical in portrait -n
Vertical in landscape -c
Vertical in landscape -n

Horizontal image

Horizontal in portrait -c
Horizontal in portrait -n
Horizontal in landscape -c
Horizontal in landscape -n

Is this the format I'm supposed to use?
And please, ignore unnecessary commits. This is my first time of actually using Github.

@FalconSN FalconSN closed this Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant