-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetlinks
More file actions
executable file
·50 lines (43 loc) · 1.73 KB
/
setlinks
File metadata and controls
executable file
·50 lines (43 loc) · 1.73 KB
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
#!/bin/bash
this_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
this_script="${this_dir}/$(basename "${BASH_SOURCE[0]}")"
for f in $(find . -maxdepth 1 -name ".*" -type f); do
if [[ -e $HOME/$f ]]; then
mv "$HOME/$f" "$HOME/$f.old"
fi
ln -s "${this_dir}/$f" "$HOME/$f"
done
gdb_origin=${this_dir}/gdbinit/gdbinit
gdb_link=$HOME/.gdbinit
if [[ -f ${gdb_origin} ]] ; then
ln -s "${gdb_origin}" "${gdb_link}"
fi
zathura_origin=${this_dir}/zathurarc
zathura_link=$HOME/.config/zathura/zathurarc
if [[ -f ${zathura_origin} ]] ; then
mkdir -p "$(dirname "${zathura_link}")"
ln -s "${zathura_origin}" "${zathura_link}"
fi
dunst_origin=${this_dir}/dunstrc
dunst_link=$HOME/.config/dunst/dunstrc
if [[ -f ${dunst_origin} ]] ; then
mkdir -p "$(dirname "${dunst_link}")"
ln -s "${dunst_origin}" "${dunst_link}"
fi
# Back up and clean other gitk files that may be interfering
potential_other_gitk_files="${XDG_CONFIG_HOME}/git/gitk
$HOME/.config/git/gitk"
for f in $potential_other_gitk_files; do
if [ -f "${f}" ]; then
mv "${f}" "${f}.backup"
echo -e "gitk.backup was created by $this_script\n
A gitk file here takes precedence over ~/.gitk (see man gitk), so it has been moved out of the way.\n
~/.gitk to be used instead of $f" >> "$(dirname ${f})"/why_old_readme.txt
fi
done
# Install gnome-terminal theme
# Note: you might need to first create a profile in gnome-terminal, get its key
# with dconf-editor, and replace the key below. Doing it the way below does not
# seem to update the list of available profiles, so profile created by this
# command is not selectable in the dropdown menu otherwise.
dconf load /org/gnome/terminal/legacy/profiles:/:756a59a5-8749-4d56-9193-7f7bab917647/ < gogruvbox-dark.dconf