Skip to content

Instantly share code, notes, and snippets.

View przemek-jablonski's full-sized avatar
🏠
Working from home

Przemek (Simon) Jabłoński przemek-jablonski

🏠
Working from home
View GitHub Profile
@przemek-jablonski
przemek-jablonski / claude-statusline.sh
Last active December 14, 2025 15:45
Claude Statusline script printing all relevant data from incoming status JSON
#!/bin/bash
# Claude Statusline script
# Script that generates a statusline for Claude CLI based on session data.
# Prints all relevant info from the incoming JSON a single line
# with colors and separators for easier reading.
# Prints:
# Project dir, Git branch, Model name, session duration, lines added/removed, tokens used (input/output/total % of context window)
# At the beginning prints emoji selected deterministically based on session ID for variety.
strategy:
fail-fast: false
matrix:
xcode: ['13.0', '12.5.1', '12.0.1']
macos: ['macos-11', 'macos-10.15']
exclude:
# excluding xcodes not present on given macOS versions
- macos: 'macos-11'
xcode: '12.0.1'
- macos: 'macos-10.15'
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch: #this will enable manual triggering
- name: Double-check macOS version (${{ matrix.macos }})
run: sw_vers
- name: Double-check Xcode.app selected
run: xcode-select --print-path
- name: Check xcodebuild version
run: xcodebuild -version
- name: Check xcode embedded SDKs
run: xcodebuild -showsdks
- name: Show buildable schemes
run: xcodebuild -list
- uses: maxim-lobanov/setup-xcode@v1.2.3
with:
xcode-version: ${{ matrix.xcode }} # 'xcode-latest', '13.0', '12.0.1' etc.
- uses: mxcl/xcodebuild@v1.9.2
with:
platform: ${{ matrix.platform }}
action: 'test'
jobs:
build-and-test:
name: ${{ matrix.command }} on  ${{ matrix.platform }} (xcode ${{ matrix.xcode }}, ${{ matrix.macos }})
runs-on: ${{ matrix.macos }} #os switching
strategy:
fail-fast: false #if 'true' then one failed job cancels all jobs remaining
matrix:
xcode: ['13.0', '12.5.1', '12.0.1']
macos: ['macos-11', 'macos-10.15']
scheme: ['Earendil']
jobs:
build-and-test:
strategy:
matrix:
xcodebuild-scheme: ['Core', 'UI', 'PushNotifications']
xcodebuild-command: ['build', 'test']
steps:
- name: Using the xcodebuild to ${{ matrix.xcodebuild-command }} the ${{ matrix.xcodebuild-scheme }} scheme.
run: xcodebuild ${{ matrix.xcodebuild-command }} -scheme ${{ matrix.xcodebuild-scheme }}
let package = Package(
...
platforms: [
.iOS(.v13),
.watchOS(.v6),
.tvOS(.v13),
.macOS(.v10_15),
],
...
)
name: Multiplatform test x2
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: 0 0 * * *