Skip to content

feat: Add sound theme preset system (v0.1.5)#1

Open
llongmane584 wants to merge 1 commit into
GOROman:mainfrom
llongmane584:feature/sound-theme-presets
Open

feat: Add sound theme preset system (v0.1.5)#1
llongmane584 wants to merge 1 commit into
GOROman:mainfrom
llongmane584:feature/sound-theme-presets

Conversation

@llongmane584

Copy link
Copy Markdown

Summary

Add a sound theme preset system that allows users to switch between multiple keyboard sound themes or create
their own custom themes.

Backwards compatible - Existing behavior is preserved as the "default" theme, so no breaking changes for
current users.


概要

サウンドテーマのプリセットシステムを追加しました。
複数のキーボード音テーマを切り替えたり、独自のテーマを作成できるようになります。

後方互換性あり - 既存の動作はデフォルトテーマとして維持されるため、現在のユーザーに影響はありません。

変更内容

新機能

  • --theme <name> オプションでサウンドテーマを指定可能
  • --theme list で利用可能なテーマ一覧を表示
  • 各テーマは sounds/<theme-name>/ ディレクトリ + theme.json で定義

ディレクトリ構成の変更

既存のサウンドファイルを sounds/default/ へ移動し、テーマごとにディレクトリを分離する構成に変更しました。

sounds/
├── default/
│ ├── theme.json
│ └── *.mp3
└── custom-theme/
├── theme.json
└── *.mp3

使用例

# テーマ一覧を表示
human-like --theme list

# 特定のテーマでタイピング
human-like --theme tofu-tkl-boba-u4t-pbs-ap1 "Hello, World!"

# テーマを指定してデーモン起動
human-like --theme mytheme --daemon start

同梱テーマ
テーマ名: default
説明: オリジナルのPC keyboard音源
────────────────────────────────────────
テーマ名: tofu-tkl-boba-u4t-pbs-ap1
説明: KBDfans TOFU TKL + Boba U4T スイッチ + PBS Aperture Priority の打鍵音(自作キーボードを自分で録音した素材です)

テスト

- 既存のテストは全てパス
- テーマ関連の新規テストを追加済み

---
🤖 Generated with https://claude.ai/code

---

- Restructure sounds/ directory with theme-based organization
- Add theme.json manifest for theme metadata and sound mappings
- Implement theme management functions (list_themes, load_theme_config, etc.)
- Add --theme CLI option to select sound themes
- Add --theme list command to show available themes
- Support custom theme creation by users
- Update README.md with theme documentation
- Add Japanese README.ja.md
- All existing tests pass, new theme tests added

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 17, 2026 03:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a sound theme preset system (v0.1.5) that allows users to switch between multiple keyboard sound themes or create custom themes. The implementation is backwards compatible, preserving existing behavior as the "default" theme.

Changes:

  • Added theme management system with --theme CLI option
  • Reorganized sound files into theme-specific directories (sounds/default/, sounds/tofu-tkl-boba-u4t-pbs-ap1/)
  • Added comprehensive test coverage for theme-related functionality

Reviewed changes

Copilot reviewed 8 out of 24 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/human_like/sound.py Added theme management functions (list_themes, load_theme_config, get_theme_sound_files) and ThemeConfig dataclass
src/human_like/cli.py Added --theme option, handle_theme_list function, and theme validation in daemon commands
tests/test_sound.py Added comprehensive tests for theme functionality (list, load, validate)
sounds/default/theme.json Configuration for default theme with PC keyboard sounds
sounds/tofu-tkl-boba-u4t-pbs-ap1/theme.json Configuration for custom mechanical keyboard theme
pyproject.toml Version bump from 0.1.4 to 0.1.5
README.md Added documentation for theme system, usage examples, and custom theme creation guide

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants