Add i3blocks and i3status

This commit is contained in:
flyingscorpio@arch-desktop 2020-04-19 01:05:20 +02:00
parent 0518ccb8af
commit 5c68c37694
2 changed files with 24 additions and 3 deletions

View file

@ -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:

View file

@ -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