From d75c6b7d02d8c9fca7ef56e45afee90469c3b007 Mon Sep 17 00:00:00 2001 From: Luk Date: Tue, 24 Feb 2026 11:20:15 +0800 Subject: [PATCH] u --- mac-disable-msoffice-autoupdate.sh | 4 ++++ nixhome/.bashrc | 11 +++++++++-- proxy.sh | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 mac-disable-msoffice-autoupdate.sh diff --git a/mac-disable-msoffice-autoupdate.sh b/mac-disable-msoffice-autoupdate.sh new file mode 100644 index 0000000..430aeb4 --- /dev/null +++ b/mac-disable-msoffice-autoupdate.sh @@ -0,0 +1,4 @@ +cd /Library/Application\ Support/Microsoft/MAU2.0 + +# sudo chmod 000 Microsoft\ AutoUpdate.app +sudo mv Microsoft\ AutoUpdate.app MicrosoftAutoupdateDisabled.app \ No newline at end of file diff --git a/nixhome/.bashrc b/nixhome/.bashrc index 5c0a334..df31de7 100644 --- a/nixhome/.bashrc +++ b/nixhome/.bashrc @@ -124,7 +124,13 @@ esac # - `7`: White # others: # \w shows absolute path, \W shows current folder. - +if [ "$(whoami)" = "root" ]; then + PSTYLE=07 + PTYPE=4 +else + PSTYLE=07 + PTYPE=3 +fi if [ "$(uname)" = "Darwin" ]; then MYOSVERSION=Mac`sw_vers -productVersion` elif [ "$(uname)" = "FreeBSD" ]; then @@ -138,7 +144,7 @@ if [[ -n "$SSH_CONNECTION" ]] || [[ "$(uname)" != "Darwin" ]]; then IN_SSH="ssh$" fi if [ "$color_prompt" = yes ]; then - PS1='<\[\033[07;32m\]\t\[\033[00m\]#\[\033[07;35m\]\u\[\033[00m\]@\[\033[07;31m\]\h\[\033[00m\]=\[\033[07;34m\]$(uname -m),$(uname),$MYOSVERSION\[\033[00m\]:\[\033[07;32m\]\w\[\033[00m\]>\[\033[07;37m\]$IN_SSH\[\033[00m\] ' + PS1='<\[\033[$PSTYLE;${PTYPE}2m\]\t\[\033[00m\]#\[\033[$PSTYLE;${PTYPE}5m\]\u\[\033[00m\]@\[\033[$PSTYLE;${PTYPE}1m\]\h\[\033[00m\]=\[\033[$PSTYLE;${PTYPE}4m\]$(uname -m),$(uname),$MYOSVERSION\[\033[00m\]:\[\033[$PSTYLE;${PTYPE}2m\]\w\[\033[00m\]>\[\033[$PSTYLE;${PTYPE}7m\]$IN_SSH\[\033[00m\] ' else PS1='<\t#\u@\h=$(uname -m),$(uname),$MYOSVERSION:\w>$IN_SSH ' # \w shows absolute path, \W shows current folder. fi @@ -192,3 +198,4 @@ fi ################################################################################ # End Of File: "~/.bashrc" ################################################################################ + diff --git a/proxy.sh b/proxy.sh index d30e42d..42ea1a5 100755 --- a/proxy.sh +++ b/proxy.sh @@ -11,10 +11,10 @@ fi # to reset port to empty, otherwise the second run of this script will not ask for port. PORT= -PORTDEFAULT=17890 +PORTDEFAULT=7897 # function proxy() { if [ "$proxySwitch" == "s" ] || [ "$proxySwitch" == "1" ]; then - echo "::*** Proxy server running on [port number] or [leave blank] for default $PORTDEFAULT (20170 for v2ray2, 17890 for 零点云, or 7897 for clash verge)" + echo "::*** Proxy server running on [port number] or [leave blank] for default $PORTDEFAULT (20170 for v2ray2, 7897 for 零点云 or clash verge)" while [ ! "$PORT" ] do read -p "***:: " PORT