add local mode support
This commit is contained in:
parent
76955562d4
commit
9074fdf31b
1 changed files with 13 additions and 0 deletions
13
hidpi.sh
13
hidpi.sh
|
@ -5,6 +5,8 @@ systemVersion=($(sw_vers -productVersion | cut -d "." -f 2))
|
||||||
systemLanguage=($(locale | grep LANG | sed s/'LANG='// | tr -d '"' | cut -d "." -f 1))
|
systemLanguage=($(locale | grep LANG | sed s/'LANG='// | tr -d '"' | cut -d "." -f 1))
|
||||||
|
|
||||||
disableSIP="Need to disable SIP"
|
disableSIP="Need to disable SIP"
|
||||||
|
langRemoteMode="Remote Mode"
|
||||||
|
langLocalMode="Local Mode"
|
||||||
langDisplay="Display"
|
langDisplay="Display"
|
||||||
langMonitors="Monitors"
|
langMonitors="Monitors"
|
||||||
langIndex="Index"
|
langIndex="Index"
|
||||||
|
@ -37,6 +39,8 @@ langChooseResOpCustom="(6) Manual input resolution"
|
||||||
|
|
||||||
if [[ "${systemLanguage}" == "zh_CN" ]]; then
|
if [[ "${systemLanguage}" == "zh_CN" ]]; then
|
||||||
disableSIP="需要关闭 SIP"
|
disableSIP="需要关闭 SIP"
|
||||||
|
langRemoteMode="远程模式"
|
||||||
|
langLocalMode="本地模式"
|
||||||
langDisplay="显示器"
|
langDisplay="显示器"
|
||||||
langMonitors="显示器"
|
langMonitors="显示器"
|
||||||
langIndex="序号"
|
langIndex="序号"
|
||||||
|
@ -72,6 +76,15 @@ downloadHost="https://raw.githubusercontent.com/xzhih/one-key-hidpi/master"
|
||||||
# downloadHost="https://raw.githubusercontent.com/xzhih/one-key-hidpi/dev"
|
# downloadHost="https://raw.githubusercontent.com/xzhih/one-key-hidpi/dev"
|
||||||
# downloadHost="http://127.0.0.1:8080"
|
# downloadHost="http://127.0.0.1:8080"
|
||||||
|
|
||||||
|
shellDir="$( cd "$( dirname "$0" )" && pwd )"
|
||||||
|
|
||||||
|
if [ -d "${shellDir}/displayIcons" ];then
|
||||||
|
echo $langLocalMode
|
||||||
|
downloadHost="fiel://${shellDir}"
|
||||||
|
else
|
||||||
|
echo $langRemoteMode
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "${sipInfo}" == *"Filesystem Protections: disabled"* ]] || [[ "$(awk '{print $5}' <<< "${sipInfo}")" == "disabled." ]] || [[ "$(awk '{print $5}' <<< "${sipInfo}")" == "disabled" ]]; then
|
if [[ "${sipInfo}" == *"Filesystem Protections: disabled"* ]] || [[ "$(awk '{print $5}' <<< "${sipInfo}")" == "disabled." ]] || [[ "$(awk '{print $5}' <<< "${sipInfo}")" == "disabled" ]]; then
|
||||||
:
|
:
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue