Moved configs into Stow structure
Fixed ranger dropping into correct directory in shell. Deleted old aliases.
This commit is contained in:
@@ -1,65 +0,0 @@
|
|||||||
# Initialize Other Alias Files {{{ #
|
|
||||||
alias_folder="~/linux-config/aliases"
|
|
||||||
alias_type="school git pc"
|
|
||||||
for type in $alias_type; do
|
|
||||||
. ~/linux-config/aliases/."$type"_aliases
|
|
||||||
done
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
# System {{{ #
|
|
||||||
alias l='ls -a'
|
|
||||||
alias ll='ls -alF'
|
|
||||||
alias cs='printf "\033c"'
|
|
||||||
shopt -s dotglob
|
|
||||||
alias lo="i3-msg exit"
|
|
||||||
alias s="systemctl suspend"
|
|
||||||
alias sd="sudo shutdown 0"
|
|
||||||
alias reb="sudo shutdown -r 0"
|
|
||||||
alias hst="history"
|
|
||||||
alias rmsw="rm .sw*"
|
|
||||||
alias nf="neofetch"
|
|
||||||
alias vlm="alsamixer -c 1"
|
|
||||||
# }}} System #
|
|
||||||
|
|
||||||
# Directories {{{ #
|
|
||||||
# unalias c
|
|
||||||
d() { cd "$@" && ls -a ; }
|
|
||||||
cd_up() { d $(printf "%0.s../" $(seq 1 $1 )) ; }
|
|
||||||
alias "d."="cd_up"
|
|
||||||
alias dd="d ~/Downloads"
|
|
||||||
alias cfg="d ~/.config"
|
|
||||||
# }}} #
|
|
||||||
|
|
||||||
ok() { okular $1 ; }
|
|
||||||
rfnd() { find . -name "$1" ; }
|
|
||||||
# rfnde() { find . -name "*.$1" ; }
|
|
||||||
rgrp() { grep -r $1 * ; }
|
|
||||||
grpy() { grep $1 *.py ; }
|
|
||||||
p3() { python3 $1 ; }
|
|
||||||
py() { python $1 ; }
|
|
||||||
|
|
||||||
# Config {{{ #
|
|
||||||
alias lc="d ~/linux-config/"
|
|
||||||
alias vv="vi ~/.vimrc"
|
|
||||||
alias vu="vi ~/.Xresources"
|
|
||||||
alias r=". ~/.bashrc"
|
|
||||||
# aliases
|
|
||||||
alias lca="d ~/linux-config/aliases"
|
|
||||||
alias vb="vi $alias_folder/.bash_aliases"
|
|
||||||
alias vs="vi $alias_folder/.school_aliases"
|
|
||||||
alias vag="vi $alias_folder/.git_aliases"
|
|
||||||
alias vap="vi $alias_folder/.pc_aliases"
|
|
||||||
# }}} Config #
|
|
||||||
|
|
||||||
# redshift
|
|
||||||
rs(){ redshift -O $(echo "scale=2;$1*1000" | bc) ; }
|
|
||||||
alias rx="redshift -x"
|
|
||||||
|
|
||||||
mrk() { pandoc -o ${1%.*}.html $1 && chr ${1%.*}.html ; }
|
|
||||||
|
|
||||||
# UltiSnips {{{ #
|
|
||||||
usnp_dir="~/.vim/plugged/vim-snippets/UltiSnips"
|
|
||||||
alias snp="d $usnp_dir"
|
|
||||||
vsnp() { vi ~/.vim/plugged/vim-snippets/UltiSnips/"$1".snippets ; }
|
|
||||||
alias tm="vi $usnp_dir/texmath.snippets"
|
|
||||||
# }}} #
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
# Aliases {{{
|
|
||||||
# . ~/.secure
|
|
||||||
alias egc="vim -c \"set syn=gitcommit\" -c \"set tw=72\" commit-msg.txt"
|
|
||||||
alias ga="git add -A * && gs"
|
|
||||||
alias gac="git add -A *; git commit"
|
|
||||||
alias gai="git add .gitignore"
|
|
||||||
alias gc="git commit"
|
|
||||||
alias gchom="git checkout master"
|
|
||||||
alias gclear="git stash clear"
|
|
||||||
alias gd="git diff -w"
|
|
||||||
alias gdc="git diff --cached"
|
|
||||||
alias gl="git log"
|
|
||||||
alias gpl="git pull --rebase"
|
|
||||||
alias gps="git push"
|
|
||||||
alias grbc="git rebase --continue"
|
|
||||||
alias gs="git status -u"
|
|
||||||
alias gsl="git shortlog"
|
|
||||||
alias gst="git stash"
|
|
||||||
alias gstore="git config credential.helper store"
|
|
||||||
alias gstp="git stash pop"
|
|
||||||
alias vig="vi .gitignore"
|
|
||||||
alias vir="vi README.md"
|
|
||||||
alias crm="mrk README.md"
|
|
||||||
gcm(){ git commit -m "$1" ; }
|
|
||||||
# Aliases }}}
|
|
||||||
|
|
||||||
# Functions {{{
|
|
||||||
gcho() { git checkout $1 ; }
|
|
||||||
gcln() { git clone $1 ; }
|
|
||||||
|
|
||||||
gremotes() {
|
|
||||||
git remote set-url --add --push origin $1
|
|
||||||
git remote set-url --add --push origin $2
|
|
||||||
}
|
|
||||||
|
|
||||||
# gmrgr: merge repos {{{ #
|
|
||||||
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 #
|
|
||||||
#
|
|
||||||
gunc() { git update-index --assume-unchanged $1 ; }
|
|
||||||
|
|
||||||
# pull all {{{ #
|
|
||||||
gpla() {
|
|
||||||
cmds="lc snp 9r sch"
|
|
||||||
for cmd in $cmds; do
|
|
||||||
eval $cmd && gst && gpl && gstp && gclear
|
|
||||||
done
|
|
||||||
}
|
|
||||||
# }}} pull all #
|
|
||||||
# Functions }}}
|
|
||||||
@@ -1,118 +0,0 @@
|
|||||||
# Both PC/Laptop {{{
|
|
||||||
if [ "$(whoami)" == "kevin" ]; then
|
|
||||||
apti() { sudo apt install $1 ; }
|
|
||||||
aptr() { sudo apt remove $1 ; }
|
|
||||||
alias vbn="cvlc --loop --alsa-gain 1 ~/Downloads/brown-noise.mp3"
|
|
||||||
|
|
||||||
# school {{{ #
|
|
||||||
alias mt="ok ~/Documents/School/calc-textbook.pdf"
|
|
||||||
alias clc="gcalccmd"
|
|
||||||
alias 6t="ok ~/Documents/School/236-textbook.pdf"
|
|
||||||
alias doc="d ~/Documents"
|
|
||||||
# }}} school #
|
|
||||||
|
|
||||||
# i3 {{{ #
|
|
||||||
alias v3="vi ~/.config/i3/config"
|
|
||||||
alias v3b="vi ~/.config/i3blocks/i3blocks.conf"
|
|
||||||
alias i3b="d /usr/share/i3blocks"
|
|
||||||
|
|
||||||
alias pipes="pipes.sh -t 2"
|
|
||||||
alias bgs="nemo ~/Pictures/Backgrounds"
|
|
||||||
|
|
||||||
gvx() { urxvt --help 2>&1 | grep $1 ; }
|
|
||||||
alias rur="xrdb ~/.Xresources"
|
|
||||||
# }}} i3 #
|
|
||||||
|
|
||||||
# coding projs {{{ #
|
|
||||||
cd_coding_dir="d ~/Documents/coding"
|
|
||||||
alias ans="d /usr/local/android-studio/bin && ./studio.sh"
|
|
||||||
alias cdn="$cd_coding_dir"
|
|
||||||
alias tb="$cd_coding_dir/trapbot"
|
|
||||||
alias vtb="$cd_coding_dir/trapbot && vi scan_reddit.py"
|
|
||||||
alias ptb="python scan_reddit.py"
|
|
||||||
alias rtb="$cd_coding_dir/trapbot && python scan_reddit.py"
|
|
||||||
# }}} coding projs #
|
|
||||||
|
|
||||||
chr() { google-chrome $1 ; }
|
|
||||||
cld() { colordiff -y --suppress-common-lines $1 $2 ; }
|
|
||||||
fi
|
|
||||||
# Both PC/Laptop }}}
|
|
||||||
|
|
||||||
# NZXT {{{
|
|
||||||
if [ "$(hostname)" == "NZXT" ]; then
|
|
||||||
# rotate monitor {{{ #
|
|
||||||
rt() {
|
|
||||||
output="HDMI-0"
|
|
||||||
if [ "$1" = "s" ]
|
|
||||||
# if [ "${1:0:1}" = "s" ]
|
|
||||||
then
|
|
||||||
output="DVI-I-1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dir="normal"
|
|
||||||
if [ "$2" = "r" ]
|
|
||||||
# if [ "${1:1:2}" = "r" ]
|
|
||||||
then
|
|
||||||
dir="right"
|
|
||||||
fi
|
|
||||||
if [ "$2" = "l" ]
|
|
||||||
then
|
|
||||||
dir="left"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# echo "xrandr --output \"$output\" --rotate \"$dir\""
|
|
||||||
xrandr --output "$output" --rotate "$dir"
|
|
||||||
}
|
|
||||||
# }}} rotate monitor #
|
|
||||||
|
|
||||||
# audio {{{ #
|
|
||||||
alias alsi="pactl list short sink-inputs"
|
|
||||||
alias als="pactl list short sinks"
|
|
||||||
amsih() { pactl move-sink-input $1 0 ; }
|
|
||||||
amsis() { pactl move-sink-input $1 1 ; }
|
|
||||||
# }}} audio #
|
|
||||||
|
|
||||||
# apps {{{ #
|
|
||||||
alias nem="nemo ."
|
|
||||||
alias spt="speedtest"
|
|
||||||
alias pg="ping -c 5 google.ca"
|
|
||||||
alias w7="VBoxManage startvm W7 --type headless"
|
|
||||||
# }}} apps #
|
|
||||||
|
|
||||||
# various coding projs {{{ #
|
|
||||||
alias cv="d ~/Documents/resume/examples"
|
|
||||||
alias cvf="d ~/Documents/resume/examples/cv"
|
|
||||||
alias vcv="vi ~/Documents/resume/examples/cv.tex"
|
|
||||||
alias okcv="ok ~/Documents/resume/examples/cv.pdf"
|
|
||||||
alias sfa="d ~/Documents/self-authoring"
|
|
||||||
alias rcg="$cd_coding_dir/random-color-generator"
|
|
||||||
alias dcr="$cd_coding_dir/dcr-logger"
|
|
||||||
alias pf="$cd_coding_dir/ParsaFood"
|
|
||||||
alias sb="$cd_coding_dir/swbot"
|
|
||||||
# alias psb="p3 create_skills_dict.py"
|
|
||||||
# alias psbo="p3 create_skills_dict.py > output.py"
|
|
||||||
alias psb="p3 create_monster_dict.py"
|
|
||||||
alias psbo="p3 create_monster_dict.py > output.py"
|
|
||||||
# }}} various coding projs #
|
|
||||||
fi
|
|
||||||
# NZXT }}}
|
|
||||||
|
|
||||||
# Laptop {{{
|
|
||||||
if [ "$(hostname)" == "X1-Carbon" ]; then
|
|
||||||
# key swaps {{{ #
|
|
||||||
xmodmap -e "keycode 9 = Escape"
|
|
||||||
xmodmap -e "keycode 22 = Home"
|
|
||||||
xmodmap -e "keycode 119 = End"
|
|
||||||
xmodmap -e "keycode 110 = Delete"
|
|
||||||
xmodmap -e "keycode 115 = BackSpace"
|
|
||||||
# }}} key swaps #
|
|
||||||
|
|
||||||
alias gbl="xbacklight -get"
|
|
||||||
sbl() { xbacklight -set $(echo "scale=2;$1*10" | bc) ; }
|
|
||||||
|
|
||||||
alias thn="thunar ."
|
|
||||||
|
|
||||||
alias plz="d ~/platterz2018/ocr-reader/app/src/main/java/com/google/android/gms/samples/vision/ocrreader"
|
|
||||||
alias ans="d /usr/local/android-studio/bin/"
|
|
||||||
fi
|
|
||||||
# Laptop }}}
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
in_lab=false
|
|
||||||
cd_school="d ~/Documents/School/notes"
|
|
||||||
|
|
||||||
# Lab Setup/Aliases {{{
|
|
||||||
if [ $(whoami) == "mokkar" ]; then
|
|
||||||
TERM=xterm-256color
|
|
||||||
xmodmap -e "clear Lock"
|
|
||||||
in_lab=true
|
|
||||||
cd_school="d ~";
|
|
||||||
|
|
||||||
ff() { firefox $1 ; }
|
|
||||||
zip() { tar -zcvf $1.tar.gz $1/ ; }
|
|
||||||
alias nau="nautilus ."
|
|
||||||
fi
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
# General {{{
|
|
||||||
alias sch="$cd_school"
|
|
||||||
alias 236="$cd_school/236"
|
|
||||||
alias psy="$cd_school/psy"
|
|
||||||
alias rml="rm *.aux *.log *.pdf"
|
|
||||||
pdl() { pdflatex $1 ; }
|
|
||||||
cptp() {
|
|
||||||
cp *template.tex cp-template.tex
|
|
||||||
chmod 600 cp-template.tex
|
|
||||||
date=`date +%-m-%d`
|
|
||||||
mv cp-template.tex "$date".tex
|
|
||||||
}
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
# 136 {{{
|
|
||||||
alias 136="$cd_school/136"
|
|
||||||
alias 136l="$cd_school/136/lecture"
|
|
||||||
alias pr3="$cd_school/136/par/3"
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
# 209 {{{
|
|
||||||
alias ll="ls -l"
|
|
||||||
|
|
||||||
# General {{{
|
|
||||||
cd_209="d ~/Documents/School/209";
|
|
||||||
alias 209="$cd_209"
|
|
||||||
alias 9r="$cd_209/mokkar"
|
|
||||||
alias l7="$cd_209/mokkar/lab7"
|
|
||||||
alias m7="make childcreates && ./childcreates 3"
|
|
||||||
alias 9a="$cd_209/mokkar/a3"
|
|
||||||
# alias cdf="ssh -t mokkar@cdf.utoronto.ca '. ./.bashrc; bash -l'"
|
|
||||||
alias cdf="echo \". ./.bashrc\"&& ssh mokkar@cdf.utoronto.ca"
|
|
||||||
mkex() { chmod 777 $1 ; }
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
# {{{ Compilation Functions
|
|
||||||
# compile without running
|
|
||||||
c9() { gcc -Wall -std=gnu99 -g -o "${1%.*}.out" "$1" -lm ; }
|
|
||||||
|
|
||||||
# compile all without running
|
|
||||||
c9a() {
|
|
||||||
for file in *; do
|
|
||||||
if [[ $file = *.c ]]; then
|
|
||||||
gcc -Wall -std=gnu99 -g -o "${file%.*}".out "$file"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# compile and run
|
|
||||||
c9r() { c9 $1 && ./"${1%.*}.out" ; }
|
|
||||||
|
|
||||||
# compile and run with input
|
|
||||||
c9i() { c9 $1 && ./"${1%.*}.out" < $2 ; }
|
|
||||||
|
|
||||||
# compile and run with input file
|
|
||||||
run() {
|
|
||||||
while read line; do
|
|
||||||
# ./$1.out $line
|
|
||||||
echo ./$1.out $line
|
|
||||||
done < $1.in
|
|
||||||
}
|
|
||||||
# temp
|
|
||||||
alias m3="make pfact && ./pfact 10"
|
|
||||||
alias 35w="c9 3-5_wait.c && ./3-5_wait.out abc a"
|
|
||||||
# }}}
|
|
||||||
# }}}
|
|
||||||
|
|
||||||
alias 36a="$cd_school/236/a1"
|
|
||||||
alias 36t="$cd_school && ok ../236-textbook.pdf"
|
|
||||||
@@ -431,12 +431,12 @@ bar {
|
|||||||
background $black$bar_trans
|
background $black$bar_trans
|
||||||
# border, bg, text color
|
# border, bg, text color
|
||||||
# focused_workspace $inactive_ws_bg $bg $focused_ws_text
|
# focused_workspace $inactive_ws_bg $bg $focused_ws_text
|
||||||
focused_workspace $inactive_ws_bg $bg $fg
|
focused_workspace $inactive_ws_bg $bg $fg
|
||||||
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/sam-i3blocks/sam-i3blocks.conf
|
||||||
status_command 2>/tmp/i3blocks-sam.err i3blocks -vvv -c ~/.config/sam-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
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# The top properties below are applied to every block, but can be overridden.
|
# The top properties below are applied to every block, but can be overridden.
|
||||||
# Each block command defaults to the script name to avoid boilerplate.
|
# Each block command defaults to the script name to avoid boilerplate.
|
||||||
align=center
|
align=center
|
||||||
command=/home/kevin/linux-config/configs/i3blocks-scripts/$BLOCK_NAME
|
command=~/.config/i3blocks/scripts/$BLOCK_NAME
|
||||||
separator=true
|
separator=true
|
||||||
separator_block_width=25
|
separator_block_width=25
|
||||||
markup=pango
|
markup=pango
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
# The top properties below are applied to every block, but can be overridden.
|
# The top properties below are applied to every block, but can be overridden.
|
||||||
# Each block command defaults to the script name to avoid boilerplate.
|
# Each block command defaults to the script name to avoid boilerplate.
|
||||||
align=center
|
align=center
|
||||||
command=/home/kevin/linux-config/configs/i3blocks-scripts/$BLOCK_NAME
|
command=~/.config/i3blocks/scripts/$BLOCK_NAME
|
||||||
separator=true
|
separator=true
|
||||||
separator_block_width=25
|
separator_block_width=25
|
||||||
markup=pango
|
markup=pango
|
||||||
@@ -273,7 +273,8 @@ map i display_file
|
|||||||
map ? help
|
map ? help
|
||||||
map W display_log
|
map W display_log
|
||||||
# map w taskview_open
|
# map w taskview_open
|
||||||
map S shell $SHELL
|
# map S shell $SHELL
|
||||||
|
map S shell fish -C "cd %d"
|
||||||
|
|
||||||
map : console
|
map : console
|
||||||
map ; console
|
map ; console
|
||||||
Reference in New Issue
Block a user