summaryrefslogtreecommitdiff
path: root/setup.sh
blob: 48cc43505e99928483ceb7382a0f3aaccfd3f277 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh

set -e

if [ ${PWD} != "/home/tmu/dotfiles" ]; then
    echo "Not in ~/dotfiles, proceed manually"
    exit 1
fi

git submodule update --init --recursive

confirm () {
    read -e -p "$1 [y/N]> "
    echo $REPLY | grep -qi "y"
}

if confirm "Check and install symlinks?"; then

	here="/home/tmu/dotfiles/"
	there="/home/tmu/"
	mkdir -p ${there}.config
	mkdir -p ${there}.local/bin

	ln -s ${here}config/emacs                      ${there}.emacs.d
	ln -s ${here}config/bash_profile               ${there}.bash_profile
	ln -s ${here}config/bashrc                     ${there}.bashrc
	ln -s ${here}config/bash_aliases               ${there}.bash_aliases
	ln -s ${here}config/tcshrc                     ${there}.tcshrc
	ln -s ${here}config/xinitrc                    ${there}.xinitrc
	ln -s ${here}config/tmux.conf                  ${there}.tmux.conf
	ln -s ${here}config/xserverrc                  ${there}.xserverrc
	ln -s ${here}config/Xdefaults                  ${there}.Xdefaults
	ln -s ${here}config/alacritty                  ${there}.config/alacritty
	ln -s ${here}config/qutebrowser                ${there}.config/qutebrowser
	ln -s ${here}config/fbterm/fbtermrc            ${there}.config/fbtermrc
	ln -s ${here}config/fbterm/fbterm-emacs.sh     ${there}.local/bin/fbterm-emacs.sh

	ln -s ${here}scripts/brightness/brightnessup   ${there}.local/bin/brightnessup
	ln -s ${here}scripts/brightness/brightnessdown ${there}.local/bin/brightnessdown
	ln -s ${here}scripts/brightness/brightnessmax  ${there}.local/bin/brightnessmax
	ln -s ${here}scripts/volume/volumeup           ${there}.local/bin/volumeup
	ln -s ${here}scripts/volume/volumedown         ${there}.local/bin/volumedown
	ln -s ${here}scripts/volume/volumemute         ${there}.local/bin/volumemute
	ln -s ${here}scripts/misc/lk.sh                ${there}.local/bin/lk
	ln -s ${here}scripts/misc/battery.sh           ${there}.local/bin/tmubattery
fi

echo "All set up, remember to source ~/.bash_profile and symlink tmubrowse and tmuterm."