diff --git a/.gitignore b/.gitignore index 787b684..ccb2a5c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,13 @@ -cp-* -*.sw* *.html -temp.sh -konsole.shortcuts +*.sw* commit-msg.txt core +cp-* ideas.md +temp.sh + +# ranger +bookmarks +history +tagged +shortcuts.conf diff --git a/aliases/zsh_aliases b/aliases/zsh_aliases index d9cd00f..700434d 100644 --- a/aliases/zsh_aliases +++ b/aliases/zsh_aliases @@ -115,24 +115,13 @@ function glc() { grep $1 ~/linux-config/aliases/zsh_aliases ; } alias lca="f ~/linux-config/aliases" source ~/.shortcuts -alias vv="ni ~/.vimrc" -alias vu="ni ~/.Xresources" -alias vzb="ni ~/.zshrc" -alias vz="ni ~/linux-config/aliases/zsh_aliases" -alias vr="ni ~/.config/ranger/rc.conf" - -# i3 {{{ # -alias v3="ni ~/.config/i3/config" -alias v3b="ni ~/.config/i3blocks/i3blocks.conf" +# i3 alias i3b="f ~/i3blocks" - alias pipes="pipes.sh -t 2" -# }}} i3 # # UltiSnips {{{ # usnp_dir="~/.vim/plugged/vim-snippets/UltiSnips" function vsnp() { ni ~/.vim/plugged/vim-snippets/UltiSnips/"$1".snippets ; } -alias tm="ni $usnp_dir/texmath.snippets" # }}} # # }}} config files # @@ -140,7 +129,7 @@ alias tm="ni $usnp_dir/texmath.snippets" # applications {{{ # silent="> /dev/null 2>&1& " -alias rn="ranger" +alias r="ranger" # okular # function ok() { nohup okular $1 > /dev/null 2>&1& ; } # zathura @@ -231,7 +220,6 @@ alias grbc="git rebase --continue" # }}} update # # edit {{{ # -alias vig="ni .gitignore" alias vir="ni README.md" alias crm="mrk README.md" # }}} edit # @@ -279,8 +267,6 @@ coding_dir="~/coding" alias cdn="$cd_coding_dir" alias gx="ni ~/Documents/csgo-config/autoexec.cfg" -alias jn="ni ~/Documents/journal/todo/11.md" -alias jnt="ni ~/Documents/journal/todo/todo.md" # trapbot {{{ # alias tb="$cd_coding_dir/trapbot" @@ -316,7 +302,6 @@ alias ureq="pip freeze > requirements.txt" # scan history alias hlg="cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1" -alias hlgf="ni $spv_dir/src/api/management/commands/update-history.log" alias crnl="grep \"(kevin) CMD\" /var/log/syslog | tail -n 1 && hlg" alias hs="$spv_dir/src/update-history.sh && hlg" # removes all but newest file diff --git a/configs/ranger/bookmarks b/configs/ranger/bookmarks deleted file mode 100644 index fc4af56..0000000 --- a/configs/ranger/bookmarks +++ /dev/null @@ -1 +0,0 @@ -':/home/kevin/linux-config/configs/ranger diff --git a/configs/ranger/history b/configs/ranger/history deleted file mode 100644 index ff699ab..0000000 --- a/configs/ranger/history +++ /dev/null @@ -1,3 +0,0 @@ -rename rocket-league -rename rocket-league.png -find d diff --git a/configs/ranger/shortcuts.conf b/configs/ranger/shortcuts.conf deleted file mode 100644 index f6caca3..0000000 --- a/configs/ranger/shortcuts.conf +++ /dev/null @@ -1,68 +0,0 @@ -map gbg cd ~/Pictures/Backgrounds -map tbg tab_new ~/Pictures/Backgrounds -map mbg shell mv -v %s ~/Pictures/Backgrounds -map Ybg shell cp -rv %s ~/Pictures/Backgrounds -map gd cd ~/Downloads -map td tab_new ~/Downloads -map md shell mv -v %s ~/Downloads -map Yd shell cp -rv %s ~/Downloads -map gD cd ~/Documents -map tD tab_new ~/Documents -map mD shell mv -v %s ~/Documents -map YD shell cp -rv %s ~/Documents -map gho cd ~/ -map tho tab_new ~/ -map mho shell mv -v %s ~/ -map Yho shell cp -rv %s ~/ -map glc cd ~/linux-config/ -map tlc tab_new ~/linux-config/ -map mlc shell mv -v %s ~/linux-config/ -map Ylc shell cp -rv %s ~/linux-config/ -map gcd cd ~/coding -map tcd tab_new ~/coding -map mcd shell mv -v %s ~/coding -map Ycd shell cp -rv %s ~/coding -map gjnd cd ~/Documents/journal -map tjnd tab_new ~/Documents/journal -map mjnd shell mv -v %s ~/Documents/journal -map Yjnd shell cp -rv %s ~/Documents/journal -map glh cd ~/Music/spotify-history -map tlh tab_new ~/Music/spotify-history -map mlh shell mv -v %s ~/Music/spotify-history -map Ylh shell cp -rv %s ~/Music/spotify-history -map gsnp cd ~/.vim/plugged/vim-snippets/UltiSnips -map tsnp tab_new ~/.vim/plugged/vim-snippets/UltiSnips -map msnp shell mv -v %s ~/.vim/plugged/vim-snippets/UltiSnips -map Ysnp shell cp -rv %s ~/.vim/plugged/vim-snippets/UltiSnips -map gsv cd ~/coding/spotify-lib-vis/src -map tsv tab_new ~/coding/spotify-lib-vis/src -map msv shell mv -v %s ~/coding/spotify-lib-vis/src -map Ysv shell cp -rv %s ~/coding/spotify-lib-vis/src -map gswa cd ~/.local/share/nvim/swap -map tswa tab_new ~/.local/share/nvim/swap -map mswa shell mv -v %s ~/.local/share/nvim/swap -map Yswa shell cp -rv %s ~/.local/share/nvim/swap -map gwo cd ~/Documents/workout-logs/11 -map two tab_new ~/Documents/workout-logs/11 -map mwo shell mv -v %s ~/Documents/workout-logs/11 -map Ywo shell cp -rv %s ~/Documents/workout-logs/11 -map gsc cd ~/Documents/school -map tsc tab_new ~/Documents/school -map msc shell mv -v %s ~/Documents/school -map Ysc shell cp -rv %s ~/Documents/school -map gst cd ~/Documents/school/sta -map tst tab_new ~/Documents/school/sta -map mst shell mv -v %s ~/Documents/school/sta -map Yst shell cp -rv %s ~/Documents/school/sta -map g2 cd ~/Documents/school/236 -map t2 tab_new ~/Documents/school/236 -map m2 shell mv -v %s ~/Documents/school/236 -map Y2 shell cp -rv %s ~/Documents/school/236 -map ga3 cd ~/Documents/school/latex-notes/236/a3 -map ta3 tab_new ~/Documents/school/latex-notes/236/a3 -map ma3 shell mv -v %s ~/Documents/school/latex-notes/236/a3 -map Ya3 shell cp -rv %s ~/Documents/school/latex-notes/236/a3 -map g3 cd ~/Documents/school/343 -map t3 tab_new ~/Documents/school/343 -map m3 shell mv -v %s ~/Documents/school/343 -map Y3 shell cp -rv %s ~/Documents/school/343 diff --git a/configs/ranger/tagged b/configs/ranger/tagged deleted file mode 100644 index e69de29..0000000 diff --git a/dotfiles/vimrc b/dotfiles/vimrc index b34dce6..22abb40 100644 --- a/dotfiles/vimrc +++ b/dotfiles/vimrc @@ -28,12 +28,18 @@ set timeoutlen=500 set hlsearch " }}} set x=y " +" commands for file types {{{ " + autocmd VimResized * wincmd = autocmd BufNewFile,BufRead .* set syntax=sh autocmd Filetype css,htmldjango,html,tex,txt,markdown set tabstop=2 shiftwidth=2 expandtab autocmd BufNewFile,BufRead *.md set filetype=markdown autocmd Filetype markdown set textwidth=0 +autocmd BufWritePost key_*.txt !bash ~/linux-config/shortcuts.sh + +" }}} commands for file types " + " vim-plug {{{ " " plug auto-install if empty(glob('~/.vim/autoload/plug.vim')) @@ -202,8 +208,10 @@ nnoremap rl q:i.s///g nnoremap rv :source $MYVIMRC " replace in entire file nnoremap R q:i%s///g2F/i +" sort lines +nnoremap s q:i.,.+sortFsi " set syntax to shell (for dotfiles) -nnoremap s :set syn=sh +nnoremap sh :set syn=sh " format current line nnoremap w Vgq " format this and next line diff --git a/dotfiles/zshrc b/dotfiles/zshrc index 2bdec54..00afc1d 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -2,8 +2,8 @@ # Path to your oh-my-zsh installation. export ZSH=/home/kevin/.oh-my-zsh - export EDITOR=/usr/bin/vim - export VISUAL=/usr/bin/vim + export EDITOR=/usr/bin/nvim + export VISUAL=/usr/bin/nvim # Set name of the theme to load. Optionally, if you set this to "random" # it'll load a random theme each time that oh-my-zsh is loaded. diff --git a/key_files.txt b/key_files.txt new file mode 100644 index 0000000..a853afa --- /dev/null +++ b/key_files.txt @@ -0,0 +1,24 @@ +# sys {{{ * + +kd ~/.key_directories +kf ~/.key_files +3 ~/.config/i3/config +3b ~/.config/i3blocks/i3blocks.conf +r ~/.config/ranger/rc.conf +u ~/.Xresources +v ~/.vimrc +z ~/linux-config/aliases/zsh_aliases +y ~/.zshrc + +# }}} sys * + +# cdn {{{ * + +hlg ~/coding/spotify-lib-vis/src/api/management/commands/update-history.log +jn ~/Documents/journal/todo/11.md +jnt ~/Documents/journal/todo/todo.md +tm ~/.vim/plugged/vim-snippets/UltiSnips/texmath.snippets +ig ./.gitignore + +# }}} cdn * + diff --git a/shortcuts.sh b/shortcuts.sh index f8e27c4..b3112f8 100755 --- a/shortcuts.sh +++ b/shortcuts.sh @@ -5,7 +5,7 @@ shellrc="$HOME/.zshrc" # Config locations folders="$HOME/linux-config/key_dirs.txt" -configs="$HOME/.key_files" +configs="$HOME/linux-config/key_files.txt" # Output locations shell_shortcuts="$HOME/.shortcuts" @@ -23,8 +23,8 @@ ensure "source $HOME/.config/ranger/shortcuts.conf" "$HOME/.config/ranger/rc.con # Format the `folders` file in the correct syntax and sent it to all three configs. sed "s/#.*$//;/^$/d" "$folders" | tee >(awk '{print $1"=\"f "$2"\" \\"}' >> "$shell_shortcuts") \ - | awk '{print "map g"$1" cd "$2"\nmap t"$1" tab_new "$2"\nmap m"$1" shell mv -v %s "$2"\nmap Y"$1" shell cp -rv %s "$2}' >> "$ranger_shortcuts" + | awk '{print "map f"$1" cd "$2"\nmap t"$1" tab_new "$2"\nmap m"$1" shell mv -v %s "$2"\nmap Y"$1" shell cp -rv %s "$2}' >> "$ranger_shortcuts" # Format the `configs` file in the correct syntax and sent it to both configs. -# sed "s/#.*$//;/^$/d" "$configs" | tee >(awk '{print $1"=\"$EDITOR "$2"\" \\"}' >> "$shell_shortcuts") \ - # | awk '{print "map "$1" shell $EDITOR "$2}' >> "$ranger_shortcuts" +sed "s/#.*$//;/^$/d" "$configs" | tee >(awk '{print "v"$1"=\"$EDITOR "$2"\" \\"}' >> "$shell_shortcuts") \ + | awk '{print "map v"$1" shell $EDITOR "$2}' >> "$ranger_shortcuts"