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.
5h:14(3h) 7d:75(19h) │ 13:20 29-Jan
| #!/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 | |
| # |
Examples from GNU Stow for Dotfiles.
~/dotfiles/
├── bash/
│ ├── .bashrc
A pattern for organising shell configuration into focused, manageable files. Works especially well with GNU Stow for dotfiles.
Add this to the end of your ~/.bashrc:
# Source additional shell configurations| #!/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() { |
| #!/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 |