From 90d957e0ecb659347e56d36794fb451125db5d9e Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Fri, 29 Jun 2018 21:21:56 -0400 Subject: [PATCH] Updated aliases for spv --- aliases/zsh_aliases | 20 +++++++++++++++----- configs/i3/config | 24 +++++++++++++----------- dotfiles/Xresources | 2 +- dotfiles/gitconfig | 5 +++++ dotfiles/vimrc | 8 ++++++-- 5 files changed, 40 insertions(+), 19 deletions(-) diff --git a/aliases/zsh_aliases b/aliases/zsh_aliases index 0397350..fdf55e3 100644 --- a/aliases/zsh_aliases +++ b/aliases/zsh_aliases @@ -43,6 +43,9 @@ function cpd() { cp -avr $1 $2 ; } # extract tar archive function untar() { tar -xzvf $1 && rm $1; } function runzip() { unzip $1 && rm $1; } + +function mkex() { chmod 777 $1 ; } + # }}} command line related # # directory-related {{{ # @@ -153,6 +156,7 @@ function auc() { xdotool click --repeat 1000000 --delay $1 1 ; } alias vbn="cvlc --loop --alsa-gain 1 ~/Music/brown-noise.mp3" alias vlm="alsamixer -c 0" +alias vlmh="alsamixer -c 3" alias rmsw="rm .sw*" # function rs(){ redshift -O $(echo "scale=2;$1*1000" | bc) ; } @@ -180,6 +184,7 @@ alias gac="git add -A . && git commit" alias gd="git diff -w" alias gdc="git diff --cached" alias gds="git diff --stat" +alias gdt="git difftool --tool=vimdiff" alias gl="git log" alias gsl="git shortlog" # }}} diff/log # @@ -294,10 +299,12 @@ alias tb="$cd_coding_dir/trapbot" # spotify-lib-vis {{{ # spv_dir="$coding_dir""/spotify-lib-vis" -alias spv="f $spv_dir/src/spotifyvis" -alias spvd="f $spv_dir/src" -alias spvt="f $spv_dir/src/spotifyvis/templates/spotifyvis" -function sspv() { +alias sv="f $spv_dir/src" +alias svl="f $spv_dir/src/login" +alias sva="f $spv_dir/src/api" +alias svg="f $spv_dir/src/graphs" +alias ft="f templates" +function ssv() { source api-keys.sh source ../bin/activate python manage.py runserver @@ -305,8 +312,11 @@ function sspv() { alias spvdb="psql -d spotifyvis -U django" function mig() { python manage.py makemigrations - python manage.py migrate + python manage.py migrate --run-syncdb + ssv } +alias cldb="python manage.py flush --no-input" +alias djs="python manage.py shell" # }}} spotify-lib-vis # diff --git a/configs/i3/config b/configs/i3/config index 7d32a34..b157dff 100644 --- a/configs/i3/config +++ b/configs/i3/config @@ -178,7 +178,9 @@ bindsym $mod+F11 workspace $ws11; exec $def_term set $ws12 "12 " bindsym $mod+F12 workspace $ws12; exec $def_term -set $ws13 "13" +set $ws13 "13 🕮" +bindsym Mod4+F3 workspace $ws13; exec $def_term + set $ws14 "14" set $ws15 "15" @@ -199,11 +201,11 @@ bindsym $mod+7 workspace $ws7 bindsym $mod+8 workspace $ws8 bindsym $mod+9 workspace $ws9 bindsym $mod+0 workspace $ws10 -bindsym Mod4+F1 workspace $ws11 -bindsym Mod4+F2 workspace $ws12 -bindsym Mod4+F3 workspace $ws13 -bindsym Mod4+F4 workspace $ws14 -bindsym Mod4+F5 workspace $ws15 +bindsym Mod4+1 workspace $ws11 +bindsym Mod4+2 workspace $ws12 +bindsym Mod4+3 workspace $ws13 +bindsym Mod4+4 workspace $ws14 +bindsym Mod4+5 workspace $ws15 # }}} ws bindings # # move container to ws {{{ # @@ -219,11 +221,11 @@ bindsym $mod+control+7 move container to workspace $ws7; workspace $ws7 bindsym $mod+control+8 move container to workspace $ws8; workspace $ws8 bindsym $mod+control+9 move container to workspace $ws9; workspace $ws9 bindsym $mod+control+0 move container to workspace $ws10; workspace $ws10 -bindsym $mod+Shift+1 move container to workspace $ws11 -bindsym $mod+Shift+2 move container to workspace $ws12 -bindsym $mod+Shift+3 move container to workspace $ws13 -bindsym $mod+Shift+4 move container to workspace $ws14 -bindsym $mod+Shift+5 move container to workspace $ws15 +bindsym $mod+Shift+1 move container to workspace $ws11; workspace $ws11 +bindsym $mod+Shift+2 move container to workspace $ws12; workspace $ws12 +bindsym $mod+Shift+3 move container to workspace $ws13; workspace $ws13 +bindsym $mod+Shift+4 move container to workspace $ws14; workspace $ws14 +bindsym $mod+Shift+5 move container to workspace $ws15; workspace $ws15 # }}} move container to ws # # }}} workspace # diff --git a/dotfiles/Xresources b/dotfiles/Xresources index 17db9f9..4711a3f 100644 --- a/dotfiles/Xresources +++ b/dotfiles/Xresources @@ -1,5 +1,5 @@ ! URxvt.font: xft:hack:size=14 -URxvt.font: xft:hack:size=12 +URxvt.font: xft:hack:size=13 URxvt*inheritPixmap: true URxvt*transparent: true diff --git a/dotfiles/gitconfig b/dotfiles/gitconfig index 2b49133..3d250c8 100644 --- a/dotfiles/gitconfig +++ b/dotfiles/gitconfig @@ -7,3 +7,8 @@ editor = nvim [push] default = simple +[merge] + tool = vimdiff + conflictstyle = diff3 +[mergetool] + prompt = false diff --git a/dotfiles/vimrc b/dotfiles/vimrc index 7c13144..2691c0e 100644 --- a/dotfiles/vimrc +++ b/dotfiles/vimrc @@ -25,6 +25,9 @@ set hlsearch autocmd VimResized * wincmd = autocmd BufNewFile,BufRead .* set syntax=sh +autocmd Filetype css,html,tex,txt set tabstop=2 shiftwidth=2 expandtab +autocmd BufNewFile,BufRead *.md set filetype=markdown +autocmd Filetype markdown set textwidth=0 " vim-plug {{{ " " plug auto-install @@ -156,7 +159,7 @@ nnoremap DA "+ggdG " reload file nnoremap e :e " find merge conflicts -nnoremap fc /[<>=]\{7\} +nnoremap fc /[<>=\|]\{7\} " reload folds nnoremap ff :set foldmethod=marker zM " toggle search highlighting @@ -204,7 +207,6 @@ nnoremap Y "+Y " Local Mappings {{{ " let maplocalleader="-" autocmd Filetype c inoremap s struct pixel -autocmd Filetype css,html,tex set tabstop=2 shiftwidth=2 expandtab " tex {{{ " autocmd Filetype tex inoremap D \Delta @@ -233,4 +235,6 @@ autocmd Filetype tex inoremap wx $w(x)$ autocmd Filetype tex inoremap tx $t(x)$ " }}} tex " +autocmd Filetype md inoremap x 0f[lRX + " }}} Local Mappings "