[debug] vim syntax highlighting; sagt file location; dxng.net (#44)

* feat(tmux): prefix + C-x to toggle synchronize-panes

* feat(riot-cfg): nasp domain username to root

* feat(vimrc): ^N to switch between nu/rnu/null

* feat(zshrc): VIRTUAL_ENV_DISABLE_PROMPT set

* fix(sagent): secure file location

* ci: remove schedule run for gitee_sync

* fix(vimrc): syntax highlighting

* feat(zshrc): move time style from l to ls

* fix(riot-config): ibd.ink -> dxng.net

* fix: ci

---------

Co-authored-by: xiongdian.me <xiongdian.me@bytedance.com>
This commit is contained in:
Dict Xiong 2024-09-11 01:14:13 +08:00 committed by GitHub
parent 92aa5fa920
commit 055d44886b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 21 additions and 12 deletions

View File

@ -1,8 +1,6 @@
name: sync repos to gitee name: sync repos to gitee
on: on:
push: ~ push: ~
schedule:
- cron: 10 4 * * *
workflow_dispatch: ~ workflow_dispatch: ~
jobs: jobs:
dotfiles: dotfiles:

View File

@ -26,6 +26,7 @@ bind | split-window -h -c "#{pane_current_path}"
# other key bindings # other key bindings
bind r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded" 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 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 # styles
# status bar # status bar

View File

@ -10,8 +10,8 @@ filetype plugin indent on
" end vundle " end vundle
colorscheme onedark colorscheme onedark
syntax on
set cursorline set cursorline
set syntax=on
set autoindent set autoindent
set smartindent set smartindent
set expandtab "spaces instead of tabs 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 InsertEnter * hi User3 ctermfg=15 ctermbg=5
au InsertLeave * hi User3 ctermfg=15 ctermbg=2 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%%] 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 <silent> <C-n> :let [&nu, &rnu] = [!&rnu, &nu+&rnu==1]<cr>
" When editing a file, always jump to the last known cursor position. " 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 " Don't do it when the position is invalid, when inside an event handler

View File

@ -14,6 +14,7 @@ export EDITOR='vim'
export PYTHONIOENCODING='UTF-8' export PYTHONIOENCODING='UTF-8'
export GPG_TTY=$(tty) export GPG_TTY=$(tty)
export LESS_TERMCAP_md=$'\E[01;33m' export LESS_TERMCAP_md=$'\E[01;33m'
export VIRTUAL_ENV_DISABLE_PROMPT=1
# env for dfs # env for dfs
if [[ -f ~/.config/dotfiles/env ]]; then set -a; source ~/.config/dotfiles/env; set +a; fi 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)" 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 "cbd"='curl http://www.baidu.com'
alias "cbds"='curl https://www.baidu.com' alias "cbds"='curl https://www.baidu.com'
alias "gdebug"='git add -A; git commit --allow-empty -m "bug fix ($(date))"' alias "gdebug"='git add -A; git commit --allow-empty -m "bug fix ($(date))"'
alias "ls"='ls --color=tty' alias "ls"='ls --color=tty --time-style="+%y-%m-%d %H:%M"'
alias "l"='ls -lAGh --time-style="+%y-%m-%d %H:%M"' alias "l"='ls -lAGh'
alias "jc"='journalctl' alias "jc"='journalctl'
alias "jce"='jc -e' alias "jce"='jc -e'
alias "jceu"='jc -eu' alias "jceu"='jc -eu'

View File

@ -11,7 +11,7 @@ j.remote() {
nasp.remote() { nasp.remote() {
remote=nasp.fit remote=nasp.fit
RET_PORT=${RET_PORT:-36022} RET_PORT=${RET_PORT:-36022}
RET_USERNAME=${RET_USERNAME:-ssh} RET_USERNAME=${RET_USERNAME:-root}
RET_TRUST_SERVER=1 RET_TRUST_SERVER=1
} }
@ -20,6 +20,13 @@ nasp.remote() {
RET_USERNAME=${RET_USERNAME:-root} 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() { i.domain() {
RET_HOSTNAME=$host.ibd.ink RET_HOSTNAME=$host.ibd.ink
RET_PORT=${RET_PORT:-12022} RET_PORT=${RET_PORT:-12022}
@ -46,11 +53,11 @@ x.domain() {
nasp.domain() { nasp.domain() {
RET_HOSTNAME=$host RET_HOSTNAME=$host
RET_PORT=${RET_PORT:-12022} RET_PORT=${RET_PORT:-12022}
RET_USERNAME=${RET_USERNAME:-dictxiong} RET_USERNAME=${RET_USERNAME:-root}
RET_JUMP_SERVER="ssh@nasp.fit:36022" RET_JUMP_SERVER="ssh@nasp.fit:36022"
RET_TRUST_SERVER=1 RET_TRUST_SERVER=1
} }
default.domain() { default.domain() {
i.domain dxng.domain
} }

View File

@ -61,7 +61,8 @@ reset()
all() all()
{ {
local agent_file="/tmp/piv-agent-$(whoami)" test -d ~/.ssh || mkdir ~/.ssh
local agent_file=~/.ssh/agent-$(whoami)
if [[ -f $agent_file ]]; then if [[ -f $agent_file ]]; then
source $agent_file > /dev/null source $agent_file > /dev/null
else else

View File

@ -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") = "0"
test $(echo | tools/common.sh ask_for_Yn "test") = "1" test $(echo | tools/common.sh ask_for_Yn "test") = "1"
test $(DFS_QUIET=1 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" 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.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.dxng.net:"/tmp/" "./tmp"'
# check alias # check alias
alias p114 alias p114
alias cbds alias cbds
which riot which riot
sagt sagt
test -f "/tmp/piv-agent-$(whoami)" test -f ~/.ssh/agent-$(whoami)
gbes || which gbes gbes || which gbes
# check update # check update