-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.sh
57 lines (41 loc) · 1.22 KB
/
start.sh
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
49
50
51
52
53
54
55
56
57
#!/bin/bash
USER=$(logname)
GITSCRIPT="$PWD/git.sh"
CRONSCRIPT="$PWD/cron.sh"
TILIX="$PWD/tilix/tilix-defaults.sh"
DOCUMENTS=~/Documents/
SYSTEMD=/etc/systemd/system/
function linkBashRc() {
BASHRC="$PWD/.bashrc"
echo "Symlinking .bashrc into user directory..."
ln -sfv $BASHRC ~/
echo "Sourcing new .bashrc"
source ~/.bashrc
}
function linkVsCodeSettings() {
SETTINGSJSON="$PWD/vscode/settings.json"
VSCONFDIR=~/.config/Code/User/
echo "Symlinking settings.json into $VSCONFDIR..."
ln -sfv $SETTINGSJSON $VSCONFDIR
}
function linkCommands() {
COMMANDS="$PWD/commands/general"
echo "Symlinking useful commands into $DOCUMENTS"
ln -sfv $COMMANDS $DOCUMENTS
}
function linkSyncthingService() {
SYNCTHING="$PWD/syncthing/syncthing@.service"
echo "Symlinking syncthing service configuration into $SYSTEMD"
ln -sfv $SYNCTHING $SYSTEMD # TODO change to copy instead of symlinking
# in order for autostarting to work
systemctl daemon-reload
# Will start as the logged in user and the GUI will be reachable @127.0.0.1:8384(default)
systemctl restart syncthing@$USER
}
linkBashRc
linkVsCodeSettings
linkCommands
linkSyncthingService
$GITSCRIPT
$CRONSCRIPT
$TILIX