diff --git a/files/.config/i3/config b/files/.config/i3/config index cc8a377..a2ea9b2 100644 --- a/files/.config/i3/config +++ b/files/.config/i3/config @@ -72,7 +72,6 @@ for_window [class="^Pulseeffects$"] floating enable for_window [class="Remmina" title="Remmina Remote Desktop Client"] floating enable for_window [class="feh" title="pinned screenshot"] floating enable sticky enable for_window [class="TeamViewer"] floating enable -for_window [class="Thunar"] floating enable # https://github.com/ValveSoftware/steam-for-linux/issues/1040 for_window [class="^Steam$" title="^Friends$"] floating enable diff --git a/files/.config/zsh/custom/000-env.zsh b/files/.config/zsh/custom/000-env.zsh index 382e9c7..72dd160 100644 --- a/files/.config/zsh/custom/000-env.zsh +++ b/files/.config/zsh/custom/000-env.zsh @@ -1,41 +1,13 @@ -# make word splitting behave like bash +# Make word splitting behave like bash setopt SH_WORD_SPLIT +# History +HISTSIZE=100000 +SAVEHIST=100000 +setopt SHARE_HISTORY # Share history between all sessions. +setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry. + # gpg-agent export GPG_TTY=$(tty) gpg-connect-agent updatestartuptty /bye >/dev/null -# Color for hostname -function get_hostname_color () { - local col - for hash_func in md5sum sha1sum sha256sum; do - col="$(printf "%03d" "$((16#$(hostname | $hash_func | head -c2)))")" - if [[ $col -ne 0 ]] \ - && [[ $col -lt 16 || $col -gt 21 ]] \ - && [[ $col -lt 232 || $col -gt 243 ]]; then - # we found a color that isn't too dark - echo $col>>~/test.log - break - else - # default color - col="002" - fi - done - printf "$col" -} -case "$HOST" in - "devbox") - ZSH_THEME_HOSTNAME_COLOR="002" - ;; - "pallet") - ZSH_THEME_HOSTNAME_COLOR="004" - ;; - "pewter") - ZSH_THEME_HOSTNAME_COLOR="005" - ;; - *) - ZSH_THEME_HOSTNAME_COLOR="$(get_hostname_color)" - ;; -esac -export ZSH_THEME_HOSTNAME_COLOR -unset -f get_hostname_color diff --git a/files/.config/zsh/custom/001-fzf.zsh b/files/.config/zsh/custom/001-fzf.zsh new file mode 100644 index 0000000..b02250c --- /dev/null +++ b/files/.config/zsh/custom/001-fzf.zsh @@ -0,0 +1,15 @@ +# Remove duplicate when using Ctrl+R +# https://github.com/junegunn/fzf/issues/626 +__fzf_history__() ( + local line + shopt -u nocaseglob nocasematch + line=$( + HISTTIMEFORMAT= history | tac | sort --key=2.1 -bus | sort -n | + FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} $FZF_DEFAULT_OPTS --tac -n2..,.. --tiebreak=index --bind=ctrl-r:toggle-sort $FZF_CTRL_R_OPTS +m" $(__fzfcmd) | + command grep '^ *[0-9]') && + if [[ $- =~ H ]]; then + sed 's/^ *\([0-9]*\)\** .*/!\1/' <<< "$line" + else + sed 's/^ *\([0-9]*\)\** *//' <<< "$line" + fi +) diff --git a/files/.config/zsh/custom/200-motd.zsh b/files/.config/zsh/custom/200-motd.zsh index d5ef984..60b588d 100644 --- a/files/.config/zsh/custom/200-motd.zsh +++ b/files/.config/zsh/custom/200-motd.zsh @@ -1,2 +1,37 @@ -motd +# Color for hostname +function get_hostname_color () { + local col + for hash_func in md5sum sha1sum sha256sum; do + col="$(printf "%03d" "$((16#$(hostname | $hash_func | head -c2)))")" + if [[ $col -ne 0 ]] \ + && [[ $col -lt 16 || $col -gt 21 ]] \ + && [[ $col -lt 232 || $col -gt 243 ]]; then + # we found a color that isn't too dark + echo $col>>~/test.log + break + else + # default color + col="002" + fi + done + printf "$col" +} +case "$HOST" in + "devbox") + ZSH_THEME_HOSTNAME_COLOR="002" + ;; + "pallet") + ZSH_THEME_HOSTNAME_COLOR="004" + ;; + "pewter") + ZSH_THEME_HOSTNAME_COLOR="005" + ;; + *) + ZSH_THEME_HOSTNAME_COLOR="$(get_hostname_color)" + ;; +esac +unset -f get_hostname_color + +# print motd +ZSH_THEME_HOSTNAME_COLOR="$ZSH_THEME_HOSTNAME_COLOR" motd diff --git a/files/.vim/vimrc b/files/.vim/vimrc index 09c845c..c4c77cc 100644 --- a/files/.vim/vimrc +++ b/files/.vim/vimrc @@ -73,7 +73,7 @@ if dein#load_state(pluginpath) call dein#add('tpope/vim-surround') call dein#add('jiangmiao/auto-pairs') call dein#add('tpope/vim-endwise') - call dein#add('chrisbra/unicode.vim') + "call dein#add('chrisbra/unicode.vim') call dein#add('ctrlpvim/ctrlp.vim') call dein#add('easymotion/vim-easymotion')