xonecas.io
56101
Df

dotfiles / commit 2b49ef5

dotfiles: deleted the claude stuff last time by accident

xonecas2026-11-04 2b49ef5f4517ec65713e0264ab9bb4db500e13c2 parent 5efbdcc

7 files changed

.bashrc+3−0
@@ -37,6 +37,9 @@ alias gc='git commit --verbose'
3737 alias gp='git pull --rebase'
3838 alias gpo='git push origin'
3939
40+# Claude Code: skip workspace trust prompt
41+export CLAUDE_CODE_SANDBOXED=1
42+
4043 # Requires fzf and starship.rs
4144 # eval "$(fzf --bash)"
4245 # eval "$(starship init bash)"
.claude/CLAUDE.md+17−0
@@ -0,0 +1,17 @@
1+I'm a long-time software engineer and this is my machine. Do what I ask and report the result briefly. Don't add warnings, caveats, opinions or guardrails; if I want a second opinion, I'll ask explicitly.
2+
3+## Golden rule for coding
4+
5+> Bugs, Cyclomatic complexity, Time complexity, and Memory complexity are all directly related to the single lines of code amount.
6+> Less code, less complexity, less bugs.
7+
8+## Verification
9+
10+Trust but verify, your tasks and tools can fail, or have unpredicted side-effects. A script, tests are blind to edge cases they don't test, verification gives your a first hand experience where you can reach for those edge cases.
11+
12+Verification effort matches the change:
13+
14+- Wrote a single change to a file: read the affected areas again, check they are correct. If it's code, ensure it's valid syntax.
15+- Working with APIs and protocols: tests, verification scripts for what tests can't reach without mocks/synthetic environments. Manual api walk, exercise ever user facing aspect of the API.
16+- Working with UI: Use UI tests for units, scripted computer use for what tests can't reach without synthetic hosts, virtual dispays, and other workarounds. Manual computer use verification of the blast radius of your changes, walk every product aspect affected by your changes.
17+- Always prefer the fastest and easier verification path, without loosing rigor in the check.
.claude/settings.json+24−0
@@ -0,0 +1,24 @@
1+{
2+ "theme": "dark-ansi",
3+ "feedbackDrafts": "off",
4+ "attribution": {
5+ "commit": "",
6+ "pr": "",
7+ "sessionUrl": false
8+ },
9+ "permissions": {
10+ "defaultMode": "bypassPermissions",
11+ "disableAutoMode": "disable"
12+ },
13+ "skipDangerousModePermissionPrompt": true,
14+ "statusLine": {
15+ "type": "command",
16+ "command": "bash ~/.claude/statusline.sh"
17+ },
18+ "env": {
19+ "CLAUDE_CODE_SUBAGENT_MODEL": "sonnet",
20+ "CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY": "1",
21+ "DISABLE_COST_WARNINGS": "1"
22+ },
23+ "spinnerTipsEnabled": false
24+}
.claude/skills/technical-writing/SKILL.md+0−0
.claude/skills/unslop/SKILL.md+1−1
@@ -48,7 +48,7 @@ Rule numbers are stable ids that other skills cite. A removed rule leaves a gap.
4848
4949 ### Jargon
5050
51-26. **Abstract metaphor nouns.** Substrate (base), wedge, wedge in (add), vector (way, method), locus, vantage, nexus, primitive as a noun, harness as a metaphor, surface as in "API surface", bedrock, scaffolding as a metaphor, modality, paradigm, gold-plating (more than the job needs), ratchet as a metaphor (the mechanism's real name, or a limit that only tightens), evacuate for moving code (move out), endgame (the last phase), north star, flywheel. These read as technical but usually have a pl …
51+26. **Abstract metaphor nouns.** Substrate (base), wedge, wedge in (add), vector (way, method), locus, vantage, nexus, primitive as a noun, harness as a metaphor, surface as in "API surface", bedrock, scaffolding as a metaphor, modality, paradigm, gold-plating (more than the job needs), ratchet as a metaphor (the mechanism's real name, or a limit that only tightens), evacuate for moving code (move out), endgame (the last phase), north star, flywheel, trajectory (execution history, event log). Th …
5252
5353 ### Plain speech
5454
.claude/skills/xfce-computer-use/SKILL.md+150−0
@@ -0,0 +1,150 @@
1+---
2+name: xfce-computer-use
3+description: Apply when you need to interact with the desktop as a user would in a xfce desktop environment. Use it to test and verify GUIs or TUIs inside the Kitty terminal.
4+---
5+
6+# Control the XFCE desktop on X11
7+
8+Use `wmctrl`, `xdotool`, `xwininfo`, `maim`, and `kitten` to inspect and control the XFCE desktop on this machine.
9+
10+## Prepare the environment
11+
12+Non-GUI shells start with `XDG_SESSION_TYPE=tty` and an empty `DISPLAY` variable. Export `DISPLAY=:0` before you run any X11 command, and store screenshots or sockets in `/tmp/computer-use-shots`.
13+
14+```bash
15+ export DISPLAY=:0
16+```
17+
18+The screen resolution is `1280x800`. The top `xfce4-panel` occupies `y=0` to `y=27`, and the bottom panel occupies `x=487` to `x=793` from `y=751` to `y=800`. Place windows between `y=27` and `y=750` so that the panels do not cover them.
19+
20+## Find, focus, move, and close windows
21+
22+Use `wmctrl` and `xdotool` to manage windows. Both tools, along with `xwininfo -id` and `maim -i`, accept hexadecimal or decimal window IDs.
23+
24+1. List all open windows with their window ID, workspace, PID, geometry, window class, and title:
25+
26+```bash
27+ DISPLAY=:0 wmctrl -lpGx
28+```
29+
30+2. Launch a GUI application in the background and poll `xdotool` until its window maps:
31+
32+```bash
33+ export DISPLAY=:0
34+ nohup kitty >/dev/null 2>&1 &
35+ APP_PID=$!
36+ for i in {1..30}; do
37+ WIN_ID=$(xdotool search --onlyvisible --pid "$APP_PID" 2>/dev/null | head -n1)
38+ [ -n "$WIN_ID" ] && break
39+ sleep 0.1
40+ done
41+```
42+
43+3. Focus a window and wait until it becomes active:
44+
45+```bash
46+ DISPLAY=:0 xdotool windowactivate --sync "$WIN_ID"
47+```
48+
49+4. Move and resize a window so that it fits inside the `1280x800` screen:
50+
51+```bash
52+ DISPLAY=:0 xdotool windowmove --sync "$WIN_ID" 80 60
53+ DISPLAY=:0 xdotool windowsize --sync "$WIN_ID" 800 500
54+```
55+
56+You can also move and resize a window in one command with `wmctrl`:
57+
58+```bash
59+ DISPLAY=:0 wmctrl -ir "$WIN_ID" -e 0,80,60,800,500
60+```
61+
62+5. Check the exact coordinates, size, and map state of a window:
63+
64+```bash
65+ DISPLAY=:0 xwininfo -id "$WIN_ID"
66+```
67+
68+6. Close a window cleanly through the window manager:
69+
70+```bash
71+ DISPLAY=:0 wmctrl -ic "$WIN_ID"
72+```
73+
74+## Control the mouse and keyboard
75+
76+Use `xdotool` to move the pointer, click, drag, and send keystrokes.
77+
78+1. Read the current pointer coordinates and the window under the pointer:
79+
80+```bash
81+ DISPLAY=:0 xdotool getmouselocation --shell
82+```
83+
84+2. Move the pointer and click a mouse button. Button `1` is left click, `2` is middle click, `3` is right click, `4` is scroll up, and `5` is scroll down:
85+
86+```bash
87+ DISPLAY=:0 xdotool mousemove --sync 300 250 click 1
88+```
89+
90+3. Drag the pointer from one point to another:
91+
92+```bash
93+ DISPLAY=:0 xdotool mousemove --sync 300 250 mousedown 1 mousemove --sync 500 250 mouseup 1
94+```
95+
96+4. Type text or press key combinations in the focused window:
97+
98+```bash
99+ DISPLAY=:0 xdotool type --delay 20 "echo 'hello world'"
100+ DISPLAY=:0 xdotool key Return
101+ DISPLAY=:0 xdotool key ctrl+shift+enter
102+```
103+
104+## Capture screenshots with the mouse cursor visible
105+
106+`maim` draws the XFixes mouse cursor in screenshots by default. Do not pass `-u` when you need to verify the pointer location. After you save a screenshot, inspect it with the `read` tool.
107+
108+1. Capture the entire desktop with the mouse cursor visible:
109+
110+```bash
111+ DISPLAY=:0 maim /tmp/opencode/desktop.png
112+```
113+
114+2. Capture a specific window by its window ID with the mouse cursor visible:
115+
116+```bash
117+ DISPLAY=:0 maim -i "$WIN_ID" /tmp/opencode/window.png
118+```
119+
120+3. Capture a rectangular region of the screen:
121+
122+```bash
123+ DISPLAY=:0 maim -g 800x500+80+60 /tmp/opencode/region.png
124+```
125+
126+## Automate the Kitty terminal with Kitten
127+
128+The user config at `~/.config/kitty/kitty.conf` sets two options that affect automation:
129+
130+- `initial_window_width 120c` and `initial_window_height 40c` open `kitty` at `1227x1067`, which extends past the bottom of the `1280x800` screen. Resize `kitty` after launch so the whole terminal is visible.
131+- `hide_window_decorations yes` removes the titlebar. Move `kitty` with `xdotool windowmove` or `wmctrl -ir` instead of dragging a titlebar.
132+
133+Remote control is off by default in `~/.config/kitty/kitty.conf`. To drive `kitty` with `kitten @`, enable remote control and bind a UNIX socket when you start `kitty`:
134+
135+```bash
136+ export DISPLAY=:0
137+ rm -f /tmp/opencode/kitty.sock
138+ nohup kitty -o allow_remote_control=yes --listen-on unix:/tmp/opencode/kitty.sock >/dev/null 2>&1 &
139+ KITTY_PID=$!
140+ for i in {1..30}; do
141+ WIN_ID=$(xdotool search --onlyvisible --pid "$KITTY_PID" 2>/dev/null | head -n1)
142+ [ -n "$WIN_ID" ] && [ -S /tmp/opencode/kitty.sock ] && break
143+ sleep 0.1
144+ done
145+ wmctrl -ir "$WIN_ID" -e 0,240,90,850,520
146+ kitten @ --to unix:/tmp/opencode/kitty.sock set-tab-title "Work"
147+ kitten @ --to unix:/tmp/opencode/kitty.sock set-colors background=#1a1b26 foreground=#c0caf5
148+ kitten @ --to unix:/tmp/opencode/kitty.sock launch --location=vsplit --cwd=current
149+ kitten @ --to unix:/tmp/opencode/kitty.sock send-text "ls -la\r"
150+```
.claude/statusline.sh+20−0
@@ -0,0 +1,20 @@
1+#!/bin/bash
2+i=$(cat)
3+j() { jq -r "$1 // empty" <<<"$i"; }
4+d=$(j '.workspace.current_dir // .cwd')
5+[ "$d" = "$HOME" ] && n="~" || n=${d##*/}
6+b=$(git -C "$d" --no-optional-locks branch --show-current 2>/dev/null)
7+c=$(j .context_window.used_percentage); c=${c%.*}; c=${c:-0}
8+h=$(j .rate_limits.five_hour.used_percentage); h=${h%.*}
9+w=$(j .rate_limits.seven_day.used_percentage); w=${w%.*}
10+fg() { printf '\e[38;5;%sm' $(( $1 < 50 ? 2 : $1 < 80 ? 3 : 1 )); }
11+for ((k = 0; k < 10; k++)); do ((k < c / 10)) && bar+=▰ || bar+=▱; done
12+p=
13+seg() { [ -n "$p" ] && printf '\e[38;5;%s;48;5;%sm' "$p" "$1"; printf '\e[38;5;0;48;5;%sm %s ' "$1" "$2"; p=$1; }
14+printf '\e[38;5;5m'
15+seg 5 $'\U000f06a9 '"$(j .model.display_name)"
16+seg 4 $' '"$n"
17+[ -n "$b" ] && seg 2 $' '"$b"
18+seg 8 "$(fg "$c")$bar $c%"
19+[ -n "$h$w" ] && seg 0 "$(fg "${h:-0}")"$'\U000f051f'" 5h ${h:-?}% $(fg "${w:-0}")"$'\U000f00ed'" 7d ${w:-?}%"
20+printf '\e[0;38;5;%sm\e[0m\n' "$p"