diff options
| -rw-r--r-- | X11/openbox/rc.xml | 2 | ||||
| -rw-r--r-- | alias | 2 | ||||
| -rw-r--r-- | mutt/muttrc.topo | 6 | ||||
| -rw-r--r-- | profile | 13 | ||||
| -rw-r--r-- | vim/vimrc | 2 | ||||
| -rw-r--r-- | zsh/zshrc | 25 |
6 files changed, 27 insertions, 23 deletions
diff --git a/X11/openbox/rc.xml b/X11/openbox/rc.xml index 0d044fe..ffc6c67 100644 --- a/X11/openbox/rc.xml +++ b/X11/openbox/rc.xml | |||
| @@ -651,7 +651,7 @@ | |||
| 651 | sh -c ' | 651 | sh -c ' |
| 652 | xdotool search --name "@Mutt" windowactivate || \ | 652 | xdotool search --name "@Mutt" windowactivate || \ |
| 653 | alacritty --title @Mutt \ | 653 | alacritty --title @Mutt \ |
| 654 | --working-directory=/home/pham/Downloads \ | 654 | --working-directory ~/Downloads \ |
| 655 | -e mutt | 655 | -e mutt |
| 656 | ' | 656 | ' |
| 657 | </command> | 657 | </command> |
| @@ -414,7 +414,7 @@ cdg() { | |||
| 414 | alias cdgg='cd $(git rev-parse --show-toplevel)' | 414 | alias cdgg='cd $(git rev-parse --show-toplevel)' |
| 415 | alias cdgw='cdgg && cd .github/workflows' | 415 | alias cdgw='cdgg && cd .github/workflows' |
| 416 | alias cdgs='cd $(git submodule status | sed "s/^.//" | cut -d" " -f2)' # cd to first submodule | 416 | alias cdgs='cd $(git submodule status | sed "s/^.//" | cut -d" " -f2)' # cd to first submodule |
| 417 | alias ch="/home/pham/helper/bin/git/check-repos.sh" | 417 | ch() { list=~/helper/bin/git/check-repos.sh; test -f $list && $list; } |
| 418 | alias git.check="/home/pham/helper/bin/git/check-repos.sh" | 418 | alias git.check="/home/pham/helper/bin/git/check-repos.sh" |
| 419 | alias cgit{.,''}rc='sudo vim /etc/cgitrc' | 419 | alias cgit{.,''}rc='sudo vim /etc/cgitrc' |
| 420 | 420 | ||
diff --git a/mutt/muttrc.topo b/mutt/muttrc.topo index cdc31a8..f3e81bf 100644 --- a/mutt/muttrc.topo +++ b/mutt/muttrc.topo | |||
| @@ -1,4 +1,10 @@ | |||
| 1 | # Identify meself | 1 | # Identify meself |
| 2 | set my_user = "pham@mail.topo.tw"; setenv my_user "$my_user" | ||
| 3 | set folder = "imaps://$my_user:993" | ||
| 4 | set imap_pass = `pass mail/$my_user` | ||
| 5 | set smtp_url = "smtp://$my_user:587" | ||
| 6 | set smtp_pass = `pass mail/$my_user` | ||
| 7 | |||
| 2 | set from = "pham@topo.tw" | 8 | set from = "pham@topo.tw" |
| 3 | set realname = "謝晉凡 Hsieh Chin Fan" | 9 | set realname = "謝晉凡 Hsieh Chin Fan" |
| 4 | set signature = "~/.config/mutt/.signature" | 10 | set signature = "~/.config/mutt/.signature" |
| @@ -16,6 +16,19 @@ export VISUAL=$EDITOR | |||
| 16 | export TIG_EDITOR=$EDITOR | 16 | export TIG_EDITOR=$EDITOR |
| 17 | export GIT_EDITOR=$EDITOR | 17 | export GIT_EDITOR=$EDITOR |
| 18 | 18 | ||
| 19 | # IM for GUI | ||
| 20 | export LANG="zh-CN.UTF-8" | ||
| 21 | export LC_ALL="en_US.UTF-8" | ||
| 22 | # fcitx | ||
| 23 | export GTK_IM_MODULE="fcitx" | ||
| 24 | export QT_IM_MODULE="fcitx" | ||
| 25 | export XMODIFIERS="@im=fcitx" | ||
| 26 | export INPUT_METHOD="fcitx" | ||
| 27 | export XIM="fcitx" | ||
| 28 | export XIM_PROGRAM="fcitx" | ||
| 29 | export SDL_IM_MODULE="fcitx" | ||
| 30 | export GLFW_IM_MODULE="ibus" | ||
| 31 | |||
| 19 | # Get current shell | 32 | # Get current shell |
| 20 | shell=$(</proc/$$/cmdline sed -E 's/(.)-.+$/\1/' | tr -d '[\0\-]') | 33 | shell=$(</proc/$$/cmdline sed -E 's/(.)-.+$/\1/' | tr -d '[\0\-]') |
| 21 | export shell=${shell##*/} | 34 | export shell=${shell##*/} |
| @@ -7,7 +7,7 @@ endif | |||
| 7 | 7 | ||
| 8 | " Get current dir | 8 | " Get current dir |
| 9 | " let s:home = fnamemodify(resolve(expand('<sfile>:p')), ':h') | 9 | " let s:home = fnamemodify(resolve(expand('<sfile>:p')), ':h') |
| 10 | let s:home = '/home/pham/helper/vim' | 10 | let s:home = '~/helper/vim' |
| 11 | 11 | ||
| 12 | " Add current dir into runtimepath | 12 | " Add current dir into runtimepath |
| 13 | execute 'set runtimepath+='.s:home | 13 | execute 'set runtimepath+='.s:home |
| @@ -36,18 +36,6 @@ _comp_options+=(globdots) # With hidden files | |||
| 36 | zstyle ':completion:*' menu select | 36 | zstyle ':completion:*' menu select |
| 37 | zstyle ':completion::complete:*' gain-privileges 1 | 37 | zstyle ':completion::complete:*' gain-privileges 1 |
| 38 | 38 | ||
| 39 | function _already_sync_after_wakeup() { | ||
| 40 | WAKEUP="$HOME/.wakeup" | ||
| 41 | [ ! -e "$WAKEUP" ] && return 0 | ||
| 42 | |||
| 43 | latest=$(date -d @`stat -c %X "$WAKEUP"` +%s) | ||
| 44 | # If sync time is older than wakeup time (timestamp in file), then return false | ||
| 45 | if [ $latest -gt "$(cat $WAKEUP)" ]; then | ||
| 46 | return 0 | ||
| 47 | else | ||
| 48 | return 1 | ||
| 49 | fi | ||
| 50 | } | ||
| 51 | 39 | ||
| 52 | autoload -Uz add-zsh-hook | 40 | autoload -Uz add-zsh-hook |
| 53 | autoload -Uz parameter | 41 | autoload -Uz parameter |
| @@ -64,13 +52,6 @@ function precmd() { | |||
| 64 | fi | 52 | fi |
| 65 | PROMPT="%B%(?:%F{green}%m%f:%K{red}%F{black}%m%f%k)%f%F{cyan} %c%f%b${jobstring} " | 53 | PROMPT="%B%(?:%F{green}%m%f:%K{red}%F{black}%m%f%k)%f%F{cyan} %c%f%b${jobstring} " |
| 66 | 54 | ||
| 67 | # RIGHT PROMPT | ||
| 68 | # Show context and git status of tracking repos at right | ||
| 69 | UNSYNC_REPOS=$(NUM=$($SETTING_DIR/bin/git/check-repos.sh -n); (( $NUM != 0 )) && echo $NUM) | ||
| 70 | NEED_SYNC=$(_already_sync_after_wakeup || echo S) | ||
| 71 | RPROMPT="%B%K{blue}%F{yellow}${CONTEXT:+ $CONTEXT }%f%k%K{red}%F{black}${UNSYNC_REPOS}${NEED_SYNC}%f%k%b" | ||
| 72 | |||
| 73 | |||
| 74 | [ -n "$PRE_POPULATE" ] && print -z "$PRE_POPULATE" | 55 | [ -n "$PRE_POPULATE" ] && print -z "$PRE_POPULATE" |
| 75 | } | 56 | } |
| 76 | 57 | ||
| @@ -147,4 +128,8 @@ case ":$PATH:" in | |||
| 147 | esac | 128 | esac |
| 148 | # pnpm end | 129 | # pnpm end |
| 149 | 130 | ||
| 150 | source ~/.profile | 131 | source ~/.profile 2>/dev/null |
| 132 | |||
| 133 | # Makefile | ||
| 134 | zstyle ':completion:*:make:*:targets' call-command true | ||
| 135 | zstyle ':completion:*:*:make:*' tag-order 'targets' 2>/dev/null | ||