Something went wrong. Try again.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788#!/bin/bash
cd $(dirname $0)
# Some reason Linux `ln` and Mac `ln` don't support the same flags...if [ "$(uname)" == 'Darwin' ]; then lndir="ln -sfh"else lndir="ln -sfT"fi
# Set up bin directory, which must be set up first$lndir "$(pwd)/bin" "$HOME/.bin"export PATH="$PATH:$HOME/.bin"export SKIN=${SKIN:-onedark}export FONT_SIZE=${FONT_SIZE:-14}
# If another executable is passed, we call it now.# This is intended to be one of the install/for-* scripts.if [ -x "$1" ]; then $1fi
# Expand templates with theme variables. "themes/$SKIN"variables=$(cat "themes/$SKIN" | grep '^export' | sed 's/^export \([^=]*\).*/$\1/ ; P ; s/theme_/theme_rgb_/')for file in $(find . -name '*.template' -type f); do cd "$(dirname "$file")" export GPG_KEY_ID=$(git config user.signingkey) export GIT_EMAIL=$(git config user.email) envsubst "$variables \$PWD \$FONT_SIZE \$GPG_KEY_ID \$GIT_EMAIL" < "$(basename "$file")" > "$(basename "${file%.template}")" cd - >/dev/nulldone
# Make executable any templated scripts that need to be executablechmod +x ./tmux/scripts/tmux-status-left
# Then link configs for all of the installed programsdot_config () { $lndir "$(pwd)/$1" "$HOME/.config/$1"}
$lndir ./base ./syncat/style/activetest -d "./syncat/style/$SKIN" && ln -sf "./$SKIN/colours.syncat" "./syncat/style/colours.syncat"check broot && dot_config brootcheck fish && dot_config fishcheck flashfocus && dot_config flashfocuscheck hunter && dot_config huntercheck joshuto && dot_config joshutocheck kak && dot_config kakcheck kitty && dot_config kittycheck mako && dot_config makocheck nvim && dot_config nvimcheck ranger && dot_config rangercheck rofi && dot_config roficheck wofi && dot_config woficheck sway && dot_config swaycheck swaylock && dot_config swaylockcheck swayidle && dot_config swayidlecheck hx && dot_config helixcheck tig && dot_config tigcheck zellij && dot_config zellijcheck topgrade && dot_config topgradecheck wezterm && dot_config weztermcheck rio && dot_config riocheck fd && dot_config fdcheck tv && dot_config televisioncheck yazi && dot_config yazicheck mise && dot_config misecheck gh && dot_config gh# check hyprland && dot_config hypr # I never ended up setting this one up
if [ "$(uname)" == 'Darwin' ]; then check syncat && $lndir "$(pwd)/syncat" "$HOME/Library/Preferences/com.cameldridge.syncat"else check syncat && dot_config syncatfi
check waybar && dot_config waybarcheck alacritty && dot_config alacrittycheck tmux && ln -sf "$(pwd)/tmux/.tmux.conf" "$HOME/.tmux.conf"$lndir "$(pwd)/terminfo" "$HOME/.terminfo"
ln -sf "$(pwd)/git/.gitconfig" "$HOME/.gitconfig"ln -sf "$(pwd)/bash/.bashrc" "$HOME/.bashrc"ln -sf "$(pwd)/ssh/config" "$HOME/.ssh/config"$lndir "$(pwd)/fonts" "$HOME/.fonts"