diff --git a/install.py b/install.py index bbd0035..e7f0862 100755 --- a/install.py +++ b/install.py @@ -102,6 +102,8 @@ class Installer: self._do_symlink(src, dest, is_dir=True) def _do_symlink(self, src: str, dest: str, *, is_dir: bool) -> None: + p_src = Path(src).expanduser() + pretty_src = self.pretty_path(p_src) p_dest = Path(dest).expanduser() pretty_dest = self.pretty_path(p_dest) @@ -115,11 +117,15 @@ class Installer: return if p_dest.islink(): - # TODO: check fucntion for bash -ef equivalent p_dest.remove() - ui.info_2("Symlink", pretty_dest, "->", src) - src_full: Path = self.base_dir / "dotfiles" / src + ui.info_2("Symlink", pretty_dest, "->", pretty_src) + + if p_src.startswith(self.home): + src_full = p_src + else: + src_full = self.base_dir / "dotfiles" / p_src + src_full.symlink(p_dest) def do_write(self, dest: str, content: str) -> None: diff --git a/installation_scripts/i3.sh b/installation_scripts/i3.sh index 06f6d72..03f7bfd 100644 --- a/installation_scripts/i3.sh +++ b/installation_scripts/i3.sh @@ -31,6 +31,9 @@ fi # }}} # Add clones from GitHub {{{ +############################ +# OK NEED TO DO GIT UPDATE # +############################ mkdir -p "$GITHUB_DOTFILES" @@ -61,6 +64,9 @@ fi # }}} # Add config links {{{ +###### +# OK # +###### echo "Adding .Xresources and .xsettingsd" make_symlink ~/.Xresources "$GITHUB_DOTFILES"/i3-starterpack/.Xresources @@ -78,6 +84,9 @@ make_symlink ~/.fonts/icomoon/feather.ttf "$GITHUB_DOTFILES"/i3-starterpack/.fon # }}} # Add i3 main config {{{ +###### +# OK # +###### echo "Adding i3/config" mkdir -p ~/.config/i3 @@ -86,6 +95,9 @@ make_symlink ~/.config/i3/config "$BASE_DIR"/dotfiles/i3/'config' # }}} # Add i3status config {{{ +###### +# OK # +###### echo "Adding i3status/config" mkdir -p ~/.config/i3status @@ -94,6 +106,9 @@ make_symlink ~/.config/i3status/config "$BASE_DIR"/dotfiles/i3/'status' # }}} # Add i3blocks config {{{ +###### +# OK # +###### echo "Adding i3blocks/config" mkdir -p ~/.config/i3blocks