Initial commit of sync-aliases and key_aliases
Split off shell functions into zsh_aliases_functions. Added aliases for .gitconfig and Watson.
This commit is contained in:
295
aliases/key_aliases
Normal file
295
aliases/key_aliases
Normal file
@@ -0,0 +1,295 @@
|
|||||||
|
# system {{{ #
|
||||||
|
|
||||||
|
# clear screen
|
||||||
|
cs "printf '\033c'"
|
||||||
|
hst "history"
|
||||||
|
nf "cs && neofetch | lolcat"
|
||||||
|
# reload urxvt
|
||||||
|
ru "xrdb ~/.Xresources"
|
||||||
|
# list file sizes in megabytes with depth 1
|
||||||
|
dum "sudo du -d 1 -B M"
|
||||||
|
|
||||||
|
vgb "sni /etc/default/grub"
|
||||||
|
mkgb "sudo grub-mkconfig -o /boot/grub/grub.cfg"
|
||||||
|
|
||||||
|
grep "grep --color=auto"
|
||||||
|
rg "grep -nr"
|
||||||
|
# pk "pkill -f"
|
||||||
|
|
||||||
|
mkpk "makepkg -sri"
|
||||||
|
mkex "chmod 777"
|
||||||
|
|
||||||
|
# systemctl
|
||||||
|
ctl "systemctl"
|
||||||
|
ctle "systemctl enable"
|
||||||
|
ctld "systemctl disable"
|
||||||
|
ctls "systemctl start"
|
||||||
|
|
||||||
|
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"
|
||||||
|
|
||||||
|
# }}} command line related #
|
||||||
|
|
||||||
|
# directory-related {{{ #
|
||||||
|
l "ls -a"
|
||||||
|
ll "ls -alFh"
|
||||||
|
smv "sudo mv"
|
||||||
|
f "cd"
|
||||||
|
fz "fzf"
|
||||||
|
fnd "find . -type f -name"
|
||||||
|
|
||||||
|
rmr "rm -rf"
|
||||||
|
mdp "mkdir -p"
|
||||||
|
rsy "rsync -Pr"
|
||||||
|
|
||||||
|
# list all (un)mounted drives
|
||||||
|
lhd "sudo fdisk -l"
|
||||||
|
# get disc space for mounted drives
|
||||||
|
ds "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 "f /run/media/kevin/pc-backup/backups/nzxt && ll | grep gz"
|
||||||
|
|
||||||
|
# }}} directory-related #
|
||||||
|
|
||||||
|
# power options {{{ #
|
||||||
|
|
||||||
|
s "systemctl suspend"
|
||||||
|
sd "sudo shutdown 0"
|
||||||
|
reb "sudo shutdown -r 0"
|
||||||
|
lo "i3-msg exit"
|
||||||
|
x "xmodmap ~/.Xmodmap && xset r rate 200 60"
|
||||||
|
|
||||||
|
# }}} 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"
|
||||||
|
pcr "sudo pacman -Rs"
|
||||||
|
pcu "sudo pacman -Sy"
|
||||||
|
xpc "pacman -Qqe > ~/linux-config/txt/nzxt-pkgs.txt"
|
||||||
|
# tri "trizen -S --noconfirm"
|
||||||
|
tri "trizen -S"
|
||||||
|
|
||||||
|
# internet
|
||||||
|
pg "ping -c 3 8.8.8.8"
|
||||||
|
dh "sudo dhcpcd"
|
||||||
|
rdh "sudo killall dhcpcd && sudo dhcpcd"
|
||||||
|
|
||||||
|
id "identify"
|
||||||
|
|
||||||
|
# }}} system #
|
||||||
|
|
||||||
|
# config files {{{ #
|
||||||
|
rz "source ~/linux-config/aliases/zsh_aliases"
|
||||||
|
lca "f ~/linux-config/aliases"
|
||||||
|
|
||||||
|
pipes "pipes.sh -t 3"
|
||||||
|
|
||||||
|
# }}} config files #
|
||||||
|
|
||||||
|
# applications {{{ #
|
||||||
|
|
||||||
|
# silent="> /dev/null 2>&1& "
|
||||||
|
|
||||||
|
chr "google-chrome"
|
||||||
|
h "htop -s PERCENT_MEM"
|
||||||
|
hc "htop -s PERCENT_CPU"
|
||||||
|
r "ranger"
|
||||||
|
mr "man ranger"
|
||||||
|
clc "cloc ."
|
||||||
|
n "nvim"
|
||||||
|
sni "sudo nvim"
|
||||||
|
fh "feh"
|
||||||
|
sx "sxiv"
|
||||||
|
wp "grep wallpaper ~/.cache/wal/colors.sh"
|
||||||
|
|
||||||
|
# rsl "java -jar ~/Downloads/RuneLite.jar"
|
||||||
|
# swex "sudo nohup ~/Downloads/swex.appimage $silent"
|
||||||
|
|
||||||
|
cv "cava"
|
||||||
|
|
||||||
|
rx "redshift -x"
|
||||||
|
|
||||||
|
gpe "gpg --encrypt --recipient"
|
||||||
|
gpd "gpg --decrypt"
|
||||||
|
|
||||||
|
# pass {{{ #
|
||||||
|
|
||||||
|
ps "pass"
|
||||||
|
psc "pass -c"
|
||||||
|
pse "pass edit"
|
||||||
|
psi "pass insert -m"
|
||||||
|
psg "pass generate -c"
|
||||||
|
|
||||||
|
xclip "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 #
|
||||||
|
|
||||||
|
p3 "python3"
|
||||||
|
py "python"
|
||||||
|
|
||||||
|
wt "watson"
|
||||||
|
wt "watson"
|
||||||
|
wta "watson start"
|
||||||
|
wte "watson edit"
|
||||||
|
wtl "watson log"
|
||||||
|
wts "watson stop"
|
||||||
|
wtt "watson status"
|
||||||
|
|
||||||
|
# }}} applications #
|
||||||
|
|
||||||
|
# git {{{ #
|
||||||
|
# aliases {{{
|
||||||
|
gstr "git config credential.helper store"
|
||||||
|
g "git"
|
||||||
|
|
||||||
|
# add {{{ #
|
||||||
|
ga "git add -A . && gs"
|
||||||
|
gac "git add -A . && git commit -S"
|
||||||
|
# unsigned commt
|
||||||
|
gacu "git add -A . && git commit"
|
||||||
|
# }}} add #
|
||||||
|
|
||||||
|
# diff/log {{{ #
|
||||||
|
gd "git diff -w"
|
||||||
|
gdc "git diff --cached"
|
||||||
|
gds "git diff --stat"
|
||||||
|
gdt "git difftool --tool=vimdiff"
|
||||||
|
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"
|
||||||
|
|
||||||
|
# push {{{ #
|
||||||
|
gst "git stash"
|
||||||
|
gstp "git stash pop"
|
||||||
|
|
||||||
|
gc "git commit -S"
|
||||||
|
gcu "git commit"
|
||||||
|
gcam "ga && git commit --amend --no-edit -S"
|
||||||
|
gcamp "ga && git commit --amend --no-edit -S && gpsf"
|
||||||
|
|
||||||
|
psgi "git add . && git commit -m '.' -S && git push"
|
||||||
|
gps "git push"
|
||||||
|
gpsn "git push --set-upstream origin master"
|
||||||
|
gpsf "git push --force"
|
||||||
|
gclear "git stash clear"
|
||||||
|
|
||||||
|
gpl "git pull --rebase"
|
||||||
|
grbc "git rebase --continue"
|
||||||
|
|
||||||
|
# }}} push #
|
||||||
|
|
||||||
|
# }}} update #
|
||||||
|
|
||||||
|
crm "mrk README.md"
|
||||||
|
|
||||||
|
# aliases }}}
|
||||||
|
|
||||||
|
gcho "git checkout"
|
||||||
|
gchon "git checkout -b"
|
||||||
|
|
||||||
|
gcln "git clone"
|
||||||
|
gchp "git cherry-pick"
|
||||||
|
gchpc "git cherry-pick --continue"
|
||||||
|
|
||||||
|
# }}} merge repos #
|
||||||
|
|
||||||
|
# assume file unchanged
|
||||||
|
gunc "git update-index --assume-unchanged"
|
||||||
|
|
||||||
|
# }}} git #
|
||||||
|
|
||||||
|
# coding projs {{{ #
|
||||||
|
# coding_dir="~/coding"
|
||||||
|
|
||||||
|
# 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
|
||||||
|
ssv "source ../bin/activate && python manage.py runserver"
|
||||||
|
# start spv server outside dir
|
||||||
|
sssv "sv && ssv"
|
||||||
|
# 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"
|
||||||
|
|
||||||
|
# scan history
|
||||||
|
hs "$spv_dir/src/update-history.sh && hlg"
|
||||||
|
# show last history scan
|
||||||
|
hlg "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"
|
||||||
|
|
||||||
|
# }}} spotify-lib-vis #
|
||||||
|
|
||||||
|
sc "shellcheck"
|
||||||
|
pdl "pdflatex"
|
||||||
|
tcl "tex-clean"
|
||||||
|
|
||||||
|
mfs "nvim /home/kevin/coding/best-mf-site-personal/index.html"
|
||||||
|
|
||||||
|
# }}} coding projs #
|
||||||
|
|
||||||
|
# school {{{ #
|
||||||
|
|
||||||
|
# 369
|
||||||
|
# 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"
|
||||||
|
ma "make"
|
||||||
|
mc "make clean"
|
||||||
|
|
||||||
|
# }}} school #
|
||||||
@@ -144,7 +144,7 @@ alias vlh="alsamixer -c 2"
|
|||||||
alias pc="sudo pacman -S"
|
alias pc="sudo pacman -S"
|
||||||
alias pcr="sudo pacman -Rs"
|
alias pcr="sudo pacman -Rs"
|
||||||
alias pcu="sudo pacman -Sy"
|
alias pcu="sudo pacman -Sy"
|
||||||
alias xpc="pacman -Qqe > ~/linux-config/txt/pacman-pkgs/nzxt-pkgs.txt"
|
alias xpc="pacman -Qqe > ~/linux-config/txt/nzxt-pkgs.txt"
|
||||||
# alias tri="trizen -S --noconfirm"
|
# alias tri="trizen -S --noconfirm"
|
||||||
alias tri="trizen -S"
|
alias tri="trizen -S"
|
||||||
|
|
||||||
@@ -153,6 +153,8 @@ alias pg="ping -c 3 8.8.8.8"
|
|||||||
alias dh="sudo dhcpcd"
|
alias dh="sudo dhcpcd"
|
||||||
alias rdh="sudo killall dhcpcd && sudo dhcpcd"
|
alias rdh="sudo killall dhcpcd && sudo dhcpcd"
|
||||||
|
|
||||||
|
alias id="identify"
|
||||||
|
|
||||||
# }}} system #
|
# }}} system #
|
||||||
|
|
||||||
# config files {{{ #
|
# config files {{{ #
|
||||||
@@ -184,7 +186,8 @@ function ev() { nohup evince $1 > /dev/null 2>&1& ; }
|
|||||||
function chr() { google-chrome $1 ; }
|
function chr() { google-chrome $1 ; }
|
||||||
alias n="nvim"
|
alias n="nvim"
|
||||||
alias sni="sudo nvim"
|
alias sni="sudo nvim"
|
||||||
alias fh="feh --bg $wallpaper"
|
alias fh="feh"
|
||||||
|
alias sx="sxiv"
|
||||||
function mrk() { pandoc -o ${1%.*}.html $1 ; }
|
function mrk() { pandoc -o ${1%.*}.html $1 ; }
|
||||||
alias wp="grep wallpaper ~/.cache/wal/colors.sh"
|
alias wp="grep wallpaper ~/.cache/wal/colors.sh"
|
||||||
|
|
||||||
@@ -231,11 +234,20 @@ function grpy() { grep $1 *.py ; }
|
|||||||
alias p3="python3"
|
alias p3="python3"
|
||||||
alias py="python"
|
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 #
|
# }}} applications #
|
||||||
|
|
||||||
# git {{{ #
|
# git {{{ #
|
||||||
# aliases {{{
|
# aliases {{{
|
||||||
alias gstr="git config credential.helper store"
|
alias gstr="git config credential.helper store"
|
||||||
|
alias g="git"
|
||||||
|
|
||||||
# add {{{ #
|
# add {{{ #
|
||||||
alias ga="git add -A . && gs"
|
alias ga="git add -A . && gs"
|
||||||
@@ -395,14 +407,17 @@ alias sc="shellcheck"
|
|||||||
alias pdl="pdflatex"
|
alias pdl="pdflatex"
|
||||||
alias tcl="tex-clean"
|
alias tcl="tex-clean"
|
||||||
|
|
||||||
|
alias mfs="nvim /home/kevin/coding/best-mf-site-personal/index.html"
|
||||||
|
|
||||||
# }}} coding projs #
|
# }}} coding projs #
|
||||||
|
|
||||||
# school {{{ #
|
# school {{{ #
|
||||||
|
|
||||||
# 369
|
# 369
|
||||||
alias vm6="VBoxHeadless --startvm 369-a1"
|
alias vm6="VBoxHeadless --startvm 369-a1"
|
||||||
alias sha="ssh kevin@192.168.0.21"
|
alias sa="ssh k@192.168.0.17"
|
||||||
alias cpi="scp interceptor.c kevin@192.168.0.21:/home/kevin/a1"
|
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 ma="make"
|
||||||
alias mc="make clean"
|
alias mc="make clean"
|
||||||
|
|
||||||
|
|||||||
108
aliases/zsh_aliases_functions
Normal file
108
aliases/zsh_aliases_functions
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
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
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# startup {{{ #
|
# startup {{{ #
|
||||||
set $browser "chromium"
|
set $browser "firefox"
|
||||||
set $def_term "urxvt"
|
set $def_term "urxvt"
|
||||||
# set $runelite "java -jar ~/Downloads/RuneLite.jar"
|
# set $runelite "java -jar ~/Downloads/RuneLite.jar"
|
||||||
set $swex "sudo ~/Downloads/swex.appimage"
|
set $swex "sudo ~/Downloads/swex.appimage"
|
||||||
@@ -34,6 +34,7 @@ bindsym Mod4+c exec $browser
|
|||||||
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
|
||||||
|
bindsym Mod4+$mod+m exec pass -c uoft/markus
|
||||||
bindsym Mod4+n exec urxvt -e nvim
|
bindsym Mod4+n exec urxvt -e nvim
|
||||||
bindsym Mod4+o exec xclip -selection clipboard ~/.password-store/social/gmail
|
bindsym Mod4+o exec xclip -selection clipboard ~/.password-store/social/gmail
|
||||||
# bindsym Mod4+p workspace $ws4; exec pgadmin3
|
# bindsym Mod4+p workspace $ws4; exec pgadmin3
|
||||||
@@ -47,7 +48,6 @@ bindsym control+$mod+s exec systemctl suspend
|
|||||||
bindsym Mod4+t exec xclip -selection clipboard ~/.password-store/social/trapbot
|
bindsym Mod4+t exec xclip -selection clipboard ~/.password-store/social/trapbot
|
||||||
bindsym Mod4+u exec echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard
|
bindsym Mod4+u exec echo 'kevin.mok@mail.utoronto.ca' | xclip -selection clipboard
|
||||||
bindsym Mod4+$mod+u exec pass -c uoft/acorn
|
bindsym Mod4+$mod+u exec pass -c uoft/acorn
|
||||||
|
|
||||||
# bindsym Mod4+x exec $swex
|
# bindsym Mod4+x exec $swex
|
||||||
# bindsym Mod4+x exec xmodmap ~/.Xmodmap
|
# bindsym Mod4+x exec xmodmap ~/.Xmodmap
|
||||||
bindsym Mod4+z exec cliqz
|
bindsym Mod4+z exec cliqz
|
||||||
@@ -140,10 +140,10 @@ bindsym control+Shift+x kill
|
|||||||
# container display {{{ #
|
# container display {{{ #
|
||||||
# backgrounds
|
# backgrounds
|
||||||
# set $colors_sh "~/.cache/wal/colors.sh"
|
# set $colors_sh "~/.cache/wal/colors.sh"
|
||||||
bindsym $mod+q exec wal -i "$HOME/Pictures/Backgrounds/vibrant"; exec ~/.cache/wal/colors.sh
|
bindsym $mod+q exec wal -i "$HOME/Pictures/Backgrounds/bright/editing"; exec ~/.cache/wal/colors.sh
|
||||||
# bindsym $mod+w exec wal -i "$HOME/Pictures/Backgrounds/dim"; exec ~/.cache/wal/colors.sh
|
# bindsym $mod+w exec wal -i "$HOME/Pictures/Backgrounds/dim"; exec ~/.cache/wal/colors.sh
|
||||||
bindsym $mod+r exec wal -i "$HOME/Pictures/Backgrounds/"; exec ~/.cache/wal/colors.sh
|
|
||||||
bindsym $mod+w exec ~/linux-config/scripts/bg-chooser
|
bindsym $mod+w exec ~/linux-config/scripts/bg-chooser
|
||||||
|
bindsym $mod+r exec wal -i "$HOME/Pictures/Backgrounds/dim/editing"; exec ~/.cache/wal/colors.sh
|
||||||
|
|
||||||
# enter fullscreen mode for the focused container
|
# enter fullscreen mode for the focused container
|
||||||
bindsym $mod+f fullscreen toggle
|
bindsym $mod+f fullscreen toggle
|
||||||
@@ -202,7 +202,7 @@ set $ws2 "2 "
|
|||||||
workspace $ws2 output $samsung
|
workspace $ws2 output $samsung
|
||||||
bindsym $mod+F2 workspace $ws2; exec $def_term
|
bindsym $mod+F2 workspace $ws2; exec $def_term
|
||||||
|
|
||||||
set $ws3 "3 "
|
set $ws3 "3 "
|
||||||
workspace $ws3 output $benq
|
workspace $ws3 output $benq
|
||||||
bindsym $mod+F3 workspace $ws3; exec $browser
|
bindsym $mod+F3 workspace $ws3; exec $browser
|
||||||
|
|
||||||
@@ -227,6 +227,7 @@ set $ws7 "7 "
|
|||||||
# set $ws7 "7 📤"
|
# set $ws7 "7 📤"
|
||||||
workspace $ws7 output $samsung
|
workspace $ws7 output $samsung
|
||||||
bindsym $mod+F7 workspace $ws7; exec $def_term
|
bindsym $mod+F7 workspace $ws7; exec $def_term
|
||||||
|
bindsym Mod4+v workspace $ws7; exec VBoxManage startvm "369-a1"
|
||||||
|
|
||||||
set $ws8 "8 "
|
set $ws8 "8 "
|
||||||
# set $ws8 "8 📊"
|
# set $ws8 "8 📊"
|
||||||
@@ -245,7 +246,7 @@ assign [class="spotify"] $ws10
|
|||||||
workspace $ws10 output $samsung
|
workspace $ws10 output $samsung
|
||||||
set $hp 2
|
set $hp 2
|
||||||
# bindsym Mod4+v workspace $ws10; exec urxvt -e alsamixer -c 0
|
# bindsym Mod4+v workspace $ws10; exec urxvt -e alsamixer -c 0
|
||||||
bindsym Mod4+v workspace $ws10; exec urxvt -e cava
|
# bindsym Mod4+v workspace $ws10; exec urxvt -e cava
|
||||||
# bindsym Mod4+h workspace $ws10; exec urxvt -e alsamixer -c $hp
|
# bindsym Mod4+h workspace $ws10; exec urxvt -e alsamixer -c $hp
|
||||||
bindsym Mod4+s workspace $ws10; exec spotify
|
bindsym Mod4+s workspace $ws10; exec spotify
|
||||||
|
|
||||||
|
|||||||
@@ -648,7 +648,7 @@ set preview_images true
|
|||||||
#
|
#
|
||||||
# * iterm2:
|
# * iterm2:
|
||||||
# Preview images in full color using iTerm2 image previews
|
# Preview images in full color using iTerm2 image previews
|
||||||
# (http://iterm2.com/images.html). This requires using iTerm2 compiled
|
# (http://iterm2.com/images.html). This requires using iTerm1 compiled
|
||||||
# with image preview support.
|
# with image preview support.
|
||||||
#
|
#
|
||||||
# This feature relies on the dimensions of the terminal's font. By default, a
|
# This feature relies on the dimensions of the terminal's font. By default, a
|
||||||
@@ -687,4 +687,6 @@ map cw eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.
|
|||||||
map zu shell unzip %f
|
map zu shell unzip %f
|
||||||
map zr shell unzip %f && rm %f
|
map zr shell unzip %f && rm %f
|
||||||
|
|
||||||
|
map v. shell $EDITOR %f
|
||||||
|
|
||||||
# map gr fzf_select
|
# map gr fzf_select
|
||||||
|
|||||||
@@ -206,3 +206,4 @@ fi
|
|||||||
# Both PC/Laptop }}}
|
# Both PC/Laptop }}}
|
||||||
|
|
||||||
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
||||||
|
source /home/kevin/.aliases
|
||||||
|
|||||||
@@ -17,3 +17,16 @@
|
|||||||
tool = vimdiff
|
tool = vimdiff
|
||||||
[commit]
|
[commit]
|
||||||
gpgsign = true
|
gpgsign = true
|
||||||
|
[alias]
|
||||||
|
a = add
|
||||||
|
c = commit
|
||||||
|
ch = checkout
|
||||||
|
d = diff
|
||||||
|
f = fetch
|
||||||
|
l = log
|
||||||
|
m = merge
|
||||||
|
pl = pull
|
||||||
|
ps = push
|
||||||
|
s = status
|
||||||
|
st = stash
|
||||||
|
r = remote
|
||||||
|
|||||||
@@ -171,7 +171,10 @@ colorscheme wal
|
|||||||
" Mappings {{{ "
|
" Mappings {{{ "
|
||||||
|
|
||||||
" function keys {{{ "
|
" function keys {{{ "
|
||||||
map <F1> :silent !scp %:p kevin@192.168.0.21:/home/kevin/a1<CR>
|
" map <F1> :silent !scp %:p k@192.168.0.17:/home/k/a1<CR>
|
||||||
|
" map <F2> :silent !gcc -m32 -o test_full test_full.c && scp test_full 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 <F3> :silent !gcc -m32 -o test_intercept test_intercept.c && scp test_intercept k@192.168.0.17:/home/k/a1<CR>
|
||||||
map <F4> :xa<CR>
|
map <F4> :xa<CR>
|
||||||
map <F5> :q!<CR>
|
map <F5> :q!<CR>
|
||||||
" map <F6> :make -C ~/Documents/resume cv<CR>
|
" map <F6> :make -C ~/Documents/resume cv<CR>
|
||||||
|
|||||||
@@ -172,3 +172,4 @@ source /home/kevin/coding/spotify-lib-vis/src/api-keys.sh
|
|||||||
|
|
||||||
export GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
export PASSWORD_STORE_CLIP_TIME=120
|
export PASSWORD_STORE_CLIP_TIME=120
|
||||||
|
source /home/kevin/.aliases
|
||||||
|
|||||||
54
scripts/sync-aliases
Executable file
54
scripts/sync-aliases
Executable file
@@ -0,0 +1,54 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# key_aliases="$HOME/Downloads/sync-aliases/key_aliases"
|
||||||
|
key_aliases="$HOME/linux-config/aliases/key_aliases"
|
||||||
|
# tmp_aliases="/tmp/sync-aliases.tmp"
|
||||||
|
|
||||||
|
# create temp file with no comments/blank lines
|
||||||
|
# sed -e '/^$/d' -e '/^[ \t#].*/d' "$key_aliases" | sort > "$tmp_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/Downloads/sync-aliases/key_aliases.fish"
|
||||||
|
fish_abbr="$HOME/.config/fish/key_aliases.fish"
|
||||||
|
ensure "source $fish_abbr" "$fish_config"
|
||||||
|
|
||||||
|
# bash
|
||||||
|
bashrc="$HOME/.bashrc"
|
||||||
|
zshrc="$HOME/.zshrc"
|
||||||
|
# fish_abbr="$HOME/Downloads/sync-aliases/key_aliases.fish"
|
||||||
|
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 's/\([a-z0-9]\+\) \(".\+"\)$/abbr \1 \2/g' "$tmp_aliases"
|
||||||
|
# # awk '{printf "abbr " $1; $1 = ""; print $0; }' "$tmp_aliases"
|
||||||
|
# awk '{printf "abbr " $1; $1 = ""; print $0; }' "$tmp_aliases" > "$fish_abbr"
|
||||||
|
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"
|
||||||
|
|
||||||
|
# # sed -e 's/^\([a-z]\+\) \(".\+"\)$/alias \1=\2/g' "$tmp_aliases"
|
||||||
|
# awk '{
|
||||||
|
# printf "alias " $1;
|
||||||
|
# $1 = "";
|
||||||
|
# printf "=";
|
||||||
|
# print gensub(" ", "", 1, $0);
|
||||||
|
# }' "$tmp_aliases" > "$bash_aliases"
|
||||||
@@ -7,7 +7,7 @@ d /home/kevin/Downloads
|
|||||||
D /home/kevin/Documents
|
D /home/kevin/Documents
|
||||||
k /home/kevin/
|
k /home/kevin/
|
||||||
lc /home/kevin/linux-config/
|
lc /home/kevin/linux-config/
|
||||||
m /run/media/kevin
|
me /run/media/kevin
|
||||||
o /
|
o /
|
||||||
p /home/kevin/.password-store
|
p /home/kevin/.password-store
|
||||||
P /home/kevin/Pictures
|
P /home/kevin/Pictures
|
||||||
@@ -20,12 +20,14 @@ cn /home/kevin/coding
|
|||||||
ib /home/kevin/linux-config/configs/i3blocks-scripts
|
ib /home/kevin/linux-config/configs/i3blocks-scripts
|
||||||
j /home/kevin/Documents/journal
|
j /home/kevin/Documents/journal
|
||||||
lh /home/kevin/Documents/listening-history
|
lh /home/kevin/Documents/listening-history
|
||||||
|
ms /home/kevin/coding/best-mf-site-personal
|
||||||
ra /home/kevin/linux-config/configs/ranger
|
ra /home/kevin/linux-config/configs/ranger
|
||||||
sr /home/kevin/linux-config/scripts
|
sr /home/kevin/linux-config/scripts
|
||||||
snp /home/kevin/.vim/plugged/vim-snippets/UltiSnips
|
snp /home/kevin/.vim/plugged/vim-snippets/UltiSnips
|
||||||
sv /home/kevin/coding/spotify-lib-vis/src
|
sv /home/kevin/coding/spotify-lib-vis/src
|
||||||
swa /home/kevin/.local/share/nvim/swap
|
swa /home/kevin/.local/share/nvim/swap
|
||||||
tx /home/kevin/linux-config/txt
|
tx /home/kevin/linux-config/txt
|
||||||
|
wa /home/kevin/.config/watson
|
||||||
wo /home/kevin/Documents/workout-logs/11
|
wo /home/kevin/Documents/workout-logs/11
|
||||||
|
|
||||||
# }}} cdn *
|
# }}} cdn *
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ jn /home/kevin/Documents/journal/todo/1.md
|
|||||||
jt /home/kevin/Documents/journal/todo/todo.md
|
jt /home/kevin/Documents/journal/todo/todo.md
|
||||||
lh /home/kevin/Documents/listening-history/polarbier.csv
|
lh /home/kevin/Documents/listening-history/polarbier.csv
|
||||||
ne /home/kevin/linux-config/configs/neofetch/config.conf
|
ne /home/kevin/linux-config/configs/neofetch/config.conf
|
||||||
|
re README.md
|
||||||
tm /home/kevin/.vim/plugged/vim-snippets/UltiSnips/texmath.snippets
|
tm /home/kevin/.vim/plugged/vim-snippets/UltiSnips/texmath.snippets
|
||||||
|
|
||||||
# }}} cdn *
|
# }}} cdn *
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
alsa-utils
|
alsa-utils
|
||||||
|
arch-install-scripts
|
||||||
autoconf
|
autoconf
|
||||||
automake
|
automake
|
||||||
bash
|
bash
|
||||||
bc
|
bc
|
||||||
bison
|
bison
|
||||||
|
bookworm
|
||||||
broadcom-wl
|
broadcom-wl
|
||||||
browserpass
|
browserpass
|
||||||
bzip2
|
bzip2
|
||||||
|
certbot
|
||||||
chromium
|
chromium
|
||||||
chromium-widevine
|
chromium-widevine
|
||||||
cliqz
|
cliqz
|
||||||
@@ -33,6 +36,8 @@ ffcast
|
|||||||
file
|
file
|
||||||
filesystem
|
filesystem
|
||||||
findutils
|
findutils
|
||||||
|
firefox
|
||||||
|
fish
|
||||||
flex
|
flex
|
||||||
fzf
|
fzf
|
||||||
gawk
|
gawk
|
||||||
@@ -40,11 +45,11 @@ gcc
|
|||||||
gcc-libs
|
gcc-libs
|
||||||
gdb
|
gdb
|
||||||
gettext
|
gettext
|
||||||
|
gimp
|
||||||
git
|
git
|
||||||
glibc
|
glibc
|
||||||
grep
|
grep
|
||||||
grub
|
grub
|
||||||
gscreenshot
|
|
||||||
gzip
|
gzip
|
||||||
htop-vim-git
|
htop-vim-git
|
||||||
i3-gaps
|
i3-gaps
|
||||||
@@ -66,6 +71,7 @@ linux-headers
|
|||||||
logrotate
|
logrotate
|
||||||
lolcat
|
lolcat
|
||||||
lsof
|
lsof
|
||||||
|
lutris
|
||||||
lvm2
|
lvm2
|
||||||
lxappearance
|
lxappearance
|
||||||
make
|
make
|
||||||
@@ -80,23 +86,28 @@ neovim
|
|||||||
netctl
|
netctl
|
||||||
noto-fonts
|
noto-fonts
|
||||||
ntfs-3g
|
ntfs-3g
|
||||||
|
ntp
|
||||||
numlockx
|
numlockx
|
||||||
nvidia
|
nvidia
|
||||||
openssh
|
openssh
|
||||||
|
os-prober
|
||||||
pacman
|
pacman
|
||||||
pass
|
pass
|
||||||
patch
|
patch
|
||||||
pciutils
|
pciutils
|
||||||
pcmanfm
|
pcmanfm
|
||||||
pdfgrep
|
pdfgrep
|
||||||
|
peaclock
|
||||||
perl
|
perl
|
||||||
pgadmin4
|
pgadmin4
|
||||||
pipes.sh
|
pipes.sh
|
||||||
pkgconf
|
pkgconf
|
||||||
postgresql
|
postgresql
|
||||||
procps-ng
|
procps-ng
|
||||||
|
psensor
|
||||||
psmisc
|
psmisc
|
||||||
pulseaudio
|
pulseaudio
|
||||||
|
pycp
|
||||||
python-dbus
|
python-dbus
|
||||||
python-pip
|
python-pip
|
||||||
python-pywal
|
python-pywal
|
||||||
@@ -106,8 +117,10 @@ qrencode
|
|||||||
ranger
|
ranger
|
||||||
redshift
|
redshift
|
||||||
reiserfsprogs
|
reiserfsprogs
|
||||||
|
rsync
|
||||||
rxvt-unicode-pixbuf
|
rxvt-unicode-pixbuf
|
||||||
s-nail
|
s-nail
|
||||||
|
scrot
|
||||||
sed
|
sed
|
||||||
shadow
|
shadow
|
||||||
shellcheck
|
shellcheck
|
||||||
@@ -115,8 +128,11 @@ spotify
|
|||||||
spotify-now-git
|
spotify-now-git
|
||||||
st
|
st
|
||||||
steam
|
steam
|
||||||
|
steam-native-runtime
|
||||||
steamos-xpad-dkms
|
steamos-xpad-dkms
|
||||||
sudo
|
sudo
|
||||||
|
surf
|
||||||
|
sxiv
|
||||||
sysfsutils
|
sysfsutils
|
||||||
sysstat
|
sysstat
|
||||||
systemd-numlockontty
|
systemd-numlockontty
|
||||||
@@ -135,6 +151,7 @@ texlive-local-tkz-base
|
|||||||
texlive-local-tkz-euclide
|
texlive-local-tkz-euclide
|
||||||
texlive-localmanager-git
|
texlive-localmanager-git
|
||||||
the_silver_searcher
|
the_silver_searcher
|
||||||
|
tmux
|
||||||
tor
|
tor
|
||||||
tor-browser
|
tor-browser
|
||||||
transmission-gtk
|
transmission-gtk
|
||||||
@@ -147,10 +164,12 @@ unzip
|
|||||||
usbutils
|
usbutils
|
||||||
util-linux
|
util-linux
|
||||||
vi
|
vi
|
||||||
|
virtualbox
|
||||||
vlc
|
vlc
|
||||||
w3m
|
w3m
|
||||||
wego
|
wego
|
||||||
which
|
which
|
||||||
|
wine
|
||||||
wireless_tools
|
wireless_tools
|
||||||
wpa_actiond
|
wpa_actiond
|
||||||
wpa_supplicant
|
wpa_supplicant
|
||||||
@@ -207,9 +226,10 @@ xorg-xvinfo
|
|||||||
xorg-xwd
|
xorg-xwd
|
||||||
xorg-xwininfo
|
xorg-xwininfo
|
||||||
xorg-xwud
|
xorg-xwud
|
||||||
|
yad
|
||||||
youtube-viewer
|
youtube-viewer
|
||||||
zathura
|
zathura
|
||||||
zathura-pdf-poppler
|
zathura-pdf-mupdf
|
||||||
zbar
|
zbar
|
||||||
zip
|
zip
|
||||||
zsh
|
zsh
|
||||||
|
|||||||
Reference in New Issue
Block a user