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"
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"
mkgb "sudo grub-mkconfig -o /boot/grub/grub.cfg"
@ -53,7 +55,7 @@ fz "fzf"
fnd "find . -type f -name"
rmr "rm -rf"
mdp "mkdir -p"
md "mkdir -p"
rsy "rsync -Pr"
# list all (un)mounted drives
@ -101,9 +103,13 @@ tri "trizen -S --noedit"
# }}} pacman #
py "python"
pipi "sudo pip install"
# internet
pgo "ping -c 3 8.8.8.8"
dh "sudo dhcpcd"
kdh "sudo killall dhcpcd"
rdh "sudo killall dhcpcd && sudo dhcpcd"
id "identify"
@ -125,7 +131,7 @@ pipes "pipes.sh -t 3"
chr "google-chrome"
# h "htop -s PERCENT_MEM"
# hc "htop -s PERCENT_CPU"
hc "htop -s PERCENT_CPU"
r "ranger"
mra "man ranger"
clc "cloc ."
@ -137,6 +143,8 @@ sxa "sxiv -a"
wg "wego"
wp "grep wallpaper ~/.cache/wal/colors.sh"
kd "killall Discord && killall Discord"
# rsl "java -jar ~/Downloads/RuneLite.jar"
# swex "sudo nohup ~/Downloads/swex.appimage $silent"
@ -172,11 +180,12 @@ w "watson"
wa "watson start"
we "watson edit"
wl "watson log --day"
wlw "watson log"
# wlm "watson log --project coding --tag mfs"
wr "watson report"
ws "watson stop"
wse "watson stop && watson edit"
wsl "watson stop && watson log"
wsl "watson stop && watson log --day"
wt "watson status"
# }}} watson #
@ -261,7 +270,7 @@ crm "mrk README.md"
gcho "git checkout"
gchon "git checkout -b"
gf "git fetch"
gf "git fetch origin"
gcln "git clone"
gchp "git cherry-pick"
@ -325,19 +334,21 @@ tcl "tex-clean"
# mfs
mfs "nvim /home/kevin/coding/best-mf-site-personal/index.html"
hps "python3 -m http.server"
ht "python3 -m http.server"
# j "jekyll"
# js "jekyll serve"
h "hugo"
he "hugo serve -D --disableFastRender"
ss "ssh kevin@192.168.0.100"
ssb "ssh-bandit"
# }}} coding projs #
# school {{{ #
# 369
# 369 {{{ #
# a2
m "printf '\033c' && bear make"
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"
# 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 #

1
fish/.config/fish/config.fish

@ -36,6 +36,7 @@ set -x PASSWORD_STORE_CLIP_TIME 120
# fxn abbr's
abbr ag "grep-aliases"
abbr bq "benq-brightness"
abbr ev "evince-silent"
# 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 xset r rate 200 70
exec xrdb ~/.Xresources
exec --no-startup-id dunst
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 $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+u exec echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard
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 xmodmap ~/.Xmodmap && xset r rate 200 70
bindsym Mod4+z exec cliqz
@ -236,7 +238,7 @@ set $ws7 "7 "
# set $ws7 "7 📤"
workspace $ws7 output $samsung
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 📊"
@ -255,7 +257,7 @@ assign [class="spotify"] $ws10
workspace $ws10 output $samsung
set $hp 2
# 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+s workspace $ws10; exec spotify

5
i3blocks/.config/i3blocks/i3blocks.conf

@ -20,6 +20,11 @@ color=#cbe4ff
# interval=30
# # color=#acc0cd
[volume]
interval=once
signal=1
interval=10
[calendar]
interval=30
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 zr shell unzip %f && rm %f
map e. open_with evince f
map v. shell $EDITOR %f
# map gr fzf_select

5
txt/key_dirs.txt

@ -14,7 +14,7 @@ me /run/media/kevin
o /
p /home/kevin/.password-store
P /home/kevin/Pictures
t /tmp
tm /tmp
# }}} sys *
@ -42,7 +42,8 @@ wo /home/kevin/Documents/workout-logs/11
# sch {{{ *
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
6 /home/kevin/school/369
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
# }}} 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=350
set hlsearch
set noswapfile
" set noswapfile
" let maplocalleader="-"
let maplocalleader="\\"
" }}} set x=y "
@ -40,15 +40,11 @@ autocmd VimResized * wincmd =
autocmd BufNewFile,BufRead .* set syntax=sh
filetype plugin 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 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 Filetype markdown set textwidth=0
" autocmd Filetype html set foldmarker=0
autocmd BufWritePost key_* !sync-shortcuts
autocmd VimLeave *.tex !tex-clean %
" " auto-reload vimrc {{{ "
@ -62,6 +58,19 @@ autocmd VimLeave *.tex !tex-clean %
" }}} 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 {{{ "
" plug auto-install
if empty(glob('~/.vim/autoload/plug.vim'))
@ -124,6 +133,11 @@ Plug 'SirVer/ultisnips'
let g:UltiSnipsExpandTrigger = "<tab>"
let g:UltiSnipsJumpForwardTrigger = "<tab>"
let g:UltiSnipsJumpBackwardTrigger = "<C-tab>"
let g:ultisnips_javascript = {
\ 'keyword-spacing': 'always',
\ 'semi': 'never',
\ 'space-before-function-paren': 'never',
\ }
" custom snippets
Plug 'Kevin-Mok/vim-snippets'
@ -176,6 +190,7 @@ Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'terryma/vim-multiple-cursors'
" let g:multi_cursor_select_all_word_key='<C-a>'
Plug 'dag/vim-fish'
Plug 'shime/vim-livedown'
call plug#end()
@ -187,10 +202,12 @@ colorscheme wal
" Mappings {{{ "
" 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 <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 <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 <F5> :q!<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>
nnoremap <F10> :set paste<CR>"+p:set nopaste<CR>
map <F11> :LivedownPreview<CR>
" }}} function keys "
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
" sort lines until end of file
vnoremap <leader>s :sort<CR>
nnoremap <leader>sc :set spell spelllang=en_us<CR>
" run current file in shell
nnoremap <leader>sh :!%:p<CR>
nnoremap <leader>sh :!%:p
" sort lines until end of file
nnoremap <leader>so q:i.,$sort<CR>
" sort lines
@ -302,12 +321,6 @@ nnoremap <leader>z za
" 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 {{{ "
autocmd Filetype tex inoremap <localleader>bt \bowtie
@ -346,4 +359,10 @@ autocmd Filetype tex inoremap <localleader>tx $t(x)$
" }}} 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 "

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

Loading…
Cancel
Save