Skip to content

Instantly share code, notes, and snippets.

@simoninglis
simoninglis / .tmux-session
Last active February 19, 2026 08:00
.tmux-session starter + tmux-join helper
#!/usr/bin/env bash
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SESSION="${TMUX_SESSION_NAME:-$(basename "$SCRIPT_DIR")}"
if ! tmux has-session -t "=$SESSION" 2>/dev/null; then
tmux new-session -d -s "$SESSION" -c "$SCRIPT_DIR" -n editor
tmux new-window -t "$SESSION" -n shell -c "$SCRIPT_DIR"
tmux send-keys -t "$SESSION:editor" 'nvim .' C-m
fi
@simoninglis
simoninglis / 30-project-workflow.sh
Created February 19, 2026 07:03
workon/workoff: project-specific tmux sessions with fzf, tab completion, and per-project .tmux-session files
#!/bin/bash
# Source: bash stow module (bash/.bashrc.d/30-project-workflow.sh)
# Purpose: Tmux-based project workflow functions (workon/workoff)
# Note: Sourced by ~/.bashrc, not executed directly
# Project workflow functions for tmux session management
# Helper function to normalize project names into valid tmux session names
# Converts customer/project -> customer-project, scratch/proj -> scratch-proj
function _normalize_session_name() {
@simoninglis
simoninglis / bashrc-d-gist.md
Created February 5, 2026 07:00
Modular .bashrc with .bashrc.d/ - shell configuration pattern for use with GNU Stow

Modular .bashrc with .bashrc.d/

A pattern for organising shell configuration into focused, manageable files. Works especially well with GNU Stow for dotfiles.

The sourcing loop

Add this to the end of your ~/.bashrc:

# Source additional shell configurations
@simoninglis
simoninglis / README.md
Created February 5, 2026 01:54
GNU Stow for Dotfiles - Quick Start Examples

GNU Stow for Dotfiles - Quick Start

Examples from GNU Stow for Dotfiles.

Structure

~/dotfiles/
├── bash/
│ ├── .bashrc
@simoninglis
simoninglis / README.md
Created February 3, 2026 00:19
CI status in tmux status bar (GitHub Actions + Gitea Actions)

CI Status in tmux Status Bar

Put your CI build status in your tmux status bar. Know immediately when something breaks.

C:✓ B:✓ D:✓ V:✓ │ 14:32 01-Feb

Why?

@simoninglis
simoninglis / teax-ci-status
Created January 30, 2026 10:09
teax CI status for tmux - Real-time Gitea workflow visibility
#!/usr/bin/env bash
# Description: Output Gitea CI workflow status for tmux status bar
# Author: https://github.com/simoninglis/teax
# License: MIT
#
# Dependencies:
# - teax: Gitea CLI companion (pip install git+https://github.com/simoninglis/teax.git)
# - tea: Official Gitea CLI (must be configured with `tea login add`)
# - jq: JSON processor
#
@simoninglis
simoninglis / gist-README.md
Last active February 22, 2026 17:33
claude-usage: Display Claude Code API usage (5h/7d quotas) in tmux status bar with color-coded thresholds

claude-usage: Claude Code Usage in tmux Status Bar

Display your Claude Code API usage (5-hour and 7-day quotas) directly in your tmux status bar with color-coded thresholds and time-until-reset.

tmux status bar showing claude-usage

What It Shows

5h:14(3h) 7d:75(19h) │ 13:20 29-Jan