From 756162fb70a69568f1eb35ff3eb15de872ccd771 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Tue, 29 Jan 2019 01:51:24 -0500 Subject: [PATCH] Moved configs into Stow structure Fixed ranger dropping into correct directory in shell. Deleted old aliases. --- aliases/.bash_aliases | 65 ---------- aliases/.git_aliases | 57 --------- aliases/.pc_aliases | 118 ------------------ aliases/.school_aliases | 85 ------------- {configs => i3/.config}/i3/config | 4 +- .../.config}/i3blocks/i3blocks-display.conf | 0 .../.config}/i3blocks/i3blocks.conf | 2 +- .../.config/i3blocks}/sam-i3blocks.conf | 2 +- .../.config/i3blocks/scripts}/backlight | 0 .../.config/i3blocks/scripts}/battery | 0 .../.config/i3blocks/scripts}/calendar | 0 .../.config/i3blocks/scripts}/cpu_usage | 0 .../.config/i3blocks/scripts}/load_average | 0 .../.config/i3blocks/scripts}/memory | 0 .../.config/i3blocks/scripts}/name | 0 .../.config/i3blocks/scripts}/spotify | 0 .../.config/i3blocks/scripts}/temperature | 0 .../.config/i3blocks/scripts}/time | 0 .../.config/i3blocks/scripts}/time_short | 0 .../.config/i3blocks/scripts}/volume | 0 .../.config/i3blocks/scripts}/wifi | 0 .../.config}/neofetch/config.conf | 0 .../.config}/ranger/commands.py | 0 {configs => ranger/.config}/ranger/rc.conf | 3 +- {configs => ranger/.config}/ranger/rifle.conf | 0 {configs => ranger/.config}/ranger/scope.sh | 0 26 files changed, 6 insertions(+), 330 deletions(-) delete mode 100644 aliases/.bash_aliases delete mode 100644 aliases/.git_aliases delete mode 100644 aliases/.pc_aliases delete mode 100644 aliases/.school_aliases rename {configs => i3/.config}/i3/config (99%) rename {configs => i3blocks/.config}/i3blocks/i3blocks-display.conf (100%) rename {configs => i3blocks/.config}/i3blocks/i3blocks.conf (97%) rename {configs/sam-i3blocks => i3blocks/.config/i3blocks}/sam-i3blocks.conf (89%) rename {configs/i3blocks-scripts => i3blocks/.config/i3blocks/scripts}/backlight (100%) rename {configs/i3blocks-scripts => i3blocks/.config/i3blocks/scripts}/battery (100%) rename {configs/i3blocks-scripts => i3blocks/.config/i3blocks/scripts}/calendar (100%) rename {configs/i3blocks-scripts => i3blocks/.config/i3blocks/scripts}/cpu_usage (100%) rename {configs/i3blocks-scripts => i3blocks/.config/i3blocks/scripts}/load_average (100%) rename {configs/i3blocks-scripts => i3blocks/.config/i3blocks/scripts}/memory (100%) rename {configs/i3blocks-scripts => i3blocks/.config/i3blocks/scripts}/name (100%) rename {configs/i3blocks-scripts => i3blocks/.config/i3blocks/scripts}/spotify (100%) rename {configs/i3blocks-scripts => i3blocks/.config/i3blocks/scripts}/temperature (100%) rename {configs/i3blocks-scripts => i3blocks/.config/i3blocks/scripts}/time (100%) rename {configs/i3blocks-scripts => i3blocks/.config/i3blocks/scripts}/time_short (100%) rename {configs/i3blocks-scripts => i3blocks/.config/i3blocks/scripts}/volume (100%) rename {configs/i3blocks-scripts => i3blocks/.config/i3blocks/scripts}/wifi (100%) rename {configs => neofetch/.config}/neofetch/config.conf (100%) rename {configs => ranger/.config}/ranger/commands.py (100%) rename {configs => ranger/.config}/ranger/rc.conf (99%) rename {configs => ranger/.config}/ranger/rifle.conf (100%) rename {configs => ranger/.config}/ranger/scope.sh (100%) diff --git a/aliases/.bash_aliases b/aliases/.bash_aliases deleted file mode 100644 index c4fb728..0000000 --- a/aliases/.bash_aliases +++ /dev/null @@ -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" -# }}} # diff --git a/aliases/.git_aliases b/aliases/.git_aliases deleted file mode 100644 index 24f4ca2..0000000 --- a/aliases/.git_aliases +++ /dev/null @@ -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 }}} diff --git a/aliases/.pc_aliases b/aliases/.pc_aliases deleted file mode 100644 index 6fa85fa..0000000 --- a/aliases/.pc_aliases +++ /dev/null @@ -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 }}} diff --git a/aliases/.school_aliases b/aliases/.school_aliases deleted file mode 100644 index 38c1421..0000000 --- a/aliases/.school_aliases +++ /dev/null @@ -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" diff --git a/configs/i3/config b/i3/.config/i3/config similarity index 99% rename from configs/i3/config rename to i3/.config/i3/config index 96789b9..a2bdc05 100644 --- a/configs/i3/config +++ b/i3/.config/i3/config @@ -431,12 +431,12 @@ bar { background $black$bar_trans # border, bg, text color # 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 inactive_workspace $inactive_ws_bg $inactive_ws_bg$inactive_ws_trans $fg } # status_command i3blocks -c ~/.config/sam-i3blocks/sam-i3blocks.conf - status_command 2>/tmp/i3blocks-sam.err i3blocks -vvv -c ~/.config/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 wheel_up_cmd nop wheel_down_cmd nop diff --git a/configs/i3blocks/i3blocks-display.conf b/i3blocks/.config/i3blocks/i3blocks-display.conf similarity index 100% rename from configs/i3blocks/i3blocks-display.conf rename to i3blocks/.config/i3blocks/i3blocks-display.conf diff --git a/configs/i3blocks/i3blocks.conf b/i3blocks/.config/i3blocks/i3blocks.conf similarity index 97% rename from configs/i3blocks/i3blocks.conf rename to i3blocks/.config/i3blocks/i3blocks.conf index e4e6bb6..2740903 100644 --- a/configs/i3blocks/i3blocks.conf +++ b/i3blocks/.config/i3blocks/i3blocks.conf @@ -1,7 +1,7 @@ # The top properties below are applied to every block, but can be overridden. # Each block command defaults to the script name to avoid boilerplate. align=center -command=/home/kevin/linux-config/configs/i3blocks-scripts/$BLOCK_NAME +command=~/.config/i3blocks/scripts/$BLOCK_NAME separator=true separator_block_width=25 markup=pango diff --git a/configs/sam-i3blocks/sam-i3blocks.conf b/i3blocks/.config/i3blocks/sam-i3blocks.conf similarity index 89% rename from configs/sam-i3blocks/sam-i3blocks.conf rename to i3blocks/.config/i3blocks/sam-i3blocks.conf index 2f84568..ef24bb6 100644 --- a/configs/sam-i3blocks/sam-i3blocks.conf +++ b/i3blocks/.config/i3blocks/sam-i3blocks.conf @@ -2,7 +2,7 @@ # The top properties below are applied to every block, but can be overridden. # Each block command defaults to the script name to avoid boilerplate. align=center -command=/home/kevin/linux-config/configs/i3blocks-scripts/$BLOCK_NAME +command=~/.config/i3blocks/scripts/$BLOCK_NAME separator=true separator_block_width=25 markup=pango diff --git a/configs/i3blocks-scripts/backlight b/i3blocks/.config/i3blocks/scripts/backlight similarity index 100% rename from configs/i3blocks-scripts/backlight rename to i3blocks/.config/i3blocks/scripts/backlight diff --git a/configs/i3blocks-scripts/battery b/i3blocks/.config/i3blocks/scripts/battery similarity index 100% rename from configs/i3blocks-scripts/battery rename to i3blocks/.config/i3blocks/scripts/battery diff --git a/configs/i3blocks-scripts/calendar b/i3blocks/.config/i3blocks/scripts/calendar similarity index 100% rename from configs/i3blocks-scripts/calendar rename to i3blocks/.config/i3blocks/scripts/calendar diff --git a/configs/i3blocks-scripts/cpu_usage b/i3blocks/.config/i3blocks/scripts/cpu_usage similarity index 100% rename from configs/i3blocks-scripts/cpu_usage rename to i3blocks/.config/i3blocks/scripts/cpu_usage diff --git a/configs/i3blocks-scripts/load_average b/i3blocks/.config/i3blocks/scripts/load_average similarity index 100% rename from configs/i3blocks-scripts/load_average rename to i3blocks/.config/i3blocks/scripts/load_average diff --git a/configs/i3blocks-scripts/memory b/i3blocks/.config/i3blocks/scripts/memory similarity index 100% rename from configs/i3blocks-scripts/memory rename to i3blocks/.config/i3blocks/scripts/memory diff --git a/configs/i3blocks-scripts/name b/i3blocks/.config/i3blocks/scripts/name similarity index 100% rename from configs/i3blocks-scripts/name rename to i3blocks/.config/i3blocks/scripts/name diff --git a/configs/i3blocks-scripts/spotify b/i3blocks/.config/i3blocks/scripts/spotify similarity index 100% rename from configs/i3blocks-scripts/spotify rename to i3blocks/.config/i3blocks/scripts/spotify diff --git a/configs/i3blocks-scripts/temperature b/i3blocks/.config/i3blocks/scripts/temperature similarity index 100% rename from configs/i3blocks-scripts/temperature rename to i3blocks/.config/i3blocks/scripts/temperature diff --git a/configs/i3blocks-scripts/time b/i3blocks/.config/i3blocks/scripts/time similarity index 100% rename from configs/i3blocks-scripts/time rename to i3blocks/.config/i3blocks/scripts/time diff --git a/configs/i3blocks-scripts/time_short b/i3blocks/.config/i3blocks/scripts/time_short similarity index 100% rename from configs/i3blocks-scripts/time_short rename to i3blocks/.config/i3blocks/scripts/time_short diff --git a/configs/i3blocks-scripts/volume b/i3blocks/.config/i3blocks/scripts/volume similarity index 100% rename from configs/i3blocks-scripts/volume rename to i3blocks/.config/i3blocks/scripts/volume diff --git a/configs/i3blocks-scripts/wifi b/i3blocks/.config/i3blocks/scripts/wifi similarity index 100% rename from configs/i3blocks-scripts/wifi rename to i3blocks/.config/i3blocks/scripts/wifi diff --git a/configs/neofetch/config.conf b/neofetch/.config/neofetch/config.conf similarity index 100% rename from configs/neofetch/config.conf rename to neofetch/.config/neofetch/config.conf diff --git a/configs/ranger/commands.py b/ranger/.config/ranger/commands.py similarity index 100% rename from configs/ranger/commands.py rename to ranger/.config/ranger/commands.py diff --git a/configs/ranger/rc.conf b/ranger/.config/ranger/rc.conf similarity index 99% rename from configs/ranger/rc.conf rename to ranger/.config/ranger/rc.conf index 4476ddb..a3eafe5 100644 --- a/configs/ranger/rc.conf +++ b/ranger/.config/ranger/rc.conf @@ -273,7 +273,8 @@ map i display_file map ? help map W display_log # map w taskview_open -map S shell $SHELL +# map S shell $SHELL +map S shell fish -C "cd %d" map : console map ; console diff --git a/configs/ranger/rifle.conf b/ranger/.config/ranger/rifle.conf similarity index 100% rename from configs/ranger/rifle.conf rename to ranger/.config/ranger/rifle.conf diff --git a/configs/ranger/scope.sh b/ranger/.config/ranger/scope.sh similarity index 100% rename from configs/ranger/scope.sh rename to ranger/.config/ranger/scope.sh