Browse Source

Fixed ranger bookmarking and opening last dir

red-hat-laptop
Kevin Mok 6 years ago
parent
commit
0248ff9b6e
Signed by: Kevin-Mok GPG Key ID: AEA75288DC135CF5
  1. 23
      aliases/zsh_aliases
  2. 2
      configs/i3/config
  3. 16
      configs/ranger/rc.conf
  4. 18
      dotfiles/.vimrc
  5. 6
      dotfiles/.zshrc
  6. 4
      scripts/change-sink
  7. 2
      txt/exlude-dirs-backup.txt
  8. 3
      txt/key_dirs.txt
  9. 1
      txt/key_files.txt
  10. 2
      txt/pacman-pkgs/nzxt-pkgs.txt

23
aliases/zsh_aliases

@ -46,6 +46,7 @@ function lzip() { unzip -l $1 | less; }
alias mkpk="makepkg -sri"
alias mkex="chmod 777"
alias ctl="systemctl"
alias ctle="systemctl enable"
alias ctls="systemctl start"
@ -70,15 +71,10 @@ shrm() {
# directory-related {{{ #
alias l='ls -a'
alias ll='ls -alFh'
# alias f="cd"
function f() { cd $1 && pwd > ~/.last_dir ; }
# function f() { cd $1 && pwd > ~/.last_dir && ls -a ; }
# restore last dir
if [ -f ~/.last_dir ]
# then cd `cat ~/.last_dir`
then f `cat ~/.last_dir`
fi
alias f="cd"
f `cat /home/kevin/.oh-my-zsh/cache/last-working-dir`
# alias w="cd $(cat /home/kevin/.oh-my-zsh/cache/last-working-dir)"
alias rmr="rm -rf"
alias mdp="mkdir -p"
@ -88,6 +84,7 @@ alias "f.."="f ..."
function mvd() { mv $1 ~/Downloads ; }
alias lhd="sudo fdisk -l"
alias ds="df -h | grep sd"
alias chownw="sudo chown -R kevin:wheel"
alias nbu="f /run/media/kevin/pc-backup/backups/nzxt && ll | grep gz"
# }}} directory-related #
@ -164,7 +161,7 @@ alias hc="htop -s PERCENT_CPU"
alias r="ranger"
alias mr="man ranger"
alias clc="cloc ."
function za() { nohup zathura $1 > /dev/null 2>&1& ; }
function z() { nohup zathura $1 > /dev/null 2>&1& ; }
function ev() { nohup evince $1 > /dev/null 2>&1& ; }
function chr() { google-chrome $1 ; }
alias ni="nvim"
@ -253,7 +250,7 @@ function gcm(){ echo git commit -m \""$1"\" ; }
function psgi() {
git add .
git commit -m '.'
git commit -m -S '.'
git push
}
alias gps="git push"
@ -333,12 +330,12 @@ alias sva="f $spv_dir/src/api"
alias svg="f $spv_dir/src/graphs"
alias svscs="f $spv_dir/src/static/scss"
alias svcss="f $spv_dir/src/spotifyvis/static/scss"
# source ~/coding/spotify-lib-vis/src/api-keys.sh
# source "$spv_dir""/src/api-keys.sh"
source /home/kevin/coding/spotify-lib-vis/src/api-keys.sh
function ssv() {
source ../bin/activate
python manage.py runserver
}
alias sssv="sv && ssv"
alias spvdb="psql -d spotifyvis -U django"
function mig() {
python manage.py makemigrations

2
configs/i3/config

@ -240,7 +240,7 @@ bindsym Mod4+s workspace $ws10; exec spotify
set $ws11 "11 "
# assign [class="Summoners War Exporter"] $ws11
workspace $ws11 output $samsung
bindsym $mod+F11 workspace $ws8; exec $def_term
bindsym $mod+F11 workspace $ws11; exec $def_term
set $ws12 "12 "
bindsym $mod+F12 workspace $ws12; exec $def_term

16
configs/ranger/rc.conf

@ -418,8 +418,8 @@ map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
# Searching
map gr console search%space
map / fzf_select
map / console search%space
map gr fzf_select
map n search_next
map N search_next forward=False
map ct search_next order=tag
@ -493,11 +493,11 @@ copymap zf zz
# Bookmarks
map `<any> enter_bookmark %any
map '<any> enter_bookmark %any
map m<any> set_bookmark %any
map um<any> unset_bookmark %any
map b<any> set_bookmark %any
map ub<any> unset_bookmark %any
map m<bg> draw_bookmarks
copymap m<bg> um<bg> `<bg> '<bg>
# map m<bg> draw_bookmarks
# copymap m<bg> um<bg> `<bg> '<bg>
# Generate all the chmod bindings with some python help:
eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
@ -674,8 +674,8 @@ map rr source ~/.config/ranger/rc.conf
# backgrounds
map w shell /usr/bin/wal -i %f
map md shell mv %f dim
map mb shell mv %f vibrant
map bgd shell mv %f dim
map bgb shell mv %f vibrant
# bulk rename
map cw eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ")

18
dotfiles/.vimrc

@ -71,13 +71,13 @@ Plug 'vim-scripts/L9'
" Gotham color scheme
" Plug 'whatyouhide/vim-gotham'
" collection of Vim color schemes
Plug 'flazz/vim-colorschemes'
" " collection of Vim color schemes
" Plug 'flazz/vim-colorschemes'
" preview Vim color scheme easily within Vim
Plug 'xolox/vim-colorscheme-switcher'
" prerequisite for above plugin
Plug 'xolox/vim-misc'
" " preview Vim color scheme easily within Vim
" Plug 'xolox/vim-colorscheme-switcher'
" " prerequisite for above plugin
" Plug 'xolox/vim-misc'
" automatically save buffers upon returning to normal mode
Plug '907th/vim-auto-save'
@ -224,10 +224,10 @@ nnoremap <leader>plc :PlugClean<CR>
nnoremap <leader>plu :PlugUpdate<CR>
" don't break lines
nnoremap <leader>py :set tw=0<CR>
" replace in next x lines
nnoremap <leader>r q:i.,.+s///g<ESC>Fsi
" reload file
nnoremap <leader>rf :e<CR>
nnoremap <leader>r :e<CR>
" replace in next x lines
nnoremap <leader>re q:i.,.+s///g<ESC>Fsi
" replace in line
nnoremap <leader>rl q:i.s///g<left><left><left>
" replace in visual selection

6
dotfiles/.zshrc

@ -103,6 +103,9 @@ source ~/linux-config/aliases/zsh_aliases
# ZSH_THEME="agnoster"
source $ZSH/custom/antigen.zsh
antigen bundle last-working-dir
antigen bundle pass
antigen bundle hlissner/zsh-autopair
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle softmoth/zsh-vim-mode
@ -116,7 +119,7 @@ if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
fi
# pywal
export PATH="${PATH}:${HOME}/.local/bin/:${HOME}/linux-config/scripts"
export PATH="${PATH}:${HOME}/.local/bin/:${HOME}/linux-config/scripts:/opt/pycharm-2018.3.1/bin"
(cat ~/.cache/wal/sequences &)
source ~/.cache/wal/colors.sh
@ -160,6 +163,7 @@ fi
# # }}} autoreload zsh aliases #
source /home/kevin/.shortcuts
source /home/kevin/coding/spotify-lib-vis/src/api-keys.sh
# export pywal colors
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

4
scripts/change-sink

@ -2,8 +2,8 @@
#Device name variable
if [ "$1" = "dac" ]; then
# devicename="alsa_output.usb-1852_DigiHug_USB_Audio-01.analog-stereo"
devicename="alsa_output.usb-FiiO_DigiHug_USB_Audio-01.analog-stereo"
devicename="alsa_output.usb-1852_DigiHug_USB_Audio-01.analog-stereo"
# devicename="alsa_output.usb-FiiO_DigiHug_USB_Audio-01.analog-stereo"
elif [ "$1" = "line-out" ]; then
devicename="alsa_output.pci-0000_00_14.2.analog-stereo"
fi

2
txt/exlude-dirs-backup.txt

@ -1,4 +1,4 @@
/home/kevin/.cache/spotify/Storage
/home/kevin/.cache
/lost+found
/mnt
/proc

3
txt/key_dirs.txt

@ -16,8 +16,9 @@ p /home/kevin/.password-store
# cdn {{{ *
cn /home/kevin/coding
j /home/kevin/Documents/journal
ib /home/kevin/linux-config/configs/i3blocks-scripts
j /home/kevin/Documents/journal
lh /home/kevin/Documents/listening-history
ra /home/kevin/linux-config/configs/ranger
snp /home/kevin/.vim/plugged/vim-snippets/UltiSnips
sv /home/kevin/coding/spotify-lib-vis/src

1
txt/key_files.txt

@ -20,6 +20,7 @@ z /home/kevin/linux-config/aliases/zsh_aliases
hlg /home/kevin/coding/spotify-lib-vis/src/api/management/commands/update-history.log
jn /home/kevin/Documents/journal/todo/12.md
jt /home/kevin/Documents/journal/todo/todo.md
lh /home/kevin/Documents/listening-history/polarbier.csv
no ./.gitignore
ne /home/kevin/linux-config/configs/neofetch/config.conf
tm /home/kevin/.vim/plugged/vim-snippets/UltiSnips/texmath.snippets

2
txt/pacman-pkgs/nzxt-pkgs.txt

@ -79,6 +79,7 @@ pacman
pass
patch
pciutils
pcmanfm
pdfgrep
perl
pipes.sh
@ -189,4 +190,5 @@ xorg-xwud
zathura
zathura-pdf-poppler
zbar
zip
zsh
Loading…
Cancel
Save