17
.chezmoiignore
Normal file
17
.chezmoiignore
Normal file
@@ -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 }}
|
||||||
15
.gitignore
vendored
15
.gitignore
vendored
@@ -1,16 +1 @@
|
|||||||
mpv/.config/mpv/watch_later/*
|
|
||||||
|
|
||||||
*.html
|
|
||||||
*.sw*
|
|
||||||
|
|
||||||
cp-*
|
|
||||||
commit-msg.txt
|
commit-msg.txt
|
||||||
core
|
|
||||||
ideas.md
|
|
||||||
temp.sh
|
|
||||||
|
|
||||||
# ranger
|
|
||||||
bookmarks
|
|
||||||
history
|
|
||||||
tagged
|
|
||||||
key_mappings.conf
|
|
||||||
|
|||||||
@@ -1,460 +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"
|
|
||||||
z "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"
|
|
||||||
|
|
||||||
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 #
|
|
||||||
@@ -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 #
|
|
||||||
@@ -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
|
|
||||||
4
dot_config/chezmoi/chezmoi.toml.tmpl
Normal file
4
dot_config/chezmoi/chezmoi.toml.tmpl
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
sourceDir = "{{ .chezmoi.homedir }}/{{ .chezmoi.os }}-config"
|
||||||
|
|
||||||
|
[data]
|
||||||
|
gui = true
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
set $browser "firefox"
|
set $browser "firefox"
|
||||||
# set $browser "chromium"
|
# set $browser "chromium"
|
||||||
set $def_term "urxvt"
|
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 2000
|
||||||
# exec redshift -O 3000
|
# exec redshift -O 3000
|
||||||
# random bg
|
# random bg
|
||||||
@@ -37,7 +37,7 @@ bindsym control+Return exec $def_term
|
|||||||
bindsym Mod4+a exec studio
|
bindsym Mod4+a exec studio
|
||||||
bindsym Mod4+b layout tabbed; exec zathura
|
bindsym Mod4+b layout tabbed; exec zathura
|
||||||
bindsym Mod4+c exec $browser
|
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+f exec firefox
|
||||||
bindsym Mod4+$mod+f exec echo 'Kevin@fosstodon.org' | xclip -selection clipboard
|
bindsym Mod4+$mod+f exec echo 'Kevin@fosstodon.org' | xclip -selection clipboard
|
||||||
bindsym Mod4+h exec echo 'kevin.mok@live.ca' | 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 $mod+F5 workspace $ws5; exec $browser
|
||||||
bindsym Mod4+g workspace $ws5; layout stacking; exec urxvt -e steam
|
bindsym Mod4+g workspace $ws5; layout stacking; exec urxvt -e steam
|
||||||
bindsym Mod4+t workspace $ws5; exec thunderbird
|
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 "
|
set $ws6 "6 "
|
||||||
workspace $ws6 output $samsung
|
workspace $ws6 output $samsung
|
||||||
assign [class="Slack"] $ws6
|
assign [class="Slack"] $ws6
|
||||||
bindsym Mod4+d workspace $ws6; exec discord
|
bindsym Mod4+d workspace $ws6; exec discord
|
||||||
bindsym Mod4+i workspace $ws6; exec firefox -new-window https://riot.im/app/#/home
|
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 "
|
||||||
# set $ws7 "7 📤"
|
# set $ws7 "7 📤"
|
||||||
@@ -305,10 +308,10 @@ bindsym $mod+8 workspace $ws8
|
|||||||
bindsym $mod+9 workspace $ws9
|
bindsym $mod+9 workspace $ws9
|
||||||
bindsym $mod+0 workspace $ws10
|
bindsym $mod+0 workspace $ws10
|
||||||
bindsym Mod4+1 workspace $ws11
|
bindsym Mod4+1 workspace $ws11
|
||||||
bindsym Mod4+2 workspace $ws12
|
# bindsym Mod4+2 workspace $ws12
|
||||||
bindsym Mod4+3 workspace $ws13
|
# bindsym Mod4+3 workspace $ws13
|
||||||
bindsym Mod4+4 workspace $ws14
|
# bindsym Mod4+4 workspace $ws14
|
||||||
bindsym Mod4+5 workspace $ws15
|
# bindsym Mod4+5 workspace $ws15
|
||||||
# }}} ws bindings #
|
# }}} ws bindings #
|
||||||
|
|
||||||
# move container to ws {{{ #
|
# move container to ws {{{ #
|
||||||
@@ -431,8 +434,8 @@ bar {
|
|||||||
inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $fg
|
inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $fg
|
||||||
}
|
}
|
||||||
tray_output none
|
tray_output none
|
||||||
# status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
|
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 2>/tmp/i3blocks.err i3blocks -vvv -c ~/.config/i3blocks/i3blocks.conf | tee /tmp/i3blocks.out
|
||||||
output $benq
|
output $benq
|
||||||
wheel_up_cmd nop
|
wheel_up_cmd nop
|
||||||
wheel_down_cmd nop
|
wheel_down_cmd nop
|
||||||
@@ -456,8 +459,8 @@ bar {
|
|||||||
active_workspace $inactive_ws_bg $fg$active_ws_trans $fg
|
active_workspace $inactive_ws_bg $fg$active_ws_trans $fg
|
||||||
inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_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 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
|
# status_command 2>/tmp/i3blocks-sam.err i3blocks -vvv -c ~/.config/i3blocks/sam-i3blocks.conf | tee /tmp/i3blocks-sam.out
|
||||||
tray_output none
|
tray_output none
|
||||||
wheel_up_cmd nop
|
wheel_up_cmd nop
|
||||||
wheel_down_cmd nop
|
wheel_down_cmd nop
|
||||||
@@ -25,6 +25,12 @@ interval=once
|
|||||||
signal=1
|
signal=1
|
||||||
interval=60
|
interval=60
|
||||||
|
|
||||||
|
[spotify]
|
||||||
|
label=
|
||||||
|
LONG_NAME=
|
||||||
|
SHORT_NAME=
|
||||||
|
interval=5
|
||||||
|
|
||||||
[calendar]
|
[calendar]
|
||||||
interval=30
|
interval=30
|
||||||
label=
|
label=
|
||||||
@@ -30,6 +30,7 @@ interval=30
|
|||||||
label=
|
label=
|
||||||
DATEFMT=+%H:%M.%a-%m-%d
|
DATEFMT=+%H:%M.%a-%m-%d
|
||||||
# SHORTFMT=+%H:%M:%S
|
# SHORTFMT=+%H:%M:%S
|
||||||
|
SHORTFMT=+%H:%M.%a-%m-%d
|
||||||
HEIGHT=180
|
HEIGHT=180
|
||||||
WIDTH=220
|
WIDTH=220
|
||||||
|
|
||||||
0
i3blocks/.config/i3blocks/scripts/backlight → dot_config/i3blocks/scripts/executable_backlight
Executable file → Normal file
0
i3blocks/.config/i3blocks/scripts/backlight → dot_config/i3blocks/scripts/executable_backlight
Executable file → Normal file
0
i3blocks/.config/i3blocks/scripts/battery → dot_config/i3blocks/scripts/executable_battery
Executable file → Normal file
0
i3blocks/.config/i3blocks/scripts/battery → dot_config/i3blocks/scripts/executable_battery
Executable file → Normal file
0
i3blocks/.config/i3blocks/scripts/calendar → dot_config/i3blocks/scripts/executable_calendar
Executable file → Normal file
0
i3blocks/.config/i3blocks/scripts/calendar → dot_config/i3blocks/scripts/executable_calendar
Executable file → Normal file
0
i3blocks/.config/i3blocks/scripts/cpu_usage → dot_config/i3blocks/scripts/executable_cpu_usage
Executable file → Normal file
0
i3blocks/.config/i3blocks/scripts/cpu_usage → dot_config/i3blocks/scripts/executable_cpu_usage
Executable file → Normal file
0
i3blocks/.config/i3blocks/scripts/load_average → dot_config/i3blocks/scripts/executable_load_average
Executable file → Normal file
0
i3blocks/.config/i3blocks/scripts/load_average → dot_config/i3blocks/scripts/executable_load_average
Executable file → Normal file
0
i3blocks/.config/i3blocks/scripts/memory → dot_config/i3blocks/scripts/executable_memory
Executable file → Normal file
0
i3blocks/.config/i3blocks/scripts/memory → dot_config/i3blocks/scripts/executable_memory
Executable file → Normal file
0
i3blocks/.config/i3blocks/scripts/name → dot_config/i3blocks/scripts/executable_name
Executable file → Normal file
0
i3blocks/.config/i3blocks/scripts/name → dot_config/i3blocks/scripts/executable_name
Executable file → Normal file
6
i3blocks/.config/i3blocks/scripts/spotify → dot_config/i3blocks/scripts/executable_spotify
Executable file → Normal file
6
i3blocks/.config/i3blocks/scripts/spotify → dot_config/i3blocks/scripts/executable_spotify
Executable file → Normal file
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
LONG_NAME=${LONG_NAME:-"%artist - %title"}
|
||||||
|
SHORT_NAME=${SHORT_NAME:-"%title"}
|
||||||
case "$BLOCK_BUTTON" in
|
case "$BLOCK_BUTTON" in
|
||||||
1) dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause ;;
|
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 ;;
|
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
|
esac
|
||||||
|
|
||||||
. "/home/kevin/.cache/wal/colors.sh"
|
. "/home/kevin/.cache/wal/colors.sh"
|
||||||
long_title=$(spotify-now -i '%artist - %title' -p '' -e '' | sed 's/&/&/g')
|
long_title=$(spotify-now -i "$LONG_NAME" -p '' -e '' | sed 's/&/&/g')
|
||||||
short_title=$(spotify-now -i '%title' -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"
|
printf "$long_title\n$short_title\n%s\n" "$color7"
|
||||||
2
i3blocks/.config/i3blocks/scripts/temperature → dot_config/i3blocks/scripts/executable_temperature
Executable file → Normal file
2
i3blocks/.config/i3blocks/scripts/temperature → dot_config/i3blocks/scripts/executable_temperature
Executable file → Normal file
@@ -3,5 +3,5 @@
|
|||||||
. "/home/kevin/.cache/wal/colors.sh"
|
. "/home/kevin/.cache/wal/colors.sh"
|
||||||
|
|
||||||
temps="$(sensors | rg 'temp1:.*' | awk '{ print $2 }' | rg -o '\d{2}' | \
|
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"
|
printf "%s\n\n%s\n" "$temps" "$color7"
|
||||||
0
i3blocks/.config/i3blocks/scripts/time → dot_config/i3blocks/scripts/executable_time
Executable file → Normal file
0
i3blocks/.config/i3blocks/scripts/time → dot_config/i3blocks/scripts/executable_time
Executable file → Normal file
2
i3blocks/.config/i3blocks/scripts/volume → dot_config/i3blocks/scripts/executable_volume
Executable file → Normal file
2
i3blocks/.config/i3blocks/scripts/volume → dot_config/i3blocks/scripts/executable_volume
Executable file → Normal file
@@ -37,7 +37,7 @@ AUDIO_DELTA=${AUDIO_DELTA:-5}
|
|||||||
# LONG_FORMAT=${LONG_FORMAT:-'${SYMB} ${VOL}% [${INDEX}:${NAME}]'}
|
# LONG_FORMAT=${LONG_FORMAT:-'${SYMB} ${VOL}% [${INDEX}:${NAME}]'}
|
||||||
LONG_FORMAT=${SHORT_FORMAT:-'${SINK_SYMB} ${VOL}%'}
|
LONG_FORMAT=${SHORT_FORMAT:-'${SINK_SYMB} ${VOL}%'}
|
||||||
# SHORT_FORMAT=${SHORT_FORMAT:-'${SYMB} ${VOL}%[${INDEX}]'}
|
# SHORT_FORMAT=${SHORT_FORMAT:-'${SYMB} ${VOL}%[${INDEX}]'}
|
||||||
SHORT_FORMAT=${SHORT_FORMAT:-'${SINK_SYMB} ${VOL}%[${INDEX}]'}
|
SHORT_FORMAT=${SHORT_FORMAT:-'${SINK_SYMB} ${VOL}%'}
|
||||||
|
|
||||||
# flags {{{ #
|
# flags {{{ #
|
||||||
|
|
||||||
0
i3blocks/.config/i3blocks/scripts/wifi → dot_config/i3blocks/scripts/executable_wifi
Executable file → Normal file
0
i3blocks/.config/i3blocks/scripts/wifi → dot_config/i3blocks/scripts/executable_wifi
Executable file → Normal file
@@ -20,15 +20,17 @@ builtin cd $last_dir
|
|||||||
bind \ce edit_command_buffer
|
bind \ce edit_command_buffer
|
||||||
bind \cr forward-word
|
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
|
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/dot_config/private_fish/private_functions"
|
||||||
|
# set -U fish_fxn_dir "/home/kevin/.config/fish/functions"
|
||||||
abbr ff "cd $fish_fxn_dir"
|
abbr ff "cd $fish_fxn_dir"
|
||||||
for fxn in (find $fish_fxn_dir -name '*.fish')
|
for fxn in (find $fish_fxn_dir -name '*.fish')
|
||||||
source $fxn
|
source $fxn
|
||||||
end
|
end
|
||||||
abbr rf "source ~/.config/fish/config.fish"
|
abbr rf "chezmoi apply && source ~/.config/fish/config.fish"
|
||||||
abbr rfs "sync-shortcuts && source ~/.config/fish/config.fish"
|
abbr rfs "sync-shortcuts && chezmoi apply && source ~/.config/fish/config.fish"
|
||||||
abbr xf "fish_config"
|
abbr xf "fish_config"
|
||||||
abbr f. "cd .."
|
abbr f. "cd .."
|
||||||
abbr f.. "cd ../.."
|
abbr f.. "cd ../.."
|
||||||
@@ -42,11 +44,10 @@ abbr mt "math"
|
|||||||
set -U spv_dir "/home/kevin/coding/spotify-lib-vis"
|
set -U spv_dir "/home/kevin/coding/spotify-lib-vis"
|
||||||
set -U mfs_dir "/home/kevin/coding/mf-site"
|
set -U mfs_dir "/home/kevin/coding/mf-site"
|
||||||
|
|
||||||
# set -U PATH /usr/local/sbin /usr/local/bin /usr/bin /usr/bin/site_perl
|
set -x PATH $PATH /home/kevin/scripts /home/kevin/scripts/colors /home/kevin/go/bin
|
||||||
# /usr/bin/vendor_perl /usr/bin/core_perl /home/kevin/linux-config/scripts
|
set -x LD_LIBRARY_PATH $LD_LIBRARY_PATH /usr/local/lib /usr/local/lib64
|
||||||
# /home/kevin/linux-config/scripts/colors
|
set -x PKG_CONFIG_PATH $PKG_CONFIG_PATH /usr/lib/pkgconfig
|
||||||
# (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 PASSWORD_STORE_CLIP_TIME 120
|
set -x PASSWORD_STORE_CLIP_TIME 120
|
||||||
set -xU XSET_RATE 90
|
set -xU XSET_RATE 90
|
||||||
set -xU XSET_DELAY 200
|
set -xU XSET_DELAY 200
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
function scan-history
|
function scan-history
|
||||||
sudo systemctl start postgresql.service
|
sudo systemctl start postgresql.service
|
||||||
# and systemctl status 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 $spv_dir/src/scripts/update-history.sh
|
||||||
and cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1
|
and cat $spv_dir/src/api/management/commands/update-history.log | tail -n 1
|
||||||
end
|
end
|
||||||
0
ranger/.config/ranger/scope.sh → dot_config/ranger/executable_scope.sh
Executable file → Normal file
0
ranger/.config/ranger/scope.sh → dot_config/ranger/executable_scope.sh
Executable file → Normal file
1
dot_config/ranger/plugins/__init__.py
Normal file
1
dot_config/ranger/plugins/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
0
ranger/.config/ranger/plugins/devicons.py → dot_config/ranger/plugins/executable_devicons.py
Executable file → Normal file
0
ranger/.config/ranger/plugins/devicons.py → dot_config/ranger/plugins/executable_devicons.py
Executable file → Normal file
0
ranger/.config/ranger/plugins/devicons_linemode.py → dot_config/ranger/plugins/executable_devicons_linemode.py
Executable file → Normal file
0
ranger/.config/ranger/plugins/devicons_linemode.py → dot_config/ranger/plugins/executable_devicons_linemode.py
Executable file → Normal file
@@ -101,7 +101,7 @@ set draw_progress_bar_in_status_bar true
|
|||||||
set draw_borders false
|
set draw_borders false
|
||||||
|
|
||||||
# Display the directory name in tabs?
|
# Display the directory name in tabs?
|
||||||
set dirname_in_tabs false
|
set dirname_in_tabs true
|
||||||
|
|
||||||
# Enable the mouse support?
|
# Enable the mouse support?
|
||||||
set mouse_enabled false
|
set mouse_enabled false
|
||||||
@@ -365,7 +365,6 @@ map gm cd /media
|
|||||||
map gM cd /mnt
|
map gM cd /mnt
|
||||||
map gs cd /srv
|
map gs cd /srv
|
||||||
map gp cd /tmp
|
map gp cd /tmp
|
||||||
# map gr cd /
|
|
||||||
map gR eval fm.cd(ranger.RANGERDIR)
|
map gR eval fm.cd(ranger.RANGERDIR)
|
||||||
map g/ cd /
|
map g/ cd /
|
||||||
map g? cd /usr/share/doc/ranger
|
map g? cd /usr/share/doc/ranger
|
||||||
@@ -421,7 +420,8 @@ map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
|
|||||||
|
|
||||||
# Searching
|
# Searching
|
||||||
map / console search%space
|
map / console search%space
|
||||||
map gr fzf_select
|
# map gr fzf_select
|
||||||
|
map rg fzf_select
|
||||||
map n search_next
|
map n search_next
|
||||||
map N search_next forward=False
|
map N search_next forward=False
|
||||||
map ct search_next order=tag
|
map ct search_next order=tag
|
||||||
@@ -677,10 +677,10 @@ map rr source ~/.config/ranger/rc.conf
|
|||||||
# backgrounds {{{ #
|
# backgrounds {{{ #
|
||||||
|
|
||||||
map w shell /usr/bin/wal -i %f
|
map w shell /usr/bin/wal -i %f
|
||||||
map bde shell mv %f dim/editing
|
map bde shell mv %f /home/kevin/Pictures/Backgrounds/dim/editing
|
||||||
map bdn shell mv %f dim/non-editing
|
map bdn shell mv %f /home/kevin/Pictures/Backgrounds/dim/non-editing
|
||||||
map bbe shell mv %f bright/editing
|
map bbe shell mv %f /home/kevin/Pictures/Backgrounds/bright/editing
|
||||||
map bbn shell mv %f bright/non-editing
|
map bbn shell mv %f /home/kevin/Pictures/Backgrounds/bright/non-editing
|
||||||
map be shell mv %f editing
|
map be shell mv %f editing
|
||||||
map bn shell mv %f non-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 e. open_with evince f
|
||||||
map v. shell $EDITOR %f
|
map v. shell $EDITOR %f
|
||||||
|
|
||||||
# map gr fzf_select
|
|
||||||
source /home/kevin/.config/ranger/key_mappings.conf
|
source /home/kevin/.config/ranger/key_mappings.conf
|
||||||
|
|
||||||
map dg shell dragon-drag-and-drop -a -x %p
|
map dg shell dragon-drag-and-drop -a -x %p
|
||||||
@@ -26,7 +26,7 @@ set timeoutlen=350
|
|||||||
set tw=75
|
set tw=75
|
||||||
set undodir=~/.vim/undo
|
set undodir=~/.vim/undo
|
||||||
set undofile
|
set undofile
|
||||||
set updatetime=2000
|
set updatetime=1000
|
||||||
|
|
||||||
autocmd VimResized * wincmd =
|
autocmd VimResized * wincmd =
|
||||||
filetype plugin on
|
filetype plugin on
|
||||||
@@ -52,17 +52,21 @@ autocmd FileType *css,htmldjango,html,javascript,json,markdown,tex,text,yaml set
|
|||||||
" autocmd BufNewFile,BufRead *.md set filetype=markdown
|
" autocmd BufNewFile,BufRead *.md set filetype=markdown
|
||||||
" autocmd Filetype markdown set textwidth=0
|
" autocmd Filetype markdown set textwidth=0
|
||||||
" autocmd Filetype html set foldmarker=0
|
" autocmd Filetype html set foldmarker=0
|
||||||
|
autocmd BufNewFile,BufRead *.gd set expandtab!
|
||||||
autocmd Filetype markdown map <F8> :LivedownToggle<CR>
|
autocmd Filetype markdown map <F8> :LivedownToggle<CR>
|
||||||
autocmd Filetype markdown inoremap <Tab> <Esc>>>A
|
autocmd Filetype markdown nnoremap <Tab> <Esc>>>A
|
||||||
autocmd Filetype markdown inoremap <S-Tab> <Esc><<A
|
autocmd Filetype markdown inoremap <S-Tab> <Esc><<A
|
||||||
autocmd Filetype javascript set updatetime=1000
|
autocmd Filetype markdown inoremap > <Esc>>>A
|
||||||
|
autocmd Filetype markdown inoremap >> >
|
||||||
|
autocmd FileType markdown,tex,text set spell spelllang=en_us
|
||||||
autocmd Filetype json nnoremap <leader>j :%!python -m json.tool<CR>
|
autocmd Filetype json nnoremap <leader>j :%!python -m json.tool<CR>
|
||||||
autocmd Filetype json set foldmethod=marker
|
autocmd Filetype json set foldmethod=marker
|
||||||
autocmd FileType sh map <F8> :!clear && shellcheck %<CR>
|
autocmd FileType sh map <F8> :!clear && shellcheck %<CR>
|
||||||
|
autocmd FileType tex set updatetime=3000
|
||||||
autocmd FileType tex map <F8> :VimtexCompile<CR>
|
autocmd FileType tex map <F8> :VimtexCompile<CR>
|
||||||
autocmd VimEnter *.tex VimtexCompile
|
autocmd VimEnter *.tex VimtexCompile
|
||||||
autocmd FileType markdown,tex,text set spell spelllang=en_us
|
|
||||||
autocmd VimLeave *.tex !tex-clean %:p
|
autocmd VimLeave *.tex !tex-clean %:p
|
||||||
|
autocmd BufNewFile,BufRead *.tmpl set tw=0 sw=2
|
||||||
|
|
||||||
" " auto-reload vimrc {{{ "
|
" " auto-reload vimrc {{{ "
|
||||||
|
|
||||||
@@ -80,7 +84,7 @@ autocmd VimLeave *.tex !tex-clean %:p
|
|||||||
autocmd BufNewFile,BufRead watson*.fish set tabstop=2 shiftwidth=2 expandtab
|
autocmd BufNewFile,BufRead watson*.fish set tabstop=2 shiftwidth=2 expandtab
|
||||||
autocmd BufRead commit-msg.txt set filetype=gitcommit tw=72
|
autocmd BufRead commit-msg.txt set filetype=gitcommit tw=72
|
||||||
" autocmd BufWritePost key_* !sync-shortcuts
|
" autocmd BufWritePost key_* !sync-shortcuts
|
||||||
autocmd BufNewFile,BufRead key_* map <F1> :silent !sync-shortcuts<CR>
|
autocmd BufNewFile,BufRead key_* map <F1> :w<CR>:silent !sync-shortcuts<CR>
|
||||||
|
|
||||||
" map <F1> :silent !scp %:p k@192.168.0.17:/home/k/a1<CR>
|
" map <F1> :silent !scp %:p k@192.168.0.17:/home/k/a1<CR>
|
||||||
" map <F2> :silent !scp -P 2222 e1.html e1_style.css kevin@127.0.0.1:/home/kevin/Downloads/e1<CR>
|
" map <F2> :silent !scp -P 2222 e1.html e1_style.css kevin@127.0.0.1:/home/kevin/Downloads/e1<CR>
|
||||||
@@ -178,6 +182,7 @@ Plug 'scrooloose/nerdcommenter'
|
|||||||
|
|
||||||
" add quotes/brackets around chunks of text easily
|
" add quotes/brackets around chunks of text easily
|
||||||
Plug 'tpope/vim-surround'
|
Plug 'tpope/vim-surround'
|
||||||
|
nmap S ys
|
||||||
|
|
||||||
" navigate around file easily and precisely
|
" navigate around file easily and precisely
|
||||||
Plug 'easymotion/vim-easymotion'
|
Plug 'easymotion/vim-easymotion'
|
||||||
@@ -219,9 +224,10 @@ Plug 'tpope/vim-fugitive'
|
|||||||
" auto reload file
|
" auto reload file
|
||||||
Plug 'djoshea/vim-autoread'
|
Plug 'djoshea/vim-autoread'
|
||||||
" Plug 'mustache/vim-mustache-handlebars'
|
" Plug 'mustache/vim-mustache-handlebars'
|
||||||
|
" Plug 'trapd00r/vim-syntax-vidir-ls'
|
||||||
|
Plug 'calviken/vim-gdscript3'
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
" }}} vim-plug "
|
" }}} vim-plug "
|
||||||
|
|
||||||
" colorscheme gotham256
|
" colorscheme gotham256
|
||||||
@@ -231,7 +237,6 @@ colorscheme wal
|
|||||||
|
|
||||||
nnoremap > >>
|
nnoremap > >>
|
||||||
nnoremap < <<
|
nnoremap < <<
|
||||||
inoremap >> <Esc>>>A
|
|
||||||
inoremap << <Esc><<A
|
inoremap << <Esc><<A
|
||||||
|
|
||||||
" function keys {{{ "
|
" function keys {{{ "
|
||||||
@@ -265,7 +270,7 @@ nnoremap <C-w> <C-W>|
|
|||||||
let mapleader="\<Space>"
|
let mapleader="\<Space>"
|
||||||
|
|
||||||
" find alias
|
" find alias
|
||||||
nnoremap <leader>a /^ <Left>
|
nnoremap <leader>a / <Left>
|
||||||
" replace until end of line
|
" replace until end of line
|
||||||
nnoremap <leader>c c$
|
nnoremap <leader>c c$
|
||||||
" delete entire buffer
|
" delete entire buffer
|
||||||
@@ -96,7 +96,6 @@ plugins=(
|
|||||||
# }}} default #
|
# }}} default #
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
source ~/linux-config/aliases/zsh_aliases
|
|
||||||
|
|
||||||
# ZSH_THEME="bira"
|
# ZSH_THEME="bira"
|
||||||
# ZSH_THEME="miloshadzic"
|
# ZSH_THEME="miloshadzic"
|
||||||
@@ -171,7 +170,6 @@ fi
|
|||||||
|
|
||||||
# # }}} autoreload zsh aliases #
|
# # }}} autoreload zsh aliases #
|
||||||
|
|
||||||
source /home/kevin/coding/spotify-lib-vis/src/api-keys.sh
|
|
||||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||||
|
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
@@ -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
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/home/kevin/.local/share/omf/themes/pure/conf.d/pure.fish
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
/home/kevin/.local/share/omf/themes/pure/fish_prompt.fish
|
|
||||||
391
key_aliases.tmpl
Normal file
391
key_aliases.tmpl
Normal file
@@ -0,0 +1,391 @@
|
|||||||
|
# vim: fdm=indent
|
||||||
|
|
||||||
|
# system
|
||||||
|
# clear screen
|
||||||
|
c "printf '\033c'"
|
||||||
|
hst "history"
|
||||||
|
## nf "printf '\033c' && neofetch | lolcat"
|
||||||
|
nf "printf '\033c' && neofetch"
|
||||||
|
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"
|
||||||
|
vd "vidir --verbose"
|
||||||
|
|
||||||
|
# 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 --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 --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 "
|
||||||
|
|
||||||
|
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"
|
||||||
|
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"
|
||||||
|
n "nvim"
|
||||||
|
p3 "python3"
|
||||||
|
pdft "pdftotext"
|
||||||
|
pipes "pipes.sh -t 3"
|
||||||
|
py "python"
|
||||||
|
r "ranger"
|
||||||
|
rx "redshift -x"
|
||||||
|
sn "sudo nvim"
|
||||||
|
vmd "vimdiff"
|
||||||
|
wg "wego"
|
||||||
|
wp "grep wallpaper ~/.cache/wal/colors.sh"
|
||||||
|
z "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"
|
||||||
|
wra "watson report --all"
|
||||||
|
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 "source ../bin/activate.fish && 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"
|
||||||
|
|
||||||
|
med "printf '\033c' && bear make move_mouse_with_head && ./move_mouse_with_head"
|
||||||
|
# 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 #
|
||||||
60
key_dirs.tmpl
Normal file
60
key_dirs.tmpl
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
# vim: fdm=indent
|
||||||
|
|
||||||
|
# sys *
|
||||||
|
bg {{ .chezmoi.homedir }}/Pictures/Backgrounds
|
||||||
|
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 }}
|
||||||
|
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 *
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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 *
|
||||||
52
key_files.tmpl
Normal file
52
key_files.tmpl
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# vim: fdm=indent
|
||||||
|
|
||||||
|
# sys *
|
||||||
|
3 ~/{{ .chezmoi.os }}-config/dot_config/i3/config
|
||||||
|
a ~/{{ .chezmoi.os }}-config/key_aliases.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 }}/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 }}/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
|
||||||
|
# sys *
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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
|
||||||
|
# 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 *
|
||||||
0
scripts/colors/arch → scripts/colors/executable_arch
Executable file → Normal file
0
scripts/colors/arch → scripts/colors/executable_arch
Executable file → Normal file
0
scripts/colors/blocks → scripts/colors/executable_blocks
Executable file → Normal file
0
scripts/colors/blocks → scripts/colors/executable_blocks
Executable file → Normal file
0
scripts/colors/panes → scripts/colors/executable_panes
Executable file → Normal file
0
scripts/colors/panes → scripts/colors/executable_panes
Executable file → Normal file
0
scripts/colors/rupees → scripts/colors/executable_rupees
Executable file → Normal file
0
scripts/colors/rupees → scripts/colors/executable_rupees
Executable file → Normal file
0
scripts/colors/space-invaders → scripts/colors/executable_space-invaders
Executable file → Normal file
0
scripts/colors/space-invaders → scripts/colors/executable_space-invaders
Executable file → Normal file
0
scripts/colors/unowns → scripts/colors/executable_unowns
Executable file → Normal file
0
scripts/colors/unowns → scripts/colors/executable_unowns
Executable file → Normal file
0
scripts/backup → scripts/executable_backup
Executable file → Normal file
0
scripts/backup → scripts/executable_backup
Executable file → Normal file
0
scripts/bg-chooser → scripts/executable_bg-chooser
Executable file → Normal file
0
scripts/bg-chooser → scripts/executable_bg-chooser
Executable file → Normal file
0
scripts/burn-iso.sh → scripts/executable_burn-iso.sh
Executable file → Normal file
0
scripts/burn-iso.sh → scripts/executable_burn-iso.sh
Executable file → Normal file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user