Browse Source

Aliases: find/grep (recursive), Python, Markdown

- Vim: refresh file, format 2 lines
- i3: ksnapshot
red-hat-laptop
Kevin Mok 7 years ago
parent
commit
8fffcacdf6
  1. 6
      aliases/.bash_aliases
  2. 1
      aliases/.git_aliases
  3. 11
      aliases/.pc_aliases
  4. 8
      configs/NZXT/i3.conf
  5. 5
      dotfiles/vimrc

6
aliases/.bash_aliases

@ -31,6 +31,10 @@ alias cfg="d ~/.config"
# }}} # # }}} #
ok() { okular $1 ; } ok() { okular $1 ; }
rfnd() { find . -name "$1" ; }
rgrp() { grep -r $1 * ; }
p3() { python3 $1 ; }
py() { python $1 ; }
# Config {{{ # # Config {{{ #
alias lc="d ~/linux-config/" alias lc="d ~/linux-config/"
@ -47,7 +51,7 @@ alias r=". ~/.bashrc"
# redshift # redshift
rs(){ redshift -O $(($1 * 1000)) ; } rs(){ redshift -O $(($1 * 1000)) ; }
alias rx="redshift -x" alias rx="redshift -x"
pand() { pandoc -o ${1%.*}.html $1 && google-chrome ${1%.*}.html ; }
mrk() { pandoc -o ${1%.*}.html $1 && chr ${1%.*}.html ; }
# UltiSnips {{{ # # UltiSnips {{{ #
usnp_dir="~/.vim/plugged/vim-snippets/UltiSnips" usnp_dir="~/.vim/plugged/vim-snippets/UltiSnips"

1
aliases/.git_aliases

@ -19,6 +19,7 @@ alias gst="git stash"
alias gstp="git stash pop" alias gstp="git stash pop"
alias gclear="git stash clear" alias gclear="git stash clear"
alias egc="vim -c \"set syn=gitcommit\" -c \"set tw=72\" commit-msg.txt" alias egc="vim -c \"set syn=gitcommit\" -c \"set tw=72\" commit-msg.txt"
alias gchom="git checkout master"
# Aliases }}} # Aliases }}}
# Functions {{{ # Functions {{{

11
aliases/.pc_aliases

@ -60,10 +60,15 @@ if [ "$(hostname)" == "NZXT" ]; then
alias rcg="$cd_coding_dir/random-color-generator" alias rcg="$cd_coding_dir/random-color-generator"
alias dcr="$cd_coding_dir/dcr-logger" alias dcr="$cd_coding_dir/dcr-logger"
alias pf="$cd_coding_dir/ParsaFood" alias pf="$cd_coding_dir/ParsaFood"
alias tpb="$cd_coding_dir/trapbot"
alias tb="$cd_coding_dir/trapbot"
alias vtb="$cd_coding_dir/trapbot && vi trapbot.py"
alias ptb="python trapbot.py" alias ptb="python trapbot.py"
alias ptbo="python trapbot.py > output.py && vi output.py"
alias tbof="python trapbot-local.py"
alias ptbo="python trapbot.py > output.py"
alias sb="$cd_coding_dir/swbot"
# alias psb="p3 create_skills_dict.py"
# alias psbo="p3 create_skills_dict.py > output.py"
alias psb="p3 create_monster_dict.py"
alias psbo="p3 create_monster_dict.py > output.py"
# xset r rate 200 75 # xset r rate 200 75
# xmodmap -e "clear Lock" # xmodmap -e "clear Lock"

8
configs/NZXT/i3.conf

@ -1,7 +1,7 @@
# applications {{{ # # applications {{{ #
# startup {{{ # # startup {{{ #
exec redshift -O 4000 exec redshift -O 4000
exec_always feh --bg-scale ~/Pictures/Backgrounds/samurai-astronaut.jpg
exec_always feh --bg-center ~/Pictures/Backgrounds/samurai-astronaut.jpg
exec imwheel exec imwheel
exec --no-startup-id i3-msg 'workspace 1 ; exec terminator' exec --no-startup-id i3-msg 'workspace 1 ; exec terminator'
exec --no-startup-id i3-msg 'workspace 3 ; exec google-chrome' exec --no-startup-id i3-msg 'workspace 3 ; exec google-chrome'
@ -20,6 +20,7 @@ bindsym Mod4+o exec okular
bindsym Mod4+m exec okular $sch_dir/calc-textbook.pdf bindsym Mod4+m exec okular $sch_dir/calc-textbook.pdf
bindsym Mod4+p exec pycharm bindsym Mod4+p exec pycharm
bindsym Mod4+s exec spotify bindsym Mod4+s exec spotify
bindsym Print exec ksnapshot
# redshift {{{ # # redshift {{{ #
bindsym $mod+Mod4+1 exec redshift -O 1500 bindsym $mod+Mod4+1 exec redshift -O 1500
@ -127,6 +128,7 @@ assign [class="jetbrains-"] $ws8
set $ws9 "9 " set $ws9 "9 "
set $ws10 "10 " set $ws10 "10 "
assign [class="VirtualBox"] $ws10 assign [class="VirtualBox"] $ws10
assign [class="Spotify"] $ws10
set $ws11 "11 " set $ws11 "11 "
workspace $ws11 output $benq workspace $ws11 output $benq
# }}} ws names # # }}} ws names #
@ -197,14 +199,14 @@ bindsym $mod+control+l resize grow width 10 px or 10 ppt
set $sb_font Hack Bold set $sb_font Hack Bold
bar { bar {
font pango:$sb_font 17 font pango:$sb_font 17
tray_output $benq
tray_output none
status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
output HDMI-0 output HDMI-0
} }
bar { bar {
output $samsung output $samsung
tray_output $benq
tray_output none
font pango:$sb_font 22 font pango:$sb_font 22
} }
# }}} status bar # # }}} status bar #

5
dotfiles/vimrc

@ -20,6 +20,7 @@ set linespace=5
set cursorcolumn set cursorcolumn
set cursorline set cursorline
set timeoutlen=300 set timeoutlen=300
set hlsearch
" }}} set x=y " " }}} set x=y "
autocmd VimResized * wincmd = autocmd VimResized * wincmd =
@ -91,7 +92,7 @@ nnoremap <C-g> <C-W>_
nnoremap <C-w> <C-W>| nnoremap <C-w> <C-W>|
let mapleader="\<Space>" let mapleader="\<Space>"
nnoremap <leader>e o<ESC>
nnoremap <leader>e :e<CR>
nnoremap <leader>ff :set foldmethod=marker<CR> zM nnoremap <leader>ff :set foldmethod=marker<CR> zM
nnoremap <leader>h :set hlsearch! hlsearch?<CR> nnoremap <leader>h :set hlsearch! hlsearch?<CR>
nnoremap <leader>he :help nnoremap <leader>he :help
@ -101,12 +102,14 @@ nnoremap <leader>nw :set nowrap<CR>
nnoremap <leader>pli :PlugInstall<CR> nnoremap <leader>pli :PlugInstall<CR>
nnoremap <leader>plc :PlugClean<CR> nnoremap <leader>plc :PlugClean<CR>
nnoremap <leader>plu :PlugUpdate<CR> nnoremap <leader>plu :PlugUpdate<CR>
nnoremap <leader>py :set tw=200<CR>
nnoremap <leader>r q:i.,.+s///g<ESC>Fsi nnoremap <leader>r q:i.,.+s///g<ESC>Fsi
nnoremap <leader>rl q:i.s///g<left><left><left> nnoremap <leader>rl q:i.s///g<left><left><left>
nnoremap <leader>rv :source $MYVIMRC<CR> 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
nnoremap <leader>s :set syn=sh<CR> nnoremap <leader>s :set syn=sh<CR>
nnoremap <leader>w Vgq nnoremap <leader>w Vgq
nnoremap <leader>ww Vjgq
nnoremap <leader>z za nnoremap <leader>z za
" }}} Mappings " " }}} Mappings "

Loading…
Cancel
Save