From fda3907f9266ac1900e11589c174870abfdc7bb8 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Mon, 15 Apr 2019 00:05:48 -0400 Subject: [PATCH 1/4] Initial chezmoi commit --- .gitignore | 16 - aliases/zsh_aliases | 424 ------------------ aliases/zsh_aliases_functions | 108 ----- x/.Xmodmap => dot_Xmodmap | 0 x/.Xresources => dot_Xresources | 0 shell/.bashrc => dot_bashrc | 0 {i3/.config => dot_config}/i3/config | 0 .../i3blocks/i3blocks-display.conf | 0 .../i3blocks/i3blocks.conf | 0 .../i3blocks/sam-i3blocks.conf | 0 .../i3blocks/scripts/executable_backlight | 0 .../i3blocks/scripts/executable_battery | 0 .../i3blocks/scripts/executable_calendar | 0 .../i3blocks/scripts/executable_cpu_usage | 0 .../i3blocks/scripts/executable_load_average | 0 .../i3blocks/scripts/executable_memory | 0 .../i3blocks/scripts/executable_name | 0 .../i3blocks/scripts/executable_spotify | 0 .../i3blocks/scripts/executable_temperature | 0 .../i3blocks/scripts/executable_time | 0 .../i3blocks/scripts/executable_volume | 0 .../i3blocks/scripts/executable_wifi | 0 {mpv/.config => dot_config}/mpv/input.conf | 0 .../neofetch/config.conf | 0 .../private_fish}/completions/watson.fish | 0 .../private_fish}/config.fish | 0 .../private_functions}/369/a2/carsim.fish | 0 .../private_functions}/369/a2/gdb-a2.fish | 0 .../369/a3/gdb-a3-break.fish | 0 .../private_functions}/369/a3/run-a3.fish | 0 .../369/a4/block-to-line.fish | 0 .../369/a4/executable_revert-image.fish | 0 .../private_functions}/369/a4/hex.fish | 0 .../369/a4/mount-image.fish | 0 .../private_functions}/369/a4/run-a4.fish | 0 .../private_functions}/369/grep-c.fish | 0 .../private_functions}/369/grep-headers.fish | 0 .../private_functions}/369/rg-headers.fish | 0 .../private_functions}/369/rgc.fish | 0 .../private_functions}/benq-brightness.fish | 0 .../private_fish/private_functions}/cd.fish | 0 .../private_functions}/certbot-ssl.fish | 0 .../private_fish/private_functions}/copy.fish | 0 .../create-fish-function.fish | 0 .../private_functions}/evince-silent.fish | 0 .../private_functions}/find-vim-filetype.fish | 0 .../git/git-amend-push.fish | 0 .../git/git-delete-branch.fish | 0 .../git/git-diff-files.fish | 0 .../git/git-mult-remotes.fish | 0 .../git/git-push-multiple.fish | 0 .../private_functions}/grep-aliases.fish | 0 .../private_functions}/grep-pdf-file.fish | 0 .../private_functions}/grep-pdf.fish | 0 .../private_functions}/pastebin.fish | 0 .../private_functions}/redshift-set.fish | 0 .../private_functions}/scan-history.fish | 0 .../private_functions}/shred-rm.fish | 0 .../private_functions}/ssh-bandit.fish | 0 .../private_functions}/unix-timestamp.fish | 0 .../private_functions}/unzip-rm.fish | 0 .../private_fish/private_functions}/vsnp.fish | 0 .../private_functions}/wc-pdf.fish | 0 .../.config => dot_config}/ranger/commands.py | 0 .../ranger/executable_scope.sh | 0 dot_config/ranger/plugins/__init__.py | 1 + .../__pycache__/__init__.cpython-37.opt-1.pyc | Bin .../__pycache__/devicons.cpython-37.opt-1.pyc | Bin .../devicons_linemode.cpython-37.opt-1.pyc | Bin .../ranger/plugins/executable_devicons.py | 0 .../plugins/executable_devicons_linemode.py | 0 {ranger/.config => dot_config}/ranger/rc.conf | 2 +- .../.config => dot_config}/ranger/rifle.conf | 0 .../.config => dot_config}/zathura/zathurarc | 0 git/.gitconfig => dot_gitconfig | 0 input/.imwheelrc => dot_imwheelrc | 0 input/.inputrc => dot_inputrc | 0 vim/.nvim => dot_nvim | 0 vim/.vimrc => dot_vimrc | 2 +- x/.xinitrc => dot_xinitrc | 0 shell/.zshrc => dot_zshrc | 0 fish/.config/fish/conf.d/omf.fish | 7 - fish/.config/fish/conf.d/pure.fish | 1 - fish/.config/fish/functions/fish_prompt.fish | 1 - aliases/key_aliases => key_aliases | 4 + ranger/.config/ranger/plugins/__init__.py | 0 scripts/colors/{arch => executable_arch} | 0 scripts/colors/{blocks => executable_blocks} | 0 scripts/colors/{panes => executable_panes} | 0 scripts/colors/{rupees => executable_rupees} | 0 ...ace-invaders => executable_space-invaders} | 0 scripts/colors/{unowns => executable_unowns} | 0 scripts/{backup => executable_backup} | 0 scripts/{bg-chooser => executable_bg-chooser} | 0 .../{burn-iso.sh => executable_burn-iso.sh} | 0 .../{change-sink => executable_change-sink} | 0 ...kgs.sh => executable_install-arch-pkgs.sh} | 0 scripts/{passmenu => executable_passmenu} | 0 scripts/{qr-gif.sh => executable_qr-gif.sh} | 0 scripts/{rick-roll => executable_rick-roll} | 0 scripts/{shuffler => executable_shuffler} | 0 .../{sync-aliases => executable_sync-aliases} | 0 ...nc-shortcuts => executable_sync-shortcuts} | 0 scripts/{tex-clean => executable_tex-clean} | 0 stow.sh | 3 - txt/key_dirs.txt | 1 + 106 files changed, 8 insertions(+), 562 deletions(-) delete mode 100644 .gitignore delete mode 100644 aliases/zsh_aliases delete mode 100644 aliases/zsh_aliases_functions rename x/.Xmodmap => dot_Xmodmap (100%) rename x/.Xresources => dot_Xresources (100%) rename shell/.bashrc => dot_bashrc (100%) rename {i3/.config => dot_config}/i3/config (100%) rename {i3blocks/.config => dot_config}/i3blocks/i3blocks-display.conf (100%) rename {i3blocks/.config => dot_config}/i3blocks/i3blocks.conf (100%) rename {i3blocks/.config => dot_config}/i3blocks/sam-i3blocks.conf (100%) rename i3blocks/.config/i3blocks/scripts/backlight => dot_config/i3blocks/scripts/executable_backlight (100%) mode change 100755 => 100644 rename i3blocks/.config/i3blocks/scripts/battery => dot_config/i3blocks/scripts/executable_battery (100%) mode change 100755 => 100644 rename i3blocks/.config/i3blocks/scripts/calendar => dot_config/i3blocks/scripts/executable_calendar (100%) mode change 100755 => 100644 rename i3blocks/.config/i3blocks/scripts/cpu_usage => dot_config/i3blocks/scripts/executable_cpu_usage (100%) mode change 100755 => 100644 rename i3blocks/.config/i3blocks/scripts/load_average => dot_config/i3blocks/scripts/executable_load_average (100%) mode change 100755 => 100644 rename i3blocks/.config/i3blocks/scripts/memory => dot_config/i3blocks/scripts/executable_memory (100%) mode change 100755 => 100644 rename i3blocks/.config/i3blocks/scripts/name => dot_config/i3blocks/scripts/executable_name (100%) mode change 100755 => 100644 rename i3blocks/.config/i3blocks/scripts/spotify => dot_config/i3blocks/scripts/executable_spotify (100%) mode change 100755 => 100644 rename i3blocks/.config/i3blocks/scripts/temperature => dot_config/i3blocks/scripts/executable_temperature (100%) mode change 100755 => 100644 rename i3blocks/.config/i3blocks/scripts/time => dot_config/i3blocks/scripts/executable_time (100%) mode change 100755 => 100644 rename i3blocks/.config/i3blocks/scripts/volume => dot_config/i3blocks/scripts/executable_volume (100%) mode change 100755 => 100644 rename i3blocks/.config/i3blocks/scripts/wifi => dot_config/i3blocks/scripts/executable_wifi (100%) mode change 100755 => 100644 rename {mpv/.config => dot_config}/mpv/input.conf (100%) rename {neofetch/.config => dot_config}/neofetch/config.conf (100%) rename {fish/.config/fish => dot_config/private_fish}/completions/watson.fish (100%) rename {fish/.config/fish => dot_config/private_fish}/config.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/369/a2/carsim.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/369/a2/gdb-a2.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/369/a3/gdb-a3-break.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/369/a3/run-a3.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/369/a4/block-to-line.fish (100%) rename fish/.config/fish/functions/369/a4/revert-image.fish => dot_config/private_fish/private_functions/369/a4/executable_revert-image.fish (100%) mode change 100755 => 100644 rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/369/a4/hex.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/369/a4/mount-image.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/369/a4/run-a4.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/369/grep-c.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/369/grep-headers.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/369/rg-headers.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/369/rgc.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/benq-brightness.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/cd.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/certbot-ssl.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/copy.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/create-fish-function.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/evince-silent.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/find-vim-filetype.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/git/git-amend-push.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/git/git-delete-branch.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/git/git-diff-files.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/git/git-mult-remotes.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/git/git-push-multiple.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/grep-aliases.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/grep-pdf-file.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/grep-pdf.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/pastebin.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/redshift-set.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/scan-history.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/shred-rm.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/ssh-bandit.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/unix-timestamp.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/unzip-rm.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/vsnp.fish (100%) rename {fish/.config/fish/functions => dot_config/private_fish/private_functions}/wc-pdf.fish (100%) rename {ranger/.config => dot_config}/ranger/commands.py (100%) rename ranger/.config/ranger/scope.sh => dot_config/ranger/executable_scope.sh (100%) mode change 100755 => 100644 create mode 100644 dot_config/ranger/plugins/__init__.py rename {ranger/.config => dot_config}/ranger/plugins/__pycache__/__init__.cpython-37.opt-1.pyc (100%) rename {ranger/.config => dot_config}/ranger/plugins/__pycache__/devicons.cpython-37.opt-1.pyc (100%) rename {ranger/.config => dot_config}/ranger/plugins/__pycache__/devicons_linemode.cpython-37.opt-1.pyc (100%) rename ranger/.config/ranger/plugins/devicons.py => dot_config/ranger/plugins/executable_devicons.py (100%) mode change 100755 => 100644 rename ranger/.config/ranger/plugins/devicons_linemode.py => dot_config/ranger/plugins/executable_devicons_linemode.py (100%) mode change 100755 => 100644 rename {ranger/.config => dot_config}/ranger/rc.conf (99%) rename {ranger/.config => dot_config}/ranger/rifle.conf (100%) rename {zathura/.config => dot_config}/zathura/zathurarc (100%) rename git/.gitconfig => dot_gitconfig (100%) rename input/.imwheelrc => dot_imwheelrc (100%) rename input/.inputrc => dot_inputrc (100%) rename vim/.nvim => dot_nvim (100%) rename vim/.vimrc => dot_vimrc (99%) rename x/.xinitrc => dot_xinitrc (100%) rename shell/.zshrc => dot_zshrc (100%) delete mode 100644 fish/.config/fish/conf.d/omf.fish delete mode 120000 fish/.config/fish/conf.d/pure.fish delete mode 120000 fish/.config/fish/functions/fish_prompt.fish rename aliases/key_aliases => key_aliases (99%) delete mode 100644 ranger/.config/ranger/plugins/__init__.py rename scripts/colors/{arch => executable_arch} (100%) mode change 100755 => 100644 rename scripts/colors/{blocks => executable_blocks} (100%) mode change 100755 => 100644 rename scripts/colors/{panes => executable_panes} (100%) mode change 100755 => 100644 rename scripts/colors/{rupees => executable_rupees} (100%) mode change 100755 => 100644 rename scripts/colors/{space-invaders => executable_space-invaders} (100%) mode change 100755 => 100644 rename scripts/colors/{unowns => executable_unowns} (100%) mode change 100755 => 100644 rename scripts/{backup => executable_backup} (100%) mode change 100755 => 100644 rename scripts/{bg-chooser => executable_bg-chooser} (100%) mode change 100755 => 100644 rename scripts/{burn-iso.sh => executable_burn-iso.sh} (100%) mode change 100755 => 100644 rename scripts/{change-sink => executable_change-sink} (100%) mode change 100755 => 100644 rename scripts/{install-arch-pkgs.sh => executable_install-arch-pkgs.sh} (100%) mode change 100755 => 100644 rename scripts/{passmenu => executable_passmenu} (100%) mode change 100755 => 100644 rename scripts/{qr-gif.sh => executable_qr-gif.sh} (100%) mode change 100755 => 100644 rename scripts/{rick-roll => executable_rick-roll} (100%) mode change 100755 => 100644 rename scripts/{shuffler => executable_shuffler} (100%) mode change 100755 => 100644 rename scripts/{sync-aliases => executable_sync-aliases} (100%) mode change 100755 => 100644 rename scripts/{sync-shortcuts => executable_sync-shortcuts} (100%) mode change 100755 => 100644 rename scripts/{tex-clean => executable_tex-clean} (100%) mode change 100755 => 100644 delete mode 100755 stow.sh diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 077d19e..0000000 --- a/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -mpv/.config/mpv/watch_later/* - -*.html -*.sw* - -cp-* -commit-msg.txt -core -ideas.md -temp.sh - -# ranger -bookmarks -history -tagged -key_mappings.conf diff --git a/aliases/zsh_aliases b/aliases/zsh_aliases deleted file mode 100644 index c6d19a5..0000000 --- a/aliases/zsh_aliases +++ /dev/null @@ -1,424 +0,0 @@ -# system {{{ # - -# # vim mode {{{ # -# bindkey -v -# function zle-line-init zle-keymap-select { - # VIM_PROMPT="%{$fg_bold[yellow]%} [% NORMAL]% %{$reset_color%}" - # RPS1="${${KEYMAP/vicmd/$VIM_PROMPT}/(main|viins)/} $EPS1" - # zle reset-prompt -# } -# zle -N zle-line-init -# zle -N zle-keymap-select -# export KEYTIMEOUT=1 -# # }}} vim mode # - -# command line related {{{ # -# search history -bindkey '\e[A' history-beginning-search-backward -bindkey '\e[B' history-beginning-search-forward - -alias cs='printf "\033c"' -alias hst="history" -alias nf="cs && neofetch | lolcat" -# nf -alias ru="xrdb ~/.Xresources" -# list file sizes in megabytes with depth 1 -alias dum="sudo du -d 1 -B M" - -alias vgb="sni /etc/default/grub" -alias mkgb="sudo grub-mkconfig -o /boot/grub/grub.cfg" - -function cld() { colordiff -y --suppress-common-lines $1 $2 ; } -alias grep='grep --color=auto' -function gpdf() { - pdfgrep -n -e $1 $2 -} -# for finding files by name -export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -g ""' -# find text inside files -function rg() { grep -nr $1 ; } -function cpd() { cp -avr $1 $2 ; } -alias pk="pkill -f" - -# extract tar archive -function utar() { tar -xzvf $1 && rm $1; } -function rzip() { unzip $1 && rm $1; } -function lzip() { unzip -l $1 | less; } - -alias mkpk="makepkg -sri" -alias mkex="chmod 777" -alias ctl="systemctl" -alias ctle="systemctl enable" -alias ctld="systemctl disable" -alias ctls="systemctl start" - -alias wm="sudo wifi-menu" - -# mounting {{{ # - -alias udm="udisksctl mount -b" -alias udmb="udisksctl mount -b /dev/sdc2" -alias udu="udisksctl unmount -b" -alias udub="udisksctl unmount -b /dev/sdc2" - -# }}} mounting # - -alias tc="touch" -shrm() { - for file in "$@"; do - shred "$file" && rm "$file" - done -} - -# }}} command line related # - -# directory-related {{{ # -alias l='ls -a' -alias ll='ls -alFh' -alias smv="sudo mv" -alias f="cd" -alias fz="fzf" -alias fnd="find . -type f -name" -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" -alias rsy="rsync -Pr" - -alias "f."="f .." -alias "f.."="f ..." - -function mvd() { mv $1 ~/Downloads ; } -alias lhd="sudo fdisk -l" -alias ds="df -h | tee >(head -n 1) >(grep sd) >/dev/null" -alias chownw="sudo chown -R kevin:wheel" -alias chwnm="sudo chown -R kevin:wheel /run/media/kevin" -alias nbu="f /run/media/kevin/pc-backup/backups/nzxt && ll | grep gz" - -# }}} directory-related # - -# power options {{{ # - -alias s="systemctl suspend" -alias sd="sudo shutdown 0" -alias reb="sudo shutdown -r 0" -alias lo="i3-msg exit" -alias x="xmodmap ~/.Xmodmap && xset r rate 200 60" - -# }}} 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 # - -# sound -alias vlm="alsamixer -c 0" -alias vlh="alsamixer -c 2" - -# apt -# function apti() { sudo apt install $1 ; } -# function aptr() { sudo apt remove $1 ; } -# alias aptu="sudo apt upgrade" -alias pc="sudo pacman -S" -alias pcr="sudo pacman -Rs" -alias pcu="sudo pacman -Sy" -alias xpc="pacman -Qqe > ~/linux-config/txt/nzxt-pkgs.txt" -# alias tri="trizen -S --noconfirm" -alias tri="trizen -S" - -# internet -alias pg="ping -c 3 8.8.8.8" -alias dh="sudo dhcpcd" -alias rdh="sudo killall dhcpcd && sudo dhcpcd" - -alias id="identify" - -# }}} system # - -# config files {{{ # -function gz() { grep $1 ~/linux-config/aliases/zsh_aliases ; } -alias rz="source ~/linux-config/aliases/zsh_aliases" -alias lca="f ~/linux-config/aliases" - -# i3 -alias i3b="f ~/i3blocks" -alias pipes="pipes.sh -t 3" - -# UltiSnips {{{ # -urnp_dir="~/.vim/plugged/vim-snippets/UltiSnips" -function vsnp() { nvim ~/.vim/plugged/vim-snippets/UltiSnips/"$1".snippets ; } -# }}} # - -# }}} config files # - -# applications {{{ # -silent="> /dev/null 2>&1& " - -alias h="htop -s PERCENT_MEM" -alias hc="htop -s PERCENT_CPU" -alias r="ranger" -alias mr="man ranger" -alias clc="cloc ." -function z() { nohup zathura $1 > /dev/null 2>&1& ; } -function ev() { nohup evince $1 > /dev/null 2>&1& ; } -function chr() { google-chrome $1 ; } -alias n="nvim" -alias sni="sudo nvim" -alias fh="feh" -alias sx="sxiv" -function mrk() { pandoc -o ${1%.*}.html $1 ; } -alias wp="grep wallpaper ~/.cache/wal/colors.sh" - -# auto-clicker {{{ # - -function auc() { xdotool click --repeat 1000000 --delay $1 1 ; } -# alias auc1="xdotool click --repeat 1000000 --delay 1 1" -# alias auc3="xdotool click --repeat 1000000 --delay 300 1" -# alias auc5="xdotool click --repeat 1000000 --delay 500 1" -# alias kauc="pkill -f xdotool" - -# }}} auto-clicker # - -# alias rsl="java -jar ~/Downloads/RuneLite.jar" -alias swex="sudo nohup ~/Downloads/swex.appimage $silent" - -alias vbn="cvlc --loop --alsa-gain 1 ~/Music/brown-noise.mp3" -alias cv="cava" -alias rmsw="rm .sw*" - -function rs(){ redshift -P -O $(echo "scale=2;$1*1000" | bc) ; } -alias rx="redshift -x" - -alias gpe="gpg --encrypt --recipient" -alias gpd="gpg --decrypt" - -# pass {{{ # - -alias ps="pass" -alias psc="pass -c" -alias pse="pass edit" -alias psi="pass insert -m" -alias psg="pass generate -c" - -alias xclip="xclip -selection clipboard" -alias yh="echo 'kevin.mok@live.ca' | xclip -selection clipboard" -alias yg="xclip -selection clipboard ~/.password-store/social/gmail" -alias yt="xclip -selection clipboard ~/.password-store/social/trapbot" -alias yu="echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard" - -# }}} pass # - -function grpy() { grep $1 *.py ; } -alias p3="python3" -alias py="python" - -# watson -alias wt="watson" -alias wta="watson start" -alias wte="watson edit" -alias wtl="watson log" -alias wts="watson stop" -alias wtt="watson status" - -# }}} applications # - -# git {{{ # -# aliases {{{ -alias gstr="git config credential.helper store" -alias g="git" - -# add {{{ # -alias ga="git add -A . && gs" -alias gac="git add -A . && git commit -S" -alias gacu="git add -A . && git commit" -# }}} add # - -# diff/log {{{ # -alias gd="git diff -w" -function gde() { git diff --cached -- ':(exclude)'$1 ; } -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 # - -# update {{{ # - -alias gs="git status -u" -alias gchom="git checkout master" -alias gchnw="git checkout -b wip" -alias gchw="git checkout wip" -alias gheadm1="git reset --hard HEAD~1" -alias gls="git ls-tree -r HEAD --name-only" - -# push {{{ # -alias gst="git stash" -alias gstp="git stash pop" - -alias gc="git commit -S" -alias gcu="git commit" -alias gcam="ga && git commit --amend --no-edit -S" -alias gcamp="ga && git commit --amend --no-edit -S && gpsf" -# todo: fix -function gcm(){ echo git commit -m \""$1"\" ; } - -function psgi() { - git add . - git commit -m '.' -S - git push -} -alias gps="git push" -alias gpsi="git push --set-upstream origin master" -alias gpsf="git push --force" -alias gclear="git stash clear" -# }}} push # - -# pull {{{ # -alias gpl="git pull --rebase" -alias grbc="git rebase --continue" -# }}} pull # - -# }}} update # - -# edit {{{ # -alias vre="ni README.md" -alias crm="mrk README.md" -# }}} edit # - -# aliases }}} - -# functions {{{ -alias gcho="git checkout" -alias gchon="git checkout -b" -function gchof() { git checkout $1 $2 ; } - -alias gcln="git clone" -alias gchp="git cherry-pick" -alias gchpc="git cherry-pick --continue" - -# add multiple push repos -function gremotes() { - git remote set-url --add --push origin $1 - git remote set-url --add --push origin $2 - git remote -v -} - -# gmrgr: merge repos {{{ # -function gmrgr() { - # 1 = remote name, 2 = remote path - git remote add $1 $2 - git fetch $1 - # whichever branch you want to merge - git merge --allow-unrelated-histories $1/master - git remote remove $1 -} -# }}} merge repos # - -# assume file unchanged -alias gunc="git update-index --assume-unchanged" -# delete branch locally and on server -function grmb() { git push origin --delete $1 && git branch -D $1 ; } - -# functions }}} - -# }}} git # - -# coding projs {{{ # -coding_dir="~/coding" -alias cdn="$cd_coding_dir" - -alias gx="ni ~/Documents/csgo-config/autoexec.cfg" - -# trapbot {{{ # -alias tb="$cd_coding_dir/trapbot" - alias vtb="$cd_coding_dir/trapbot && ni scan_reddit.py" - alias ptb="python scan_reddit.py" - alias rtb="$cd_coding_dir/trapbot && python scan_reddit.py" -# }}} trapbot # - -# spotify-lib-vis {{{ # - -spv_dir="$coding_dir""/spotify-lib-vis" -alias svl="f $spv_dir/src/login" -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 /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 - python manage.py migrate --run-syncdb - ssv -} -alias cldb="python manage.py flush --no-input && ssv" -alias djs="python manage.py shell" -alias upip="pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U" -alias ureq="pip freeze > requirements.txt" - -# scan history -alias hlg="cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1" -alias crnl="grep \"(kevin) CMD\" /var/log/syslog | tail -n 1 && hlg" -alias hs="$spv_dir/src/update-history.sh && hlg" -# removes all but newest file -# alias rmol="ls -t | tail -n +2 | xargs rm -- && l" - -# }}} spotify-lib-vis # - -# # Stardew Valley {{{ - # 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 sc="shellcheck" -alias pdl="pdflatex" -alias tcl="tex-clean" - -alias mfs="nvim /home/kevin/coding/best-mf-site-personal/index.html" - -# }}} coding projs # - -# school {{{ # - -# 369 -alias vm6="VBoxHeadless --startvm 369-a1" -alias sa="ssh k@192.168.0.17" -alias cpi="scp interceptor.c kevin@192.168.0.17:/home/kevin/a1" -alias cpti="gcc -m32 -o test_intercept test_intercept.c && scp test_intercept k@192.168.0.17:/home/k/a1" -alias ma="make" -alias mc="make clean" - -# }}} school # diff --git a/aliases/zsh_aliases_functions b/aliases/zsh_aliases_functions deleted file mode 100644 index 5e70bb6..0000000 --- a/aliases/zsh_aliases_functions +++ /dev/null @@ -1,108 +0,0 @@ -alias "f."="f .." -alias "f.."="f ..." - -function cld() { colordiff -y --suppress-common-lines $1 $2 ; } -function gpdf() { - pdfgrep -n -e $1 $2 -} - -function cpd() { cp -avr $1 $2 ; } - -# extract tar archive -function utar() { tar -xzvf $1 && rm $1; } -function rzip() { unzip $1 && rm $1; } -function lzip() { unzip -l $1 | less; } -export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -g ""' -shrm() { - for file in "$@"; do - shred "$file" && rm "$file" - done -} -f `cat /home/kevin/.oh-my-zsh/cache/last-working-dir` -function mvd() { mv $1 ~/Downloads ; } - -# rewrite in dmenu if really need -# 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 gz() { grep $1 ~/linux-config/aliases/zsh_aliases ; } -function vsnp() { nvim ~/.vim/plugged/vim-snippets/UltiSnips/"$1".snippets ; } -silent="> /dev/null 2>&1& " -function z() { nohup zathura $1 > /dev/null 2>&1& ; } -function ev() { nohup evince $1 > /dev/null 2>&1& ; } -function mrk() { pandoc -o ${1%.*}.html $1 ; } - -# auto-clicker {{{ # - -function auc() { xdotool click --repeat 1000000 --delay $1 1 ; } -# auc1 "xdotool click --repeat 1000000 --delay 1 1" -# auc3 "xdotool click --repeat 1000000 --delay 300 1" -# auc5 "xdotool click --repeat 1000000 --delay 500 1" -# kauc "pkill -f xdotool" - -# }}} auto-clicker # - -function rs(){ redshift -P -O $(echo "scale=2;$1*1000" | bc) ; } -function grpy() { grep $1 *.py ; } - -# git {{{ # - -function gde() { git diff --cached -- ':(exclude)'$1 ; } -# todo: fix -function gcm(){ echo git commit -m \""$1"\" ; } -function gchof() { git checkout $1 $2 ; } - -# add multiple push repos -function gremotes() { - git remote set-url --add --push origin $1 - git remote set-url --add --push origin $2 - git remote -v -} - -# merge repos -function gmrgr() { - # 1 = remote name, 2 = remote path - git remote add $1 $2 - git fetch $1 - # whichever branch you want to merge - git merge --allow-unrelated-histories $1/master - git remote remove $1 -} -# delete branch locally and on server -function grmb() { git push origin --delete $1 && git branch -D $1 ; } - -# }}} git # - -# # Stardew Valley {{{ - # sdv_save_dir=~/Documents/sdv-save - # sdv "f $sdv_save_dir" - # smp "~/Downloads/sdv/smapi/install\ on\ Linux.sh" - # # 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 ; } -# # }}} - -source /home/kevin/coding/spotify-lib-vis/src/api-keys.sh diff --git a/x/.Xmodmap b/dot_Xmodmap similarity index 100% rename from x/.Xmodmap rename to dot_Xmodmap diff --git a/x/.Xresources b/dot_Xresources similarity index 100% rename from x/.Xresources rename to dot_Xresources diff --git a/shell/.bashrc b/dot_bashrc similarity index 100% rename from shell/.bashrc rename to dot_bashrc diff --git a/i3/.config/i3/config b/dot_config/i3/config similarity index 100% rename from i3/.config/i3/config rename to dot_config/i3/config diff --git a/i3blocks/.config/i3blocks/i3blocks-display.conf b/dot_config/i3blocks/i3blocks-display.conf similarity index 100% rename from i3blocks/.config/i3blocks/i3blocks-display.conf rename to dot_config/i3blocks/i3blocks-display.conf diff --git a/i3blocks/.config/i3blocks/i3blocks.conf b/dot_config/i3blocks/i3blocks.conf similarity index 100% rename from i3blocks/.config/i3blocks/i3blocks.conf rename to dot_config/i3blocks/i3blocks.conf diff --git a/i3blocks/.config/i3blocks/sam-i3blocks.conf b/dot_config/i3blocks/sam-i3blocks.conf similarity index 100% rename from i3blocks/.config/i3blocks/sam-i3blocks.conf rename to dot_config/i3blocks/sam-i3blocks.conf diff --git a/i3blocks/.config/i3blocks/scripts/backlight b/dot_config/i3blocks/scripts/executable_backlight old mode 100755 new mode 100644 similarity index 100% rename from i3blocks/.config/i3blocks/scripts/backlight rename to dot_config/i3blocks/scripts/executable_backlight diff --git a/i3blocks/.config/i3blocks/scripts/battery b/dot_config/i3blocks/scripts/executable_battery old mode 100755 new mode 100644 similarity index 100% rename from i3blocks/.config/i3blocks/scripts/battery rename to dot_config/i3blocks/scripts/executable_battery diff --git a/i3blocks/.config/i3blocks/scripts/calendar b/dot_config/i3blocks/scripts/executable_calendar old mode 100755 new mode 100644 similarity index 100% rename from i3blocks/.config/i3blocks/scripts/calendar rename to dot_config/i3blocks/scripts/executable_calendar diff --git a/i3blocks/.config/i3blocks/scripts/cpu_usage b/dot_config/i3blocks/scripts/executable_cpu_usage old mode 100755 new mode 100644 similarity index 100% rename from i3blocks/.config/i3blocks/scripts/cpu_usage rename to dot_config/i3blocks/scripts/executable_cpu_usage diff --git a/i3blocks/.config/i3blocks/scripts/load_average b/dot_config/i3blocks/scripts/executable_load_average old mode 100755 new mode 100644 similarity index 100% rename from i3blocks/.config/i3blocks/scripts/load_average rename to dot_config/i3blocks/scripts/executable_load_average diff --git a/i3blocks/.config/i3blocks/scripts/memory b/dot_config/i3blocks/scripts/executable_memory old mode 100755 new mode 100644 similarity index 100% rename from i3blocks/.config/i3blocks/scripts/memory rename to dot_config/i3blocks/scripts/executable_memory diff --git a/i3blocks/.config/i3blocks/scripts/name b/dot_config/i3blocks/scripts/executable_name old mode 100755 new mode 100644 similarity index 100% rename from i3blocks/.config/i3blocks/scripts/name rename to dot_config/i3blocks/scripts/executable_name diff --git a/i3blocks/.config/i3blocks/scripts/spotify b/dot_config/i3blocks/scripts/executable_spotify old mode 100755 new mode 100644 similarity index 100% rename from i3blocks/.config/i3blocks/scripts/spotify rename to dot_config/i3blocks/scripts/executable_spotify diff --git a/i3blocks/.config/i3blocks/scripts/temperature b/dot_config/i3blocks/scripts/executable_temperature old mode 100755 new mode 100644 similarity index 100% rename from i3blocks/.config/i3blocks/scripts/temperature rename to dot_config/i3blocks/scripts/executable_temperature diff --git a/i3blocks/.config/i3blocks/scripts/time b/dot_config/i3blocks/scripts/executable_time old mode 100755 new mode 100644 similarity index 100% rename from i3blocks/.config/i3blocks/scripts/time rename to dot_config/i3blocks/scripts/executable_time diff --git a/i3blocks/.config/i3blocks/scripts/volume b/dot_config/i3blocks/scripts/executable_volume old mode 100755 new mode 100644 similarity index 100% rename from i3blocks/.config/i3blocks/scripts/volume rename to dot_config/i3blocks/scripts/executable_volume diff --git a/i3blocks/.config/i3blocks/scripts/wifi b/dot_config/i3blocks/scripts/executable_wifi old mode 100755 new mode 100644 similarity index 100% rename from i3blocks/.config/i3blocks/scripts/wifi rename to dot_config/i3blocks/scripts/executable_wifi diff --git a/mpv/.config/mpv/input.conf b/dot_config/mpv/input.conf similarity index 100% rename from mpv/.config/mpv/input.conf rename to dot_config/mpv/input.conf diff --git a/neofetch/.config/neofetch/config.conf b/dot_config/neofetch/config.conf similarity index 100% rename from neofetch/.config/neofetch/config.conf rename to dot_config/neofetch/config.conf diff --git a/fish/.config/fish/completions/watson.fish b/dot_config/private_fish/completions/watson.fish similarity index 100% rename from fish/.config/fish/completions/watson.fish rename to dot_config/private_fish/completions/watson.fish diff --git a/fish/.config/fish/config.fish b/dot_config/private_fish/config.fish similarity index 100% rename from fish/.config/fish/config.fish rename to dot_config/private_fish/config.fish diff --git a/fish/.config/fish/functions/369/a2/carsim.fish b/dot_config/private_fish/private_functions/369/a2/carsim.fish similarity index 100% rename from fish/.config/fish/functions/369/a2/carsim.fish rename to dot_config/private_fish/private_functions/369/a2/carsim.fish diff --git a/fish/.config/fish/functions/369/a2/gdb-a2.fish b/dot_config/private_fish/private_functions/369/a2/gdb-a2.fish similarity index 100% rename from fish/.config/fish/functions/369/a2/gdb-a2.fish rename to dot_config/private_fish/private_functions/369/a2/gdb-a2.fish diff --git a/fish/.config/fish/functions/369/a3/gdb-a3-break.fish b/dot_config/private_fish/private_functions/369/a3/gdb-a3-break.fish similarity index 100% rename from fish/.config/fish/functions/369/a3/gdb-a3-break.fish rename to dot_config/private_fish/private_functions/369/a3/gdb-a3-break.fish diff --git a/fish/.config/fish/functions/369/a3/run-a3.fish b/dot_config/private_fish/private_functions/369/a3/run-a3.fish similarity index 100% rename from fish/.config/fish/functions/369/a3/run-a3.fish rename to dot_config/private_fish/private_functions/369/a3/run-a3.fish diff --git a/fish/.config/fish/functions/369/a4/block-to-line.fish b/dot_config/private_fish/private_functions/369/a4/block-to-line.fish similarity index 100% rename from fish/.config/fish/functions/369/a4/block-to-line.fish rename to dot_config/private_fish/private_functions/369/a4/block-to-line.fish diff --git a/fish/.config/fish/functions/369/a4/revert-image.fish b/dot_config/private_fish/private_functions/369/a4/executable_revert-image.fish old mode 100755 new mode 100644 similarity index 100% rename from fish/.config/fish/functions/369/a4/revert-image.fish rename to dot_config/private_fish/private_functions/369/a4/executable_revert-image.fish diff --git a/fish/.config/fish/functions/369/a4/hex.fish b/dot_config/private_fish/private_functions/369/a4/hex.fish similarity index 100% rename from fish/.config/fish/functions/369/a4/hex.fish rename to dot_config/private_fish/private_functions/369/a4/hex.fish diff --git a/fish/.config/fish/functions/369/a4/mount-image.fish b/dot_config/private_fish/private_functions/369/a4/mount-image.fish similarity index 100% rename from fish/.config/fish/functions/369/a4/mount-image.fish rename to dot_config/private_fish/private_functions/369/a4/mount-image.fish diff --git a/fish/.config/fish/functions/369/a4/run-a4.fish b/dot_config/private_fish/private_functions/369/a4/run-a4.fish similarity index 100% rename from fish/.config/fish/functions/369/a4/run-a4.fish rename to dot_config/private_fish/private_functions/369/a4/run-a4.fish diff --git a/fish/.config/fish/functions/369/grep-c.fish b/dot_config/private_fish/private_functions/369/grep-c.fish similarity index 100% rename from fish/.config/fish/functions/369/grep-c.fish rename to dot_config/private_fish/private_functions/369/grep-c.fish diff --git a/fish/.config/fish/functions/369/grep-headers.fish b/dot_config/private_fish/private_functions/369/grep-headers.fish similarity index 100% rename from fish/.config/fish/functions/369/grep-headers.fish rename to dot_config/private_fish/private_functions/369/grep-headers.fish diff --git a/fish/.config/fish/functions/369/rg-headers.fish b/dot_config/private_fish/private_functions/369/rg-headers.fish similarity index 100% rename from fish/.config/fish/functions/369/rg-headers.fish rename to dot_config/private_fish/private_functions/369/rg-headers.fish diff --git a/fish/.config/fish/functions/369/rgc.fish b/dot_config/private_fish/private_functions/369/rgc.fish similarity index 100% rename from fish/.config/fish/functions/369/rgc.fish rename to dot_config/private_fish/private_functions/369/rgc.fish diff --git a/fish/.config/fish/functions/benq-brightness.fish b/dot_config/private_fish/private_functions/benq-brightness.fish similarity index 100% rename from fish/.config/fish/functions/benq-brightness.fish rename to dot_config/private_fish/private_functions/benq-brightness.fish diff --git a/fish/.config/fish/functions/cd.fish b/dot_config/private_fish/private_functions/cd.fish similarity index 100% rename from fish/.config/fish/functions/cd.fish rename to dot_config/private_fish/private_functions/cd.fish diff --git a/fish/.config/fish/functions/certbot-ssl.fish b/dot_config/private_fish/private_functions/certbot-ssl.fish similarity index 100% rename from fish/.config/fish/functions/certbot-ssl.fish rename to dot_config/private_fish/private_functions/certbot-ssl.fish diff --git a/fish/.config/fish/functions/copy.fish b/dot_config/private_fish/private_functions/copy.fish similarity index 100% rename from fish/.config/fish/functions/copy.fish rename to dot_config/private_fish/private_functions/copy.fish diff --git a/fish/.config/fish/functions/create-fish-function.fish b/dot_config/private_fish/private_functions/create-fish-function.fish similarity index 100% rename from fish/.config/fish/functions/create-fish-function.fish rename to dot_config/private_fish/private_functions/create-fish-function.fish diff --git a/fish/.config/fish/functions/evince-silent.fish b/dot_config/private_fish/private_functions/evince-silent.fish similarity index 100% rename from fish/.config/fish/functions/evince-silent.fish rename to dot_config/private_fish/private_functions/evince-silent.fish diff --git a/fish/.config/fish/functions/find-vim-filetype.fish b/dot_config/private_fish/private_functions/find-vim-filetype.fish similarity index 100% rename from fish/.config/fish/functions/find-vim-filetype.fish rename to dot_config/private_fish/private_functions/find-vim-filetype.fish diff --git a/fish/.config/fish/functions/git/git-amend-push.fish b/dot_config/private_fish/private_functions/git/git-amend-push.fish similarity index 100% rename from fish/.config/fish/functions/git/git-amend-push.fish rename to dot_config/private_fish/private_functions/git/git-amend-push.fish diff --git a/fish/.config/fish/functions/git/git-delete-branch.fish b/dot_config/private_fish/private_functions/git/git-delete-branch.fish similarity index 100% rename from fish/.config/fish/functions/git/git-delete-branch.fish rename to dot_config/private_fish/private_functions/git/git-delete-branch.fish diff --git a/fish/.config/fish/functions/git/git-diff-files.fish b/dot_config/private_fish/private_functions/git/git-diff-files.fish similarity index 100% rename from fish/.config/fish/functions/git/git-diff-files.fish rename to dot_config/private_fish/private_functions/git/git-diff-files.fish diff --git a/fish/.config/fish/functions/git/git-mult-remotes.fish b/dot_config/private_fish/private_functions/git/git-mult-remotes.fish similarity index 100% rename from fish/.config/fish/functions/git/git-mult-remotes.fish rename to dot_config/private_fish/private_functions/git/git-mult-remotes.fish diff --git a/fish/.config/fish/functions/git/git-push-multiple.fish b/dot_config/private_fish/private_functions/git/git-push-multiple.fish similarity index 100% rename from fish/.config/fish/functions/git/git-push-multiple.fish rename to dot_config/private_fish/private_functions/git/git-push-multiple.fish diff --git a/fish/.config/fish/functions/grep-aliases.fish b/dot_config/private_fish/private_functions/grep-aliases.fish similarity index 100% rename from fish/.config/fish/functions/grep-aliases.fish rename to dot_config/private_fish/private_functions/grep-aliases.fish diff --git a/fish/.config/fish/functions/grep-pdf-file.fish b/dot_config/private_fish/private_functions/grep-pdf-file.fish similarity index 100% rename from fish/.config/fish/functions/grep-pdf-file.fish rename to dot_config/private_fish/private_functions/grep-pdf-file.fish diff --git a/fish/.config/fish/functions/grep-pdf.fish b/dot_config/private_fish/private_functions/grep-pdf.fish similarity index 100% rename from fish/.config/fish/functions/grep-pdf.fish rename to dot_config/private_fish/private_functions/grep-pdf.fish diff --git a/fish/.config/fish/functions/pastebin.fish b/dot_config/private_fish/private_functions/pastebin.fish similarity index 100% rename from fish/.config/fish/functions/pastebin.fish rename to dot_config/private_fish/private_functions/pastebin.fish diff --git a/fish/.config/fish/functions/redshift-set.fish b/dot_config/private_fish/private_functions/redshift-set.fish similarity index 100% rename from fish/.config/fish/functions/redshift-set.fish rename to dot_config/private_fish/private_functions/redshift-set.fish diff --git a/fish/.config/fish/functions/scan-history.fish b/dot_config/private_fish/private_functions/scan-history.fish similarity index 100% rename from fish/.config/fish/functions/scan-history.fish rename to dot_config/private_fish/private_functions/scan-history.fish diff --git a/fish/.config/fish/functions/shred-rm.fish b/dot_config/private_fish/private_functions/shred-rm.fish similarity index 100% rename from fish/.config/fish/functions/shred-rm.fish rename to dot_config/private_fish/private_functions/shred-rm.fish diff --git a/fish/.config/fish/functions/ssh-bandit.fish b/dot_config/private_fish/private_functions/ssh-bandit.fish similarity index 100% rename from fish/.config/fish/functions/ssh-bandit.fish rename to dot_config/private_fish/private_functions/ssh-bandit.fish diff --git a/fish/.config/fish/functions/unix-timestamp.fish b/dot_config/private_fish/private_functions/unix-timestamp.fish similarity index 100% rename from fish/.config/fish/functions/unix-timestamp.fish rename to dot_config/private_fish/private_functions/unix-timestamp.fish diff --git a/fish/.config/fish/functions/unzip-rm.fish b/dot_config/private_fish/private_functions/unzip-rm.fish similarity index 100% rename from fish/.config/fish/functions/unzip-rm.fish rename to dot_config/private_fish/private_functions/unzip-rm.fish diff --git a/fish/.config/fish/functions/vsnp.fish b/dot_config/private_fish/private_functions/vsnp.fish similarity index 100% rename from fish/.config/fish/functions/vsnp.fish rename to dot_config/private_fish/private_functions/vsnp.fish diff --git a/fish/.config/fish/functions/wc-pdf.fish b/dot_config/private_fish/private_functions/wc-pdf.fish similarity index 100% rename from fish/.config/fish/functions/wc-pdf.fish rename to dot_config/private_fish/private_functions/wc-pdf.fish diff --git a/ranger/.config/ranger/commands.py b/dot_config/ranger/commands.py similarity index 100% rename from ranger/.config/ranger/commands.py rename to dot_config/ranger/commands.py diff --git a/ranger/.config/ranger/scope.sh b/dot_config/ranger/executable_scope.sh old mode 100755 new mode 100644 similarity index 100% rename from ranger/.config/ranger/scope.sh rename to dot_config/ranger/executable_scope.sh diff --git a/dot_config/ranger/plugins/__init__.py b/dot_config/ranger/plugins/__init__.py new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/dot_config/ranger/plugins/__init__.py @@ -0,0 +1 @@ + diff --git a/ranger/.config/ranger/plugins/__pycache__/__init__.cpython-37.opt-1.pyc b/dot_config/ranger/plugins/__pycache__/__init__.cpython-37.opt-1.pyc similarity index 100% rename from ranger/.config/ranger/plugins/__pycache__/__init__.cpython-37.opt-1.pyc rename to dot_config/ranger/plugins/__pycache__/__init__.cpython-37.opt-1.pyc diff --git a/ranger/.config/ranger/plugins/__pycache__/devicons.cpython-37.opt-1.pyc b/dot_config/ranger/plugins/__pycache__/devicons.cpython-37.opt-1.pyc similarity index 100% rename from ranger/.config/ranger/plugins/__pycache__/devicons.cpython-37.opt-1.pyc rename to dot_config/ranger/plugins/__pycache__/devicons.cpython-37.opt-1.pyc diff --git a/ranger/.config/ranger/plugins/__pycache__/devicons_linemode.cpython-37.opt-1.pyc b/dot_config/ranger/plugins/__pycache__/devicons_linemode.cpython-37.opt-1.pyc similarity index 100% rename from ranger/.config/ranger/plugins/__pycache__/devicons_linemode.cpython-37.opt-1.pyc rename to dot_config/ranger/plugins/__pycache__/devicons_linemode.cpython-37.opt-1.pyc diff --git a/ranger/.config/ranger/plugins/devicons.py b/dot_config/ranger/plugins/executable_devicons.py old mode 100755 new mode 100644 similarity index 100% rename from ranger/.config/ranger/plugins/devicons.py rename to dot_config/ranger/plugins/executable_devicons.py diff --git a/ranger/.config/ranger/plugins/devicons_linemode.py b/dot_config/ranger/plugins/executable_devicons_linemode.py old mode 100755 new mode 100644 similarity index 100% rename from ranger/.config/ranger/plugins/devicons_linemode.py rename to dot_config/ranger/plugins/executable_devicons_linemode.py diff --git a/ranger/.config/ranger/rc.conf b/dot_config/ranger/rc.conf similarity index 99% rename from ranger/.config/ranger/rc.conf rename to dot_config/ranger/rc.conf index 45e3410..1cd4833 100644 --- a/ranger/.config/ranger/rc.conf +++ b/dot_config/ranger/rc.conf @@ -101,7 +101,7 @@ set draw_progress_bar_in_status_bar true set draw_borders false # Display the directory name in tabs? -set dirname_in_tabs false +set dirname_in_tabs true # Enable the mouse support? set mouse_enabled false diff --git a/ranger/.config/ranger/rifle.conf b/dot_config/ranger/rifle.conf similarity index 100% rename from ranger/.config/ranger/rifle.conf rename to dot_config/ranger/rifle.conf diff --git a/zathura/.config/zathura/zathurarc b/dot_config/zathura/zathurarc similarity index 100% rename from zathura/.config/zathura/zathurarc rename to dot_config/zathura/zathurarc diff --git a/git/.gitconfig b/dot_gitconfig similarity index 100% rename from git/.gitconfig rename to dot_gitconfig diff --git a/input/.imwheelrc b/dot_imwheelrc similarity index 100% rename from input/.imwheelrc rename to dot_imwheelrc diff --git a/input/.inputrc b/dot_inputrc similarity index 100% rename from input/.inputrc rename to dot_inputrc diff --git a/vim/.nvim b/dot_nvim similarity index 100% rename from vim/.nvim rename to dot_nvim diff --git a/vim/.vimrc b/dot_vimrc similarity index 99% rename from vim/.vimrc rename to dot_vimrc index 176eaca..3241375 100644 --- a/vim/.vimrc +++ b/dot_vimrc @@ -80,7 +80,7 @@ autocmd VimLeave *.tex !tex-clean %:p 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 key_* map :silent !sync-shortcuts +autocmd BufNewFile,BufRead key_* map :w:silent !sync-shortcuts " map :silent !scp %:p k@192.168.0.17:/home/k/a1 " map :silent !scp -P 2222 e1.html e1_style.css kevin@127.0.0.1:/home/kevin/Downloads/e1 diff --git a/x/.xinitrc b/dot_xinitrc similarity index 100% rename from x/.xinitrc rename to dot_xinitrc diff --git a/shell/.zshrc b/dot_zshrc similarity index 100% rename from shell/.zshrc rename to dot_zshrc diff --git a/fish/.config/fish/conf.d/omf.fish b/fish/.config/fish/conf.d/omf.fish deleted file mode 100644 index 3e0f6d6..0000000 --- a/fish/.config/fish/conf.d/omf.fish +++ /dev/null @@ -1,7 +0,0 @@ -# Path to Oh My Fish install. -set -q XDG_DATA_HOME - and set -gx OMF_PATH "$XDG_DATA_HOME/omf" - or set -gx OMF_PATH "$HOME/.local/share/omf" - -# Load Oh My Fish configuration. -source $OMF_PATH/init.fish diff --git a/fish/.config/fish/conf.d/pure.fish b/fish/.config/fish/conf.d/pure.fish deleted file mode 120000 index efa6cf8..0000000 --- a/fish/.config/fish/conf.d/pure.fish +++ /dev/null @@ -1 +0,0 @@ -/home/kevin/.local/share/omf/themes/pure/conf.d/pure.fish \ No newline at end of file diff --git a/fish/.config/fish/functions/fish_prompt.fish b/fish/.config/fish/functions/fish_prompt.fish deleted file mode 120000 index 2ade0dc..0000000 --- a/fish/.config/fish/functions/fish_prompt.fish +++ /dev/null @@ -1 +0,0 @@ -/home/kevin/.local/share/omf/themes/pure/fish_prompt.fish \ No newline at end of file diff --git a/aliases/key_aliases b/key_aliases similarity index 99% rename from aliases/key_aliases rename to key_aliases index 1390c9a..2eecf1f 100644 --- a/aliases/key_aliases +++ b/key_aliases @@ -325,6 +325,10 @@ gunc "git update-index --assume-unchanged" # coding projs {{{ # # coding_dir="~/coding" +cz "chezmoi" +cza "chezmoi add" +cze "chezmoi edit" + rgt "rg TODO" # trapbot {{{ # diff --git a/ranger/.config/ranger/plugins/__init__.py b/ranger/.config/ranger/plugins/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/scripts/colors/arch b/scripts/colors/executable_arch old mode 100755 new mode 100644 similarity index 100% rename from scripts/colors/arch rename to scripts/colors/executable_arch diff --git a/scripts/colors/blocks b/scripts/colors/executable_blocks old mode 100755 new mode 100644 similarity index 100% rename from scripts/colors/blocks rename to scripts/colors/executable_blocks diff --git a/scripts/colors/panes b/scripts/colors/executable_panes old mode 100755 new mode 100644 similarity index 100% rename from scripts/colors/panes rename to scripts/colors/executable_panes diff --git a/scripts/colors/rupees b/scripts/colors/executable_rupees old mode 100755 new mode 100644 similarity index 100% rename from scripts/colors/rupees rename to scripts/colors/executable_rupees diff --git a/scripts/colors/space-invaders b/scripts/colors/executable_space-invaders old mode 100755 new mode 100644 similarity index 100% rename from scripts/colors/space-invaders rename to scripts/colors/executable_space-invaders diff --git a/scripts/colors/unowns b/scripts/colors/executable_unowns old mode 100755 new mode 100644 similarity index 100% rename from scripts/colors/unowns rename to scripts/colors/executable_unowns diff --git a/scripts/backup b/scripts/executable_backup old mode 100755 new mode 100644 similarity index 100% rename from scripts/backup rename to scripts/executable_backup diff --git a/scripts/bg-chooser b/scripts/executable_bg-chooser old mode 100755 new mode 100644 similarity index 100% rename from scripts/bg-chooser rename to scripts/executable_bg-chooser diff --git a/scripts/burn-iso.sh b/scripts/executable_burn-iso.sh old mode 100755 new mode 100644 similarity index 100% rename from scripts/burn-iso.sh rename to scripts/executable_burn-iso.sh diff --git a/scripts/change-sink b/scripts/executable_change-sink old mode 100755 new mode 100644 similarity index 100% rename from scripts/change-sink rename to scripts/executable_change-sink diff --git a/scripts/install-arch-pkgs.sh b/scripts/executable_install-arch-pkgs.sh old mode 100755 new mode 100644 similarity index 100% rename from scripts/install-arch-pkgs.sh rename to scripts/executable_install-arch-pkgs.sh diff --git a/scripts/passmenu b/scripts/executable_passmenu old mode 100755 new mode 100644 similarity index 100% rename from scripts/passmenu rename to scripts/executable_passmenu diff --git a/scripts/qr-gif.sh b/scripts/executable_qr-gif.sh old mode 100755 new mode 100644 similarity index 100% rename from scripts/qr-gif.sh rename to scripts/executable_qr-gif.sh diff --git a/scripts/rick-roll b/scripts/executable_rick-roll old mode 100755 new mode 100644 similarity index 100% rename from scripts/rick-roll rename to scripts/executable_rick-roll diff --git a/scripts/shuffler b/scripts/executable_shuffler old mode 100755 new mode 100644 similarity index 100% rename from scripts/shuffler rename to scripts/executable_shuffler diff --git a/scripts/sync-aliases b/scripts/executable_sync-aliases old mode 100755 new mode 100644 similarity index 100% rename from scripts/sync-aliases rename to scripts/executable_sync-aliases diff --git a/scripts/sync-shortcuts b/scripts/executable_sync-shortcuts old mode 100755 new mode 100644 similarity index 100% rename from scripts/sync-shortcuts rename to scripts/executable_sync-shortcuts diff --git a/scripts/tex-clean b/scripts/executable_tex-clean old mode 100755 new mode 100644 similarity index 100% rename from scripts/tex-clean rename to scripts/executable_tex-clean diff --git a/stow.sh b/stow.sh deleted file mode 100755 index ab8ac69..0000000 --- a/stow.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -stow git i3 i3blocks input mpv neofetch ranger shell vim x zathura diff --git a/txt/key_dirs.txt b/txt/key_dirs.txt index a1e072e..031b84f 100644 --- a/txt/key_dirs.txt +++ b/txt/key_dirs.txt @@ -39,6 +39,7 @@ swa /home/kevin/.local/share/nvim/swap tx /home/kevin/linux-config/txt wd /home/kevin/.config/watson wo /home/kevin/Documents/workout-logs/11 +zd /home/kevin/chezmoi # }}} cdn * From 59c6e400c56e29e95fd3f2bb2a625c3c8f298f68 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Mon, 15 Apr 2019 02:25:07 -0400 Subject: [PATCH 2/4] chezmoi: ignore (root), convert some paths Aliases for chezmoi. --- .chezmoiignore | 17 ++++++++++++++ dot_config/private_fish/config.fish | 12 ++++------ key_aliases | 10 ++++---- txt/key_dirs.txt => key_dirs | 9 +++----- txt/key_files.txt => key_files | 10 ++++---- scripts/executable_sync-aliases | 36 ----------------------------- scripts/executable_sync-shortcuts | 6 ++--- txt/ideas.md | 7 ++++++ 8 files changed, 46 insertions(+), 61 deletions(-) create mode 100644 .chezmoiignore rename txt/key_dirs.txt => key_dirs (91%) rename txt/key_files.txt => key_files (87%) delete mode 100644 scripts/executable_sync-aliases diff --git a/.chezmoiignore b/.chezmoiignore new file mode 100644 index 0000000..7d33349 --- /dev/null +++ b/.chezmoiignore @@ -0,0 +1,17 @@ +README.md + +{{ if eq .chezmoi.username "root" }} +.config/i3/ +.config/i3blocks/ +.config/mpv/ +.config/neofetch/ +.config/zathura/ +scripts/ +txt/ +.bashrc +.gitconfig +.imwheelrc +.xinitrc +.Xresources +.zshrc +{{ end }} diff --git a/dot_config/private_fish/config.fish b/dot_config/private_fish/config.fish index e478b80..9d66de4 100644 --- a/dot_config/private_fish/config.fish +++ b/dot_config/private_fish/config.fish @@ -20,9 +20,11 @@ builtin cd $last_dir bind \ce edit_command_buffer bind \cr forward-word -/home/kevin/linux-config/scripts/sync-shortcuts +chezmoi apply +/home/kevin/scripts/sync-shortcuts source /home/kevin/.config/fish/key_abbr.fish -set -U fish_fxn_dir "/home/kevin/linux-config/fish/.config/fish/functions" +# set -U fish_fxn_dir "/home/kevin/linux-config/fish/.config/fish/functions" +set -U fish_fxn_dir "/home/kevin/.config/fish/functions" abbr ff "cd $fish_fxn_dir" for fxn in (find $fish_fxn_dir -name '*.fish') source $fxn @@ -42,11 +44,7 @@ abbr mt "math" set -U spv_dir "/home/kevin/coding/spotify-lib-vis" set -U mfs_dir "/home/kevin/coding/mf-site" -# set -U PATH /usr/local/sbin /usr/local/bin /usr/bin /usr/bin/site_perl -# /usr/bin/vendor_perl /usr/bin/core_perl /home/kevin/linux-config/scripts -# /home/kevin/linux-config/scripts/colors -# (ruby -e 'print Gem.user_dir')/bin -set -x PATH $PATH /home/kevin/linux-config/scripts /home/kevin/linux-config/scripts/colors /home/kevin/go/bin +set -x PATH $PATH /home/kevin/scripts /home/kevin/scripts/colors /home/kevin/go/bin set -x PASSWORD_STORE_CLIP_TIME 120 set -xU XSET_RATE 90 set -xU XSET_DELAY 200 diff --git a/key_aliases b/key_aliases index 2eecf1f..809c232 100644 --- a/key_aliases +++ b/key_aliases @@ -174,7 +174,7 @@ sxt "sxiv -t *" vmd "vimdiff" wg "wego" wp "grep wallpaper ~/.cache/wal/colors.sh" -z "zathura --fork" +zt "zathura --fork" lz "unzip -l" @@ -325,9 +325,11 @@ gunc "git update-index --assume-unchanged" # coding projs {{{ # # coding_dir="~/coding" -cz "chezmoi" -cza "chezmoi add" -cze "chezmoi edit" +zm "chezmoi" +za "chezmoi add" +zar "chezmoi add -r" +ze "chezmoi edit" +zp "chezmoi -v apply" rgt "rg TODO" diff --git a/txt/key_dirs.txt b/key_dirs similarity index 91% rename from txt/key_dirs.txt rename to key_dirs index 031b84f..640a936 100644 --- a/txt/key_dirs.txt +++ b/key_dirs @@ -3,21 +3,19 @@ bg /home/kevin/Pictures/Backgrounds cf /home/kevin/.config -lc /home/kevin/linux-config/ -lf /mnt/linux-files d /home/kevin/Downloads D /home/kevin/Documents fo /home/kevin/.config/fish -fs /home/kevin/linux-config/fish/.config/fish k /home/kevin/ -lc /home/kevin/linux-config/ +lf /mnt/linux-files +lfv /mnt/linux-files/Videos me /run/media/kevin o / p /home/kevin/.password-store P /home/kevin/Pictures sw ~/.local/share/nvim/swap/ tm /tmp -lfv /mnt/linux-files/Videos +z /home/kevin/linux-config # }}} sys * @@ -39,7 +37,6 @@ swa /home/kevin/.local/share/nvim/swap tx /home/kevin/linux-config/txt wd /home/kevin/.config/watson wo /home/kevin/Documents/workout-logs/11 -zd /home/kevin/chezmoi # }}} cdn * diff --git a/txt/key_files.txt b/key_files similarity index 87% rename from txt/key_files.txt rename to key_files index a34b5d8..fba948c 100644 --- a/txt/key_files.txt +++ b/key_files @@ -1,9 +1,9 @@ # sys {{{ * -3 /home/kevin/.config/i3/config -a /home/kevin/linux-config/aliases/key_aliases -d /home/kevin/linux-config/txt/key_dirs.txt -f /home/kevin/linux-config/txt/key_files.txt +3 ~/linux-config/dot_config/i3/config +a ~/linux-config/key_aliases +d ~/linux-config/key_dirs +f ~/linux-config/key_files i /home/kevin/.config/i3blocks/i3blocks.conf p /home/kevin/linux-config/txt/pacman-pkgs/pacman-pkgs.txt r /home/kevin/.config/ranger/rc.conf @@ -11,7 +11,7 @@ sr /home/kevin/linux-config/configs/ranger/shortcuts.conf ss /home/kevin/.shortcuts u /home/kevin/.Xresources v /home/kevin/.vimrc -x /home/kevin/.config/fish/config.fish +x ~/linux-config/dot_config/private_fish/config.fish y /home/kevin/.zshrc z /home/kevin/linux-config/aliases/zsh_aliases diff --git a/scripts/executable_sync-aliases b/scripts/executable_sync-aliases deleted file mode 100644 index c451da7..0000000 --- a/scripts/executable_sync-aliases +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -key_aliases="$HOME/linux-config/aliases/key_aliases" - -# Ensure text of argument 1 exists in the file argument 2 -ensure() {{{ - if [[ ! -e "$2" ]]; then - touch "$2" - fi - (grep "$1" "$2")>/dev/null 2>&1 || echo "$1" >> "$2" -}}} - -# fish -fish_config="$HOME/.config/fish/config.fish" -fish_abbr="$HOME/.config/fish/key_aliases.fish" -ensure "source $fish_abbr" "$fish_config" - -# bash/zsh -bashrc="$HOME/.bashrc" -zshrc="$HOME/.zshrc" -aliases="$HOME/.aliases" -ensure "source $aliases" "$bashrc" -ensure "source $aliases" "$zshrc" - -# Remove, prepare files -printf "# vim: filetype=sh\\n" > "$fish_abbr" -printf "# vim: filetype=sh\\n" > "$aliases" - -sed -e '/^$/d' -e '/^[ \t#].*/d' "$key_aliases" | sort | tee \ - >(awk '{printf "abbr " $1; $1 = ""; print $0; }' >> "$fish_abbr") \ - | awk '{ - printf "alias " $1; - $1 = ""; - printf "="; - print gensub(" ", "", 1, $0); - }' >> "$aliases" diff --git a/scripts/executable_sync-shortcuts b/scripts/executable_sync-shortcuts index d8f1934..af82697 100644 --- a/scripts/executable_sync-shortcuts +++ b/scripts/executable_sync-shortcuts @@ -30,9 +30,9 @@ ensure "source $fish_abbr" "$fish_config" ensure "source $ranger_mappings" "$ranger_config" # key files -key_dirs="$HOME/linux-config/txt/key_dirs.txt" -key_files="$HOME/linux-config/txt/key_files.txt" -key_aliases="$HOME/linux-config/aliases/key_aliases" +key_dirs="$HOME/key_dirs" +key_files="$HOME/key_files" +key_aliases="$HOME/key_aliases" # Remove, prepare files rm -f "$ranger_mappings" 2>/dev/null diff --git a/txt/ideas.md b/txt/ideas.md index 18ffdb9..01d1c9d 100644 --- a/txt/ideas.md +++ b/txt/ideas.md @@ -1,2 +1,9 @@ +# chezmoi +- edit chez dir files? +- nvim setup +- fish config +- home dir var +- merge laptop + - nnn - spotify blocklet - escape chars. From 5d1908a095139bfa54b56c5cd1ea5c6b4acdd531 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Mon, 15 Apr 2019 03:17:47 -0400 Subject: [PATCH 3/4] chezmoi: convert key files to templates Minimal Spotify controller block on main display. --- dot_config/i3blocks/i3blocks.conf | 6 + dot_config/i3blocks/sam-i3blocks.conf | 1 + .../i3blocks/scripts/executable_spotify | 6 +- dot_config/i3blocks/scripts/executable_volume | 2 +- dot_config/private_fish/config.fish | 4 +- dot_vimrc | 3 +- key_aliases | 466 ------------------ key_aliases.tmpl | 384 +++++++++++++++ key_dirs | 63 --- key_dirs.tmpl | 56 +++ key_files | 56 --- key_files.tmpl | 50 ++ scripts/executable_sync-shortcuts | 4 +- txt/ideas.md | 10 +- 14 files changed, 515 insertions(+), 596 deletions(-) delete mode 100644 key_aliases create mode 100644 key_aliases.tmpl delete mode 100644 key_dirs create mode 100644 key_dirs.tmpl delete mode 100644 key_files create mode 100644 key_files.tmpl diff --git a/dot_config/i3blocks/i3blocks.conf b/dot_config/i3blocks/i3blocks.conf index 912b125..8ae66b8 100644 --- a/dot_config/i3blocks/i3blocks.conf +++ b/dot_config/i3blocks/i3blocks.conf @@ -25,6 +25,12 @@ interval=once signal=1 interval=60 +[spotify] +label= +LONG_NAME= +SHORT_NAME= +interval=5 + [calendar] interval=30 label= diff --git a/dot_config/i3blocks/sam-i3blocks.conf b/dot_config/i3blocks/sam-i3blocks.conf index 16fcc70..97a1c17 100644 --- a/dot_config/i3blocks/sam-i3blocks.conf +++ b/dot_config/i3blocks/sam-i3blocks.conf @@ -30,6 +30,7 @@ interval=30 label= DATEFMT=+%H:%M.%a-%m-%d # SHORTFMT=+%H:%M:%S +SHORTFMT=+%H:%M.%a-%m-%d HEIGHT=180 WIDTH=220 diff --git a/dot_config/i3blocks/scripts/executable_spotify b/dot_config/i3blocks/scripts/executable_spotify index 3f00f86..71836bb 100644 --- a/dot_config/i3blocks/scripts/executable_spotify +++ b/dot_config/i3blocks/scripts/executable_spotify @@ -1,5 +1,7 @@ #!/bin/bash +LONG_NAME=${LONG_NAME:-"%artist - %title"} +SHORT_NAME=${SHORT_NAME:-"%title"} case "$BLOCK_BUTTON" in 1) dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause ;; 2) dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous ;; @@ -7,6 +9,6 @@ case "$BLOCK_BUTTON" in esac . "/home/kevin/.cache/wal/colors.sh" -long_title=$(spotify-now -i '%artist - %title' -p '' -e '' | sed 's/&/&/g') -short_title=$(spotify-now -i '%title' -p '' -e '' | sed 's/&/&/g') +long_title=$(spotify-now -i "$LONG_NAME" -p '' -e '' | sed 's/&/&/g') +short_title=$(spotify-now -i "$SHORT_NAME" -p '' -e '' | sed 's/&/&/g') printf "$long_title\n$short_title\n%s\n" "$color7" diff --git a/dot_config/i3blocks/scripts/executable_volume b/dot_config/i3blocks/scripts/executable_volume index 0a9be6b..9631f39 100644 --- a/dot_config/i3blocks/scripts/executable_volume +++ b/dot_config/i3blocks/scripts/executable_volume @@ -37,7 +37,7 @@ AUDIO_DELTA=${AUDIO_DELTA:-5} # LONG_FORMAT=${LONG_FORMAT:-'${SYMB} ${VOL}% [${INDEX}:${NAME}]'} LONG_FORMAT=${SHORT_FORMAT:-'${SINK_SYMB} ${VOL}%'} # SHORT_FORMAT=${SHORT_FORMAT:-'${SYMB} ${VOL}%[${INDEX}]'} -SHORT_FORMAT=${SHORT_FORMAT:-'${SINK_SYMB} ${VOL}%[${INDEX}]'} +SHORT_FORMAT=${SHORT_FORMAT:-'${SINK_SYMB} ${VOL}%'} # flags {{{ # diff --git a/dot_config/private_fish/config.fish b/dot_config/private_fish/config.fish index 9d66de4..d789bad 100644 --- a/dot_config/private_fish/config.fish +++ b/dot_config/private_fish/config.fish @@ -29,8 +29,8 @@ abbr ff "cd $fish_fxn_dir" for fxn in (find $fish_fxn_dir -name '*.fish') source $fxn end -abbr rf "source ~/.config/fish/config.fish" -abbr rfs "sync-shortcuts && source ~/.config/fish/config.fish" +abbr rf "chezmoi apply && source ~/.config/fish/config.fish" +abbr rfs "sync-shortcuts && chezmoi apply && source ~/.config/fish/config.fish" abbr xf "fish_config" abbr f. "cd .." abbr f.. "cd ../.." diff --git a/dot_vimrc b/dot_vimrc index 3241375..f8133bd 100644 --- a/dot_vimrc +++ b/dot_vimrc @@ -55,14 +55,15 @@ autocmd FileType *css,htmldjango,html,javascript,json,markdown,tex,text,yaml set autocmd Filetype markdown map :LivedownToggle autocmd Filetype markdown inoremap >>A autocmd Filetype markdown inoremap <j :%!python -m json.tool autocmd Filetype json set foldmethod=marker autocmd FileType sh map :!clear && shellcheck % autocmd FileType tex map :VimtexCompile autocmd VimEnter *.tex VimtexCompile -autocmd FileType markdown,tex,text set spell spelllang=en_us autocmd VimLeave *.tex !tex-clean %:p +autocmd BufNewFile,BufRead *.tmpl set tw=0 sw=2 " " auto-reload vimrc {{{ " diff --git a/key_aliases b/key_aliases deleted file mode 100644 index 809c232..0000000 --- a/key_aliases +++ /dev/null @@ -1,466 +0,0 @@ -# system {{{ # -# vim: fdm=marker - -# clear screen -c "printf '\033c'" -hst "history" -nf "printf '\033c' && neofetch | lolcat" -fi "fish" -# reload urxvt -ru "xrdb ~/.Xresources" -# list file sizes in megabytes with depth 1 -duh "sudo du -d 1 -h --apparent-size | sort -hr" -dum "sudo du -d 1 -m --apparent-size | sort -hr" -m "man" -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 "sudo nvim /etc/default/grub" -mkgb "sudo grub-mkconfig -o /boot/grub/grub.cfg" - -b "bat" -ba "bat *" -grep "grep --color=auto -n" -grr "grep -r" -# pk "pkill -f" -cld "colordiff -wy --suppress-common-lines" - -mkpk "makepkg -sri" -ex "chmod 777" -ex "chmod 777" - -# systemctl {{{ # - -ctl "sudo systemctl" -ctle "sudo systemctl enable" -ctld "sudo systemctl disable" -ctla "sudo systemctl start" -ctls "sudo systemctl stop" -ctlt "sudo systemctl status" -ctltd "sudo systemctl status dhcpcd" -ctlr "sudo systemctl restart" - -# }}} systemctl # - -wm "sudo wifi-menu" - -# mounting -udm "udisksctl mount -b" -udmb "udisksctl mount -b /dev/sdc2" -udu "udisksctl unmount -b" -udub "udisksctl unmount -b /dev/sdc2" - -tc "touch" -vdr "vidir" - -# directory-related {{{ # -ls "lsd" -l "lsd -a" -ll "lsd -al" -smv "sudo mv" -f "cd" -fz "fzf" -fnd "find . -type f -name" - -rmr "rm -rf" -rmd "rm ~/Downloads/*" -rmw "rm ~/.local/share/nvim/swap/" -md "mkdir -p" -rsy "rsync -Pr" - -# list all (un)mounted drives -lhd "sudo fdisk -l" -# get disc space for mounted drives -# ds "df -h | tee >(head -n 1) >(grep sd) >/dev/null" -ds "df -h | head -n 1 && df -h | grep sd" -chownw "sudo chown -R kevin:wheel" -chwnm "sudo chown -R kevin:wheel /run/media/kevin" -# cd into backup folder and show backup sizes -nbu "cd /run/media/kevin/backup-hd/nzxt/tar && lsd -l" - -# }}} directory-related # - -# power options {{{ # - -s "systemctl suspend" -so "xset dpms force off" -sd "systemctl poweroff" -rb "systemctl reboot" -lo "i3-msg exit" -x "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE" -X "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE" - -# }}} power options # - -# sound -vlm "alsamixer -c 0" -vlh "alsamixer -c 2" - -# apt -# apti "sudo apt install" -# aptr "sudo apt remove" -# aptu "sudo apt upgrade" - -# pacman {{{ # - -# pc "sudo pacman -S" -# pcq "sudo pacman -Qi" -# pcr "sudo pacman -Rns" -# pcud "sudo pacman -Sy" -# pcug "sudo pacman -Syu" -# xpc "pacman -Qqne > ~/linux-config/txt/nzxt-pkgs.txt && pacman -Qqme > ~/linux-config/txt/nzxt-aur.txt " - -# tri "trizen -S --noconfirm" -tri "trizen -S --noedit" - -# install -ya "yay -S --answerdiff=N --answeredit=N" -# info -yaq "yay -Qi" -# remove -yar "yay -Rns" -# sync -yaud "yay -Sy" -# sync and update -yaug "yay -Syu" -# export packages -xya "yay -Qqne > ~/linux-config/txt/nzxt-pkgs.txt && yay -Qqme > ~/linux-config/txt/nzxt-aur.txt " - -# }}} pacman # - -py "python" -pipi "sudo pip install" - -# internet -pg "ping -c 3 -W 1 8.8.8.8" -dh "sudo dhcpcd" -kdh "sudo killall dhcpcd" -rdh "sudo killall dhcpcd && sudo dhcpcd" - -id "identify" - -# rz "source ~/linux-config/aliases/zsh_aliases" - -# }}} system # - -# applications {{{ # - -# silent="> /dev/null 2>&1& " - -chr "google-chrome" -clc "cloc ." -cv "cava" -fh "feh" -gpd "gpg --decrypt" -gpe "gpg --encrypt --recipient" -htc "htop -s PERCENT_CPU" -htm "htop -s PERCENT_MEM" -kd "killall Discord && killall Discord" -kt "killall thunderbird" -mp "mpv --volume=50" -mra "man ranger" -n "nvim" -p3 "python3" -pdft "pdftotext" -pipes "pipes.sh -t 3" -py "python" -r "ranger" -rx "redshift -x" -sn "sudo nvim" -sx "sxiv" -sxa "sxiv -a" -sxt "sxiv -t *" -vmd "vimdiff" -wg "wego" -wp "grep wallpaper ~/.cache/wal/colors.sh" -zt "zathura --fork" - -lz "unzip -l" - -# rsl "java -jar ~/Downloads/RuneLite.jar" -# swex "sudo nohup ~/Downloads/swex.appimage $silent" - -# pass {{{ # - -ps "pass" -psc "pass -c" -pse "pass edit" -psi "pass insert -m" -psg "pass generate -c" -pss "pass show" - -xc "xclip -selection clipboard" -yh "echo 'kevin.mok@live.ca' | xclip -selection clipboard" -yg "xclip -selection clipboard ~/.password-store/social/gmail" -yt "xclip -selection clipboard ~/.password-store/social/trapbot" -yu "echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard" - -# }}} pass # - -# watson {{{ # - -w "watson" -wa "watson start" -wae "watson start && watson edit" -we "watson edit" -wl "watson log --day" -wla "watson log --all --tag=" -ww "watson log" -# wlm "watson log --project coding --tag mfs" -wr "watson report --day" -wrw "watson report" -wre "watson restart" -wree "watson restart && watson edit" -ws "watson status && watson stop" -wse "watson stop && watson edit" -wsc "watson cancel" -wsl "watson stop && watson log --day" -wt "watson status" - -# }}} watson # - -# }}} applications # - -# git {{{ # -gstr "git config credential.helper store" -g "git" - -# branch {{{ # - -gb "git branch" -gbd "git branch -D" -gba "git branch --no-merged && echo '' && git branch --merged" -gbu "git branch --no-merged" -gbm "git branch --merged" - -gmg "git merge" -gmgt "git mergetool" - -# }}} branch # - -gr "git remote -v" -gro "git remote show origin" - -# add/remove {{{ # - -ga "git add -A && git status -u" -gac "git add -A && git commit -S" -gaf "git add -f" -# unsigned commt -gacu "git add -A && git commit" - -grm "git rm" -grmf "git rm -f" -grmc "git rm --cached" -grmfc "git rm -f --cached" -grmor "rm (fd -e orig --no-ignore -H)" - -# }}} add # - -# diff/log {{{ # -gd "git difftool -w --tool=vimdiff" -gdc "git difftool -w --cached --tool=vimdiff" -gdl "git diff -w" -gdlc "git diff --cached -w" -gdh "git diff --cached -w HEAD~1" -gds "git diff --stat" -gl "git log" -gsl "git shortlog" -# }}} diff/log # - -# update {{{ # - -gs "git status -u" -gchom "git checkout master" -gchnw "git checkout -b wip" -gchw "git checkout wip" -gheadm1 "git reset --hard HEAD~1" -# show files in git repo -# gls "git ls-tree -r HEAD --name-only" -gls "git ls-tree HEAD --name-only" - -# push {{{ # -gst "git stash" -gstl "git stash list" -gstp "git stash pop" - -gc "git commit -S" -gcu "git commit" -gca "git add -A && git commit --amend --no-edit -S" -gcam "git add -A && git commit --amend -S" -# gcamp "git add -A && git commit --amend --no-edit -S && gpsf" - -psgi "git add -A && git commit -m 'Update' -S && git push" -gps "git push" -gpsi "git config credential.helper store && git push" -# gpsn "git push --set-upstream origin master" -gpsn "eval (git push 2>&1 | tail -n 2)" -gpsf "git push --force" -gclear "git stash clear" - -gpl "git pull --rebase" -grba "git rebase --abort" -grbc "git rebase --continue" - -# }}} push # - -# }}} update # - -crm "mrk README.md" - -gcho "git checkout" -gchon "git checkout -b" -gf "git fetch origin" - -gcln "git clone" -gchp "git cherry-pick" -gchpc "git cherry-pick --continue" - -# assume file unchanged -gunc "git update-index --assume-unchanged" - -# }}} git # - -# coding projs {{{ # -# coding_dir="~/coding" - -zm "chezmoi" -za "chezmoi add" -zar "chezmoi add -r" -ze "chezmoi edit" -zp "chezmoi -v apply" - -rgt "rg TODO" - -# trapbot {{{ # -# tb "$cd_coding_dir/trapbot" - # vtb "$cd_coding_dir/trapbot && ni scan_reddit.py" - # ptb "python scan_reddit.py" - # rtb "$cd_coding_dir/trapbot && python scan_reddit.py" -# }}} trapbot # - -# spotify-lib-vis {{{ # - -# spv_dir="$coding_dir""/spotify-lib-vis" -# svl "f $spv_dir/src/login" -# sva "f $spv_dir/src/api" -# svg "f $spv_dir/src/graphs" -# svscs "f $spv_dir/src/static/scss" -# svcss "f $spv_dir/src/spotifyvis/static/scss" -# start spv server from dir -# pg "sudo systemctl start postgresql.service && systemctl status postgresql.service" -ssv "bash ../bin/activate && python manage.py runserver" -# start spv server outside dir -# open spv db in psql -spvdb "psql -d spotifyvis -U django" -mig "python manage.py makemigrations && python manage.py migrate --run-syncdb && ssv" -cldb "python manage.py flush --no-input && ssv" -# django shell -djs "python manage.py shell" -# update pip -upip "pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U" -# update pip req's. -ureq "pip freeze > requirements.txt" - -# show last history scan -hlg "cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1" -# scan history -# hs "$spv_dir/src/update-history.sh && cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1" -# scan cron log for hs cmd -crnl "grep \"(kevin) CMD\" /var/log/syslog | tail -n 1 && hlg" -# removes all but newest file -# rmol "ls -t | tail -n +2 | xargs rm -- && l" - -snw "spotify-now -i '%artist - %title'" - -# }}} spotify-lib-vis # - -shc "shellcheck" -pdl "pdflatex" -tcl "tex-clean" - -# mfs -mfs "nvim /home/kevin/coding/best-mf-site-personal/index.html" -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" - -rt "python ~/coding/rt-scraper/rt-scraper.py" - -# }}} coding projs # - -# school {{{ # - -wlf "watson log --all --tag=final" -wrf "watson report --all --tag=final" - -# 369 {{{ # - -ssc "ssh mokkar@teach.cs.utoronto.ca" - -ma "printf '\033c' && bear make" -mc "bear make clean" -mca "bear make clean && printf '\033c' && bear make" - -rmc "rm compile_commands.json" -rms "rm swapfile.*" -wl6 "watson log --all --project=369 --tag=a4" -wr6 "watson report --all --project=369 --tag=a4" - -um6 "sudo umount /mnt/369-a4" - -# a2 {{{ # - -mcr "bear make clean && printf '\033c' && bear make && ./carsim light 1 20" -# mr "printf '\033c' && make && ./carsim stop 10 20" -# mr "printf '\033c' && bear make && ./carsim light 1 20" -# "valgrind --tool=helgrind ./carsim stop 10 50 > helgrind.txt 2>&1 && valgrind --tool=helgrind ./carsim light 10 50 >> helgrind.txt 2>&1" -# lk "valgrind --leak-check=yes ./carsim stop 10 20" -lk "valgrind --leak-check=yes ./carsim light 1 1" -# hl "valgrind --tool=helgrind ./carsim stop 10 20" -hl "valgrind --tool=helgrind ./carsim light 10 20" - -# }}} a2 # - -# a1 -# sa "ssh k@192.168.0.17" -# 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{{{ - -wl0 "watson log --all --project=309 --tag=phase2" -wr0 "watson report --all --project=309 --tag=phase2" - -# apps -nd "node" -ndm "nodemon" -knd "killall node" -mg "mongo" - -# server -0ht "cd ~/school/309-proj && python3 -m http.server" -mgd "mongod --dbpath mongo-data" -# nds "killall node && nodemon server.js" -nds "nodemon server.js" - -# heroku -hr "heroku" -hrs "heroku local web" -hrt "heroku ps" -hrl "heroku logs --dyno web -n 1500 | rg up | awk '{ system(\"date -d \" \$1); \$1 = \"\"; print \$0 }' | paste -s -d' \n'" -gpsh "git push heroku" - -0c "node collections.js" - -# }}} - -# }}} school # diff --git a/key_aliases.tmpl b/key_aliases.tmpl new file mode 100644 index 0000000..eaab893 --- /dev/null +++ b/key_aliases.tmpl @@ -0,0 +1,384 @@ +# vim: fdm=indent + +# system + # clear screen + cs "printf '\033c'" + hst "history" + nf "printf '\033c' && neofetch | lolcat" + fi "fish" + # reload urxvt + ru "xrdb ~/.Xresources" + # list file sizes in megabytes with depth 1 + duh "sudo du -d 1 -h --apparent-size | sort -hr" + dum "sudo du -d 1 -m --apparent-size | sort -hr" + m "man" + 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 "sudo nvim /etc/default/grub" + mkgb "sudo grub-mkconfig -o /boot/grub/grub.cfg" + + b "bat" + ba "bat *" + grep "grep --color=auto -n" + grr "grep -r" + # pk "pkill -f" + cld "colordiff -wy --suppress-common-lines" + + mkpk "makepkg -sri" + ex "chmod 777" + ex "chmod 777" + + # systemctl # + ctl "sudo systemctl" + ctle "sudo systemctl enable" + ctld "sudo systemctl disable" + ctla "sudo systemctl start" + ctls "sudo systemctl stop" + ctlt "sudo systemctl status" + ctltd "sudo systemctl status dhcpcd" + ctlr "sudo systemctl restart" + + wm "sudo wifi-menu" + + # mounting + udm "udisksctl mount -b" + udmb "udisksctl mount -b /dev/sdc2" + udu "udisksctl unmount -b" + udub "udisksctl unmount -b /dev/sdc2" + + tc "touch" + vdr "vidir" + + # directory-related # + ls "lsd" + l "lsd -a" + ll "lsd -al" + smv "sudo mv" + f "cd" + fz "fzf" + fnd "find . -type f -name" + + rmr "rm -rf" + rmd "rm ~/Downloads/*" + rmw "rm ~/.local/share/nvim/swap/" + md "mkdir -p" + rsy "rsync -Pr" + + # list all (un)mounted drives + lhd "sudo fdisk -l" + # get disc space for mounted drives + # ds "df -h | tee >(head -n 1) >(grep sd) >/dev/null" + ds "df -h | head -n 1 && df -h | grep sd" + chownw "sudo chown -R {{ .chezmoi.group }}:wheel" + chwnm "sudo chown -R {{ .chezmoi.group }}:wheel /run/media/{{ .chezmoi.username }}" + # cd into backup folder and show backup sizes + nbu "cd /run/media/{{ .chezmoi.group }}/backup-hd/{{ .chezmoi.fullHostname }}/tar && lsd -l" + + # directory-related # + + # power options # + s "systemctl suspend" + so "xset dpms force off" + sd "systemctl poweroff" + rb "systemctl reboot" + lo "i3-msg exit" + x "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE" + X "xmodmap ~/.Xmodmap && xset r rate $XSET_DELAY $XSET_RATE" + + # sound + vlm "alsamixer -c 0" + vlh "alsamixer -c 2" + + # apt + # apti "sudo apt install" + # aptr "sudo apt remove" + # aptu "sudo apt upgrade" + + # pacman # + + # pc "sudo pacman -S" + # pcq "sudo pacman -Qi" + # pcr "sudo pacman -Rns" + # pcud "sudo pacman -Sy" + # pcug "sudo pacman -Syu" + # xpc "pacman -Qqne > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-pkgs.txt && pacman -Qqme > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-aur.txt " + + # tri "trizen -S --noconfirm" + tri "trizen -S --noedit" + + # install + ya "yay -S --answerdiff=N --answeredit=N" + # info + yaq "yay -Qi" + # remove + yar "yay -Rns" + # sync + yaud "yay -Sy" + # sync and update + yaug "yay -Syu" + # export packages + xya "yay -Qqne > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-pkgs.txt && yay -Qqme > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-aur.txt " + + py "python" + pipi "sudo pip install" + + # internet + pg "ping -c 3 -W 1 8.8.8.8" + dh "sudo dhcpcd" + kdh "sudo killall dhcpcd" + rdh "sudo killall dhcpcd && sudo dhcpcd" + + id "identify" + # rz "source ~/{{ .chezmoi.os }}-config/aliases/zsh_aliases" +# system + +chr "google-chrome" +# applications # + # silent="> /dev/null 2>&1& " + clc "cloc ." + cv "cava" + dg "dragon-drag-and-drop -x" + fh "feh" + gpd "gpg --decrypt" + gpe "gpg --encrypt --recipient" + htc "htop -s PERCENT_CPU" + htm "htop -s PERCENT_MEM" + kd "killall Discord && killall Discord" + kt "killall thunderbird" + mp "mpv --volume=50" + mra "man ranger" + n "nvim" + p3 "python3" + pdft "pdftotext" + pipes "pipes.sh -t 3" + py "python" + r "ranger" + rx "redshift -x" + sn "sudo nvim" + sx "sxiv" + sxa "sxiv -a" + sxt "sxiv -t *" + vmd "vimdiff" + wg "wego" + wp "grep wallpaper ~/.cache/wal/colors.sh" + zt "zathura --fork" + + lz "unzip -l" + + # rsl "java -jar ~/Downloads/RuneLite.jar" + # swex "sudo nohup ~/Downloads/swex.appimage $silent" + + # pass # + ps "pass" + psc "pass -c" + pse "pass edit" + psi "pass insert -m" + psg "pass generate -c" + pss "pass show" + + xc "xclip -selection clipboard" + yh "echo 'kevin.mok@live.ca' | xclip -selection clipboard" + yg "xclip -selection clipboard ~/.password-store/social/gmail" + yt "xclip -selection clipboard ~/.password-store/social/trapbot" + yu "echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard" + + w "watson" + wa "watson start" + wae "watson start && watson edit" + we "watson edit" + wl "watson log --day" + wla "watson log --all --tag=" + ww "watson log" + # wlm "watson log --project coding --tag mfs" + wr "watson report --day" + wrw "watson report" + wre "watson restart" + wree "watson restart && watson edit" + ws "watson status && watson stop" + wse "watson stop && watson edit" + wsc "watson cancel" + wsl "watson stop && watson log --day" + wt "watson status" +# applications # + +g "git" +# git # + gstr "git config credential.helper store" + + # branch # + gb "git branch" + gbd "git branch -D" + gba "git branch --no-merged && echo '' && git branch --merged" + gbu "git branch --no-merged" + gbm "git branch --merged" + + gmg "git merge" + gmgt "git mergetool" + + gr "git remote -v" + gro "git remote show origin" + + # add/remove # + ga "git add -A && git status -u" + gac "git add -A && git commit -S" + gaf "git add -f" + # unsigned commt + gacu "git add -A && git commit" + + grm "git rm" + grmf "git rm -f" + grmc "git rm --cached" + grmfc "git rm -f --cached" + grmor "rm (fd -e orig --no-ignore -H)" + # add # + + gd "git difftool -w --tool=vimdiff" + # diff/log # + gdc "git difftool -w --cached --tool=vimdiff" + gdl "git diff -w" + gdlc "git diff --cached -w" + gdh "git diff --cached -w HEAD~1" + gds "git diff --stat" + gl "git log" + gsl "git shortlog" + # diff/log # + + gs "git status -u" + # update # + gchom "git checkout master" + gchnw "git checkout -b wip" + gchw "git checkout wip" + gheadm1 "git reset --hard HEAD~1" + # show files in git repo + # gls "git ls-tree -r HEAD --name-only" + gls "git ls-tree HEAD --name-only" + + # push # + gst "git stash" + gstl "git stash list" + gstp "git stash pop" + + gc "git commit -S" + gcu "git commit" + gca "git add -A && git commit --amend --no-edit -S" + gcam "git add -A && git commit --amend -S" + # gcamp "git add -A && git commit --amend --no-edit -S && gpsf" + + psgi "git add -A && git commit -m 'Update' -S && git push" + gps "git push" + gpsi "git config credential.helper store && git push" + # gpsn "git push --set-upstream origin master" + gpsn "eval (git push 2>&1 | tail -n 2)" + gpsf "git push --force" + gclear "git stash clear" + + gpl "git pull --rebase" + grba "git rebase --abort" + grbc "git rebase --continue" + + crm "mrk README.md" + + gcho "git checkout" + gchon "git checkout -b" + gf "git fetch origin" + + gcln "git clone" + gchp "git cherry-pick" + gchpc "git cherry-pick --continue" + + # assume file unchanged + gunc "git update-index --assume-unchanged" +# git # + +rgt "rg TODO" +# coding projs # + ## chezmoi + zm "chezmoi" + za "chezmoi add" + zar "chezmoi add -r" + zd "chezmoi data" + ze "chezmoi edit" + zp "chezmoi -v apply" + + ssv "bash ../bin/activate && python manage.py runserver" + # spotify-lib-vis # + # start spv server outside dir + # open spv db in psql + spvdb "psql -d spotifyvis -U django" + mig "python manage.py makemigrations && python manage.py migrate --run-syncdb && ssv" + cldb "python manage.py flush --no-input && ssv" + # django shell + djs "python manage.py shell" + # update pip + upip "pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U" + # update pip req's. + ureq "pip freeze > requirements.txt" + + # show last history scan + hlg "cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1" + # scan history + # hs "$spv_dir/src/update-history.sh && cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1" + # scan cron log for hs cmd + crnl "grep \"({{ .chezmoi.group }}) CMD\" /var/log/syslog | tail -n 1 && hlg" + # removes all but newest file + # rmol "ls -t | tail -n +2 | xargs rm -- && l" + + snw "spotify-now -i '%artist - %title'" + + shc "shellcheck" + pdl "pdflatex" + tcl "tex-clean" + + # mfs + mfs "nvim {{ .chezmoi.homedir }}/coding/best-mf-site-personal/index.html" + ht "python3 -m http.server" + # j "jekyll" + # js "jekyll serve" + h "hugo" + he "hugo serve -D --disableFastRender" + + ss "ssh {{ .chezmoi.group }}@192.168.0.100" + ssb "ssh-bandit" + + rt "python ~/coding/rt-scraper/rt-scraper.py" +# coding projs # + +wlf "watson log --all --tag=final" +wrf "watson report --all --tag=final" +# school # + # 369 # + ssc "ssh mokkar@teach.cs.utoronto.ca" + + ma "printf '\033c' && bear make" + mc "bear make clean" + mca "bear make clean && printf '\033c' && bear make" + + rmc "rm compile_commands.json" + rms "rm swapfile.*" + + wl0 "watson log --all --project=309 --tag=phase2" + wr0 "watson report --all --project=309 --tag=phase2" + # 309 + # apps + nd "node" + ndm "nodemon" + knd "killall node" + mg "mongo" + + # server + 0ht "cd ~/school/309-proj && python3 -m http.server" + mgd "mongod --dbpath mongo-data" + # nds "killall node && nodemon server.js" + nds "nodemon server.js" + + # heroku + hr "heroku" + hrs "heroku local web" + hrt "heroku ps" + hrl "heroku logs --dyno web -n 1500 | rg up | awk '{ system(\"date -d \" \$1); \$1 = \"\"; print \$0 }' | paste -s -d' \n'" + gpsh "git push heroku" + + 0c "node collections.js" +# school # diff --git a/key_dirs b/key_dirs deleted file mode 100644 index 640a936..0000000 --- a/key_dirs +++ /dev/null @@ -1,63 +0,0 @@ -# sys {{{ * -# vim: fdm=marker - -bg /home/kevin/Pictures/Backgrounds -cf /home/kevin/.config -d /home/kevin/Downloads -D /home/kevin/Documents -fo /home/kevin/.config/fish -k /home/kevin/ -lf /mnt/linux-files -lfv /mnt/linux-files/Videos -me /run/media/kevin -o / -p /home/kevin/.password-store -P /home/kevin/Pictures -sw ~/.local/share/nvim/swap/ -tm /tmp -z /home/kevin/linux-config - -# }}} sys * - -# cdn {{{ * - -b1 /home/kevin/coding/mf-site/themes/base16 -cn /home/kevin/coding -ib /home/kevin/linux-config/i3blocks/.config/i3blocks/scripts -j /home/kevin/Documents/journal -lh /home/kevin/Documents/listening-history -ms /home/kevin/coding/mf-site -mh /home/kevin/coding/mf-site/layouts -# mg /home/kevin/coding/best-mf-site-personal -ra /home/kevin/.config/ranger -sr /home/kevin/linux-config/scripts -snp /home/kevin/.vim/plugged/vim-snippets/UltiSnips -sv /home/kevin/coding/spotify-lib-vis/src -swa /home/kevin/.local/share/nvim/swap -tx /home/kevin/linux-config/txt -wd /home/kevin/.config/watson -wo /home/kevin/Documents/workout-logs/11 - -# }}} cdn * - -# sch {{{ * - -lt /home/kevin/school/latex-notes - -# 309{{{ -sc /home/kevin/school -0c /home/kevin/school/309-proj/css -0d /home/kevin/school/309 -0j /home/kevin/school/309-proj/public/js -0l /home/kevin/school/309/l -0p /home/kevin/school/309-proj -0m /home/kevin/school/309-proj/mongo -e4 /home/kevin/school/309/e4 -# }}} - -6 /home/kevin/school/369 -6l /home/kevin/school/369/notes/lectures - -hp /home/kevin/school/hps - -# }}} sch * diff --git a/key_dirs.tmpl b/key_dirs.tmpl new file mode 100644 index 0000000..b44a1a9 --- /dev/null +++ b/key_dirs.tmpl @@ -0,0 +1,56 @@ +# vim: fdm=indent + +# sys * + bg {{ .chezmoi.homedir }}/Pictures/Backgrounds + c {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config + cf {{ .chezmoi.homedir }}/.config + d {{ .chezmoi.homedir }}/Downloads + D {{ .chezmoi.homedir }}/Documents + fo {{ .chezmoi.homedir }}/.config/fish + k {{ .chezmoi.homedir }}/ + lf /mnt/{{ .chezmoi.os }}-files + lfv /mnt/{{ .chezmoi.os }}-files/Videos + me /run/media/{{ .chezmoi.group }} + o / + p {{ .chezmoi.homedir }}/.password-store + P {{ .chezmoi.homedir }}/Pictures + sw {{ .chezmoi.homedir }}/.local/share/nvim/swap/ + tm /tmp +# sys * + +b1 {{ .chezmoi.homedir }}/coding/mf-site/themes/base16 +# cdn * + cn {{ .chezmoi.homedir }}/coding + ib {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/i3blocks/.config/i3blocks/scripts + j {{ .chezmoi.homedir }}/Documents/journal + lh {{ .chezmoi.homedir }}/Documents/listening-history + ms {{ .chezmoi.homedir }}/coding/mf-site + mh {{ .chezmoi.homedir }}/coding/mf-site/layouts + # mg {{ .chezmoi.homedir }}/coding/best-mf-site-personal + ra {{ .chezmoi.homedir }}/.config/ranger + sr {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/scripts + snp {{ .chezmoi.homedir }}/.vim/plugged/vim-snippets/UltiSnips + sv {{ .chezmoi.homedir }}/coding/spotify-lib-vis/src + swa {{ .chezmoi.homedir }}/.local/share/nvim/swap + tx {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/txt + wd {{ .chezmoi.homedir }}/.config/watson + wo {{ .chezmoi.homedir }}/Documents/workout-logs/11 +# cdn * + +lt {{ .chezmoi.homedir }}/school/latex-notes +# sch * + # 309 + sc {{ .chezmoi.homedir }}/school + 0c {{ .chezmoi.homedir }}/school/309-proj/css + 0d {{ .chezmoi.homedir }}/school/309 + 0j {{ .chezmoi.homedir }}/school/309-proj/public/js + 0l {{ .chezmoi.homedir }}/school/309/l + 0p {{ .chezmoi.homedir }}/school/309-proj + 0m {{ .chezmoi.homedir }}/school/309-proj/mongo + e4 {{ .chezmoi.homedir }}/school/309/e4 + + 6 {{ .chezmoi.homedir }}/school/369 + 6l {{ .chezmoi.homedir }}/school/369/notes/lectures + + hp {{ .chezmoi.homedir }}/school/hps +# sch * diff --git a/key_files b/key_files deleted file mode 100644 index fba948c..0000000 --- a/key_files +++ /dev/null @@ -1,56 +0,0 @@ -# sys {{{ * - -3 ~/linux-config/dot_config/i3/config -a ~/linux-config/key_aliases -d ~/linux-config/key_dirs -f ~/linux-config/key_files -i /home/kevin/.config/i3blocks/i3blocks.conf -p /home/kevin/linux-config/txt/pacman-pkgs/pacman-pkgs.txt -r /home/kevin/.config/ranger/rc.conf -sr /home/kevin/linux-config/configs/ranger/shortcuts.conf -ss /home/kevin/.shortcuts -u /home/kevin/.Xresources -v /home/kevin/.vimrc -x ~/linux-config/dot_config/private_fish/config.fish -y /home/kevin/.zshrc -z /home/kevin/linux-config/aliases/zsh_aliases - -# }}} sys * - -# cdn {{{ * - -cm /tmp/commit-msg.txt -cmd ./commit-msg.txt -hlg /home/kevin/coding/spotify-lib-vis/src/api/management/commands/update-history.log -id /home/kevin/coding/project-ideas/ideas.md -ig ./.gitignore -jn /home/kevin/Documents/journal/todo/2.md -jt /home/kevin/Documents/journal/todo/todo.md -lh /home/kevin/Documents/listening-history/polarbier.csv -mc /home/kevin/coding/mf-site/assets/sass/main.scss -mi /home/kevin/coding/mf-site/ideas.md -ne /home/kevin/linux-config/configs/neofetch/config.conf -re README.md -td todo.md -tm /home/kevin/.vim/plugged/vim-snippets/UltiSnips/texmath.snippets -wh /home/kevin/Documents/journal/todo/work-habit.md -wt /home/kevin/.config/watson/state.tmp - -# }}} cdn * - -# sch {{{ * - -# 309 {{{ * - -0c /home/kevin/school/309-proj/sass/main.scss -0h /home/kevin/school/309-proj/public/js/helpers.js -0i /home/kevin/school/309-proj/public/index.html -0m /home/kevin/school/309-proj/public/js/main.js -0f /home/kevin/school/309-proj/public/js/food.js -0s /home/kevin/school/309-proj/server.js -0t /home/kevin/school/309-proj/public/js/stores.js -0k /home/kevin/school/309-proj/json/kevin.md - -# }}} 309 * - -# }}} sch * diff --git a/key_files.tmpl b/key_files.tmpl new file mode 100644 index 0000000..6be6034 --- /dev/null +++ b/key_files.tmpl @@ -0,0 +1,50 @@ +# vim: fdm=indent + +# sys * + 3 ~/{{ .chezmoi.os }}-config/dot_config/i3/config + a ~/{{ .chezmoi.os }}-config/key_aliases.tmpl + d ~/{{ .chezmoi.os }}-config/key_dirs.tmpl + f ~/{{ .chezmoi.os }}-config/key_files.tmpl + i {{ .chezmoi.homedir }}/.config/i3blocks/i3blocks.conf + p {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/txt/pacman-pkgs/pacman-pkgs.txt + r {{ .chezmoi.homedir }}/.config/ranger/rc.conf + sr {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/configs/ranger/shortcuts.conf + ss {{ .chezmoi.homedir }}/.shortcuts + u {{ .chezmoi.homedir }}/.Xresources + v {{ .chezmoi.homedir }}/.vimrc + x ~/{{ .chezmoi.os }}-config/dot_config/private_fish/config.fish + y {{ .chezmoi.homedir }}/.zshrc + z {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/aliases/zsh_aliases +# sys * + +cm /tmp/commit-msg.txt +# cdn * + ci {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/txt/ideas.md + cmd ./commit-msg.txt + hlg {{ .chezmoi.homedir }}/coding/spotify-lib-vis/src/api/management/commands/update-history.log + id {{ .chezmoi.homedir }}/coding/project-ideas/ideas.md + ig ./.gitignore + jn {{ .chezmoi.homedir }}/Documents/journal/todo/2.md + jt {{ .chezmoi.homedir }}/Documents/journal/todo/todo.md + lh {{ .chezmoi.homedir }}/Documents/listening-history/polarbier.csv + mc {{ .chezmoi.homedir }}/coding/mf-site/assets/sass/main.scss + mi {{ .chezmoi.homedir }}/coding/mf-site/ideas.md + ne {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/configs/neofetch/config.conf + re README.md + td todo.md + tm {{ .chezmoi.homedir }}/.vim/plugged/vim-snippets/UltiSnips/texmath.snippets + wh {{ .chezmoi.homedir }}/Documents/journal/todo/work-habit.md + wt {{ .chezmoi.homedir }}/.config/watson/state.tmp +# cdn * + +0c {{ .chezmoi.homedir }}/school/309-proj/sass/main.scss +# sch * +# 309 * + 0h {{ .chezmoi.homedir }}/school/309-proj/public/js/helpers.js + 0i {{ .chezmoi.homedir }}/school/309-proj/public/index.html + 0m {{ .chezmoi.homedir }}/school/309-proj/public/js/main.js + 0f {{ .chezmoi.homedir }}/school/309-proj/public/js/food.js + 0s {{ .chezmoi.homedir }}/school/309-proj/server.js + 0t {{ .chezmoi.homedir }}/school/309-proj/public/js/stores.js + 0k {{ .chezmoi.homedir }}/school/309-proj/json/{{ .chezmoi.group }}.md +# sch * diff --git a/scripts/executable_sync-shortcuts b/scripts/executable_sync-shortcuts index af82697..dad8d4e 100644 --- a/scripts/executable_sync-shortcuts +++ b/scripts/executable_sync-shortcuts @@ -54,7 +54,7 @@ sed "s/\s*#.*$//;/^\s*$/d" "$key_files" | tee \ >(awk '{print "abbr v"$1, "\"$EDITOR "$2"\""}' >> "$fish_abbr") \ | awk '{print "map v"$1" shell $EDITOR "$2}' >> "$ranger_mappings" -sed -e '/^$/d' -e '/^[ \t#].*/d' "$key_aliases" | sort | tee \ +sed -e '/^$/d' -e '/[ ]*#.*/d' "$key_aliases" | sort | tee \ >(awk '{printf "abbr " $1; $1 = ""; print $0; }' >> "$fish_abbr") \ | awk '{ printf $1; @@ -62,4 +62,4 @@ sed -e '/^$/d' -e '/^[ \t#].*/d' "$key_aliases" | sort | tee \ printf "="; printf gensub(" ", "", 1, $0); print " \\"; - }' >> "$aliases" + }' >> "$aliases" diff --git a/txt/ideas.md b/txt/ideas.md index 01d1c9d..5faf3ee 100644 --- a/txt/ideas.md +++ b/txt/ideas.md @@ -1,9 +1,13 @@ # chezmoi -- edit chez dir files? +- root + - shortcut script + - fish config template - nvim setup -- fish config -- home dir var - merge laptop +- home server +- lab + - template bash file +# Other - nnn - spotify blocklet - escape chars. From 8dd7e28ad0cdd95add349c2737b3ecf0a445272f Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Sun, 21 Apr 2019 03:24:49 -0400 Subject: [PATCH 4/4] Update --- .gitignore | 1 + dot_config/chezmoi/chezmoi.toml.tmpl | 4 +++ dot_config/i3/config | 25 ++++++++------- .../i3blocks/scripts/executable_temperature | 2 +- dot_config/private_fish/config.fish | 7 +++-- .../private_functions/scan-history.fish | 2 +- dot_config/ranger/rc.conf | 13 ++++---- dot_vimrc | 16 ++++++---- dot_zshrc | 2 -- key_aliases.tmpl | 31 ++++++++++++------- key_dirs.tmpl | 6 +++- key_files.tmpl | 10 +++--- txt/exclude-dirs-backup.txt | 5 +-- txt/nzxt-aur.txt | 12 ++++++- txt/nzxt-pkgs.txt | 10 +++++- txt/{ideas.md => todo.md} | 2 +- 16 files changed, 96 insertions(+), 52 deletions(-) create mode 100644 .gitignore create mode 100644 dot_config/chezmoi/chezmoi.toml.tmpl rename txt/{ideas.md => todo.md} (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b2642fd --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +commit-msg.txt diff --git a/dot_config/chezmoi/chezmoi.toml.tmpl b/dot_config/chezmoi/chezmoi.toml.tmpl new file mode 100644 index 0000000..b5f897b --- /dev/null +++ b/dot_config/chezmoi/chezmoi.toml.tmpl @@ -0,0 +1,4 @@ +sourceDir = "{{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config" + +[data] + gui = true diff --git a/dot_config/i3/config b/dot_config/i3/config index ff4c31d..3d88fa8 100644 --- a/dot_config/i3/config +++ b/dot_config/i3/config @@ -3,7 +3,7 @@ set $browser "firefox" # set $browser "chromium" set $def_term "urxvt" -set $scripts_path "/home/kevin/linux-config/scripts" +set $scripts_path "/home/kevin/scripts" exec redshift -O 2000 # exec redshift -O 3000 # random bg @@ -37,7 +37,7 @@ bindsym control+Return exec $def_term bindsym Mod4+a exec studio bindsym Mod4+b layout tabbed; exec zathura bindsym Mod4+c exec $browser -bindsym Mod4+e exec notify-send "HPS Word Count" "$(pdftotext /home/kevin/school/latex-notes/hps/essay.pdf - | wc -w)" +# bindsym Mod4+e exec notify-send "HPS Word Count" "$(pdftotext /home/kevin/school/latex-notes/hps/essay.pdf - | wc -w)" bindsym Mod4+f exec firefox bindsym Mod4+$mod+f exec echo 'Kevin@fosstodon.org' | xclip -selection clipboard bindsym Mod4+h exec echo 'kevin.mok@live.ca' | xclip -selection clipboard @@ -237,13 +237,16 @@ assign [class="Steam"] $ws5 bindsym $mod+F5 workspace $ws5; exec $browser bindsym Mod4+g workspace $ws5; layout stacking; exec urxvt -e steam bindsym Mod4+t workspace $ws5; exec thunderbird +bindsym Mod4+5 workspace $ws5; exec cd ~/coding/ada-mario-prep && godot -e +for_window [class="ada-mario-prep"] floating enable +for_window [class="Move_mouse_with_head"] floating enable set $ws6 "6 " workspace $ws6 output $samsung assign [class="Slack"] $ws6 bindsym Mod4+d workspace $ws6; exec discord bindsym Mod4+i workspace $ws6; exec firefox -new-window https://riot.im/app/#/home -# bindsym Mod4+k workspace $ws6; exec slack +bindsym Mod4+k workspace $ws6; exec slack set $ws7 "7 " # set $ws7 "7 📤" @@ -305,10 +308,10 @@ bindsym $mod+8 workspace $ws8 bindsym $mod+9 workspace $ws9 bindsym $mod+0 workspace $ws10 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 +# 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 {{{ # @@ -431,8 +434,8 @@ bar { inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $fg } tray_output none - # status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf - status_command 2>/tmp/i3blocks.err i3blocks -vvv -c ~/.config/i3blocks/i3blocks.conf | tee /tmp/i3blocks.out + status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf + # status_command 2>/tmp/i3blocks.err i3blocks -vvv -c ~/.config/i3blocks/i3blocks.conf | tee /tmp/i3blocks.out output $benq wheel_up_cmd nop wheel_down_cmd nop @@ -456,8 +459,8 @@ bar { active_workspace $inactive_ws_bg $fg$active_ws_trans $fg inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $fg } - # status_command i3blocks -c ~/.config/sam-i3blocks/sam-i3blocks.conf - status_command 2>/tmp/i3blocks-sam.err i3blocks -vvv -c ~/.config/i3blocks/sam-i3blocks.conf | tee /tmp/i3blocks-sam.out + status_command i3blocks -c ~/.config/i3blocks/sam-i3blocks.conf + # status_command 2>/tmp/i3blocks-sam.err i3blocks -vvv -c ~/.config/i3blocks/sam-i3blocks.conf | tee /tmp/i3blocks-sam.out tray_output none wheel_up_cmd nop wheel_down_cmd nop diff --git a/dot_config/i3blocks/scripts/executable_temperature b/dot_config/i3blocks/scripts/executable_temperature index e436e98..68ff2a2 100644 --- a/dot_config/i3blocks/scripts/executable_temperature +++ b/dot_config/i3blocks/scripts/executable_temperature @@ -3,5 +3,5 @@ . "/home/kevin/.cache/wal/colors.sh" temps="$(sensors | rg 'temp1:.*' | awk '{ print $2 }' | rg -o '\d{2}' | \ - sed 's/$/°C/' | tr '\n' ' ' | xargs)" + sort -r | sed 's/$/°C/' | tr '\n' ' ' | xargs)" printf "%s\n\n%s\n" "$temps" "$color7" diff --git a/dot_config/private_fish/config.fish b/dot_config/private_fish/config.fish index d789bad..2ec4249 100644 --- a/dot_config/private_fish/config.fish +++ b/dot_config/private_fish/config.fish @@ -23,8 +23,8 @@ bind \cr forward-word chezmoi apply /home/kevin/scripts/sync-shortcuts source /home/kevin/.config/fish/key_abbr.fish -# set -U fish_fxn_dir "/home/kevin/linux-config/fish/.config/fish/functions" -set -U fish_fxn_dir "/home/kevin/.config/fish/functions" +set -U fish_fxn_dir "/home/kevin/linux-config/dot_config/private_fish/private_functions" +# set -U fish_fxn_dir "/home/kevin/.config/fish/functions" abbr ff "cd $fish_fxn_dir" for fxn in (find $fish_fxn_dir -name '*.fish') source $fxn @@ -45,6 +45,9 @@ set -U spv_dir "/home/kevin/coding/spotify-lib-vis" set -U mfs_dir "/home/kevin/coding/mf-site" set -x PATH $PATH /home/kevin/scripts /home/kevin/scripts/colors /home/kevin/go/bin +set -x LD_LIBRARY_PATH $LD_LIBRARY_PATH /usr/local/lib /usr/local/lib64 +set -x PKG_CONFIG_PATH $PKG_CONFIG_PATH /usr/lib/pkgconfig + set -x PASSWORD_STORE_CLIP_TIME 120 set -xU XSET_RATE 90 set -xU XSET_DELAY 200 diff --git a/dot_config/private_fish/private_functions/scan-history.fish b/dot_config/private_fish/private_functions/scan-history.fish index 7b2bea5..36f3c5d 100644 --- a/dot_config/private_fish/private_functions/scan-history.fish +++ b/dot_config/private_fish/private_functions/scan-history.fish @@ -1,7 +1,7 @@ function scan-history sudo systemctl start postgresql.service # and systemctl status postgresql.service - and source $spv_dir/src/api-keys.sh + and source $spv_dir/src/scripts/api-keys.sh and $spv_dir/src/scripts/update-history.sh and cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1 end diff --git a/dot_config/ranger/rc.conf b/dot_config/ranger/rc.conf index 1cd4833..aad4842 100644 --- a/dot_config/ranger/rc.conf +++ b/dot_config/ranger/rc.conf @@ -365,7 +365,6 @@ map gm cd /media map gM cd /mnt map gs cd /srv map gp cd /tmp -# map gr cd / map gR eval fm.cd(ranger.RANGERDIR) map g/ cd / map g? cd /usr/share/doc/ranger @@ -421,7 +420,8 @@ map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) # Searching map / console search%space -map gr fzf_select +# map gr fzf_select +map rg fzf_select map n search_next map N search_next forward=False map ct search_next order=tag @@ -677,10 +677,10 @@ map rr source ~/.config/ranger/rc.conf # backgrounds {{{ # map w shell /usr/bin/wal -i %f -map bde shell mv %f dim/editing -map bdn shell mv %f dim/non-editing -map bbe shell mv %f bright/editing -map bbn shell mv %f bright/non-editing +map bde shell mv %f /home/kevin/Pictures/Backgrounds/dim/editing +map bdn shell mv %f /home/kevin/Pictures/Backgrounds/dim/non-editing +map bbe shell mv %f /home/kevin/Pictures/Backgrounds/bright/editing +map bbn shell mv %f /home/kevin/Pictures/Backgrounds/bright/non-editing map be shell mv %f editing map bn shell mv %f non-editing @@ -695,7 +695,6 @@ map zr shell unzip %f && rm %f map e. open_with evince f map v. shell $EDITOR %f -# map gr fzf_select source /home/kevin/.config/ranger/key_mappings.conf map dg shell dragon-drag-and-drop -a -x %p diff --git a/dot_vimrc b/dot_vimrc index f8133bd..8fa2e95 100644 --- a/dot_vimrc +++ b/dot_vimrc @@ -26,7 +26,7 @@ set timeoutlen=350 set tw=75 set undodir=~/.vim/undo set undofile -set updatetime=2000 +set updatetime=1000 autocmd VimResized * wincmd = filetype plugin on @@ -52,14 +52,17 @@ autocmd FileType *css,htmldjango,html,javascript,json,markdown,tex,text,yaml set " autocmd BufNewFile,BufRead *.md set filetype=markdown " autocmd Filetype markdown set textwidth=0 " autocmd Filetype html set foldmarker=0 +autocmd BufNewFile,BufRead *.gd set expandtab! autocmd Filetype markdown map :LivedownToggle -autocmd Filetype markdown inoremap >>A +autocmd Filetype markdown nnoremap >>A autocmd Filetype markdown inoremap < >>A +autocmd Filetype markdown inoremap >> > autocmd FileType markdown,tex,text set spell spelllang=en_us -autocmd Filetype javascript set updatetime=1000 autocmd Filetype json nnoremap j :%!python -m json.tool autocmd Filetype json set foldmethod=marker autocmd FileType sh map :!clear && shellcheck % +autocmd FileType tex set updatetime=3000 autocmd FileType tex map :VimtexCompile autocmd VimEnter *.tex VimtexCompile autocmd VimLeave *.tex !tex-clean %:p @@ -179,6 +182,7 @@ Plug 'scrooloose/nerdcommenter' " add quotes/brackets around chunks of text easily Plug 'tpope/vim-surround' + nmap S ys " navigate around file easily and precisely Plug 'easymotion/vim-easymotion' @@ -220,9 +224,10 @@ Plug 'tpope/vim-fugitive' " auto reload file Plug 'djoshea/vim-autoread' " Plug 'mustache/vim-mustache-handlebars' +" Plug 'trapd00r/vim-syntax-vidir-ls' +Plug 'calviken/vim-gdscript3' call plug#end() - " }}} vim-plug " " colorscheme gotham256 @@ -232,7 +237,6 @@ colorscheme wal nnoremap > >> nnoremap < << -inoremap >> >>A inoremap << < | let mapleader="\" " find alias -nnoremap a /^ +nnoremap a / " replace until end of line nnoremap c c$ " delete entire buffer diff --git a/dot_zshrc b/dot_zshrc index d6d46c0..a1579df 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -96,7 +96,6 @@ plugins=( # }}} default # source $ZSH/oh-my-zsh.sh -source ~/linux-config/aliases/zsh_aliases # ZSH_THEME="bira" # ZSH_THEME="miloshadzic" @@ -171,7 +170,6 @@ fi # # }}} autoreload zsh aliases # -source /home/kevin/coding/spotify-lib-vis/src/api-keys.sh [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh export GPG_TTY=$(tty) diff --git a/key_aliases.tmpl b/key_aliases.tmpl index eaab893..be34014 100644 --- a/key_aliases.tmpl +++ b/key_aliases.tmpl @@ -2,9 +2,10 @@ # system # clear screen - cs "printf '\033c'" + c "printf '\033c'" hst "history" - nf "printf '\033c' && neofetch | lolcat" + ## nf "printf '\033c' && neofetch | lolcat" + nf "printf '\033c' && neofetch" fi "fish" # reload urxvt ru "xrdb ~/.Xresources" @@ -49,7 +50,7 @@ udub "udisksctl unmount -b /dev/sdc2" tc "touch" - vdr "vidir" + vd "vidir --verbose" # directory-related # ls "lsd" @@ -109,15 +110,17 @@ tri "trizen -S --noedit" # install - ya "yay -S --answerdiff=N --answeredit=N" + ya "yay -S --answerclean=None --answerdiff=None --answeredit=None" # info yaq "yay -Qi" # remove yar "yay -Rns" # sync yaud "yay -Sy" + # sync and download + yaugd "yay -Syuw --answerclean=None --answerdiff=None --answeredit=None" # sync and update - yaug "yay -Syu" + yaug "yay -Syu --answerclean=None --answerdiff=None --answeredit=None" # export packages xya "yay -Qqne > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-pkgs.txt && yay -Qqme > ~/{{ .chezmoi.os }}-config/txt/{{ .chezmoi.fullHostname }}-aur.txt " @@ -145,7 +148,11 @@ chr "google-chrome" gpe "gpg --encrypt --recipient" htc "htop -s PERCENT_CPU" htm "htop -s PERCENT_MEM" - kd "killall Discord && killall Discord" + i "sxiv" + ig "sxiv -a" + it "sxiv -t *" + ka "killall" + kd "killall Discord && killall Discord && killall slack" kt "killall thunderbird" mp "mpv --volume=50" mra "man ranger" @@ -157,13 +164,10 @@ chr "google-chrome" r "ranger" rx "redshift -x" sn "sudo nvim" - sx "sxiv" - sxa "sxiv -a" - sxt "sxiv -t *" vmd "vimdiff" wg "wego" wp "grep wallpaper ~/.cache/wal/colors.sh" - zt "zathura --fork" + z "zathura --fork" lz "unzip -l" @@ -193,6 +197,7 @@ chr "google-chrome" ww "watson log" # wlm "watson log --project coding --tag mfs" wr "watson report --day" + wra "watson report --all" wrw "watson report" wre "watson restart" wree "watson restart && watson edit" @@ -302,7 +307,7 @@ rgt "rg TODO" ze "chezmoi edit" zp "chezmoi -v apply" - ssv "bash ../bin/activate && python manage.py runserver" + ssv "source ../bin/activate.fish && python manage.py runserver" # spotify-lib-vis # # start spv server outside dir # open spv db in psql @@ -342,7 +347,9 @@ rgt "rg TODO" ss "ssh {{ .chezmoi.group }}@192.168.0.100" ssb "ssh-bandit" - rt "python ~/coding/rt-scraper/rt-scraper.py" + rt "python ~/coding/rt-scraper/!rt-scraper.py" + + med "printf '\033c' && bear make move_mouse_with_head && ./move_mouse_with_head" # coding projs # wlf "watson log --all --tag=final" diff --git a/key_dirs.tmpl b/key_dirs.tmpl index b44a1a9..c033ce4 100644 --- a/key_dirs.tmpl +++ b/key_dirs.tmpl @@ -2,12 +2,12 @@ # sys * bg {{ .chezmoi.homedir }}/Pictures/Backgrounds - c {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config cf {{ .chezmoi.homedir }}/.config d {{ .chezmoi.homedir }}/Downloads D {{ .chezmoi.homedir }}/Documents fo {{ .chezmoi.homedir }}/.config/fish k {{ .chezmoi.homedir }}/ + lc {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config lf /mnt/{{ .chezmoi.os }}-files lfv /mnt/{{ .chezmoi.os }}-files/Videos me /run/media/{{ .chezmoi.group }} @@ -20,10 +20,13 @@ b1 {{ .chezmoi.homedir }}/coding/mf-site/themes/base16 # cdn * + 2d {{ .chezmoi.homedir }}/coding/godot-demos/2d-plat + ad {{ .chezmoi.homedir }}/coding/ada-mario-prep cn {{ .chezmoi.homedir }}/coding ib {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/i3blocks/.config/i3blocks/scripts j {{ .chezmoi.homedir }}/Documents/journal lh {{ .chezmoi.homedir }}/Documents/listening-history + mm {{ .chezmoi.homedir }}/coding/move-mouse-with-head ms {{ .chezmoi.homedir }}/coding/mf-site mh {{ .chezmoi.homedir }}/coding/mf-site/layouts # mg {{ .chezmoi.homedir }}/coding/best-mf-site-personal @@ -31,6 +34,7 @@ b1 {{ .chezmoi.homedir }}/coding/mf-site/themes/base16 sr {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/scripts snp {{ .chezmoi.homedir }}/.vim/plugged/vim-snippets/UltiSnips sv {{ .chezmoi.homedir }}/coding/spotify-lib-vis/src + svg {{ .chezmoi.homedir }}/coding/spotify-lib-vis/src/graphs/static/graphs/scripts swa {{ .chezmoi.homedir }}/.local/share/nvim/swap tx {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/txt wd {{ .chezmoi.homedir }}/.config/watson diff --git a/key_files.tmpl b/key_files.tmpl index 6be6034..b45741c 100644 --- a/key_files.tmpl +++ b/key_files.tmpl @@ -3,15 +3,15 @@ # sys * 3 ~/{{ .chezmoi.os }}-config/dot_config/i3/config a ~/{{ .chezmoi.os }}-config/key_aliases.tmpl - d ~/{{ .chezmoi.os }}-config/key_dirs.tmpl + dr ~/{{ .chezmoi.os }}-config/key_dirs.tmpl f ~/{{ .chezmoi.os }}-config/key_files.tmpl i {{ .chezmoi.homedir }}/.config/i3blocks/i3blocks.conf p {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/txt/pacman-pkgs/pacman-pkgs.txt - r {{ .chezmoi.homedir }}/.config/ranger/rc.conf + r {{ .chezmoi.homedir }}/linux-config/dot_config/ranger/rc.conf sr {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/configs/ranger/shortcuts.conf ss {{ .chezmoi.homedir }}/.shortcuts u {{ .chezmoi.homedir }}/.Xresources - v {{ .chezmoi.homedir }}/.vimrc + v {{ .chezmoi.homedir }}/linux-config/dot_vimrc x ~/{{ .chezmoi.os }}-config/dot_config/private_fish/config.fish y {{ .chezmoi.homedir }}/.zshrc z {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/aliases/zsh_aliases @@ -19,6 +19,7 @@ cm /tmp/commit-msg.txt # cdn * + bid {{ .chezmoi.homedir }}/coding/project-ideas/blog.md ci {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/txt/ideas.md cmd ./commit-msg.txt hlg {{ .chezmoi.homedir }}/coding/spotify-lib-vis/src/api/management/commands/update-history.log @@ -31,7 +32,8 @@ cm /tmp/commit-msg.txt mi {{ .chezmoi.homedir }}/coding/mf-site/ideas.md ne {{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config/configs/neofetch/config.conf re README.md - td todo.md + t todo.md + tt txt/todo.md tm {{ .chezmoi.homedir }}/.vim/plugged/vim-snippets/UltiSnips/texmath.snippets wh {{ .chezmoi.homedir }}/Documents/journal/todo/work-habit.md wt {{ .chezmoi.homedir }}/.config/watson/state.tmp diff --git a/txt/exclude-dirs-backup.txt b/txt/exclude-dirs-backup.txt index 74e0bc9..e091064 100644 --- a/txt/exclude-dirs-backup.txt +++ b/txt/exclude-dirs-backup.txt @@ -1,8 +1,9 @@ +/home/kevin/.cache +/home/kevin/.local/share/Steam/steamapps/common +/home/kevin/.ACEStream /home/kevin/.android /home/kevin/.AndroidStudio3.3 /home/kevin/Android -/home/kevin/.cache -/home/kevin/.local/share/Steam/steamapps/common /lost+found /mnt /proc diff --git a/txt/nzxt-aur.txt b/txt/nzxt-aur.txt index 3540538..0896cbe 100644 --- a/txt/nzxt-aur.txt +++ b/txt/nzxt-aur.txt @@ -1,6 +1,9 @@ +acestream-engine +acestream-player android-studio +aurvote bear -browserpass +chezmoi chromium-widevine cliqz-bin curseradio-git @@ -8,10 +11,12 @@ discord dragon-drag-and-drop-git ffcast flashplugin-focusfix +godot-bin heroku-cli htop-vim-git i3blocks-git insomnia +libavutil-52 linux-kevin linux-kevin-headers linux-nzxt @@ -27,8 +32,10 @@ pipes.sh pycp qdirstat riot-desktop-git +robo3t-bin rxvt-unicode-pixbuf sc-im +slack-desktop-dark spotify spotify-now-git st @@ -37,6 +44,8 @@ systemd-numlockontty texlive-local-algorithmicx texlive-local-algorithms texlive-local-biblatex +texlive-local-biblatex-apa +texlive-local-csquotes texlive-local-enumitem texlive-local-ifmtarg texlive-local-logreq @@ -55,5 +64,6 @@ vidir watson weechat-vimode-git wego +wpa_actiond yad yay diff --git a/txt/nzxt-pkgs.txt b/txt/nzxt-pkgs.txt index 872d39f..d08be77 100644 --- a/txt/nzxt-pkgs.txt +++ b/txt/nzxt-pkgs.txt @@ -1,4 +1,5 @@ alsa-utils +android-file-transfer apache arch-install-scripts asp @@ -11,7 +12,9 @@ biber bison bookworm broadcom-wl +browserpass bzip2 +calcurse certbot chromium cloc @@ -42,6 +45,7 @@ firefox fish flashplugin flex +fortune-mod fzf gawk gcc @@ -54,6 +58,7 @@ glibc grep grub gzip +hdf5 hexyl highlight hugo @@ -117,6 +122,7 @@ procps-ng psmisc pulseaudio python-dbus +python-numpy python-pip python-pywal python-setuptools @@ -146,6 +152,7 @@ sysfsutils sysstat systemd-sysvcompat tar +termdown texinfo texlive-core the_silver_searcher @@ -167,15 +174,16 @@ valgrind vi vim virtualbox +vtk w3m which wireless_tools wkhtmltopdf -wpa_actiond wpa_supplicant xautomation xbindkeys xclip +xdotool xf86-input-evdev xf86-input-keyboard xf86-input-mouse diff --git a/txt/ideas.md b/txt/todo.md similarity index 100% rename from txt/ideas.md rename to txt/todo.md index 5faf3ee..c111197 100644 --- a/txt/ideas.md +++ b/txt/todo.md @@ -1,9 +1,9 @@ # chezmoi +- merge laptop - root - shortcut script - fish config template - nvim setup -- merge laptop - home server - lab - template bash file