blob: f9527c382480a5bf83abec6cf63599dd06e08791 (
plain) (
blame)
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
|
_script="$(realpath ${BASH_SOURCE[0]})"
_scriptname="$(basename $_script)"
_scriptdir="$(dirname $_script)"
_modulename="$(basename $_scriptdir)"
DOT_MODULE_NAME="i3"
function preinstall() {
if ! [[ -x "$(command -v alacritty)" ]]; then
PACKAGES+=("alacritty")
fi
}
function install() {
return
# backup old file if it exists and we haven't backed it up before
if [[ -f "$HOME/.config/i3/config" ]] && ! [[ -f "$HOME/.config/i3/config.bak" ]] && ! [[ -f "$_scriptdir/.firstrun" ]]; then
log verbose "making backup"
cp "$HOME/.config/i3/config" "$HOME/.config/i3/config.bak"
touch "$_scriptdir/.firstrun"
fi
log info "linking i3 config"
mkdir -p "$HOME/.config/i3"
ln -sf "$_scriptdir/config" "$HOME/.config/i3/config"
log info "linking xinitrc"
ln -sf "$_scriptdir/xinitrc" "$HOME/.xinitrc"
}
|