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
5 changes: 3 additions & 2 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,16 @@ To stop automatic updates, turn off "Update automatically" in the "Update" tab.
To stop the tool, press "Quit KxFCM" twice in the "General" tab of the settings screen.
The tab disappears when the tool quits.
The tool starts again the next time Frame starts.
To bring it back right away, run the following command in a terminal.
To bring it back right away, choose "KxFrameControllerManager" from "Launch a program" in the VR menu.
Running the following command in a terminal does the same.

```sh
~/.local/bin/kx-frame-controller-manager start
```

If you do not want the tool to start with Frame, turn off "Start automatically with Frame" in the same tab.
Turning it off does not stop the running tool.
From then on, the tool runs only when you run `start` above.
From then on, the tool runs only when you choose it from "Launch a program" or run `start` above.
From a terminal, `autostart on` and `autostart off` switch it, and `autostart` alone shows the current state.

## Uninstalling
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,16 @@ SteamVR のコントローラーバインド画面で KxFrameControllerManager
本ツールを止めるときは、設定画面の「全般」のタブで「KxFCM を終了」を 2 回押す。
終了するとタブも消える。
次に Frame を起動したときに、本ツールも起動し直す。
すぐに戻すときは、端末から次のコマンドを実行する。
すぐに戻すときは、VR のメニューの「プログラムを起動」から「KxFrameControllerManager」を選ぶ。
端末から次のコマンドを実行しても同じである。

```sh
~/.local/bin/kx-frame-controller-manager start
```

Frame の起動時に本ツールを起動させたくないときは、同じタブで「Frame の起動時に自動で起動」を OFF にする。
OFF にしても、動いている本ツールはそのまま動き続ける。
以後は上の `start` を実行したときだけ動く。
以後は「プログラムを起動」から選んだときか、上の `start` を実行したときだけ動く。
端末からは `autostart on` と `autostart off` で切り替えられ、`autostart` だけなら今の状態を表示する。

## アンインストール
Expand Down
3 changes: 3 additions & 0 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ src/
scheduler.cr 主ループの 1 拍で何を呼ぶか
cli.cr コマンドの解釈
systemd.cr ユニットの書き出し、systemctl --user の呼び出し、自動起動の状態の読み取り
desktop_entry.cr VR のメニューの「プログラムを起動」に出す .desktop の書き出しと削除
error/
usecase.cr 例外のログ記録
actions/ SteamVR Input のアクションマニフェストと frame_controller の既定バインド
Expand Down Expand Up @@ -184,6 +185,8 @@ SteamVR が動いていないことは `VRInitError_Init_NoServerForBackgroundAp

vrmanifest は接続のたびに書き出し直して登録する。
目的は SteamVR のコントローラーバインド画面に本ツールを出すことであり、自動起動には使わない。
VR のメニューの「プログラムを起動」の一覧も vrmanifest からは作られない。
その一覧は Steam が `.desktop` ファイルから作るため、`Runtime::DesktopEntry` が別に書き出す([導入](setup.md#vr-のメニューからの起動))。
実行ファイルのパスは `binary_path_linux` に書く。

## 仕様書からの変更点
Expand Down
1 change: 1 addition & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,4 @@ crystal run scripts/preview_dashboard.cr -- tmp/dashboard-preview
- SteamVR の起動でつながり、vrmanifest を登録できること
- SteamVR の終了で OpenVR を閉じ、次の起動でつなぎ直すこと
- `IVRSystem_026` と `IVRApplications_008` が `VR_IsInterfaceVersionValid` を通ること
- VR のメニューの「プログラムを起動」の一覧に「KxFrameControllerManager」が出て、選ぶと常駐が起動すること
20 changes: 19 additions & 1 deletion docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ SteamVR そのものは再起動しない。
| ログ | `~/.local/state/KxFrameControllerManager/logs/` |
| 省電力で変える前の値 | `~/.local/state/KxFrameControllerManager/power_save.json` |
| systemd のユニット | `~/.config/systemd/user/kx-frame-controller-manager.service` |
| 「プログラムを起動」の項目 | `~/.local/share/applications/kx-frame-controller-manager.desktop` |

## 常駐の管理

Expand Down Expand Up @@ -177,6 +178,23 @@ journalctl --user -u kx-frame-controller-manager # ログ
タイマーから起きた更新は、常駐が止まっていれば実行ファイルを置き換えるだけで、常駐を起動しない。
終了した常駐や、自動起動を無効にした常駐を、更新が勝手に起こすことはない。

### VR のメニューからの起動

VR のメニューの「プログラムを起動」には「KxFrameControllerManager」が出る。
選ぶと `start` を実行する。常駐が既に動いていれば何も起きない。

この一覧は Steam が作る。
Steam は `~/.local/share/applications/` などにある `.desktop` ファイルを集めて並べ、選ばれたらその `Exec` の行を実行する。
vrmanifest の登録はこの一覧に関わらない。
本ツールは `install` のときと、常駐が起動するたびに `kx-frame-controller-manager.desktop` を書き出す。
常駐の起動のたびに書くのは、自動更新が `install` を通らずに版を上げるためである。
この項目が無い版から自動更新で上げた環境にも、新しい版が起動した時点で入る。
`uninstall` はこのファイルも消す。
Steam のファイル(`shortcuts.vdf` など)は書き換えない。

書き出した直後は一覧に出ないことがある。
Steam が一覧を作り直すまでの間である。一覧を一度開き直すか、Frame を再起動すると出る。

`install` をやり直すと(導入の 1 行の再実行を含む)、自動起動は有効に戻る。
`install` は導入の手順そのものであり、利用者が明示して実行するためである。

Expand All @@ -188,7 +206,7 @@ journalctl --user -u kx-frame-controller-manager # ログ

```sh
~/.local/bin/kx-frame-controller-manager update # 待たずに確かめ、新しい版があれば置き換えて起動し直す
~/.local/bin/kx-frame-controller-manager uninstall # ユニットとタイマーを止めて消す
~/.local/bin/kx-frame-controller-manager uninstall # ユニットとタイマーを止めて消し、「プログラムを起動」の項目も消す
```

導入の 1 行をもう一度実行しても、最新の版へ置き換えて起動し直す。
Expand Down
2 changes: 2 additions & 0 deletions docs/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ v1 として予定した機能はひととおり入っている。
- SteamVR のダッシュボードに設定画面のタブ「KxFCM」が出る。状態の確認、手動の切断、ボタンの割り当てと時間と省電力の設定、更新、表示言語の切り替えができる。状態の「切断機能」は、上の `127.0.0.1:27062` へ届くかを表す
- systemd のユーザーユニットで常駐する。導入は `curl ... | bash` の 1 行で済む
- 設定画面か `start`、`stop`、`autostart` のコマンドで、常駐を終え、起動し、自動起動を切り替えられる
- VR のメニューの「プログラムを起動」に「KxFrameControllerManager」が出て、選ぶと常駐を起動する
- 自動更新のタイマーが新しい版を確かめて置き換え、起動しなければ元の版へ戻す
- 両方が切れている間は明るさと画質を下げる省電力が使える。既定では省電力も明るさを下げる項目も無効なので、設定画面か設定ファイルで有効にする

Expand All @@ -25,5 +26,6 @@ v1 として予定した機能はひととおり入っている。
- Background アプリから SteamVR Input が読めるか
- 振動が出るか
- 設定画面からの終了と自動起動の切り替え(2026-11-10 追加)
- 「プログラムを起動」の一覧に出ること、選んで常駐が起動すること(2026-11-10 追加)

実機でしか確かめられない項目の一覧は、[開発ガイド](development.md#実機でしか確かめられないこと)にある。
4 changes: 3 additions & 1 deletion locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"disconnect.unconfirmed": "{target}: Anfrage gesendet, Trennung aber nicht bestätigt ({serial})",
"disconnect.send_failed": "{target}: Anfrage konnte nicht gesendet werden ({serial})",
"install.done": "Unit geschrieben und gestartet: {path}\nProgrammdatei: {executable}",
"install.desktop_entry": "Zu „Programm starten“ im VR-Menü hinzugefügt: {path}",
"install.failed": "Aktivieren der Unit fehlgeschlagen. Prüfen Sie die Ausgabe von systemctl oben",
"uninstall.done": "Unit gestoppt und entfernt",
"uninstall.failed": "Entfernen der Unit fehlgeschlagen. Prüfen Sie die Ausgabe von systemctl oben",
Expand Down Expand Up @@ -203,5 +204,6 @@
"steamvr.description": "Schaltet Steam-Frame-Controller durch langes Drücken aus.",
"steamvr.action_set": "KxFrameControllerManager",
"steamvr.action.power_off": "Diesen Controller ausschalten (halten)",
"steamvr.action.haptic": "Haptisches Feedback"
"steamvr.action.haptic": "Haptisches Feedback",
"desktop_entry.comment": "Startet KxFCM, das Steam-Frame-Controller per langem Drücken ausschaltet"
}
4 changes: 3 additions & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"disconnect.unconfirmed": "{target}: sent the request, but could not confirm the disconnect ({serial})",
"disconnect.send_failed": "{target}: could not send the request ({serial})",
"install.done": "Wrote and started the unit: {path}\nExecutable: {executable}",
"install.desktop_entry": "Added to \"Launch a program\" in the VR menu: {path}",
"install.failed": "Failed to enable the unit. Check the systemctl output above",
"uninstall.done": "Stopped and removed the unit",
"uninstall.failed": "Failed to remove the unit. Check the systemctl output above",
Expand Down Expand Up @@ -203,5 +204,6 @@
"steamvr.description": "Turns off Steam Frame controllers with a long press.",
"steamvr.action_set": "KxFrameControllerManager",
"steamvr.action.power_off": "Turn off this controller (hold)",
"steamvr.action.haptic": "Haptic feedback"
"steamvr.action.haptic": "Haptic feedback",
"desktop_entry.comment": "Starts KxFCM, which turns off Steam Frame controllers with a long press"
}
4 changes: 3 additions & 1 deletion locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"disconnect.unconfirmed": "{target}: se envió la solicitud, pero no se pudo confirmar la desconexión ({serial})",
"disconnect.send_failed": "{target}: no se pudo enviar la solicitud ({serial})",
"install.done": "Unidad escrita e iniciada: {path}\nEjecutable: {executable}",
"install.desktop_entry": "Añadido a «Iniciar un programa» en el menú de RV: {path}",
"install.failed": "No se pudo activar la unidad. Revisa la salida de systemctl de arriba",
"uninstall.done": "Unidad detenida y eliminada",
"uninstall.failed": "No se pudo eliminar la unidad. Revisa la salida de systemctl de arriba",
Expand Down Expand Up @@ -203,5 +204,6 @@
"steamvr.description": "Apaga los mandos de Steam Frame con una pulsación larga.",
"steamvr.action_set": "KxFrameControllerManager",
"steamvr.action.power_off": "Apagar este mando (mantener)",
"steamvr.action.haptic": "Vibración"
"steamvr.action.haptic": "Vibración",
"desktop_entry.comment": "Inicia KxFCM, que apaga los mandos de Steam Frame con una pulsación larga"
}
4 changes: 3 additions & 1 deletion locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"disconnect.unconfirmed": "{target} : requête envoyée, mais déconnexion non confirmée ({serial})",
"disconnect.send_failed": "{target} : impossible d'envoyer la requête ({serial})",
"install.done": "Unité écrite et démarrée : {path}\nExécutable : {executable}",
"install.desktop_entry": "Ajouté à « Lancer un programme » dans le menu VR : {path}",
"install.failed": "Échec de l'activation de l'unité. Consultez la sortie de systemctl ci-dessus",
"uninstall.done": "Unité arrêtée et supprimée",
"uninstall.failed": "Échec de la suppression de l'unité. Consultez la sortie de systemctl ci-dessus",
Expand Down Expand Up @@ -203,5 +204,6 @@
"steamvr.description": "Éteint les manettes Steam Frame par un appui long.",
"steamvr.action_set": "KxFrameControllerManager",
"steamvr.action.power_off": "Éteindre cette manette (appui long)",
"steamvr.action.haptic": "Retour haptique"
"steamvr.action.haptic": "Retour haptique",
"desktop_entry.comment": "Démarre KxFCM, qui éteint les manettes Steam Frame par un appui long"
}
4 changes: 3 additions & 1 deletion locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"disconnect.unconfirmed": "{target}: 切断要求を送りましたが、切れたことを確かめられませんでした({serial})",
"disconnect.send_failed": "{target}: 切断要求を送れませんでした({serial})",
"install.done": "ユニットを書き出して起動しました: {path}\n実行ファイル: {executable}",
"install.desktop_entry": "VR のメニューの「プログラムを起動」に追加しました: {path}",
"install.failed": "ユニットの有効化に失敗しました。上の systemctl の出力を確かめてください",
"uninstall.done": "ユニットを止めて消しました",
"uninstall.failed": "ユニットの解除に失敗しました。上の systemctl の出力を確かめてください",
Expand Down Expand Up @@ -203,5 +204,6 @@
"steamvr.description": "長押しで Steam Frame のコントローラーを切断します。",
"steamvr.action_set": "KxFrameControllerManager",
"steamvr.action.power_off": "このコントローラーを切断(長押し)",
"steamvr.action.haptic": "振動"
"steamvr.action.haptic": "振動",
"desktop_entry.comment": "KxFCM の常駐を起動します。長押しで Steam Frame のコントローラーを切断します"
}
4 changes: 3 additions & 1 deletion locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"disconnect.unconfirmed": "{target}: 요청을 보냈지만 연결이 끊긴 것을 확인하지 못했습니다 ({serial})",
"disconnect.send_failed": "{target}: 요청을 보내지 못했습니다 ({serial})",
"install.done": "유닛을 작성하고 시작했습니다: {path}\n실행 파일: {executable}",
"install.desktop_entry": "VR 메뉴의 \"프로그램 실행\"에 추가했습니다: {path}",
"install.failed": "유닛 활성화에 실패했습니다. 위의 systemctl 출력을 확인하세요",
"uninstall.done": "유닛을 중지하고 삭제했습니다",
"uninstall.failed": "유닛 삭제에 실패했습니다. 위의 systemctl 출력을 확인하세요",
Expand Down Expand Up @@ -203,5 +204,6 @@
"steamvr.description": "길게 눌러 Steam Frame 컨트롤러의 전원을 끕니다.",
"steamvr.action_set": "KxFrameControllerManager",
"steamvr.action.power_off": "이 컨트롤러 연결 끊기 (길게 누르기)",
"steamvr.action.haptic": "진동"
"steamvr.action.haptic": "진동",
"desktop_entry.comment": "KxFCM 상주 프로그램을 시작합니다. 길게 눌러 Steam Frame 컨트롤러를 끕니다"
}
4 changes: 3 additions & 1 deletion locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"disconnect.unconfirmed": "{target}: запрос отправлен, но отключение не подтверждено ({serial})",
"disconnect.send_failed": "{target}: не удалось отправить запрос ({serial})",
"install.done": "Юнит записан и запущен: {path}\nИсполняемый файл: {executable}",
"install.desktop_entry": "Добавлено в «Запустить программу» в меню VR: {path}",
"install.failed": "Не удалось включить юнит. Проверьте вывод systemctl выше",
"uninstall.done": "Юнит остановлен и удалён",
"uninstall.failed": "Не удалось удалить юнит. Проверьте вывод systemctl выше",
Expand Down Expand Up @@ -203,5 +204,6 @@
"steamvr.description": "Выключает контроллеры Steam Frame долгим нажатием.",
"steamvr.action_set": "KxFrameControllerManager",
"steamvr.action.power_off": "Выключить этот контроллер (удерживать)",
"steamvr.action.haptic": "Вибрация"
"steamvr.action.haptic": "Вибрация",
"desktop_entry.comment": "Запускает KxFCM, который выключает контроллеры Steam Frame долгим нажатием"
}
4 changes: 3 additions & 1 deletion locales/zh-Hans.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"disconnect.unconfirmed": "{target}: 已发送断开请求,但无法确认已断开({serial})",
"disconnect.send_failed": "{target}: 无法发送断开请求({serial})",
"install.done": "已写入并启动单元: {path}\n可执行文件: {executable}",
"install.desktop_entry": "已添加到 VR 菜单的“启动程序”: {path}",
"install.failed": "启用单元失败。请查看上方 systemctl 的输出",
"uninstall.done": "已停止并删除单元",
"uninstall.failed": "删除单元失败。请查看上方 systemctl 的输出",
Expand Down Expand Up @@ -203,5 +204,6 @@
"steamvr.description": "长按即可关闭 Steam Frame 的控制器。",
"steamvr.action_set": "KxFrameControllerManager",
"steamvr.action.power_off": "断开此控制器(长按)",
"steamvr.action.haptic": "振动"
"steamvr.action.haptic": "振动",
"desktop_entry.comment": "启动 KxFCM 常驻程序。长按即可断开 Steam Frame 控制器"
}
4 changes: 3 additions & 1 deletion locales/zh-Hant.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"disconnect.unconfirmed": "{target}: 已送出中斷請求,但無法確認已中斷({serial})",
"disconnect.send_failed": "{target}: 無法送出中斷請求({serial})",
"install.done": "已寫入並啟動單元: {path}\n執行檔: {executable}",
"install.desktop_entry": "已加入 VR 選單的「啟動程式」: {path}",
"install.failed": "啟用單元失敗。請查看上方 systemctl 的輸出",
"uninstall.done": "已停止並移除單元",
"uninstall.failed": "移除單元失敗。請查看上方 systemctl 的輸出",
Expand Down Expand Up @@ -203,5 +204,6 @@
"steamvr.description": "長按即可關閉 Steam Frame 的控制器。",
"steamvr.action_set": "KxFrameControllerManager",
"steamvr.action.power_off": "中斷此控制器(長按)",
"steamvr.action.haptic": "震動"
"steamvr.action.haptic": "震動",
"desktop_entry.comment": "啟動 KxFCM 常駐程式。長按即可中斷 Steam Frame 控制器"
}
Loading
Loading