Browse Source

Auto-clicker/xviewer aliases, LaTeX setup changes

LaTeX:
- pdlb: compile bibliography
- use vimtex to preview LaTeX because live-preview plugin wasn't working
  with bibliography
red-hat-laptop
Kevin Mok 6 years ago
parent
commit
92a20f389e
  1. 13
      aliases/zsh_aliases
  2. 11
      configs/NZXT/i3/config
  3. 2
      configs/NZXT/ranger/rc.conf
  4. 2
      dotfiles/Xresources
  5. 13
      dotfiles/vimrc

13
aliases/zsh_aliases

@ -58,6 +58,7 @@ alias "f."="f .."
alias "f.2"="f ..."
alias fd="f ~/Downloads"
alias fds="f ~/Downloads/sch"
alias doc="f ~/Documents"
alias cfg="f ~/.config"
@ -104,13 +105,21 @@ alias tm="ni $usnp_dir/texmath.snippets"
# applications {{{ #
alias rg="ranger"
# okular
function ok() { nohup okular $1 > /dev/null 2>&1& ; }
# xviewer
function xv() { nohup xviewer $1 > /dev/null 2>&1& ; }
function chr() { google-chrome $1 ; }
function ni() { nvim $1 ; }
function sni() { sudo nvim $1 ; }
alias nisw="f ~/.local/share/nvim/swap"
# function mrk() { pandoc -o ${1%.*}.html $1 && chr ${1%.*}.html ; }
function mrk() { pandoc -o ${1%.*}.html $1 ; }
function auc() { xdotool click --repeat 1000000 --delay $1 1 ; }
alias auc1="xdotool click --repeat 1000000 --delay 1 1"
alias auc3="xdotool click --repeat 1000000 --delay 300 1"
alias auc5="xdotool click --repeat 1000000 --delay 500 1"
alias kauc="pkill -f xdotool"
alias vbn="cvlc --loop --alsa-gain 1 ~/Music/brown-noise.mp3"
alias vlm="alsamixer -c 2"
@ -300,6 +309,7 @@ alias gchpc="git cherry-pick --continue"
function gremotes() {
git remote set-url --add --push origin $1
git remote set-url --add --push origin $2
git remote -v
}
# gmrgr: merge repos {{{ #
@ -355,6 +365,7 @@ alias rml="rm *.aux *.log *.pdf"
# LaTeX {{{ #
function pdl() { pdflatex $1 ; }
function pdlb() { pdflatex $1 && biber $1 && pdflatex $1 ; }
function cptp() {
cp *template.tex cp-template.tex
chmod 600 cp-template.tex
@ -381,7 +392,7 @@ cd_209="f ~/Documents/School/209";
alias 209="$cd_209"
alias 9r="$cd_209/mokkar"
alias 9l="$cd_209/mokkar/lab10"
alias 9a="$cd_209/mokkar/a3"
alias 9a="$cd_209/mokkar/a4"
# }}}
alias ll="ls -la"

11
configs/NZXT/i3/config

@ -15,10 +15,14 @@ set $sch_dir "$HOME/Documents/School"
# app shortcuts {{{ #
bindsym Mod4+a exec studio
bindsym Mod4+1 exec xdotool click --repeat 5 --delay 100 1
bindsym Mod4+2 exec xdotool click --repeat 10 --delay 100 1
bindsym Mod4+3 exec xdotool click --repeat 20 --delay 100 1
# bindsym $mod+control+Return exec i3-sensible-terminal
bindsym $mod+control+Return exec $def_term
bindsym Mod4+c exec google-chrome
bindsym Mod4+e exec nemo
bindsym Mod4+f exec firefox
bindsym Mod4+o exec okular
bindsym Mod4+m exec okular $sch_dir/calc-textbook.pdf
bindsym Mod4+p exec pycharm
@ -157,6 +161,7 @@ bindsym $mod+F9 workspace $ws9; exec $def_term
set $ws10 "10 "
assign [class="VirtualBox"] $ws10
workspace $ws10 output $samsung
bindsym Mod4+s workspace $ws10; exec spotify
set $ws11 "11 "
@ -226,10 +231,8 @@ for_window [class="^.*"] border pixel 2
gaps inner 25
gaps outer 5
# increase/decrease gaps
bindsym control+shift+plus gaps inner all plus 2;gaps outer all plus 2
# bindsym control+shift+plus gaps inner all plus 2
bindsym control+shift+0 gaps inner all minus 2;gaps outer all minus 2
bindsym control+shift+plus gaps inner all set 25;gaps outer all set 5
bindsym control+shift+0 gaps inner all set 0;gaps outer all set 0
# }}} gaps #
# status bar {{{ #

2
configs/NZXT/ranger/rc.conf

@ -44,7 +44,7 @@ set confirm_on_delete multiple
# Use non-default path for file preview script?
# ranger ships with scope.sh, a script that calls external programs (see
# README.md for dependencies) to preview images, archives, etc.
#set preview_script ~/.config/ranger/scope.sh
set preview_script ~/.config/ranger/scope.sh
# Use the external preview script or display simple plain text or image previews?
set use_preview_script true

2
dotfiles/Xresources

@ -1,5 +1,5 @@
! URxvt.font: xft:hack:size=14
URxvt.font: xft:hack:size=13
URxvt.font: xft:hack:size=12
URxvt*inheritPixmap: true
URxvt*transparent: true

13
dotfiles/vimrc

@ -1,5 +1,5 @@
" set x=y {{{ "
set relativenumber
au BufWinEnter * set relativenumber
" set background=dark
set background=light
" set t_Co=256
@ -57,10 +57,13 @@ Plug '907th/vim-auto-save'
let g:auto_save = 1
" compile LaTeX PDF while writing the file
Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
" Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
" provides various functionality for writing LaTeX in Vim
Plug 'lervag/vimtex'
au BufWritePost *.tex silent call Tex_RunLaTeX()
au BufWritePost *.tex silent !pkill -USR1 xdvi.bin
let g:vimtex_view_general_viewer = 'okular'
" auto-completion for various languages
Plug 'Valloric/YouCompleteMe'
@ -122,7 +125,8 @@ map <F4> :wqa<CR>
map <F5> :qa!<CR>
map <F6> :make -C ~/Documents/resume cv<CR>
map <F7> :AutoSaveToggle<CR>
map <F9> :LLPStartPreview<CR>
" map <F9> :LLPStartPreview<CR>
map <F9> :VimtexCompile<CR>:VimtexView<CR>
nnoremap <F10> :set paste<CR>"+p:set nopaste<CR>
" }}} function keys "
@ -220,6 +224,9 @@ autocmd Filetype tex inoremap <localleader>w \wedge
autocmd Filetype tex inoremap <localleader>x $x$-axis
autocmd Filetype tex inoremap <localleader>y $y$-axis
autocmd Filetype tex inoremap <localleader>Z \mathbb{Z}
" par3
autocmd Filetype tex inoremap <localleader>wx $w(x)$
autocmd Filetype tex inoremap <localleader>tx $t(x)$
" }}} tex "
" }}} Local Mappings "
Loading…
Cancel
Save