diff --git a/editor/nvim/config/init.vim b/editor/nvim/config/init.vim index 45f401f..2f5aee6 100644 --- a/editor/nvim/config/init.vim +++ b/editor/nvim/config/init.vim @@ -13,8 +13,12 @@ call plug#begin('~/.config/nvim/bundle') " let plugin manager manage itself Plug 'junegunn/vim-plug' + " plugins +Plug 'tpope/vim-obsession' " session ease-of-use +Plug 'dhruvasagar/vim-prosession' " more session ease-of-use +let g:prosession_dir = '~/.config/nvim/session/' Plug 'vim-airline/vim-airline' " statusline " let g:airline_powerline_fonts = 0 let g:airline#extensions#tabline#enabled = 1 " automatically displays all buffers when there's only one tab open diff --git a/env/sh/bashrc b/env/sh/bashrc index 7a454c1..3079386 100644 --- a/env/sh/bashrc +++ b/env/sh/bashrc @@ -170,5 +170,7 @@ if [ -t 0 ]; then . "$HOME/.bashrc_env" fi - cd "$HOME/.." + if [ "$PWD" = "$HOME" ]; then + cd "$HOME/.." + fi fi diff --git a/env/sh/tmux.conf b/env/sh/tmux.conf index 0dd920d..abeea8a 100644 --- a/env/sh/tmux.conf +++ b/env/sh/tmux.conf @@ -6,9 +6,11 @@ bind-key s send-prefix # statusbar on bottom set-option -g status-position bottom +# honestly not sure set -g escape-time 10 setw -g monitor-activity on +# hide tmux status bar by default (prefix H toggles) set -g status off bind-key W resize-pane -x 100 @@ -18,23 +20,24 @@ bind-key v split-window -h bind-key b split-window # iterating -bind-key H set status bind r source-file ~/.tmux.conf +# toggle status bar +bind-key H set status + # vim copying setw -g mode-keys vi bind-key -t vi-copy 'v' begin-selection bind-key -t vi-copy 'y' copy-selection +# 1-based indexing for keystroke simplicity set -g base-index 1 set -g pane-base-index 1 -# use tmux-resurrect to manage saving/restoring sessions -set -g @resurrect-save 'S' -set -g @resurrect-restore 'R' - +# custom predefined layouts bind M-l source-file ~/.tmux/layouts/dev.tmux +# mimic pane switching in and out of vim is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"' bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" @@ -42,7 +45,7 @@ bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" -# present a menu of URLs to open from the visible pane. sweet. +# present a menu of urls to open from the visible pane bind-key u capture-pane \;\ save-buffer /tmp/tmux-buffer \;\ split-window -l 10 "urlview /tmp/tmux-buffer" @@ -52,10 +55,15 @@ set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' -set -g @plugin 'tmux-plugins/tmux-copycat' set -g @plugin 'tmux-plugins/tmux-yank' +set -g @plugin 'tmux-plugins/tmux-copycat' set -g @plugin 'tmux-plugins/tmux-sessionist' -# initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +# plugin options + +# enable continuum +set -g @continuum-restore 'on' + +# initialize tmux plugin manager run '~/.tmux/plugins/tpm/tpm' diff --git a/misc/git/gitconfig b/misc/git/gitconfig index 8d7ba4f..24aa4a3 100644 --- a/misc/git/gitconfig +++ b/misc/git/gitconfig @@ -4,3 +4,5 @@ name = Daniel Flanagan email = daniel@lytedev.io +[core] + editor = nvim diff --git a/os/arch_linux/utils.bash b/os/arch_linux/utils.bash index 235e393..d86bdae 100755 --- a/os/arch_linux/utils.bash +++ b/os/arch_linux/utils.bash @@ -36,6 +36,9 @@ pacaur -S \ mutt procmail msmtp \ ncmpcpp mpd \ rsync \ + samba \ + thunar-shares-plugin \ + nmap \ --noconfirm --noedit # sudo ln -s /usr/bin/google-chrome-unstable /usr/bin/chrome