Browse Source

309 proj. settings, Watson status notification

- nvidia screen tearing cmd
- restore vim swap
red-hat-laptop
Kevin Mok 6 years ago
parent
commit
3fc23d00bd
Signed by: Kevin-Mok GPG Key ID: AEA75288DC135CF5
  1. 28
      aliases/key_aliases
  2. 1
      fish/.config/fish/config.fish
  3. 3
      fish/.config/fish/functions/benq-brightness.fish
  4. 3
      fish/.config/fish/functions/ssh-bandit.fish
  5. 6
      i3/.config/i3/config
  6. 5
      i3blocks/.config/i3blocks/i3blocks.conf
  7. 1
      ranger/.config/ranger/rc.conf
  8. 5
      txt/key_dirs.txt
  9. 9
      txt/key_files.txt
  10. 49
      vim/.vimrc
  11. 0
      zathura/.config/zathura/zathurarc-o

28
aliases/key_aliases

@ -11,6 +11,8 @@ ru "xrdb ~/.Xresources"
dum "sudo du -d 1 -B M" dum "sudo du -d 1 -B M"
tl "tldr" tl "tldr"
nvt "nvidia-settings --assign CurrentMetaMode='DVI-I-1: nvidia-auto-select +0+0 {ForceCompositionPipeline=On}, HDMI-0: nvidia-auto-select +3840+0 {ForceCompositionPipeline=On}'"
vgb "sni /etc/default/grub" vgb "sni /etc/default/grub"
mkgb "sudo grub-mkconfig -o /boot/grub/grub.cfg" mkgb "sudo grub-mkconfig -o /boot/grub/grub.cfg"
@ -53,7 +55,7 @@ fz "fzf"
fnd "find . -type f -name" fnd "find . -type f -name"
rmr "rm -rf" rmr "rm -rf"
mdp "mkdir -p"
md "mkdir -p"
rsy "rsync -Pr" rsy "rsync -Pr"
# list all (un)mounted drives # list all (un)mounted drives
@ -101,9 +103,13 @@ tri "trizen -S --noedit"
# }}} pacman # # }}} pacman #
py "python"
pipi "sudo pip install"
# internet # internet
pgo "ping -c 3 8.8.8.8" pgo "ping -c 3 8.8.8.8"
dh "sudo dhcpcd" dh "sudo dhcpcd"
kdh "sudo killall dhcpcd"
rdh "sudo killall dhcpcd && sudo dhcpcd" rdh "sudo killall dhcpcd && sudo dhcpcd"
id "identify" id "identify"
@ -125,7 +131,7 @@ pipes "pipes.sh -t 3"
chr "google-chrome" chr "google-chrome"
# h "htop -s PERCENT_MEM" # h "htop -s PERCENT_MEM"
# hc "htop -s PERCENT_CPU"
hc "htop -s PERCENT_CPU"
r "ranger" r "ranger"
mra "man ranger" mra "man ranger"
clc "cloc ." clc "cloc ."
@ -137,6 +143,8 @@ sxa "sxiv -a"
wg "wego" wg "wego"
wp "grep wallpaper ~/.cache/wal/colors.sh" wp "grep wallpaper ~/.cache/wal/colors.sh"
kd "killall Discord && killall Discord"
# rsl "java -jar ~/Downloads/RuneLite.jar" # rsl "java -jar ~/Downloads/RuneLite.jar"
# swex "sudo nohup ~/Downloads/swex.appimage $silent" # swex "sudo nohup ~/Downloads/swex.appimage $silent"
@ -172,11 +180,12 @@ w "watson"
wa "watson start" wa "watson start"
we "watson edit" we "watson edit"
wl "watson log --day" wl "watson log --day"
wlw "watson log"
# wlm "watson log --project coding --tag mfs" # wlm "watson log --project coding --tag mfs"
wr "watson report" wr "watson report"
ws "watson stop" ws "watson stop"
wse "watson stop && watson edit" wse "watson stop && watson edit"
wsl "watson stop && watson log"
wsl "watson stop && watson log --day"
wt "watson status" wt "watson status"
# }}} watson # # }}} watson #
@ -261,7 +270,7 @@ crm "mrk README.md"
gcho "git checkout" gcho "git checkout"
gchon "git checkout -b" gchon "git checkout -b"
gf "git fetch"
gf "git fetch origin"
gcln "git clone" gcln "git clone"
gchp "git cherry-pick" gchp "git cherry-pick"
@ -325,19 +334,21 @@ tcl "tex-clean"
# mfs # mfs
mfs "nvim /home/kevin/coding/best-mf-site-personal/index.html" mfs "nvim /home/kevin/coding/best-mf-site-personal/index.html"
hps "python3 -m http.server"
ht "python3 -m http.server"
# j "jekyll" # j "jekyll"
# js "jekyll serve" # js "jekyll serve"
h "hugo" h "hugo"
he "hugo serve -D --disableFastRender" he "hugo serve -D --disableFastRender"
ss "ssh kevin@192.168.0.100" ss "ssh kevin@192.168.0.100"
ssb "ssh-bandit"
# }}} coding projs # # }}} coding projs #
# school {{{ # # school {{{ #
# 369
# 369 {{{ #
# a2 # a2
m "printf '\033c' && bear make" m "printf '\033c' && bear make"
mc "bear make clean" mc "bear make clean"
@ -355,4 +366,9 @@ hl "valgrind --tool=helgrind ./carsim light 10 20"
# cpi "scp interceptor.c kevin@192.168.0.17:/home/kevin/a1" # cpi "scp interceptor.c kevin@192.168.0.17:/home/kevin/a1"
# cpti "gcc -m32 -o test_intercept test_intercept.c && scp test_intercept k@192.168.0.17:/home/k/a1" # cpti "gcc -m32 -o test_intercept test_intercept.c && scp test_intercept k@192.168.0.17:/home/k/a1"
# }}} 369 #
# 309
0ht "cd ~/school/309-proj && python3 -m http.server"
# }}} school # # }}} school #

1
fish/.config/fish/config.fish

@ -36,6 +36,7 @@ set -x PASSWORD_STORE_CLIP_TIME 120
# fxn abbr's # fxn abbr's
abbr ag "grep-aliases" abbr ag "grep-aliases"
abbr bq "benq-brightness"
abbr ev "evince-silent" abbr ev "evince-silent"
# git {{{ # # git {{{ #

3
fish/.config/fish/functions/benq-brightness.fish

@ -0,0 +1,3 @@
function benq-brightness
xrandr --output HDMI-0 --gamma 1:0.8:0 --brightness (math $argv[1] / 100)
end

3
fish/.config/fish/functions/ssh-bandit.fish

@ -0,0 +1,3 @@
function ssh-bandit
sshpass -f p/$argv[1] ssh -p 2220 bandit$argv[1]@bandit.labs.overthewire.org
end

6
i3/.config/i3/config

@ -12,6 +12,7 @@ exec imwheel
exec xmodmap ~/.Xmodmap exec xmodmap ~/.Xmodmap
exec xset r rate 200 70 exec xset r rate 200 70
exec xrdb ~/.Xresources exec xrdb ~/.Xresources
exec --no-startup-id dunst
exec --no-startup-id start-pulseaudio-x11 exec --no-startup-id start-pulseaudio-x11
exec --no-startup-id i3-msg 'workspace $ws2; exec $def_term' exec --no-startup-id i3-msg 'workspace $ws2; exec $def_term'
exec --no-startup-id i3-msg 'workspace $ws3; exec $browser' exec --no-startup-id i3-msg 'workspace $ws3; exec $browser'
@ -50,6 +51,7 @@ bindsym control+$mod+s exec systemctl suspend
bindsym Mod4+t exec xclip -selection clipboard ~/.password-store/social/trapbot bindsym Mod4+t exec xclip -selection clipboard ~/.password-store/social/trapbot
bindsym Mod4+u exec echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard bindsym Mod4+u exec echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard
bindsym Mod4+$mod+u exec pass -c uoft/acorn bindsym Mod4+$mod+u exec pass -c uoft/acorn
bindsym Mod4+w exec notify-send "watson status" "$(watson status)"
# bindsym Mod4+x exec $swex # bindsym Mod4+x exec $swex
bindsym Mod4+x exec xmodmap ~/.Xmodmap && xset r rate 200 70 bindsym Mod4+x exec xmodmap ~/.Xmodmap && xset r rate 200 70
bindsym Mod4+z exec cliqz bindsym Mod4+z exec cliqz
@ -236,7 +238,7 @@ set $ws7 "7 "
# set $ws7 "7 📤" # set $ws7 "7 📤"
workspace $ws7 output $samsung workspace $ws7 output $samsung
bindsym $mod+F7 workspace $ws7; exec $def_term bindsym $mod+F7 workspace $ws7; exec $def_term
bindsym Mod4+v workspace $ws7; exec VBoxManage startvm "369-a1"
# bindsym Mod4+v workspace $ws7; exec VBoxManage startvm "369-a1"
set $ws8 "8 " set $ws8 "8 "
# set $ws8 "8 📊" # set $ws8 "8 📊"
@ -255,7 +257,7 @@ assign [class="spotify"] $ws10
workspace $ws10 output $samsung workspace $ws10 output $samsung
set $hp 2 set $hp 2
# bindsym Mod4+v workspace $ws10; exec urxvt -e alsamixer -c 0 # bindsym Mod4+v workspace $ws10; exec urxvt -e alsamixer -c 0
# bindsym Mod4+v workspace $ws10; exec urxvt -e cava
bindsym Mod4+v workspace $ws10; exec urxvt -e cava
# bindsym Mod4+h workspace $ws10; exec urxvt -e alsamixer -c $hp # bindsym Mod4+h workspace $ws10; exec urxvt -e alsamixer -c $hp
bindsym Mod4+s workspace $ws10; exec spotify bindsym Mod4+s workspace $ws10; exec spotify

5
i3blocks/.config/i3blocks/i3blocks.conf

@ -20,6 +20,11 @@ color=#cbe4ff
# interval=30 # interval=30
# # color=#acc0cd # # color=#acc0cd
[volume]
interval=once
signal=1
interval=10
[calendar] [calendar]
interval=30 interval=30
label= label=

1
ranger/.config/ranger/rc.conf

@ -687,6 +687,7 @@ map cw eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.
map zu shell unzip %f map zu shell unzip %f
map zr shell unzip %f && rm %f map zr shell unzip %f && rm %f
map e. open_with evince f
map v. shell $EDITOR %f map v. shell $EDITOR %f
# map gr fzf_select # map gr fzf_select

5
txt/key_dirs.txt

@ -14,7 +14,7 @@ me /run/media/kevin
o / o /
p /home/kevin/.password-store p /home/kevin/.password-store
P /home/kevin/Pictures P /home/kevin/Pictures
t /tmp
tm /tmp
# }}} sys * # }}} sys *
@ -42,7 +42,8 @@ wo /home/kevin/Documents/workout-logs/11
# sch {{{ * # sch {{{ *
sc /home/kevin/school sc /home/kevin/school
0 /home/kevin/school/309
0d /home/kevin/school/309
0p /home/kevin/school/309-proj
e2 /home/kevin/school/309/e2 e2 /home/kevin/school/309/e2
6 /home/kevin/school/369 6 /home/kevin/school/369
a2 /home/kevin/school/369/a2/a2 a2 /home/kevin/school/369/a2/a2

9
txt/key_files.txt

@ -35,3 +35,12 @@ tm /home/kevin/.vim/plugged/vim-snippets/UltiSnips/texmath.snippets
wt /home/kevin/.config/watson/state.tmp wt /home/kevin/.config/watson/state.tmp
# }}} cdn * # }}} cdn *
# sch {{{ *
0c /home/kevin/school/309-proj/main.scss
0h /home/kevin/school/309-proj/index.html
0j /home/kevin/school/309-proj/main.js
0k /home/kevin/school/309-proj/txt/kevin.md
# }}} sch *

49
vim/.vimrc

@ -29,7 +29,7 @@ set linespace=5
" set timeoutlen=500 " set timeoutlen=500
set timeoutlen=350 set timeoutlen=350
set hlsearch set hlsearch
set noswapfile
" set noswapfile
" let maplocalleader="-" " let maplocalleader="-"
let maplocalleader="\\" let maplocalleader="\\"
" }}} set x=y " " }}} set x=y "
@ -40,15 +40,11 @@ autocmd VimResized * wincmd =
autocmd BufNewFile,BufRead .* set syntax=sh autocmd BufNewFile,BufRead .* set syntax=sh
filetype plugin on filetype plugin on
filetype indent on filetype indent on
autocmd FileType *css,htmldjango,html,tex,markdown,yaml set tabstop=2 shiftwidth=2 expandtab
autocmd FileType *css,htmldjango,html,javascript,markdown,tex,yaml set tabstop=2 shiftwidth=2 expandtab
autocmd BufNewFile,BufRead *.txt set tabstop=2 shiftwidth=2 expandtab autocmd BufNewFile,BufRead *.txt set tabstop=2 shiftwidth=2 expandtab
autocmd BufNewFile,BufRead watson*.fish set tabstop=2 shiftwidth=2 expandtab
autocmd BufRead commit-msg.txt set filetype=gitcommit tw=72
autocmd BufNewFile,BufRead *.md set filetype=markdown autocmd BufNewFile,BufRead *.md set filetype=markdown
autocmd Filetype markdown set textwidth=0 autocmd Filetype markdown set textwidth=0
" autocmd Filetype html set foldmarker=0 " autocmd Filetype html set foldmarker=0
autocmd BufWritePost key_* !sync-shortcuts
autocmd VimLeave *.tex !tex-clean % autocmd VimLeave *.tex !tex-clean %
" " auto-reload vimrc {{{ " " " auto-reload vimrc {{{ "
@ -62,6 +58,19 @@ autocmd VimLeave *.tex !tex-clean %
" }}} commands for file types " " }}} commands for file types "
" commands for specific files {{{ "
autocmd BufNewFile,BufRead watson*.fish set tabstop=2 shiftwidth=2 expandtab
autocmd BufRead commit-msg.txt set filetype=gitcommit tw=72
autocmd BufWritePost key_* !sync-shortcuts
autocmd BufNewFile,BufRead main.scss map <F1> :silent !sass main.scss main.css<CR>
" map <leader><F2> :autocmd BufWritePost main.scss silent !sass main.scss main.css<CR>
autocmd BufNewFile,BufRead main.scss map <F2> :autocmd BufWritePost main.scss silent !sass main.scss main.css<CR>
autocmd BufNewFile,BufRead main.scss map <F3> :autocmd! BufWritePost main.scss<CR>
" }}} commands for specific files "
" vim-plug {{{ " " vim-plug {{{ "
" plug auto-install " plug auto-install
if empty(glob('~/.vim/autoload/plug.vim')) if empty(glob('~/.vim/autoload/plug.vim'))
@ -124,6 +133,11 @@ Plug 'SirVer/ultisnips'
let g:UltiSnipsExpandTrigger = "<tab>" let g:UltiSnipsExpandTrigger = "<tab>"
let g:UltiSnipsJumpForwardTrigger = "<tab>" let g:UltiSnipsJumpForwardTrigger = "<tab>"
let g:UltiSnipsJumpBackwardTrigger = "<C-tab>" let g:UltiSnipsJumpBackwardTrigger = "<C-tab>"
let g:ultisnips_javascript = {
\ 'keyword-spacing': 'always',
\ 'semi': 'never',
\ 'space-before-function-paren': 'never',
\ }
" custom snippets " custom snippets
Plug 'Kevin-Mok/vim-snippets' Plug 'Kevin-Mok/vim-snippets'
@ -176,6 +190,7 @@ Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'terryma/vim-multiple-cursors' Plug 'terryma/vim-multiple-cursors'
" let g:multi_cursor_select_all_word_key='<C-a>' " let g:multi_cursor_select_all_word_key='<C-a>'
Plug 'dag/vim-fish' Plug 'dag/vim-fish'
Plug 'shime/vim-livedown'
call plug#end() call plug#end()
@ -187,10 +202,12 @@ colorscheme wal
" Mappings {{{ " " Mappings {{{ "
" function keys {{{ " " function keys {{{ "
" map <F1> silent !sass main.scss main.css<CR>
" " map <leader><F2> :autocmd BufWritePost main.scss silent !sass main.scss main.css<CR>
" map <C-F2> :autocmd BufWritePost main.scss silent !sass main.scss main.css<CR>
" map <F2> :autocmd! BufWritePost main.scss<CR>
" map <F1> :silent !scp %:p k@192.168.0.17:/home/k/a1<CR> " map <F1> :silent !scp %:p k@192.168.0.17:/home/k/a1<CR>
" map <F2> :silent !gcc -m32 -o test_full test_full.c && scp test_full k@192.168.0.17:/home/k/a1<CR>
" map <F2> :silent !scp -P 2222 e1.html e1_style.css kevin@127.0.0.1:/home/kevin/Downloads/e1<CR> " map <F2> :silent !scp -P 2222 e1.html e1_style.css kevin@127.0.0.1:/home/kevin/Downloads/e1<CR>
" map <F3> :silent !gcc -m32 -o test_intercept test_intercept.c && scp test_intercept k@192.168.0.17:/home/k/a1<CR>
map <F4> :xa<CR> map <F4> :xa<CR>
map <F5> :q!<CR> map <F5> :q!<CR>
" map <F6> :make -C ~/Documents/resume cv<CR> " map <F6> :make -C ~/Documents/resume cv<CR>
@ -199,6 +216,7 @@ map <F8> :!clear && shellcheck %<CR>
map <F9> :VimtexCompile<CR>:VimtexView<CR> map <F9> :VimtexCompile<CR>:VimtexView<CR>
" map <F9> :VimtexCompile<CR> " map <F9> :VimtexCompile<CR>
nnoremap <F10> :set paste<CR>"+p:set nopaste<CR> nnoremap <F10> :set paste<CR>"+p:set nopaste<CR>
map <F11> :LivedownPreview<CR>
" }}} function keys " " }}} function keys "
map <S-Enter> O<ESC> map <S-Enter> O<ESC>
@ -273,8 +291,9 @@ nnoremap <leader>rv :source $MYVIMRC<CR>
nnoremap <leader>R q:i%s///g<ESC>2F/i nnoremap <leader>R q:i%s///g<ESC>2F/i
" sort lines until end of file " sort lines until end of file
vnoremap <leader>s :sort<CR> vnoremap <leader>s :sort<CR>
nnoremap <leader>sc :set spell spelllang=en_us<CR>
" run current file in shell " run current file in shell
nnoremap <leader>sh :!%:p<CR>
nnoremap <leader>sh :!%:p
" sort lines until end of file " sort lines until end of file
nnoremap <leader>so q:i.,$sort<CR> nnoremap <leader>so q:i.,$sort<CR>
" sort lines " sort lines
@ -302,12 +321,6 @@ nnoremap <leader>z za
" Local Mappings {{{ " " Local Mappings {{{ "
autocmd Filetype fish inoremap <localleader>1 $argv[1]
autocmd Filetype fish inoremap <localleader>2 $argv[2]
autocmd Filetype markdown nnoremap <localleader>x 0f[lrx
" nnoremap <localleader>x 0f[lrx
" tex {{{ " " tex {{{ "
autocmd Filetype tex inoremap <localleader>bt \bowtie autocmd Filetype tex inoremap <localleader>bt \bowtie
@ -346,4 +359,10 @@ autocmd Filetype tex inoremap <localleader>tx $t(x)$
" }}} tex " " }}} tex "
autocmd Filetype fish inoremap <localleader>1 $argv[1]
autocmd Filetype fish inoremap <localleader>2 $argv[2]
autocmd Filetype markdown nnoremap <localleader>x 0f[lrx
" nnoremap <localleader>x 0f[lrx
" }}} Local Mappings " " }}} Local Mappings "

0
zathura/.config/zathura/zathurarc → zathura/.config/zathura/zathurarc-o

Loading…
Cancel
Save