From 6627f790da23855a4e7cae2cd52119ddcb5cc24a Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Sat, 11 Apr 2026 22:50:30 -0400 Subject: [PATCH] bin: Remove unused scripts --- bin/gh-autosquash | 71 -------------------------------------------- bin/pipe | 6 ---- bin/rusty-gutentags | 8 ----- bin/wallpaper-rotate | 21 ------------- 4 files changed, 106 deletions(-) delete mode 100755 bin/gh-autosquash delete mode 100755 bin/pipe delete mode 100755 bin/rusty-gutentags delete mode 100755 bin/wallpaper-rotate diff --git a/bin/gh-autosquash b/bin/gh-autosquash deleted file mode 100755 index b97273a..0000000 --- a/bin/gh-autosquash +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -timestamp() { - date "+%Y-%m-%dT%H:%M:%S%z" -} - -log() { - echo "[$(timestamp)]" "$@" -} - -notify() { - title="$1" - body="$2" - log "${body}" - notify-send "${title}" "${body}" -} - -prompt_continue() { - read -rp 'Press ENTER to continue > ' -} - -default_workflow() { - root=$(git rev-parse --show-toplevel) - cat "${root}/.gh-autosquash-default-workflow" -} - -branch="${1-$(git symbolic-ref --short HEAD)}" -workflow="${2-$(default_workflow)}" - -data=$(gh pr view "${branch}" --json 'body,number,title') -body=$(jq -r '.body' <<< "${data}") -number=$(jq -r '.number' <<< "${data}") -title=$(jq -r '.title' <<< "${data}") - -log "Squash-merging PR #${number}: ${branch}" - -# Use the commit title and description as the commit message by default. -commit_title=$(vipe <<< "${title} (#${number})"); unset title -commit_message=$(vipe <<< "${body}"); unset body - -log "Waiting for workflow: ${workflow}" - -gh run list \ - --branch "${branch}" \ - --workflow "${workflow}" \ - --json 'status,databaseId' \ - --jq '.[] | select(.status != "completed") | .databaseId' \ - | xargs -n 1 gh run watch - -notify "${branch}" 'Workflow complete!' - -log "Confirming squash-merge for ${branch} (#${number})" -echo '' -echo '|------------------------------------------------------------------------------|-------------------|' -echo "${commit_title}" -echo '' -echo "${commit_message}" -echo '|------------------------------------------------------------------------------|-------------------|' -echo '' - -prompt_continue - -gh pr merge "${branch}" \ - --squash \ - --delete-branch \ - --subject "${commit_title}" \ - --body "${commit_message}" - -notify "${branch}" 'PR merged!' diff --git a/bin/pipe b/bin/pipe deleted file mode 100755 index 9047342..0000000 --- a/bin/pipe +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -command=$1 -file=$(mktemp --suffix=$2) -cat < /dev/stdin > $file -$command $file diff --git a/bin/rusty-gutentags b/bin/rusty-gutentags deleted file mode 100755 index 3b9370d..0000000 --- a/bin/rusty-gutentags +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -set -e - -# https://github.com/ludovicchabant/vim-gutentags/issues/206#issuecomment-422984864 - -rusty-tags vi -mv rusty-tags.vi tags.temp diff --git a/bin/wallpaper-rotate b/bin/wallpaper-rotate deleted file mode 100755 index bcc57ba..0000000 --- a/bin/wallpaper-rotate +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python3 - -from datetime import datetime -from pathlib import Path -import subprocess - -HOME = Path.home() -image_dir = HOME / 'images/wallpapers/BitDay' -dest = HOME / 'images/wallpaper.png' - -hour = datetime.now().hour -image_number = int(hour / 2) - -target = image_dir / '{}.png'.format(image_number) - -# ln -s -f -dest.unlink(missing_ok = True) -dest.symlink_to(target) - -# nitrogen --restore -subprocess.run(['nitrogen', '--restore'])