Browse Source

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.
red-hat-laptop
Kevin Mok 7 years ago
parent
commit
5c5e010c53
  1. 2
      aliases/.bash_aliases
  2. 2
      aliases/.pc_aliases
  3. 2
      aliases/.school_aliases
  4. 22
      configs/NZXT/i3.conf
  5. 0
      configs/NZXT/i3blocks.conf
  6. 0
      configs/NZXT/neofetch.conf
  7. 6
      configs/NZXT/terminator.conf
  8. 0
      configs/X1-Carbon/i3.conf
  9. 0
      configs/X1-Carbon/i3blocks.conf
  10. 0
      configs/X1-Carbon/terminator.conf
  11. 11
      configs/set-configs.sh
  12. 9
      configs/terminator-cp.sh
  13. 5
      dirs.sh
  14. 0
      dotfiles/bashrc
  15. 0
      dotfiles/gitconfig
  16. 0
      dotfiles/inputrc
  17. 11
      dotfiles/set-dotfiles.sh
  18. 0
      dotfiles/vimrc
  19. 27
      set-from-git.sh

2
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 ; }

2
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 }}}

2
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

22
i3.conf → 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 #

0
i3blocks.conf → configs/NZXT/i3blocks.conf

0
neofetch.conf → configs/NZXT/neofetch.conf

6
NZXT-terminator → 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

0
X1-Carbon-i3.conf → configs/X1-Carbon/i3.conf

0
X1-Carbon-i3blocks.conf → configs/X1-Carbon/i3blocks.conf

0
X1-Carbon-terminator → configs/X1-Carbon/terminator.conf

11
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

9
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"

5
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)

0
.bashrc → dotfiles/bashrc

0
.gitconfig → dotfiles/gitconfig

0
.inputrc → dotfiles/inputrc

11
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

0
.vimrc → dotfiles/vimrc

27
set-from-git.sh

@ -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
Loading…
Cancel
Save