Dotfiles for my tiling window manager + terminal workflow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.8 KiB

  1. #!/bin/zsh
  2. setup_marble=true
  3. # vars {{{ #
  4. linux_config_dir=/home/kevin/linux-config
  5. dot_dir=$linux_config_dir/dotfiles
  6. config_dir=$linux_config_dir/configs
  7. sys_config_dir=~/.config
  8. pc=$(hostname)
  9. # }}} vars #
  10. # dotfiles {{{ #
  11. # link files {{{ #
  12. # Get directory variables from script.
  13. # List of dotfiles I want to link to system.
  14. dotfiles=(bashrc gitconfig inputrc imwheelrc vimrc xinitrc Xmodmap Xresources zshrc)
  15. cd $dot_dir
  16. for dotfile in $dotfiles; do
  17. # Remove system dotfile.
  18. rm ~/."$dotfile"
  19. # Link dotfile in repository to system dotfile.
  20. ln -s "$dot_dir"/"$dotfile" ~/."$dotfile" && echo "Linked .$dotfile."
  21. done
  22. # }}} link files #
  23. # setup nvim config {{{ #
  24. orig_file="$sys_config_dir"/nvim/init.vim
  25. # Remove system dotfile.
  26. rm "$orig_file"
  27. # Link dotfile in repository to system dotfile.
  28. ln -s "$dot_dir"/nvim "$orig_file" && echo "Setup Neovim config."
  29. # }}} setup nvim config #
  30. # }}} dotfiles #
  31. # configs {{{ #
  32. cd $linux_config_dir
  33. # List of config dirs in system config dir that I want to link to.
  34. config_dirs=(neofetch i3 i3blocks sam-i3blocks ranger)
  35. # config_dirs=(neofetch i3 i3blocks ranger)
  36. for cur_dir in $config_dirs; do
  37. # Remove system file.
  38. rm -rf "$sys_config_dir"/"$cur_dir"
  39. # Link config file in repository to system config location.
  40. ln -s "$config_dir"/"$cur_dir" "$sys_config_dir"/"$cur_dir" && echo "Linked $cur_dir config."
  41. done
  42. # }}} configs #
  43. # marble mouse {{{ #
  44. if [[ "$setup_marble" = true ]]; then
  45. config_file_name="10-evdev.conf"
  46. sys_layout_file="/etc/X11/xorg.conf.d/$config_file_name"
  47. config_dir="$linux_config_dir/x/marble-mouse"
  48. # Remove system file.
  49. sudo rm -rf "$sys_layout_file"
  50. # Link config file in repository to system config location.
  51. sudo ln -s "$config_dir"/"$config_file_name" "$sys_layout_file" && echo "Setup Marble mouse config."
  52. fi
  53. # }}} marble mouse #