Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Agent Instructions

Read and follow [CLAUDE.md](./CLAUDE.md) for this repository's architecture, coding conventions, testing guidance, and release rules. It is the shared source of truth for Claude Code and Codex.

Read [HANDOFF.md](./HANDOFF.md) for any active task handoff, and follow the handoff instructions in `CLAUDE.md` when passing work to another agent.

In particular, do not run `git push` or `git tag` without an explicit user instruction.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.5.0] - 2026-09-26

### Added
- Clockwise display rotation (`0`, `90`, `180`, `270`) for tablets and portrait monitors, including rendering, pointer coordinates, and framebuffer updates ([#17](https://github.com/sanohiro/bcon/issues/17)).
- Interactive rendering and rotated-pointer checks, plus bounded rendering and virtual-keyboard stress tools in `tests/`.
- Shared agent instructions and task handoff documentation.

### Fixed
- NumLock-off keypad navigation now works like dedicated arrow, Home, End, PageUp, PageDown, Insert, and Delete keys ([#18](https://github.com/sanohiro/bcon/issues/18)).
- Kitty image transfers finish when the last chunk omits `m`.
- Config watching ignores sibling files, coalesces pending events, and supports relative config paths and atomic saves.
- Honor `font.render_mode = "grayscale"` when initializing the glyph atlas.

## [1.3.1] - 2026-04-04

### Added
Expand Down
13 changes: 11 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,19 @@ Reference: https://vt100.net/emu/dec_ansi_parser
- Keep unsafe blocks minimal and well-documented
- Module structure: one file per major component

## Agent Handoff

Claude Code and Codex share [HANDOFF.md](./HANDOFF.md) as the current task handoff.

- At the start of a task, read the handoff and check `git status`; verify its notes against the working tree before relying on them.
- When the user asks to hand work to another agent, update the handoff with the goal, completed work, next steps, test results, blockers, and uncommitted files. Keep it brief and specific.
- Treat the handoff as task state, not as a replacement for this file or the user's instructions. Do not overwrite another agent's uncommitted work.
- When a task is complete, mark the handoff as having no active task so stale steps are not followed later.

## Language Guidelines

Use **English** for wider adoption:
- README.md, CLAUDE.md
- README.md, CLAUDE.md, AGENTS.md, HANDOFF.md
- Release notes / CHANGELOG
- Commit messages
- GitHub Issues/PR titles
Expand Down Expand Up @@ -264,7 +273,7 @@ img2sixel test.png
- **kmscon** (C): https://github.com/dvdhrm/kmscon
- **alacritty** (Rust): https://github.com/alacritty/alacritty

## Commands for Claude Code
## Commands for Coding Agents

When implementing, prefer:
- Small, focused commits
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bcon"
version = "1.4.0"
version = "1.5.0"
edition = "2021"
authors = ["Hironobu Sano"]
description = "GPU-accelerated terminal emulator for Linux console"
Expand Down
58 changes: 58 additions & 0 deletions HANDOFF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Agent Handoff

Status: Active — review complete; v1.5.0 merge and release pending.

## Goal

Merge the reviewed display rotation (#17), NumLock-off keypad navigation (#18),
and related rendering/config fixes. The user authorized merging and necessary
documentation updates. The user also explicitly authorized a release. Use v1.5.0 because rotation adds
a feature. All commit, PR, release, and issue messages must be English.
Leave issue #19 unchanged.
After release, reply to #17 and #18 in English, briefly apologizing for the slow reply
(as requested by the user). Do not send those replies before release.

## Completed

- Reviewed all application, documentation, and test-tool changes.
- Fixed review findings: relative-path config watch filtering, grayscale mode
selection and R8-to-RGB atlas upload, and out-of-bounds absolute pointer input
after rotation. Added regression coverage.
- Fixed final-target handling in the interactive pointer check and NumLock
restoration in the keypad check.
- Updated English/Japanese configuration, keybind, and installation docs;
added an Unreleased changelog section and tests/README.md.
- Earlier systemd visual smoke run: 12 screenshots showed correct text, colors,
Sixel, both Kitty transfers, partial update cleanup, and alternate-screen
restoration. Service had zero restarts during that run. This predates the
additional code-review fixes; screenshots do not verify all rotation angles
or VT switching animations.

## Verification

- `cargo test --locked`: 65 passed, 1 hardware-dependent seatd test ignored.
- `cargo test --locked --no-default-features`: passed.
- `cargo build --release --locked`: passed after the review fixes.
- Shell/Python parsing and both C test utilities' strict syntax checks passed.
- Relative-config atomic-save regression failed before the fix and passed after.
- User reports overnight stress did not reproduce issue #19; not proof of a fix.

## Next steps

- Publish the reviewed branch/PR, verify CI, merge, tag v1.5.0, and verify the
release artifacts. Then reply to issues #17 and #18 in English with a brief
apology for the slow reply. Update this handoff once complete.
- Update this file after merge so future agents do not repeat stale work.

## Uncommitted files and blockers

- Changes are being prepared on a dedicated review branch. Check git status and
the PR before resuming. No application restart is needed for GitHub operations.
- The development share is CIFS and reports every file as executable. Preserve
existing Git modes; ignore mode-only differences when reviewing/staging.
- Privileged deployment requires the user's sudo interaction. The user offered
to execute commands themselves; never request their password.

- CIFS rejected writing loose Git objects during staging. A local review clone
is recorded in /tmp/bcon-review-path; it has the same reviewed file contents
and preserves repository file modes. Use it for publication if needed.
27 changes: 27 additions & 0 deletions docs/configuration.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,32 @@ bcon --init-config=~/foo.toml,vim # ファイル生成
BCON_CONFIG=~/foo.toml bcon # そのファイルだけを読み込み起動
```

## 画面の回転

タブレットや縦置きモニターでは、設定に次を追加します。

```toml
[display]
rotation = 90

[font]
render_mode = "grayscale"
```

`rotation` は時計回りに `0`(既定)、`90`、`180`、`270` 度を指定します。
変更後は bcon を再起動してください。90/270 度では端末の論理的な幅と高さが
入れ替わり、文字・画像・UI・ポインター座標に同じ回転が適用されます。
対応していない正の角度は警告を出し、`0` に戻ります。

グレースケールにすると、回転後の文字とパネルのサブピクセル配列が合わない
場合の色にじみを避けられます。LCD 描画を使う場合は、回転後の配列に合わせて
`lcd_subpixel`(`rgb`、`bgr`、`vrgb`、`vbgr`)を選んでください。
描画モードやサブピクセル配列の変更後も再起動が必要です。

`bcon@tty2.service` を使う場合は `/etc/bcon/config.toml` を編集し、
`sudo systemctl restart bcon@tty2` の後に `Ctrl+Alt+F2` で tty2 に切り替えます。
rootless セッションでは `~/.config/bcon/config.toml` を使えます。

## 利用可能なプリセット

| プリセット | 説明 |
Expand Down Expand Up @@ -107,6 +133,7 @@ speed = 1.0 # カーソル速度倍率 (デフォルト: 1.0、
[display]
prefer_external = true # 外部モニター優先 (HDMI/DP > 内蔵)
auto_switch = true # ホットプラグ時に自動切り替え
rotation = 0 # 時計回り: 0、90、180、270 度。変更後は再起動が必要

[drm]
device = "auto" # "auto" は各 GPU を probe して接続中のディスプレイを自動選択
Expand Down
27 changes: 27 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,32 @@ bcon --init-config=~/foo.toml,vim # generate the file
BCON_CONFIG=~/foo.toml bcon # load it exclusively
```

## Display rotation

For tablets or portrait monitors, add this to your configuration:

```toml
[display]
rotation = 90

[font]
render_mode = "grayscale"
```

`rotation` accepts `0` (default), `90`, `180`, or `270`, clockwise. Restart
bcon after changing it. Quarter turns swap the terminal's logical width and
height; text, images, UI, and pointer coordinates use the same rotation.
Invalid positive angles fall back to `0` with a warning.

Grayscale avoids color fringes when the rotated content no longer matches the
panel's subpixel layout. To retain LCD rendering, choose `lcd_subpixel` for the
rotated layout (`rgb`, `bgr`, `vrgb`, or `vbgr`). Restart after changing the font
rendering mode or subpixel layout as well.

For `bcon@tty2.service`, edit `/etc/bcon/config.toml` and restart with
`sudo systemctl restart bcon@tty2`, then switch to tty2 with `Ctrl+Alt+F2`.
Rootless sessions can use `~/.config/bcon/config.toml`.

## Available Presets

| Preset | Description |
Expand Down Expand Up @@ -109,6 +135,7 @@ speed = 1.0 # Cursor speed multiplier (default: 1.0)
[display]
prefer_external = true # Prefer external monitors (HDMI/DP) over internal
auto_switch = true # Auto-switch on hotplug connect/disconnect
rotation = 0 # Clockwise degrees: 0, 90, 180, or 270; restart to apply

[drm]
device = "auto" # "auto" probes each GPU and selects one with a connected display
Expand Down
9 changes: 8 additions & 1 deletion docs/installation.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@ bcon はデフォルトで libseat 対応。以下が可能:

同じバイナリが `sudo` でもユーザーセッションでも動作します。

rootless で試す場合は空いているテキスト VT(GNOME では通常
`Ctrl+Alt+F3`)に切り替え、
そこでログインしてから `bcon --backend=seatd` を実行します。この対話的な
起動では getty を停止する必要はありません。ログイン後は getty から
ログインセッションへ VT が引き継がれています。システムサービスから
VT 上で bcon を直接起動する場合は、同じ VT の競合を避けるため
その VT の getty を停止してください。


## Arch Linux ユーザー向け
Debian/Ubuntu と比べていくつか違いがあります。
Expand Down Expand Up @@ -191,4 +199,3 @@ yay -S bcon
4. ユーザーログインセッション

セッションファイル (`bcon-session`, `bcon.desktop`) は AUR パッケージが最終配置先に直接インストールするため、手動コピーは不要です。

7 changes: 6 additions & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ bcon includes libseat support by default, enabling:

The same binary works both with `sudo` and as a user session.

For a rootless run, switch to an unused text VT (often `Ctrl+Alt+F3` on
GNOME), log in there, and run `bcon --backend=seatd` from that login shell.
You do not need to disable getty for this interactive setup: getty has already
handed the VT to your login session. If a system service starts bcon directly
on a VT instead, disable that VT's getty so the two services do not own it.


## For Arch Linux Users
There are some differences compared to Debian/Ubuntu.
Expand Down Expand Up @@ -192,4 +198,3 @@ yay -S bcon
4. User Login Session

Session files (`bcon-session`, `bcon.desktop`) are installed in their final locations by the AUR package, so no manual deployment is needed.

8 changes: 8 additions & 0 deletions docs/keybinds.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
| 次のタブ | `Ctrl+Shift+PageDown` | 同左 | 同左 | 次のタブに切替 |
| 前のタブ | `Ctrl+Shift+PageUp` | 同左 | 同左 | 前のタブに切替 |

## テンキー

NumLock が OFF のとき、テンキーの矢印・Home・End・PageUp・PageDown・Insert・Delete
は独立した同名のキーと同じように動作し、bcon のキーバインドにも使えます。
NumLock が ON のときは数字を入力します。追加設定は不要です。
動作は XKB レイアウトが選ぶキーシンボルに従います。レイアウトによっては
Shift を押すと NumLock の動作が一時的に反転します。

## カスタムキーバインド

1つのアクションに複数のキーを割り当て可能:
Expand Down
8 changes: 8 additions & 0 deletions docs/keybinds.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ English | **[Japanese](keybinds.ja.md)**
| Next Tab | `Ctrl+Shift+PageDown` | same | same | Switch to next tab |
| Prev Tab | `Ctrl+Shift+PageUp` | same | same | Switch to previous tab |

## Numeric keypad

With NumLock off, keypad arrows, Home, End, PageUp, PageDown, Insert, and Delete
work like the dedicated navigation keys, including bcon keybinds. With NumLock
on, the keypad continues to enter digits. No extra configuration is required.
The keysym selected by your XKB layout determines the behavior; some layouts
make Shift temporarily reverse NumLock.

## Custom Keybinds

Multiple keys can be assigned to a single action in config:
Expand Down
Loading
Loading