Merge branch 'master' of git.24unix.net:tracer/dotfiles
This commit is contained in:
@@ -8,6 +8,8 @@ Linux:
|
|||||||
macOS:
|
macOS:
|
||||||
```brew install git neovim lsd tmux```
|
```brew install git neovim lsd tmux```
|
||||||
|
|
||||||
|
On macOS, `install.sh` also installs the `font-jetbrains-mono-nerd-font` Homebrew cask.
|
||||||
|
|
||||||
From your users home directory (~/), execute:
|
From your users home directory (~/), execute:
|
||||||
```git clone gitea@git.24unix.net:tracer/dotfiles.git .config/dotfiles```
|
```git clone gitea@git.24unix.net:tracer/dotfiles.git .config/dotfiles```
|
||||||
|
|
||||||
|
|||||||
25
install.sh
25
install.sh
@@ -105,6 +105,7 @@ apply_dotfiles() {
|
|||||||
if [ "$(uname -s)" = "Darwin" ]; then
|
if [ "$(uname -s)" = "Darwin" ]; then
|
||||||
install_karabiner_config
|
install_karabiner_config
|
||||||
fi
|
fi
|
||||||
|
install_fonts
|
||||||
install_kitty_icon
|
install_kitty_icon
|
||||||
install_tmux_plugins
|
install_tmux_plugins
|
||||||
install_powerlevel10k
|
install_powerlevel10k
|
||||||
@@ -135,6 +136,15 @@ replace_dir() {
|
|||||||
link_dotfile() {
|
link_dotfile() {
|
||||||
source_path=$1
|
source_path=$1
|
||||||
target_path=$2
|
target_path=$2
|
||||||
|
resolved_source_path=$(cd "$(dirname "$source_path")" && pwd)/$(basename "$source_path")
|
||||||
|
target_parent=$(dirname "$target_path")
|
||||||
|
resolved_target_parent=$(cd "$target_parent" 2>/dev/null && pwd || printf '%s' "$target_parent")
|
||||||
|
resolved_target_path=$resolved_target_parent/$(basename "$target_path")
|
||||||
|
|
||||||
|
if [ "$resolved_source_path" = "$resolved_target_path" ]; then
|
||||||
|
skip "$target_path resolves to the source path; refusing to create a self-referential symlink."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -L "$target_path" ]; then
|
if [ -L "$target_path" ]; then
|
||||||
current_target=$(readlink "$target_path")
|
current_target=$(readlink "$target_path")
|
||||||
@@ -188,6 +198,21 @@ install_kitty_icon() {
|
|||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_fonts() {
|
||||||
|
if [ "$(uname -s)" != "Darwin" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! command_exists brew; then
|
||||||
|
skip "font installation: Homebrew is not installed."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${BLUE}Installing fonts...${RESET}"
|
||||||
|
brew install --cask font-jetbrains-mono-nerd-font
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
install_tmux_plugins() {
|
install_tmux_plugins() {
|
||||||
echo "${BLUE}Installing tmux plugins...${RESET}"
|
echo "${BLUE}Installing tmux plugins...${RESET}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user