@quickcall/all-configs 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -2
- package/bin/all-configs.js +44 -0
- package/package.json +20 -4
- package/runtime/allconfigs/__init__.py +1 -0
- package/runtime/allconfigs/__main__.py +42 -0
- package/runtime/allconfigs/__pycache__/__init__.cpython-312.pyc +0 -0
- package/runtime/allconfigs/__pycache__/__main__.cpython-312.pyc +0 -0
- package/runtime/allconfigs/__pycache__/modules.cpython-312.pyc +0 -0
- package/runtime/allconfigs/__pycache__/probe.cpython-312.pyc +0 -0
- package/runtime/allconfigs/__pycache__/runner.cpython-312.pyc +0 -0
- package/runtime/allconfigs/modules.py +221 -0
- package/runtime/allconfigs/probe.py +60 -0
- package/runtime/install.sh +74 -0
- package/runtime/lib/common.sh +147 -0
- package/runtime/lib/uninstall.sh +35 -0
- package/runtime/modules/aldente/install.sh +23 -0
- package/runtime/modules/aldente/module.toml +11 -0
- package/runtime/modules/aliases/aliases.sh +31 -0
- package/runtime/modules/aliases/install.sh +36 -0
- package/runtime/modules/aliases/module.toml +7 -0
- package/runtime/modules/aqua-voice/install.sh +23 -0
- package/runtime/modules/aqua-voice/module.toml +11 -0
- package/runtime/modules/betterdisplay/install.sh +23 -0
- package/runtime/modules/betterdisplay/module.toml +11 -0
- package/runtime/modules/bitwarden/install.sh +19 -0
- package/runtime/modules/bitwarden/module.toml +11 -0
- package/runtime/modules/browsers/install.sh +33 -0
- package/runtime/modules/browsers/module.toml +11 -0
- package/runtime/modules/bun/install.sh +72 -0
- package/runtime/modules/bun/module.toml +7 -0
- package/runtime/modules/caveman/install.sh +79 -0
- package/runtime/modules/caveman/module.toml +7 -0
- package/runtime/modules/claude/install.sh +22 -0
- package/runtime/modules/claude/module.toml +7 -0
- package/runtime/modules/codex/install.sh +20 -0
- package/runtime/modules/codex/module.toml +7 -0
- package/runtime/modules/docker/install.sh +19 -0
- package/runtime/modules/docker/module.toml +11 -0
- package/runtime/modules/external-skills/install.sh +30 -0
- package/runtime/modules/external-skills/module.toml +4 -0
- package/runtime/modules/ffmpeg/install.sh +13 -0
- package/runtime/modules/ffmpeg/module.toml +11 -0
- package/runtime/modules/fonts/install.sh +62 -0
- package/runtime/modules/fonts/module.toml +8 -0
- package/runtime/modules/ghostty/config +44 -0
- package/runtime/modules/ghostty/install.sh +64 -0
- package/runtime/modules/ghostty/module.toml +9 -0
- package/runtime/modules/ghostty/themes/ayu-dark +22 -0
- package/runtime/modules/ghostty/themes/catppuccin-frappe +23 -0
- package/runtime/modules/ghostty/themes/catppuccin-latte +23 -0
- package/runtime/modules/ghostty/themes/catppuccin-latte.conf +23 -0
- package/runtime/modules/ghostty/themes/catppuccin-macchiato +23 -0
- package/runtime/modules/ghostty/themes/catppuccin-mocha +23 -0
- package/runtime/modules/ghostty/themes/visual-studio-light +27 -0
- package/runtime/modules/ghostty/themes/vscode-light +24 -0
- package/runtime/modules/ghostty/themes/vscode-light-soft +24 -0
- package/runtime/modules/ghostty/xterm-ghostty.terminfo +81 -0
- package/runtime/modules/github/install.sh +101 -0
- package/runtime/modules/github/module.toml +8 -0
- package/runtime/modules/hf/install.sh +98 -0
- package/runtime/modules/hf/module.toml +7 -0
- package/runtime/modules/karabiner/README.md +146 -0
- package/runtime/modules/karabiner/agents.md +39 -0
- package/runtime/modules/karabiner/app_launchers.json +236 -0
- package/runtime/modules/karabiner/custom_delete_mapping.json +13 -0
- package/runtime/modules/karabiner/fn_to_control.json +9 -0
- package/runtime/modules/karabiner/install.sh +60 -0
- package/runtime/modules/karabiner/karabiner.json +866 -0
- package/runtime/modules/karabiner/keychron-modifier-swap.sh +80 -0
- package/runtime/modules/karabiner/module.toml +8 -0
- package/runtime/modules/karabiner/remap_caps_lock_shift_super.json +23 -0
- package/runtime/modules/karabiner/remap_escape_to_control.json +49 -0
- package/runtime/modules/karabiner/rename_caps_lock_to_super.json +23 -0
- package/runtime/modules/karabiner/right_shift_mouse_click.json +44 -0
- package/runtime/modules/karabiner/swap_esc_delete.json +10 -0
- package/runtime/modules/karabiner/troubleshooting.md +242 -0
- package/runtime/modules/karabiner/vim_arrow_keys.json +477 -0
- package/runtime/modules/keepingyouawake/install.sh +23 -0
- package/runtime/modules/keepingyouawake/module.toml +11 -0
- package/runtime/modules/keycastr/install.sh +23 -0
- package/runtime/modules/keycastr/module.toml +11 -0
- package/runtime/modules/multi-github/install.sh +179 -0
- package/runtime/modules/multi-github/module.toml +4 -0
- package/runtime/modules/ncdu/install.sh +13 -0
- package/runtime/modules/ncdu/module.toml +11 -0
- package/runtime/modules/node/install.sh +73 -0
- package/runtime/modules/node/module.toml +11 -0
- package/runtime/modules/nvim/.neoconf.json +15 -0
- package/runtime/modules/nvim/init.lua +2 -0
- package/runtime/modules/nvim/install.sh +142 -0
- package/runtime/modules/nvim/lazy-lock.json +35 -0
- package/runtime/modules/nvim/lazyvim.json +10 -0
- package/runtime/modules/nvim/lua/config/autocmds.lua +18 -0
- package/runtime/modules/nvim/lua/config/keymaps.lua +10 -0
- package/runtime/modules/nvim/lua/config/lazy.lua +53 -0
- package/runtime/modules/nvim/lua/config/options.lua +3 -0
- package/runtime/modules/nvim/lua/plugins/image.lua +9 -0
- package/runtime/modules/nvim/lua/plugins/markdown.lua +56 -0
- package/runtime/modules/nvim/lua/plugins/noice.lua +17 -0
- package/runtime/modules/nvim/lua/plugins/rose-pine.lua +16 -0
- package/runtime/modules/nvim/lua/plugins/snacks.lua +20 -0
- package/runtime/modules/nvim/module.toml +8 -0
- package/runtime/modules/nvim/stylua.toml +3 -0
- package/runtime/modules/p10k/install.sh +46 -0
- package/runtime/modules/p10k/module.toml +8 -0
- package/runtime/modules/p10k/p10k.zsh +1711 -0
- package/runtime/modules/pi/install.sh +77 -0
- package/runtime/modules/pi/module.toml +8 -0
- package/runtime/modules/pi/packages +5 -0
- package/runtime/modules/pi/settings.json +21 -0
- package/runtime/modules/presentify/install.sh +25 -0
- package/runtime/modules/presentify/module.toml +7 -0
- package/runtime/modules/rectangle/RectangleConfig.json +353 -0
- package/runtime/modules/rectangle/install.sh +64 -0
- package/runtime/modules/rectangle/module.toml +11 -0
- package/runtime/modules/shortcat/install.sh +19 -0
- package/runtime/modules/shortcat/module.toml +11 -0
- package/runtime/modules/skills/install.sh +25 -0
- package/runtime/modules/skills/module.toml +4 -0
- package/runtime/modules/skills/skills-lock.json +35 -0
- package/runtime/modules/slack/install.sh +23 -0
- package/runtime/modules/slack/module.toml +11 -0
- package/runtime/modules/spotify/install.sh +23 -0
- package/runtime/modules/spotify/module.toml +11 -0
- package/runtime/modules/ssh-keygen/install.sh +130 -0
- package/runtime/modules/ssh-keygen/module.toml +4 -0
- package/runtime/modules/statusline/install.sh +69 -0
- package/runtime/modules/statusline/module.toml +7 -0
- package/runtime/modules/statusline/statusline.sh +168 -0
- package/runtime/modules/statusline/turn-counter.sh +11 -0
- package/runtime/modules/superfile/cheatsheet.md +127 -0
- package/runtime/modules/superfile/config.toml +181 -0
- package/runtime/modules/superfile/hotkeys.toml +96 -0
- package/runtime/modules/superfile/install.sh +73 -0
- package/runtime/modules/superfile/module.toml +7 -0
- package/runtime/modules/tailscale/install.sh +29 -0
- package/runtime/modules/tailscale/module.toml +11 -0
- package/runtime/modules/tinycast/install.sh +68 -0
- package/runtime/modules/tinycast/module.toml +7 -0
- package/runtime/modules/tinycast/settings.json +226 -0
- package/runtime/modules/tmux/.tmux.conf.local +168 -0
- package/runtime/modules/tmux/README.md +50 -0
- package/runtime/modules/tmux/install.sh +57 -0
- package/runtime/modules/tmux/installer.mjs +191 -0
- package/runtime/modules/tmux/module.toml +8 -0
- package/runtime/modules/tmux/shell-helpers.sh +20 -0
- package/runtime/modules/tmux/uninstall.sh +134 -0
- package/runtime/modules/uv/install.sh +72 -0
- package/runtime/modules/uv/module.toml +7 -0
- package/runtime/modules/vlc/install.sh +23 -0
- package/runtime/modules/vlc/module.toml +11 -0
- package/runtime/modules/vscode/install.sh +33 -0
- package/runtime/modules/vscode/keybindings.json +74 -0
- package/runtime/modules/vscode/module.toml +8 -0
- package/runtime/modules/vscode/settings.json +426 -0
- package/runtime/modules/vscode/tasks.json +1 -0
- package/runtime/modules/yt-dlp/install.sh +13 -0
- package/runtime/modules/yt-dlp/module.toml +11 -0
- package/runtime/modules/zed/install.sh +43 -0
- package/runtime/modules/zed/module.toml +8 -0
- package/runtime/modules/zed/settings.json +208 -0
- package/runtime/modules/zoxide/install.sh +41 -0
- package/runtime/modules/zoxide/module.toml +11 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
6
|
+
source "$ROOT_DIR/lib/common.sh"
|
|
7
|
+
|
|
8
|
+
step "Installing Slack"
|
|
9
|
+
|
|
10
|
+
if [[ "$PLATFORM" != "mac" ]]; then
|
|
11
|
+
warn "Slack module currently supports macOS only"
|
|
12
|
+
exit 0
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
if command -v brew &>/dev/null; then
|
|
16
|
+
brew_install_cask slack
|
|
17
|
+
else
|
|
18
|
+
warn "Homebrew not found; skipping Slack app install"
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
echo ""
|
|
22
|
+
echo -e " ${GRN}Done!${R}"
|
|
23
|
+
echo ""
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
6
|
+
source "$ROOT_DIR/lib/common.sh"
|
|
7
|
+
|
|
8
|
+
step "Installing Spotify"
|
|
9
|
+
|
|
10
|
+
if [[ "$PLATFORM" != "mac" ]]; then
|
|
11
|
+
warn "Spotify module currently supports macOS only"
|
|
12
|
+
exit 0
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
if command -v brew &>/dev/null; then
|
|
16
|
+
brew_install_cask spotify
|
|
17
|
+
else
|
|
18
|
+
warn "Homebrew not found; skipping Spotify app install"
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
echo ""
|
|
22
|
+
echo -e " ${GRN}Done!${R}"
|
|
23
|
+
echo ""
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
6
|
+
source "$ROOT_DIR/lib/common.sh"
|
|
7
|
+
|
|
8
|
+
usage() {
|
|
9
|
+
cat << USAGE
|
|
10
|
+
Usage: ${0##*/} [options]
|
|
11
|
+
|
|
12
|
+
Options:
|
|
13
|
+
-e, --email <email> Key email/comment (required)
|
|
14
|
+
-u, --username <username> SSH username (default: current user)
|
|
15
|
+
-H, --hostname <hostname> Target host (default: github.com)
|
|
16
|
+
-k, --keyname <name> Output key filename (default: id_ed25519_<hostname>)
|
|
17
|
+
-c, --comment <comment> Key comment (default: <email>)
|
|
18
|
+
-h, --help Show this help
|
|
19
|
+
|
|
20
|
+
Examples:
|
|
21
|
+
${0##*/} -e sagar@example.com -u sagar -H github.com
|
|
22
|
+
USAGE
|
|
23
|
+
exit 0
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
EMAIL="${EMAIL:-}"
|
|
27
|
+
USERNAME="${USERNAME:-$(whoami)}"
|
|
28
|
+
# bash presets $HOSTNAME to the machine name, so it cannot carry a default
|
|
29
|
+
TARGET_HOST="${SSH_HOST:-github.com}"
|
|
30
|
+
KEYNAME="${KEYNAME:-}"
|
|
31
|
+
COMMENT="${COMMENT:-}"
|
|
32
|
+
|
|
33
|
+
while [[ $# -gt 0 ]]; do
|
|
34
|
+
case "$1" in
|
|
35
|
+
-e|--email) EMAIL="$2"; shift 2 ;;
|
|
36
|
+
-u|--username) USERNAME="$2"; shift 2 ;;
|
|
37
|
+
-H|--hostname) TARGET_HOST="$2"; shift 2 ;;
|
|
38
|
+
-k|--keyname) KEYNAME="$2"; shift 2 ;;
|
|
39
|
+
-c|--comment) COMMENT="$2"; shift 2 ;;
|
|
40
|
+
-h|--help) usage ;;
|
|
41
|
+
*) fail "Unknown option: $1"; exit 1 ;;
|
|
42
|
+
esac
|
|
43
|
+
done
|
|
44
|
+
|
|
45
|
+
if [[ -z "$EMAIL" && -t 0 ]]; then
|
|
46
|
+
read -rp " Email for SSH key comment: " EMAIL
|
|
47
|
+
fi
|
|
48
|
+
[[ -n "$EMAIL" ]] || { fail "--email is required (or set EMAIL)"; exit 1; }
|
|
49
|
+
|
|
50
|
+
if [[ -z "$KEYNAME" ]]; then
|
|
51
|
+
# strip domain suffix, e.g. github.com -> github
|
|
52
|
+
KEYNAME="id_ed25519_${TARGET_HOST%%.*}"
|
|
53
|
+
fi
|
|
54
|
+
[[ -n "$COMMENT" ]] || COMMENT="$EMAIL"
|
|
55
|
+
|
|
56
|
+
KEY_PATH="$HOME/.ssh/$KEYNAME"
|
|
57
|
+
SSH_DIR="$HOME/.ssh"
|
|
58
|
+
CONFIG_FILE="$SSH_DIR/config"
|
|
59
|
+
|
|
60
|
+
step "Generating SSH key"
|
|
61
|
+
|
|
62
|
+
mkdir -p "$SSH_DIR"
|
|
63
|
+
chmod 700 "$SSH_DIR"
|
|
64
|
+
|
|
65
|
+
if [[ -f "$KEY_PATH" ]]; then
|
|
66
|
+
warn "key already exists: $KEY_PATH"
|
|
67
|
+
else
|
|
68
|
+
ssh-keygen -t ed25519 -C "$COMMENT" -f "$KEY_PATH" -N ""
|
|
69
|
+
ok "key generated: $KEY_PATH"
|
|
70
|
+
fi
|
|
71
|
+
|
|
72
|
+
chmod 600 "$KEY_PATH"
|
|
73
|
+
chmod 644 "$KEY_PATH.pub"
|
|
74
|
+
|
|
75
|
+
step "Adding key to ssh-agent"
|
|
76
|
+
|
|
77
|
+
if command -v ssh-agent &>/dev/null && [[ -n "${SSH_AGENT_PID:-}" ]]; then
|
|
78
|
+
ssh-add "$KEY_PATH" 2>/dev/null && ok "key added to ssh-agent" || warn "ssh-add failed"
|
|
79
|
+
else
|
|
80
|
+
warn "ssh-agent not running — skipping ssh-add"
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
step "Updating SSH config"
|
|
84
|
+
|
|
85
|
+
if [[ ! -f "$CONFIG_FILE" ]]; then
|
|
86
|
+
touch "$CONFIG_FILE"
|
|
87
|
+
chmod 600 "$CONFIG_FILE"
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
HOST_ALIAS="$TARGET_HOST"
|
|
91
|
+
|
|
92
|
+
# Remove existing block for this host if present
|
|
93
|
+
if grep -q "# ssh-keygen: $HOST_ALIAS" "$CONFIG_FILE" 2>/dev/null; then
|
|
94
|
+
# portable in-place delete (BSD sed -i needs a suffix arg, GNU does not)
|
|
95
|
+
tmp="$(mktemp)"
|
|
96
|
+
sed "/# ssh-keygen: $HOST_ALIAS/,/# end ssh-keygen: $HOST_ALIAS/d" "$CONFIG_FILE" > "$tmp"
|
|
97
|
+
cat "$tmp" > "$CONFIG_FILE" && rm -f "$tmp"
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
cat >> "$CONFIG_FILE" << EOF
|
|
101
|
+
# ssh-keygen: $HOST_ALIAS
|
|
102
|
+
Host $HOST_ALIAS
|
|
103
|
+
HostName $TARGET_HOST
|
|
104
|
+
User $USERNAME
|
|
105
|
+
IdentityFile $KEY_PATH
|
|
106
|
+
IdentitiesOnly yes
|
|
107
|
+
# end ssh-keygen: $HOST_ALIAS
|
|
108
|
+
EOF
|
|
109
|
+
|
|
110
|
+
ok "SSH config updated: $CONFIG_FILE"
|
|
111
|
+
|
|
112
|
+
step "Testing GitHub SSH authentication"
|
|
113
|
+
|
|
114
|
+
if [[ "$TARGET_HOST" == "github.com" ]]; then
|
|
115
|
+
if ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 -i "$KEY_PATH" -T git@github.com 2>&1 | grep -q "successfully authenticated"; then
|
|
116
|
+
ok "GitHub SSH authentication works"
|
|
117
|
+
else
|
|
118
|
+
warn "GitHub SSH authentication failed — add the public key to GitHub first"
|
|
119
|
+
fi
|
|
120
|
+
else
|
|
121
|
+
warn "hostname is not github.com — skipping GitHub auth test"
|
|
122
|
+
fi
|
|
123
|
+
|
|
124
|
+
echo ""
|
|
125
|
+
echo -e " ${GRN}Done!${R} Public key: ${CYN}$KEY_PATH.pub${R}"
|
|
126
|
+
echo ""
|
|
127
|
+
echo -e " ${D}Add this to $TARGET_HOST:${R}"
|
|
128
|
+
echo ""
|
|
129
|
+
cat "$KEY_PATH.pub"
|
|
130
|
+
echo ""
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
ROOT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
6
|
+
source "$ROOT_DIR/lib/common.sh"
|
|
7
|
+
|
|
8
|
+
CLAUDE_DIR="$HOME/.claude"
|
|
9
|
+
SETTINGS_FILE="$CLAUDE_DIR/settings.json"
|
|
10
|
+
|
|
11
|
+
step "Installing statusline"
|
|
12
|
+
|
|
13
|
+
# Check jq
|
|
14
|
+
if ! command -v jq &>/dev/null; then
|
|
15
|
+
fail "jq required — brew install jq / apt install jq"
|
|
16
|
+
exit 1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
mkdir -p "$CLAUDE_DIR"
|
|
20
|
+
|
|
21
|
+
# Copy files
|
|
22
|
+
cp "$SCRIPT_DIR/statusline.sh" "$CLAUDE_DIR/statusline-command.sh"
|
|
23
|
+
chmod +x "$CLAUDE_DIR/statusline-command.sh"
|
|
24
|
+
ok "statusline.sh ${D}→ ~/.claude/${R}"
|
|
25
|
+
|
|
26
|
+
cp "$SCRIPT_DIR/turn-counter.sh" "$CLAUDE_DIR/turn-counter.sh"
|
|
27
|
+
chmod +x "$CLAUDE_DIR/turn-counter.sh"
|
|
28
|
+
ok "turn-counter.sh ${D}→ ~/.claude/${R}"
|
|
29
|
+
|
|
30
|
+
# Merge into settings.json
|
|
31
|
+
if [[ -f "$SETTINGS_FILE" ]]; then
|
|
32
|
+
cp "$SETTINGS_FILE" "$CLAUDE_DIR/settings.json.bak"
|
|
33
|
+
existing=$(cat "$SETTINGS_FILE")
|
|
34
|
+
else
|
|
35
|
+
existing="{}"
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
updated=$(echo "$existing" | jq '
|
|
39
|
+
.statusLine = {
|
|
40
|
+
"type": "command",
|
|
41
|
+
"command": ($home + "/.claude/statusline-command.sh")
|
|
42
|
+
} |
|
|
43
|
+
.hooks.Stop = (
|
|
44
|
+
[(.hooks.Stop // [])[] | select(.hooks[0].command | test("turn-counter\\.sh$") | not)] +
|
|
45
|
+
[{"hooks": [{"type": "command", "command": ($home + "/.claude/turn-counter.sh")}]}]
|
|
46
|
+
)
|
|
47
|
+
' --arg home "$HOME")
|
|
48
|
+
|
|
49
|
+
echo "$updated" > "$SETTINGS_FILE"
|
|
50
|
+
ok "settings.json ${D}(merged)${R}"
|
|
51
|
+
|
|
52
|
+
# Verify
|
|
53
|
+
all_good=true
|
|
54
|
+
[[ -x "$CLAUDE_DIR/statusline-command.sh" ]] || all_good=false
|
|
55
|
+
[[ -x "$CLAUDE_DIR/turn-counter.sh" ]] || all_good=false
|
|
56
|
+
settings_ok=$(jq 'has("statusLine") and has("hooks")' "$SETTINGS_FILE" 2>/dev/null)
|
|
57
|
+
[[ "$settings_ok" == "true" ]] || all_good=false
|
|
58
|
+
|
|
59
|
+
if [[ "$all_good" == true ]]; then
|
|
60
|
+
ok "all checks passed"
|
|
61
|
+
else
|
|
62
|
+
warn "installed with issues"
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
echo ""
|
|
66
|
+
echo -e " ${D}preview:${R} ${BLU}my-project${R}${D}/${R}${GRN}main${R} ${D}session${R} ${GRN} 2%${R} ${D}4h 50m${R} ${D}ctx${R} ${GRN}5%${R} ${D}T#${R}${CYN}3${R}"
|
|
67
|
+
echo -e " ${MAG}opus[1M]${R} ${D}weekly${R} ${YLW}60%${R} ${D}2d 15h${R} ${GRN}o low${R}"
|
|
68
|
+
echo -e " ${D}restart claude code to activate${R}"
|
|
69
|
+
echo ""
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
input=$(cat)
|
|
4
|
+
|
|
5
|
+
eval "$(echo "$input" | jq -r '
|
|
6
|
+
@sh "cwd=\(.workspace.current_dir // .cwd)",
|
|
7
|
+
@sh "model=\(.model.display_name // "Claude")",
|
|
8
|
+
@sh "used_pct=\(.context_window.used_percentage // 0)",
|
|
9
|
+
@sh "total_input=\(.context_window.total_input_tokens // 0)",
|
|
10
|
+
@sh "total_output=\(.context_window.total_output_tokens // 0)",
|
|
11
|
+
@sh "ctx_window_size=\(.context_window.context_window_size // 0)",
|
|
12
|
+
@sh "session_id=\(.session_id // "")",
|
|
13
|
+
@sh "session_name=\(.session_name // "")",
|
|
14
|
+
@sh "five_h_pct=\(.rate_limits.five_hour.used_percentage // "")",
|
|
15
|
+
@sh "five_h_reset=\(.rate_limits.five_hour.resets_at // "")",
|
|
16
|
+
@sh "seven_d_pct=\(.rate_limits.seven_day.used_percentage // "")",
|
|
17
|
+
@sh "seven_d_reset=\(.rate_limits.seven_day.resets_at // "")"
|
|
18
|
+
')"
|
|
19
|
+
|
|
20
|
+
R='\033[0m'; B='\033[1m'; D='\033[2m'
|
|
21
|
+
BLUE='\033[38;5;33m'
|
|
22
|
+
GREEN='\033[38;5;34m'
|
|
23
|
+
YELLOW='\033[38;5;172m'
|
|
24
|
+
RED='\033[38;5;160m'
|
|
25
|
+
CYAN='\033[38;5;31m'
|
|
26
|
+
MAGENTA='\033[38;5;92m'
|
|
27
|
+
GRAY='\033[38;5;244m'
|
|
28
|
+
DIM='\033[38;5;240m'
|
|
29
|
+
|
|
30
|
+
# ── Git ───────────────────────────────────────────────────────────────────────
|
|
31
|
+
git_root="" git_branch=""
|
|
32
|
+
if git -C "$cwd" rev-parse --git-dir >/dev/null 2>&1; then
|
|
33
|
+
git_root=$(basename "$(git -C "$cwd" --no-optional-locks rev-parse --show-toplevel 2>/dev/null)")
|
|
34
|
+
git_branch=$(git -C "$cwd" --no-optional-locks branch --show-current 2>/dev/null)
|
|
35
|
+
[[ -z "$git_branch" ]] && git_branch=$(git -C "$cwd" --no-optional-locks rev-parse --short HEAD 2>/dev/null)
|
|
36
|
+
if ! git -C "$cwd" --no-optional-locks diff-index --quiet HEAD -- 2>/dev/null; then
|
|
37
|
+
git_branch="${git_branch}*"
|
|
38
|
+
fi
|
|
39
|
+
fi
|
|
40
|
+
dir="${git_root:-$(basename "$cwd")}"
|
|
41
|
+
|
|
42
|
+
# ── Model short ──────────────────────────────────────────────────────────────
|
|
43
|
+
short_model=$(echo "$model" | sed -E 's/Claude //; s/ \(.*//')
|
|
44
|
+
short_model="${short_model,}"
|
|
45
|
+
if [[ $ctx_window_size -ge 1000000 ]]; then
|
|
46
|
+
short_model+="[$(( ctx_window_size / 1000000 ))M]"
|
|
47
|
+
elif [[ $ctx_window_size -ge 1000 ]]; then
|
|
48
|
+
short_model+="[$(( ctx_window_size / 1000 ))K]"
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
# ── Context % ────────────────────────────────────────────────────────────────
|
|
52
|
+
used_int=${used_pct%.*}; used_int=${used_int:-0}
|
|
53
|
+
if [[ $used_int -lt 50 ]]; then cc="$GREEN"
|
|
54
|
+
elif [[ $used_int -lt 75 ]]; then cc="$YELLOW"
|
|
55
|
+
else cc="$RED"; fi
|
|
56
|
+
|
|
57
|
+
# ── Turn ─────────────────────────────────────────────────────────────────────
|
|
58
|
+
turn="0"
|
|
59
|
+
if [[ -n "$session_id" ]]; then
|
|
60
|
+
tf="/tmp/claude-turns-${session_id}.txt"
|
|
61
|
+
[[ -f "$tf" ]] && turn=$(cat "$tf" 2>/dev/null)
|
|
62
|
+
fi
|
|
63
|
+
[[ -z "$turn" ]] && turn="0"
|
|
64
|
+
|
|
65
|
+
# ── Countdown ────────────────────────────────────────────────────────────────
|
|
66
|
+
fmt_cd() {
|
|
67
|
+
local diff=$(( $1 - $(date +%s) ))
|
|
68
|
+
if [[ $diff -le 0 ]]; then echo "now"
|
|
69
|
+
elif [[ $diff -ge 86400 ]]; then printf "%dd %dh" $(( diff/86400 )) $(( (diff%86400)/3600 ))
|
|
70
|
+
elif [[ $diff -ge 3600 ]]; then printf "%dh %dm" $(( diff/3600 )) $(( (diff%3600)/60 ))
|
|
71
|
+
else printf "%dm" $(( diff/60 )); fi
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
lc() {
|
|
75
|
+
if [[ $1 -lt 50 ]]; then echo "$GREEN"
|
|
76
|
+
elif [[ $1 -lt 80 ]]; then echo "$YELLOW"
|
|
77
|
+
else echo "$RED"; fi
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
# ── Rate limits (aligned sub-fields) ─────────────────────────────────────────
|
|
81
|
+
s_label="session"; s_pct=""; s_time=""; sc=""
|
|
82
|
+
if [[ -n "$five_h_pct" ]]; then
|
|
83
|
+
sv=$(printf "%.0f" "$five_h_pct"); sc=$(lc "$sv")
|
|
84
|
+
s_pct="${sv}%"
|
|
85
|
+
[[ -n "$five_h_reset" ]] && s_time=$(fmt_cd "$five_h_reset")
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
w_label="weekly"; w_pct=""; w_time=""; wc=""
|
|
89
|
+
if [[ -n "$seven_d_pct" ]]; then
|
|
90
|
+
wv=$(printf "%.0f" "$seven_d_pct"); wc=$(lc "$wv")
|
|
91
|
+
w_pct="${wv}%"
|
|
92
|
+
[[ -n "$seven_d_reset" ]] && w_time=$(fmt_cd "$seven_d_reset")
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
lw=$(( ${#s_label} > ${#w_label} ? ${#s_label} : ${#w_label} ))
|
|
96
|
+
pw=$(( ${#s_pct} > ${#w_pct} ? ${#s_pct} : ${#w_pct} ))
|
|
97
|
+
tw=$(( ${#s_time} > ${#w_time} ? ${#s_time} : ${#w_time} ))
|
|
98
|
+
|
|
99
|
+
session_bit=""
|
|
100
|
+
if [[ -n "$s_pct" ]]; then
|
|
101
|
+
session_bit=$(printf "%b%-*s%b %b%b%*s%b %b%*s%b" \
|
|
102
|
+
"$GRAY" "$lw" "$s_label" "$R" \
|
|
103
|
+
"$sc" "$B" "$pw" "$s_pct" "$R" \
|
|
104
|
+
"$DIM" "$tw" "$s_time" "$R")
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
weekly_bit=""
|
|
108
|
+
if [[ -n "$w_pct" ]]; then
|
|
109
|
+
weekly_bit=$(printf "%b%-*s%b %b%b%*s%b %b%*s%b" \
|
|
110
|
+
"$GRAY" "$lw" "$w_label" "$R" \
|
|
111
|
+
"$wc" "$B" "$pw" "$w_pct" "$R" \
|
|
112
|
+
"$DIM" "$tw" "$w_time" "$R")
|
|
113
|
+
fi
|
|
114
|
+
|
|
115
|
+
# ── Right side ───────────────────────────────────────────────────────────────
|
|
116
|
+
right=""
|
|
117
|
+
[[ -n "$session_name" ]] && right="${GRAY}[s] ${session_name}${R}"
|
|
118
|
+
|
|
119
|
+
# ── Effort level (read from settings) ────────────────────────────────────────
|
|
120
|
+
effort=$(jq -r '.effortLevel // "medium"' ~/.claude/settings.json 2>/dev/null)
|
|
121
|
+
case "$effort" in
|
|
122
|
+
low) effort_display="${GREEN}o low${R}" ;;
|
|
123
|
+
high) effort_display="${RED}* high${R}" ;;
|
|
124
|
+
*) effort_display="${YELLOW}~ med${R}" ;;
|
|
125
|
+
esac
|
|
126
|
+
|
|
127
|
+
# ── Line 1: identity + turn + effort ────────────────────────────────────────
|
|
128
|
+
# ── Column helpers (visible length, strip ANSI) ─────────────────────────────
|
|
129
|
+
vlen() {
|
|
130
|
+
local s=$1
|
|
131
|
+
s=$(printf '%b' "$s" | sed 's/\x1b\[[0-9;]*m//g')
|
|
132
|
+
echo -n "${#s}"
|
|
133
|
+
}
|
|
134
|
+
pad() {
|
|
135
|
+
local s=$1 w=$2
|
|
136
|
+
local l; l=$(vlen "$s")
|
|
137
|
+
local n=$(( w - l ))
|
|
138
|
+
[[ $n -lt 0 ]] && n=0
|
|
139
|
+
printf '%b%*s' "$s" "$n" ''
|
|
140
|
+
}
|
|
141
|
+
mx() { [[ $1 -gt $2 ]] && echo "$1" || echo "$2"; }
|
|
142
|
+
|
|
143
|
+
# ── Build columns ────────────────────────────────────────────────────────────
|
|
144
|
+
c1a="${BLUE}${B}${dir}${R}${GRAY}/${R}${GREEN}${git_branch}${R}"
|
|
145
|
+
c1b="${MAGENTA}${short_model}${R}"
|
|
146
|
+
|
|
147
|
+
c2a="$session_bit"
|
|
148
|
+
c2b="$weekly_bit"
|
|
149
|
+
|
|
150
|
+
c3a="${GRAY}ctx${R} ${cc}${B}${used_int}%${R}"
|
|
151
|
+
c3b="$effort_display"
|
|
152
|
+
|
|
153
|
+
c4a="${GRAY}T#${R}${CYAN}${B}${turn}${R}"
|
|
154
|
+
c4b=""
|
|
155
|
+
|
|
156
|
+
c5a="$right"
|
|
157
|
+
c5b=""
|
|
158
|
+
|
|
159
|
+
w1=$(mx "$(vlen "$c1a")" "$(vlen "$c1b")")
|
|
160
|
+
w2=$(mx "$(vlen "$c2a")" "$(vlen "$c2b")")
|
|
161
|
+
w3=$(mx "$(vlen "$c3a")" "$(vlen "$c3b")")
|
|
162
|
+
w4=$(mx "$(vlen "$c4a")" "$(vlen "$c4b")")
|
|
163
|
+
|
|
164
|
+
SEP=" "
|
|
165
|
+
line1="$(pad "$c1a" "$w1")${SEP}$(pad "$c2a" "$w2")${SEP}$(pad "$c3a" "$w3")${SEP}$(pad "$c4a" "$w4")${SEP}${c5a}"
|
|
166
|
+
line2="$(pad "$c1b" "$w1")${SEP}$(pad "$c2b" "$w2")${SEP}$(pad "$c3b" "$w3")${SEP}$(pad "$c4b" "$w4")${SEP}${c5b}"
|
|
167
|
+
|
|
168
|
+
printf '%b\n%b' "$line1" "$line2"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Increment turn counter per session
|
|
3
|
+
# Counter lives at /tmp/claude-turns-<session_id>.txt
|
|
4
|
+
# Resumed sessions (claude --resume) keep the same session_id,
|
|
5
|
+
# so the counter picks up where it left off.
|
|
6
|
+
# Files in /tmp survive until reboot.
|
|
7
|
+
INPUT=$(cat)
|
|
8
|
+
SESSION_ID=$(echo "$INPUT" | jq -r '.session_id')
|
|
9
|
+
TURN_FILE="/tmp/claude-turns-${SESSION_ID}.txt"
|
|
10
|
+
CURRENT=$(cat "$TURN_FILE" 2>/dev/null || echo "0")
|
|
11
|
+
echo $(( CURRENT + 1 )) > "$TURN_FILE"
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Superfile (spf) Cheat Sheet
|
|
2
|
+
|
|
3
|
+
Your current setup. macOS config: `~/Library/Application Support/superfile/`
|
|
4
|
+
(hotkeys: `hotkeys.toml`, settings: `config.toml`)
|
|
5
|
+
|
|
6
|
+
Launch: `spf` · Quit: `q` or `esc` · Help in app: `?`
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Moving Around
|
|
11
|
+
|
|
12
|
+
| Key | Action |
|
|
13
|
+
|---|---|
|
|
14
|
+
| `j` / `k` or ↓ / ↑ | move cursor down / up |
|
|
15
|
+
| `h` or ← or `backspace` | parent directory |
|
|
16
|
+
| `enter` / `l` / → | open file or folder |
|
|
17
|
+
| `pgup` / `pgdn` | page up / down |
|
|
18
|
+
| `/` | search current directory (type to filter) |
|
|
19
|
+
| `z` | zoxide jump — global smart dir jump |
|
|
20
|
+
| `.` | show / hide dotfiles |
|
|
21
|
+
| `o` | sort menu (name / size / date) |
|
|
22
|
+
| `R` | reverse sort order |
|
|
23
|
+
|
|
24
|
+
## Panels (split views)
|
|
25
|
+
|
|
26
|
+
| Key | Action |
|
|
27
|
+
|---|---|
|
|
28
|
+
| `ctrl+n` | new file panel |
|
|
29
|
+
| `w` | close current panel |
|
|
30
|
+
| `tab` / `L` | next panel |
|
|
31
|
+
| `shift+left` / `H` | previous panel |
|
|
32
|
+
| `N` | split panel |
|
|
33
|
+
|
|
34
|
+
## Focus Other Areas
|
|
35
|
+
|
|
36
|
+
| Key | Action |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `s` | sidebar (pinned dirs) — press again to go back |
|
|
39
|
+
| `m` | metadata panel |
|
|
40
|
+
| `p` | process bar (copy progress etc.) |
|
|
41
|
+
| `f` | toggle file preview |
|
|
42
|
+
| `F` | toggle footer panels |
|
|
43
|
+
| `P` | pin / unpin current folder to sidebar |
|
|
44
|
+
|
|
45
|
+
## File Operations
|
|
46
|
+
|
|
47
|
+
Works on file under cursor, or all selected files in select mode.
|
|
48
|
+
|
|
49
|
+
| Key | Action |
|
|
50
|
+
|---|---|
|
|
51
|
+
| `n` | **new file** (add `/` at end of name = new folder) |
|
|
52
|
+
| `ctrl+r` | rename |
|
|
53
|
+
| `ctrl+c` | copy |
|
|
54
|
+
| `ctrl+x` | cut |
|
|
55
|
+
| `ctrl+v` | paste |
|
|
56
|
+
| `ctrl+d` / `delete` | delete → Trash |
|
|
57
|
+
| `D` | delete permanently (NO undo) |
|
|
58
|
+
| `ctrl+a` | compress (zip) |
|
|
59
|
+
| `ctrl+e` | extract archive |
|
|
60
|
+
|
|
61
|
+
> Copy/cut items show in **clipboard panel** (bottom right).
|
|
62
|
+
> Progress shows in **process panel** (bottom left).
|
|
63
|
+
|
|
64
|
+
## Select Mode (bulk ops — like vim visual mode)
|
|
65
|
+
|
|
66
|
+
| Key | Action |
|
|
67
|
+
|---|---|
|
|
68
|
+
| `v` | enter / exit select mode |
|
|
69
|
+
| `enter` / `L` | select / deselect item under cursor |
|
|
70
|
+
| `J` / `shift+↓` | select while moving down |
|
|
71
|
+
| `K` / `shift+↑` | select while moving up |
|
|
72
|
+
| `A` | select all in directory |
|
|
73
|
+
|
|
74
|
+
Then use file ops above (`ctrl+c`, `ctrl+d`, ...) on the selection.
|
|
75
|
+
|
|
76
|
+
## Editor (nvim)
|
|
77
|
+
|
|
78
|
+
| Key | Action |
|
|
79
|
+
|---|---|
|
|
80
|
+
| `e` | open file in nvim |
|
|
81
|
+
| `E` | open current directory in nvim |
|
|
82
|
+
|
|
83
|
+
## Command Bars
|
|
84
|
+
|
|
85
|
+
| Key | Action |
|
|
86
|
+
|---|---|
|
|
87
|
+
| `:` | **shell mode** — run any terminal command in current dir (`:git status`) |
|
|
88
|
+
| `>` | spf mode — `cd <PATH>`, `open <PATH>`, `split`; supports `~`, `${VAR}`, `$(cmd)` |
|
|
89
|
+
| `esc` / `ctrl+c` | close the bar |
|
|
90
|
+
|
|
91
|
+
## Misc
|
|
92
|
+
|
|
93
|
+
| Key | Action |
|
|
94
|
+
|---|---|
|
|
95
|
+
| `ctrl+p` | copy file path to clipboard |
|
|
96
|
+
| `c` | copy current directory path |
|
|
97
|
+
| `Q` | quit AND cd shell to this dir |
|
|
98
|
+
| `?` | full hotkey list in app |
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Common Workflows
|
|
103
|
+
|
|
104
|
+
**Copy files between two folders (no commands):**
|
|
105
|
+
1. `ctrl+n` new panel → go to destination
|
|
106
|
+
2. `tab` back → select files (`v` + `J`)
|
|
107
|
+
3. `ctrl+c` → `tab` → `ctrl+v`
|
|
108
|
+
|
|
109
|
+
**Delete several files:**
|
|
110
|
+
`v` → move `j` (auto-marks) or `J` to extend → `ctrl+d`
|
|
111
|
+
|
|
112
|
+
**Jump to a project, edit it:**
|
|
113
|
+
`z` → type project name → `enter` → `E` (nvim opens dir)
|
|
114
|
+
|
|
115
|
+
**New folder:**
|
|
116
|
+
`n` → type `myfolder/` → `enter`
|
|
117
|
+
|
|
118
|
+
**Run a quick command:**
|
|
119
|
+
`:make test` or `:git status` → `esc`
|
|
120
|
+
|
|
121
|
+
## Shell Setup Notes
|
|
122
|
+
|
|
123
|
+
- `zoxide` installed + enabled (`zoxide_support = true`). It learns dirs
|
|
124
|
+
as you `cd` in terminal. Seed it: `z add ~/projects ~/Downloads`
|
|
125
|
+
- Editor = `$EDITOR` = `nvim` (already set)
|
|
126
|
+
- Trash delete needs terminal Full Disk Access:
|
|
127
|
+
System Settings → Privacy & Security → Full Disk Access → enable your terminal
|