diff --git a/NOTES.md b/NOTES.md deleted file mode 100644 index 1f2b478..0000000 --- a/NOTES.md +++ /dev/null @@ -1,2 +0,0 @@ -- check cop is working -- remove adages stuff diff --git a/docs/build_cool_retro_term_mac_homebrew_2025.sh b/docs/build_cool_retro_term_mac_homebrew_2025.sh deleted file mode 100644 index 80ffe2c..0000000 --- a/docs/build_cool_retro_term_mac_homebrew_2025.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# ----------------------------------------------------------------------------- -# build-cool-retro-term.sh -# -# This script builds and installs *Cool Retro Term* on macOS (late 2025+), -# including fixes for removed AGL framework on macOS 15 “Sequoia/Tahoe” -# and compatibility with modern Apple Silicon hardware. -# -# It automates: -# 1. Homebrew dependency setup (Qt 5, git, cmake) -# 2. Cloning the upstream GitHub repo (with submodules) -# 3. Stripping all AGL references from qmltermwidget -# 4. Adding a guard file to prevent qmake from re-injecting AGL -# 5. Regenerating makefiles with modern macOS target -# 6. Building the app with Homebrew’s Qt 5 -# -# Tested on: macOS 15.x (Apple Silicon & Intel) -# Last updated: October 2025 -# ----------------------------------------------------------------------------- - -# --- Config ------------------------------------------------------------------ -REPO_URL="https://github.com/Swordfish90/cool-retro-term.git" -TARGET_DIR="${1:-cool-retro-term}" # pass a custom path as first arg if desired - -# --- Prereqs (Homebrew, Qt 5) ------------------------------------------------ -if ! command -v brew >/dev/null 2>&1; then - echo "Homebrew not found. Install from https://brew.sh" - exit 1 -fi - -brew update -brew install qt@5 -# Optional but handy tools -brew install git cmake || true - -# Resolve Homebrew Qt 5 qmake path (ARM first, then Intel) -/opt/homebrew/opt/qt@5/bin/qmake >/dev/null 2>&1 && QT5_QMAKE="/opt/homebrew/opt/qt@5/bin/qmake" -[[ -x "${QT5_QMAKE:-}" ]] || QT5_QMAKE="/usr/local/opt/qt@5/bin/qmake" -if [[ ! -x "$QT5_QMAKE" ]]; then - echo "qt@5 qmake not found. Ensure qt@5 installed correctly." - exit 1 -fi - -# --- Clone or update the repo ------------------------------------------------ -if [[ -d "$TARGET_DIR/.git" ]]; then - echo "Updating existing repo at: $TARGET_DIR" - git -C "$TARGET_DIR" fetch --recurse-submodules - git -C "$TARGET_DIR" pull --rebase --autostash --recurse-submodules - git -C "$TARGET_DIR" submodule update --init --recursive -else - echo "Cloning into: $TARGET_DIR" - git clone --recursive "$REPO_URL" "$TARGET_DIR" -fi - -cd "$TARGET_DIR" - -# --- Strip AGL everywhere in qmltermwidget metadata -------------------------- -echo "Removing AGL framework references..." -/usr/bin/find qmltermwidget -type f \( -name '*.pro' -o -name '*.pri' -o -name '*.prl' \) -print0 \ - | xargs -0 sed -i '' -E 's/(,|\s)-framework AGL//g' || true -/usr/bin/find qmltermwidget -type f \( -name '*.pro' -o -name '*.pri' -o -name '*.prl' \) -print0 \ - | xargs -0 sed -i '' -E 's#.*AGL\.framework/Headers/?##g' || true - -# --- Add a guard to block any re-injection of AGL ---------------------------- -cat > no-agl.pri <<'EOF' -QMAKE_LIBS_OPENGL -= -framework AGL -LIBS -= -framework AGL -QMAKE_LFLAGS -= -framework\ AGL -EOF - -# Include guard in top-level and subproject if missing -grep -q 'no-agl.pri' cool-retro-term.pro || printf '\ninclude(no-agl.pri)\n' >> cool-retro-term.pro -grep -q 'no-agl.pri' qmltermwidget/QMLTermWidget/QMLTermWidget.pro || \ - printf '\ninclude(../../no-agl.pri)\n' >> qmltermwidget/QMLTermWidget/QMLTermWidget.pro - -# --- Clean generated files so qmake re-resolves everything ------------------- -echo "Cleaning old build files..." -( cd qmltermwidget && make distclean || true ) -make distclean || true -git clean -fdX || true # removes ignored build artifacts; keeps your edits - -# --- Generate Makefiles with modern macOS target + explicit OpenGL ----------- -echo "Regenerating Makefiles..." -"$QT5_QMAKE" QMAKE_MACOSX_DEPLOYMENT_TARGET=11.0 QMAKE_LIBS_OPENGL="-framework OpenGL" - -# --- Build ------------------------------------------------------------------- -echo "Building Cool Retro Term..." -make -j"$(sysctl -n hw.ncpu)" - -echo -echo "✅ Build complete!" -echo "To install and launch:" -echo ' mkdir -p ~/Applications && cp -R cool-retro-term.app ~/Applications/' -echo ' open ~/Applications/cool-retro-term.app' diff --git a/functions b/functions index 4f07919..4a4597c 100644 --- a/functions +++ b/functions @@ -4,18 +4,6 @@ command_exists() { type "$1" &>/dev/null } -# Deduplicate path variables, shell-agnostic -# TODO: use to cleanup env after logging in -# TODO: probably problematic, test. -get_var() { eval "echo \$$1"; } -set_var() { eval "$1=\"$2\""; } -dedup_pathvar() { - pathvar_name="$1" - pathvar_value="$(get_var $pathvar_name)" - deduped_path="$(echo -n $pathvar_value | perl -e 'print join(":",grep { not $seen{$_}++ } split(/:/, scalar <>))')" - set_var $pathvar_name "$deduped_path" -} - # https://coderwall.com/p/_s_xda/fix-ssh-agent-in-reattached-tmux-session-shells fixssh() { for key in SSH_AUTH_SOCK SSH_CONNECTION SSH_CLIENT; do @@ -28,42 +16,25 @@ fixssh() { # Shorten the email to the format x@y; useful in prompt git_user_name_prompt_mkii() { - gitname=$(git config user.email | sed 's/\(.\).\+@\(..\).\+/\1@\2/') - gitname_global=$(git config --global user.email | sed 's/\(.\).\+@\(..\).\+/\1@\2/') - if [[ $gitname != $gitname_global ]]; then - #echo -n $gitname | color red - echo -n $gitname  - else - echo -n $gitname - fi + git config user.email | sed 's/\(.\).\+@\(..\).\+/\1@\2/' } # git quicksave: commit and push save() { if [ -z "${1+x}" ]; then - #echo "Missing commit message."; git commit -a -m "update" && git push else git commit -a -m "$1" && git push fi } -# Print the argument in the terminal, centered -function center-text() { - #colcount=$((`tput cols` - 1)) +# Print text to terminal centered +center-text() { colcount=$((COLUMNS - 3)) sed -e :a -e "s/^.\{1,$colcount\}$/ & /;ta" unset colcount } -nerdfont_icon_search() { - cat $RUNCOM2_PATH/utils/nerd-fonts-scripts/*.sh | sed "s/i=//" | sed "s/=\$i//" | grep -E "^'" | sed "s/'//g" | sort --random-sort | fzf | perl -ne 'print $1 if /^([^ ]+) /' # | xsel --input -} - -function emoji_search() { - emojify -l | tail -n +5 | sort | fzf -} - load_secrets() { local _secrets="$HOME/.secrets" if [[ ! -f "$_secrets" ]]; then diff --git a/justfile b/justfile index 2bd3333..fe1c613 100644 --- a/justfile +++ b/justfile @@ -69,12 +69,12 @@ stale-links-clean: # 🎨 Format shell scripts with shfmt fmt: - shfmt -w setup/*.sh setup/install/*.sh + shfmt -w setup/*.sh @echo "Format complete." # ✅ Lint shell scripts with shellcheck lint: - shellcheck setup/*.sh setup/install/*.sh || true + shellcheck setup/*.sh || true @echo "Lint complete." # 🚦 Format + lint gate diff --git a/setup/NOTES.md b/setup/NOTES.md index d224283..db69551 100644 --- a/setup/NOTES.md +++ b/setup/NOTES.md @@ -29,7 +29,3 @@ starship init fish --print-full-init | sed 's/"$(commandline)"/(commandline | st See: -## Legacy - -The `install/` subdirectory contains the previous setup scripts. -These will be removed once the new scripts are validated on all platforms. diff --git a/setup/base.yml b/setup/base.yml deleted file mode 100644 index e9e038b..0000000 --- a/setup/base.yml +++ /dev/null @@ -1,27 +0,0 @@ -#FIXME: what we really want for python is uv, and the rest can follow ---- -- hosts: - - localhost - tasks: - - name: Install Required Packages - become: yes - apt: - pkg: - - bat - - eza - - git - - fish - - tmux - - vim - - curl - - fzf - - python3-pip - - python3-venv - - libreadline-dev - - libsqlite3-dev - - libbz2-dev - - libffi-dev - - tig - - fd-find - - ripgrep - - duf diff --git a/setup/install-linux.sh b/setup/install-linux.sh deleted file mode 100755 index 21be09a..0000000 --- a/setup/install-linux.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -e - -sudo apt update -sudo apt install ansible -ansible-playbook -k base.yml diff --git a/setup/install/binary-tools-install.sh b/setup/install/binary-tools-install.sh deleted file mode 100755 index 1245956..0000000 --- a/setup/install/binary-tools-install.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -#FIXME: the intent is that we want the latest version of starship, and the latest stable versions of shfmt and rust-analyzer -set -e - -echo "Installing starship..." -sh -c "$(curl -fsSL https://starship.rs/install.sh)" -- --bin-dir="$HOME/bin" - -echo "Installing shfmt..." -curl -L https://github.com/mvdan/sh/releases/download/v3.3.1/shfmt_v3.3.1_linux_amd64 -o "$HOME/bin/shfmt" -chmod a+x "$HOME/bin/shfmt" - -echo "Installing rust-analyzer..." -curl -L https://github.com/rust-analyzer/rust-analyzer/releases/latest/download/rust-analyzer-x86_64-unknown-linux-gnu.gz | gunzip -c - >~/bin/rust-analyzer -chmod +x ~/bin/rust-analyzer diff --git a/setup/install/homeshick-install.sh b/setup/install/homeshick-install.sh deleted file mode 100755 index 157c238..0000000 --- a/setup/install/homeshick-install.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -#FIXME:it would be great if this could also support cloning the git@ ssh version also, if such access is available. otherwise clone the https version - -REPOS=$HOME/.homesick/repos -git clone https://github.com/goude/homeshick.git "$REPOS/homeshick" -# shellcheck disable=SC1091 -source "$REPOS/homeshick/homeshick.sh" - -echo "Cloning homeshick repos..." - -homeshick_repos=( - "goude/dotfiles" -) - -for i in "${homeshick_repos[@]}"; do - homeshick --force --batch clone "$i" -done - -echo "Silently and forcefully linking homeshick..." -homeshick --force --batch --quiet link - -echo "Done." diff --git a/setup/install/node-packages-update.sh b/setup/install/node-packages-update.sh deleted file mode 100755 index 54d63d7..0000000 --- a/setup/install/node-packages-update.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -#FIXME: some of these have been useful to have for neovim etc - now using mostly lazyvim so see what is needed and what can be left out -# shellcheck disable=SC1091 -source "$HOME/.nvm/nvm.sh" -nvm use node - -npm install -g npm@latest jsonlint eslint tern neovim prettier stylelint stylelint-config-recommended yarn textlint live-server diff --git a/setup/install/nvim-install.sh b/setup/install/nvim-install.sh deleted file mode 100755 index e193a20..0000000 --- a/setup/install/nvim-install.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash -#FIXME: intent here is to get the latest stable version - would be great if it could work for both standard docker container,running on bare metal linux, and rpi 500 and also macos -set -e - -mkdir -p ~/.nvim/ -rm -rf ~/.nvim/nvim-linux64 -cd ~/.nvim/ || exit 1 - -#wget https://github.com/neovim/neovim/releases/download/v0.10.2/nvim-linux64.tar.gz -wget https://github.com/neovim/neovim/releases/download/v0.11.4/nvim-linux-arm64.tar.gz -tar xvzf nvim-linux-arm64.tar.gz - -rm nvim-linux-arm64.tar.gz -rm -f ~/bin/nvim - -ln -s ~/.nvim/nvim-linux-arm64/bin/nvim ~/bin/ diff --git a/setup/install/nvm-install.sh b/setup/install/nvm-install.sh deleted file mode 100755 index b36fcd5..0000000 --- a/setup/install/nvm-install.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash -#FIXME: here we want a stable solution-it should get a good stable version needn't be the latest of node, so 22 for now is fine make configurable -# change to clone repo instead, see instructions at -# https://github.com/creationix/nvm/blob/master/README.markdown#install-script -#curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash - -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash - -export NVM_DIR="$HOME/.nvm" -# shellcheck disable=SC1091 -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm - -nvm install 22