From 5c5e010c532b1f8638e444a165662a8cd9ca0093 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Thu, 15 Feb 2018 23:21:41 -0500 Subject: [PATCH] Organized dotfiles/configs into folders Split set-from-git into 3 different files for each section and created a script for common directory variables. Created separate folders for PC/laptop configs. --- aliases/.bash_aliases | 2 ++ aliases/.pc_aliases | 2 ++ aliases/.school_aliases | 2 +- i3.conf => configs/NZXT/i3.conf | 22 +++++++-------- i3blocks.conf => configs/NZXT/i3blocks.conf | 0 neofetch.conf => configs/NZXT/neofetch.conf | 0 .../NZXT/terminator.conf | 6 +++-- .../X1-Carbon/i3.conf | 0 .../X1-Carbon/i3blocks.conf | 0 .../X1-Carbon/terminator.conf | 0 configs/set-configs.sh | 11 ++++++++ configs/terminator-cp.sh | 9 +++++++ dirs.sh | 5 ++++ .bashrc => dotfiles/bashrc | 0 .gitconfig => dotfiles/gitconfig | 0 .inputrc => dotfiles/inputrc | 0 dotfiles/set-dotfiles.sh | 11 ++++++++ .vimrc => dotfiles/vimrc | 0 set-from-git.sh | 27 ------------------- 19 files changed, 56 insertions(+), 41 deletions(-) rename i3.conf => configs/NZXT/i3.conf (95%) rename i3blocks.conf => configs/NZXT/i3blocks.conf (100%) rename neofetch.conf => configs/NZXT/neofetch.conf (100%) rename NZXT-terminator => configs/NZXT/terminator.conf (91%) rename X1-Carbon-i3.conf => configs/X1-Carbon/i3.conf (100%) rename X1-Carbon-i3blocks.conf => configs/X1-Carbon/i3blocks.conf (100%) rename X1-Carbon-terminator => configs/X1-Carbon/terminator.conf (100%) create mode 100755 configs/set-configs.sh create mode 100755 configs/terminator-cp.sh create mode 100755 dirs.sh rename .bashrc => dotfiles/bashrc (100%) rename .gitconfig => dotfiles/gitconfig (100%) rename .inputrc => dotfiles/inputrc (100%) create mode 100755 dotfiles/set-dotfiles.sh rename .vimrc => dotfiles/vimrc (100%) delete mode 100755 set-from-git.sh diff --git a/aliases/.bash_aliases b/aliases/.bash_aliases index 86ad4c6..0a8d59d 100644 --- a/aliases/.bash_aliases +++ b/aliases/.bash_aliases @@ -19,6 +19,7 @@ alias hst="history" alias topo="top -o %MEM" alias rmsw="rm .sw*" alias nf="neofetch" +alias vlm="alsamixer -c 1" # }}} System # # Directories {{{ # @@ -27,6 +28,7 @@ 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 ; } diff --git a/aliases/.pc_aliases b/aliases/.pc_aliases index 7aa69ef..ac60d79 100644 --- a/aliases/.pc_aliases +++ b/aliases/.pc_aliases @@ -5,6 +5,8 @@ if [ "$(whoami)" == "kevin" ]; then alias mt="ok ~/Documents/School/calc-textbook.pdf" alias clc="gcalccmd" alias 6t="ok ~/Documents/School/236-textbook.pdf" + + cld() { colordiff -y --suppress-common-lines $1 $2 ; } fi # Both PC/Laptop }}} diff --git a/aliases/.school_aliases b/aliases/.school_aliases index f42208e..2ce33eb 100644 --- a/aliases/.school_aliases +++ b/aliases/.school_aliases @@ -45,7 +45,7 @@ alias l5="$cd_209/mokkar/lab5" alias 9a="$cd_209/mokkar/a2" # alias cdf="ssh -t mokkar@cdf.utoronto.ca '. ./.bashrc; bash -l'" alias cdf="echo \". ./.bashrc\"&& ssh mokkar@cdf.utoronto.ca" -mkex() { chmod 700 $1 ; } +mkex() { chmod 777 $1 ; } # }}} # {{{ Compilation Functions diff --git a/i3.conf b/configs/NZXT/i3.conf similarity index 95% rename from i3.conf rename to configs/NZXT/i3.conf index f02b0ee..d97e6dc 100644 --- a/i3.conf +++ b/configs/NZXT/i3.conf @@ -40,8 +40,8 @@ bindsym control+k focus up bindsym control+l focus right # move workspace to other monitor -bindsym $mod+h move workspace to output left -bindsym $mod+l move workspace to output right +bindsym $mod+minus move workspace to output left +bindsym $mod+plus move workspace to output right # alternatively, you can use the cursor keys: bindsym $mod+Left focus left @@ -98,19 +98,19 @@ set $ws1 "1 " set $ws2 "2 " set $ws3 "3 " set $ws4 "4 " -set $ws5 "5 " +set $ws5 "5 " set $ws6 "6 " set $ws7 "7 " -set $ws8 "8 " +set $ws8 "8 " set $ws9 "9 " -set $ws0 "0 " -assign [class="discord"] $ws5 +set $ws10 "10 " +assign [class="discord"] $ws6 # }}} ws names # # ws bindings {{{ # # switch to workspace -bindsym $mod+plus workspace next -bindsym $mod+minus workspace prev +bindsym $mod+h workspace prev +bindsym $mod+l workspace next bindsym $mod+1 workspace $ws1 bindsym $mod+2 workspace $ws2 @@ -168,9 +168,9 @@ bindsym $mod+control+l resize grow width 10 px or 10 ppt # status bar {{{ # # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) -set $sb_font Hack Bold 16 +set $sb_font Hack Bold bar { - font pango:$sb_font + font pango:$sb_font 17 tray_output HDMI_0 status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf output HDMI-0 @@ -179,7 +179,7 @@ bar { bar { output DVI-I-1 tray_output HDMI_0 - font pango:$sb_font + font pango:$sb_font 22 } # }}} status bar # diff --git a/i3blocks.conf b/configs/NZXT/i3blocks.conf similarity index 100% rename from i3blocks.conf rename to configs/NZXT/i3blocks.conf diff --git a/neofetch.conf b/configs/NZXT/neofetch.conf similarity index 100% rename from neofetch.conf rename to configs/NZXT/neofetch.conf diff --git a/NZXT-terminator b/configs/NZXT/terminator.conf similarity index 91% rename from NZXT-terminator rename to configs/NZXT/terminator.conf index 86f4caf..a45ab3f 100644 --- a/NZXT-terminator +++ b/configs/NZXT/terminator.conf @@ -3,9 +3,10 @@ focus = mouse inactive_color_offset = 1.0 tab_position = hidden - title_font = Noto Sans 10 + title_font = Hack 10 title_hide_sizetext = True title_transmit_bg_color = "#3d3d3d" + title_use_system_font = False [keybindings] [layouts] [[default]] @@ -24,8 +25,9 @@ copy_on_selection = True cursor_color = "#b9b9b9" custom_command = env TERM=xterm-256color bash - font = Ubuntu Mono 11 + font = Hack 11.5 foreground_color = "#0077ff" + icon_bell = False palette = "#000000:#aa0000:#00aa00:#aa5500:#0000aa:#aa00aa:#00aaaa:#aaaaaa:#555555:#ff5555:#55ff55:#ffff55:#5555ff:#ff55ff:#55ffff:#ffffff" scrollbar_position = hidden use_custom_command = True diff --git a/X1-Carbon-i3.conf b/configs/X1-Carbon/i3.conf similarity index 100% rename from X1-Carbon-i3.conf rename to configs/X1-Carbon/i3.conf diff --git a/X1-Carbon-i3blocks.conf b/configs/X1-Carbon/i3blocks.conf similarity index 100% rename from X1-Carbon-i3blocks.conf rename to configs/X1-Carbon/i3blocks.conf diff --git a/X1-Carbon-terminator b/configs/X1-Carbon/terminator.conf similarity index 100% rename from X1-Carbon-terminator rename to configs/X1-Carbon/terminator.conf diff --git a/configs/set-configs.sh b/configs/set-configs.sh new file mode 100755 index 0000000..bf707c8 --- /dev/null +++ b/configs/set-configs.sh @@ -0,0 +1,11 @@ +# Get directory variables from script. +. ../dirs.sh +# List of config files in system config dir that I want to link to. +config_files="neofetch/config.conf i3/config i3blocks/i3blocks.conf" +for file in $config_files; do + # Remove system file. + rm "$sys_config_dir"/"$file" + # Link config file in repository to system config location. + ln -s "$config_dir"/"$pc"/$(echo "$file" | cut -d'/' -f 1).conf \ + "$sys_config_dir"/"$file" +done diff --git a/configs/terminator-cp.sh b/configs/terminator-cp.sh new file mode 100755 index 0000000..aef62ff --- /dev/null +++ b/configs/terminator-cp.sh @@ -0,0 +1,9 @@ +# Get directory variables from script. +. ../dirs.sh +# The name of my Terminator config file in the repository. +my_terminator_conf_name=terminator.conf +# Remove currently existing config file in the repository. +rm "$config_dir"/"$pc"/"$my_terminator_conf_name" +# Copy system Terminator config file to repository. +cp "$sys_config_dir"/terminator/config \ +"$config_dir"/"$pc"/"$my_terminator_conf_name" diff --git a/dirs.sh b/dirs.sh new file mode 100755 index 0000000..e96d4a9 --- /dev/null +++ b/dirs.sh @@ -0,0 +1,5 @@ +linux_config_dir=~/linux-config +dot_dir=$linux_config_dir/dotfiles +config_dir=$linux_config_dir/configs +sys_config_dir=~/.config +pc=$(hostname) diff --git a/.bashrc b/dotfiles/bashrc similarity index 100% rename from .bashrc rename to dotfiles/bashrc diff --git a/.gitconfig b/dotfiles/gitconfig similarity index 100% rename from .gitconfig rename to dotfiles/gitconfig diff --git a/.inputrc b/dotfiles/inputrc similarity index 100% rename from .inputrc rename to dotfiles/inputrc diff --git a/dotfiles/set-dotfiles.sh b/dotfiles/set-dotfiles.sh new file mode 100755 index 0000000..2018fc8 --- /dev/null +++ b/dotfiles/set-dotfiles.sh @@ -0,0 +1,11 @@ +# Get directory variables from script. +. ../dirs.sh +# List of dotfiles I want to link to system. +dotfiles="bashrc gitconfig inputrc vimrc" +# cd $dot_dir +for dotfile in $dotfiles; do + # Remove system dotfile. + rm ~/."$dotfile" + # Link dotfile in repository to system dotfile. + ln -s "$dot_dir"/"$dotfile" ~/."$dotfile" +done diff --git a/.vimrc b/dotfiles/vimrc similarity index 100% rename from .vimrc rename to dotfiles/vimrc diff --git a/set-from-git.sh b/set-from-git.sh deleted file mode 100755 index a9957d2..0000000 --- a/set-from-git.sh +++ /dev/null @@ -1,27 +0,0 @@ -# dotfiles -dot_dir=~/linux-config -dotfiles="bashrc gitconfig inputrc vimrc" -cd $dot_dir -for dotfile in $dotfiles; do - rm ~/.$dotfile - ln -s $dot_dir/.$dotfile ~/.$dotfile -done - -# config files -dot_dir=~/linux-config -config_dir=~/.config -pc=$(hostname) -config_files="neofetch/config.conf i3/config i3blocks/i3blocks.conf" -for file in $config_files; do - rm $config_dir/$file - ln -s $dot_dir/"$pc"-$(echo $file | cut -d'/' -f 1).conf $config_dir/$file - # echo $(echo $file | cut -d'/' -f 1) -done - -# terminator -dot_dir=~/linux-config -config_dir=~/.config/ -# term_dir=~/.config/terminator -pc=$(hostname) -rm "$dot_dir"/"$pc"-terminator -cp "$config_dir"/terminator/config $dot_dir/"$pc"-terminator