diff --git a/.github/workflows/gitee_sync.yml b/.github/workflows/gitee_sync.yml index 7c1e0ed..8d45a70 100644 --- a/.github/workflows/gitee_sync.yml +++ b/.github/workflows/gitee_sync.yml @@ -1,8 +1,6 @@ name: sync repos to gitee on: push: ~ - schedule: - - cron: 10 4 * * * workflow_dispatch: ~ jobs: dotfiles: diff --git a/.tmux.conf2 b/.tmux.conf2 index 659ecb0..5cfd35a 100644 --- a/.tmux.conf2 +++ b/.tmux.conf2 @@ -26,6 +26,7 @@ bind | split-window -h -c "#{pane_current_path}" # other key bindings bind r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded" bind m run 'old=$(tmux show -gv mouse); new="off"; if [ "$old" = "off" ]; then new="on"; fi; tmux set -g mouse $new && tmux display-message toggle\ mouse\ mode\ $new' +bind C-x set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}" # styles # status bar diff --git a/.vimrc2 b/.vimrc2 index 059c6c9..42e3c5a 100644 --- a/.vimrc2 +++ b/.vimrc2 @@ -10,8 +10,8 @@ filetype plugin indent on " end vundle colorscheme onedark +syntax on set cursorline -set syntax=on set autoindent set smartindent set expandtab "spaces instead of tabs @@ -32,6 +32,7 @@ hi User3 ctermfg=15 ctermbg=2 au InsertEnter * hi User3 ctermfg=15 ctermbg=5 au InsertLeave * hi User3 ctermfg=15 ctermbg=2 set statusline=%3*\ %{mode()}\ %*[%n][%F](%{\"\".(&fenc==\"\"?&enc:&fenc).((exists(\"+bomb\")\ &&\ &bomb)?\"+\":\"\").\"\"},%{&ff},%Y)%2*%r%1*%m%*%<%=\'0x%B\'\ [Line:%l/%L,Col:%c][%p%%] +nnoremap :let [&nu, &rnu] = [!&rnu, &nu+&rnu==1] " When editing a file, always jump to the last known cursor position. " Don't do it when the position is invalid, when inside an event handler diff --git a/.zshrc2 b/.zshrc2 index 0bbc74e..18e06df 100644 --- a/.zshrc2 +++ b/.zshrc2 @@ -14,6 +14,7 @@ export EDITOR='vim' export PYTHONIOENCODING='UTF-8' export GPG_TTY=$(tty) export LESS_TERMCAP_md=$'\E[01;33m' +export VIRTUAL_ENV_DISABLE_PROMPT=1 # env for dfs if [[ -f ~/.config/dotfiles/env ]]; then set -a; source ~/.config/dotfiles/env; set +a; fi export DFS_OS_TYPE="$("$DOTFILES/tools/common.sh" get_os_type)" @@ -121,8 +122,8 @@ alias "p666"='ping6 2001:da8::666' alias "cbd"='curl http://www.baidu.com' alias "cbds"='curl https://www.baidu.com' alias "gdebug"='git add -A; git commit --allow-empty -m "bug fix ($(date))"' -alias "ls"='ls --color=tty' -alias "l"='ls -lAGh --time-style="+%y-%m-%d %H:%M"' +alias "ls"='ls --color=tty --time-style="+%y-%m-%d %H:%M"' +alias "l"='ls -lAGh' alias "jc"='journalctl' alias "jce"='jc -e' alias "jceu"='jc -eu' diff --git a/riot-config.sh b/riot-config.sh index 03199a3..23b1505 100644 --- a/riot-config.sh +++ b/riot-config.sh @@ -11,7 +11,7 @@ j.remote() { nasp.remote() { remote=nasp.fit RET_PORT=${RET_PORT:-36022} - RET_USERNAME=${RET_USERNAME:-ssh} + RET_USERNAME=${RET_USERNAME:-root} RET_TRUST_SERVER=1 } @@ -20,6 +20,13 @@ nasp.remote() { RET_USERNAME=${RET_USERNAME:-root} } +dxng.domain() { + RET_HOSTNAME=$host.dxng.net + RET_PORT=${RET_PORT:-12022} + RET_USERNAME=${RET_USERNAME:-root} + RET_TRUST_SERVER=1 +} + i.domain() { RET_HOSTNAME=$host.ibd.ink RET_PORT=${RET_PORT:-12022} @@ -46,11 +53,11 @@ x.domain() { nasp.domain() { RET_HOSTNAME=$host RET_PORT=${RET_PORT:-12022} - RET_USERNAME=${RET_USERNAME:-dictxiong} + RET_USERNAME=${RET_USERNAME:-root} RET_JUMP_SERVER="ssh@nasp.fit:36022" RET_TRUST_SERVER=1 } default.domain() { - i.domain + dxng.domain } diff --git a/tools/sagent.sh b/tools/sagent.sh index 083ef4e..9b317a3 100755 --- a/tools/sagent.sh +++ b/tools/sagent.sh @@ -61,7 +61,8 @@ reset() all() { - local agent_file="/tmp/piv-agent-$(whoami)" + test -d ~/.ssh || mkdir ~/.ssh + local agent_file=~/.ssh/agent-$(whoami) if [[ -f $agent_file ]]; then source $agent_file > /dev/null else diff --git a/tools/test.zsh b/tools/test.zsh index 8e98efe..f8ac0b8 100644 --- a/tools/test.zsh +++ b/tools/test.zsh @@ -41,15 +41,15 @@ test $(echo n | tools/common.sh ask_for_yN "test") = "0" test $(echo | tools/common.sh ask_for_yN "test") = "0" test $(echo | tools/common.sh ask_for_Yn "test") = "1" test $(DFS_QUIET=1 tools/common.sh ask_for_Yn "test") = "1" -test "$(DFS_TRUST=1 riot time@is.impt:2222/yes@you-r.right/you@are.really.recht./ibd./try@it,another@host scp /tmp/ ./tmp -D 2>/dev/null)" = 'scp -P 12022 -o PermitLocalCommand=yes -o ControlMaster=auto -o ControlPath=~/.ssh/master-socket/%C -o ProxyJump=time@is.impt:2222,yes@you-r.right,you@are.really.recht.,root@ibd. -r try@it.ibd.ink:"/tmp/" "./tmp" -scp -P 12022 -o PermitLocalCommand=yes -o ControlMaster=auto -o ControlPath=~/.ssh/master-socket/%C -o ForwardX11=yes -o ForwardAgent=yes -r another@host.ibd.ink:"/tmp/" "./tmp"' +test "$(DFS_TRUST=1 riot time@is.impt:2222/yes@you-r.right/you@are.really.recht./ibd./try@it,another@host scp /tmp/ ./tmp -D 2>/dev/null)" = 'scp -P 12022 -o PermitLocalCommand=yes -o ControlMaster=auto -o ControlPath=~/.ssh/master-socket/%C -o ProxyJump=time@is.impt:2222,yes@you-r.right,you@are.really.recht.,root@ibd. -r try@it.dxng.net:"/tmp/" "./tmp" +scp -P 12022 -o PermitLocalCommand=yes -o ControlMaster=auto -o ControlPath=~/.ssh/master-socket/%C -o ForwardX11=yes -o ForwardAgent=yes -r another@host.dxng.net:"/tmp/" "./tmp"' # check alias alias p114 alias cbds which riot sagt -test -f "/tmp/piv-agent-$(whoami)" +test -f ~/.ssh/agent-$(whoami) gbes || which gbes # check update