From 99500a6993520b94fa1fd866e175f39d089e146a Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Mon, 21 May 2018 20:45:36 -0400 Subject: [PATCH] Spotify project aliases, set spacing for web files --- aliases/zsh_aliases | 74 +++++++++++++++++++++++++++--------------- configs/nzxt-ubuntu | 1 + configs/nzxt/i3/config | 5 +-- dotfiles/vimrc | 22 ++++++------- dotfiles/zshrc | 2 -- 5 files changed, 62 insertions(+), 42 deletions(-) create mode 120000 configs/nzxt-ubuntu diff --git a/aliases/zsh_aliases b/aliases/zsh_aliases index 78dca84..d95c66a 100644 --- a/aliases/zsh_aliases +++ b/aliases/zsh_aliases @@ -81,6 +81,31 @@ alias reb="sudo shutdown -r 0" alias lo="i3-msg exit" # }}} power options # +# rotate monitor {{{ # +function rt() { + output="HDMI-0" + if [ "$1" = "s" ] + # if [ "${1:0:1}" = "s" ] + then + output="DVI-I-1" + fi + + dir="normal" + if [ "$2" = "r" ] + # if [ "${1:1:2}" = "r" ] + then + dir="right" + fi + if [ "$2" = "l" ] + then + dir="left" + fi + + # echo "xrandr --output \"$output\" --rotate \"$dir\"" + xrandr --output "$output" --rotate "$dir" +} +# }}} rotate monitor # + function apti() { sudo apt install $1 ; } function aptr() { sudo apt remove $1 ; } # }}} system # @@ -152,31 +177,6 @@ function py() { python $1 ; } # NZXT {{{ if [ "$(hostname)" = "nzxt" ]; then - # rotate monitor {{{ # - function rt() { - output="HDMI-0" - if [ "$1" = "s" ] - # if [ "${1:0:1}" = "s" ] - then - output="DVI-I-1" - fi - - dir="normal" - if [ "$2" = "r" ] - # if [ "${1:1:2}" = "r" ] - then - dir="right" - fi - if [ "$2" = "l" ] - then - dir="left" - fi - - # echo "xrandr --output \"$output\" --rotate \"$dir\"" - xrandr --output "$output" --rotate "$dir" - } - # }}} rotate monitor # - # audio {{{ # # was for transferring sink inputs between DAC and speakers but not # necessary if not using @@ -249,11 +249,17 @@ elif [[ "$(hostname)" = "X1-Carbon" ]]; then elif [ "$(hostname)" = "nzxt-ubuntu" ]; then # Stardew Valley {{{ - alias sdv="f ~/Documents/sdv-save" + sdv_save_dir=~/Documents/sdv-save + alias sdv="f $sdv_save_dir" + alias smp="~/Downloads/sdv/smapi/install\ on\ Linux.sh" + alias imc="sdv && source import-save.sh coop" + function ucf() { f ~/Documents/StardewMods/UncaughtFish ; } function svmd() { f ~/.local/share/Steam/steamapps/common/Stardew\ Valley/Mods ; } function svm() { mv $1 ~/.local/share/Steam/steamapps/common/Stardew\ Valley/Mods ; } # }}} +alias gx="ni ~/Documents/csgo-config/autoexec.cfg" + fi # }}} @@ -358,7 +364,7 @@ function grmb() { git push -d origin $1 && git branch -D $1 ; } # }}} git # # coding projs {{{ # -coding_dir="~/Documents/coding" +coding_dir="~/coding" cd_coding_dir="f $coding_dir" alias cdn="$cd_coding_dir" @@ -370,6 +376,7 @@ alias vli="ni $ideas_dir/general/ideas.md" alias fyn="f $ideas_dir/yes-no" alias ans="f /usr/local/android-studio/bin && ./studio.sh" + # trapbot {{{ # alias tb="$cd_coding_dir/trapbot" alias vtb="$cd_coding_dir/trapbot && ni scan_reddit.py" @@ -377,6 +384,19 @@ alias tb="$cd_coding_dir/trapbot" alias rtb="$cd_coding_dir/trapbot && python scan_reddit.py" # }}} trapbot # +# spotify-lib-vis {{{ # + +spv_dir="$coding_dir""/spotify-lib-vis" +alias spv="f $spv_dir/src/spotifyvis" +alias spvd="f $spv_dir/src" +function sspv() { + source api-keys.sh + source ../bin/activate + python manage.py runserver +} + +# }}} spotify-lib-vis # + # }}} coding projs # # school {{{ # diff --git a/configs/nzxt-ubuntu b/configs/nzxt-ubuntu new file mode 120000 index 0000000..9a50384 --- /dev/null +++ b/configs/nzxt-ubuntu @@ -0,0 +1 @@ +/home/kevin/linux-config/configs/nzxt \ No newline at end of file diff --git a/configs/nzxt/i3/config b/configs/nzxt/i3/config index cdc36b2..34488f1 100644 --- a/configs/nzxt/i3/config +++ b/configs/nzxt/i3/config @@ -7,9 +7,10 @@ set $browser "firefox" set $def_term "urxvt" exec redshift -O 4000 # random bg -exec wal -i "$HOME/Pictures/Backgrounds/dim" +exec wal -i "$HOME/Pictures/bg/mountains.jpg" # exec_always ~/.local/bin/wal -i "$HOME/Pictures/Backgrounds/retro-mountains-pink.jpg" exec imwheel +exec --no-startup-id start-pulseaudio-x11 # exec --no-startup-id i3-msg 'workspace 1 ; exec $def_term' exec --no-startup-id i3-msg 'workspace 2 ; exec $def_term' exec --no-startup-id i3-msg 'workspace 3 ; exec $browser' @@ -253,7 +254,7 @@ bar { bar { output $samsung - status_command i3blocks -c ~/.config/sam-i3blocks/sam-i3blocks.conf + # status_command i3blocks -c ~/.config/sam-i3blocks/sam-i3blocks.conf tray_output none font pango:$sb_font 22 # font pango:monospace 22, FontAwesome 22 diff --git a/dotfiles/vimrc b/dotfiles/vimrc index 5047639..6b31343 100644 --- a/dotfiles/vimrc +++ b/dotfiles/vimrc @@ -66,25 +66,25 @@ Plug 'lervag/vimtex' let g:vimtex_view_general_viewer = 'okular' " auto-completion for various languages -" Plug 'Valloric/YouCompleteMe' +Plug 'Valloric/YouCompleteMe' " wrote short bits of text that expand into whatever you want " demo: https://www.youtube.com/watch?v=Zik6u0klD40 -" Plug 'SirVer/ultisnips' +Plug 'SirVer/ultisnips' " better key bindings for UltiSnipsExpandTrigger - " let g:UltiSnipsExpandTrigger = "" - " let g:UltiSnipsJumpForwardTrigger = "" - " let g:UltiSnipsJumpBackwardTrigger = "" + let g:UltiSnipsExpandTrigger = "" + let g:UltiSnipsJumpForwardTrigger = "" + let g:UltiSnipsJumpBackwardTrigger = "" " custom snippets -" Plug 'Kevin-Mok/vim-snippets' +Plug 'Kevin-Mok/vim-snippets' " to make YouCompleteMe work with UltiSnips (both use Tab) -" Plug 'ervandew/supertab' +Plug 'ervandew/supertab' " make YCM compatible with UltiSnips (using supertab) - " let g:ycm_key_list_select_completion = ['', ''] - " let g:ycm_key_list_previous_completion = ['', ''] - " let g:SuperTabDefaultCompletionType = '' + let g:ycm_key_list_select_completion = ['', ''] + let g:ycm_key_list_previous_completion = ['', ''] + let g:SuperTabDefaultCompletionType = '' " easily comment/uncomment lines Plug 'scrooloose/nerdcommenter' @@ -200,7 +200,7 @@ nnoremap Y "+Y " Local Mappings {{{ " let maplocalleader="-" autocmd Filetype c inoremap s struct pixel -autocmd Filetype tex set tabstop=2 shiftwidth=2 expandtab +autocmd Filetype css,html,tex set tabstop=2 shiftwidth=2 expandtab " tex {{{ " autocmd Filetype tex inoremap D \Delta diff --git a/dotfiles/zshrc b/dotfiles/zshrc index 884d94a..bc85d17 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -109,6 +109,4 @@ then xinput disable "ELAN Touchscreen" # enable horizontal scrolling synclient HorizTwoFingerScroll=1 -else - xmodmap ~/.Xmodmap fi