replace firefox with chrome (#14)

This commit is contained in:
Hari 2026-03-26 15:25:40 -04:00 committed by GitHub
parent 580ea79c27
commit ff26c57035
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 61 additions and 63 deletions

View file

@ -30,8 +30,8 @@ Every desktop interaction follows: **observe -> wait -> act -> verify**.
```bash
deskctl snapshot --annotate # observe
deskctl wait window --selector 'title=Firefox' --timeout 10 # wait
deskctl click 'title=Firefox' # act
deskctl wait window --selector 'title=Chromium' --timeout 10 # wait
deskctl click 'title=Chromium' # act
deskctl snapshot # verify
```
@ -42,12 +42,12 @@ See [workflows/observe-act.sh](workflows/observe-act.sh) for a reusable script.
```bash
ref=w1 # snapshot ref (short-lived)
id=win1 # stable window ID (session-scoped)
title=Firefox # match by title
class=firefox # match by WM class
title=Chromium # match by title
class=chromium # match by WM class
focused # currently focused window
```
Bare strings like `firefox` do fuzzy matching but fail on ambiguity. Prefer explicit selectors.
Bare strings like `chromium` do fuzzy matching but fail on ambiguity. Prefer explicit selectors.
## References

View file

@ -23,8 +23,8 @@ deskctl get-mouse-position
## Wait
```bash
deskctl wait window --selector 'title=Firefox' --timeout 10
deskctl wait focus --selector 'class=firefox' --timeout 5
deskctl wait window --selector 'title=Chromium' --timeout 10
deskctl wait focus --selector 'class=chromium' --timeout 5
```
Returns the matched window payload on success. Failures include structured
@ -35,8 +35,8 @@ Returns the matched window payload on success. Failures include structured
```bash
ref=w1
id=win1
title=Firefox
class=firefox
title=Chromium
class=chromium
focused
```
@ -46,7 +46,7 @@ on ambiguity.
## Act
```bash
deskctl focus 'class=firefox'
deskctl focus 'class=chromium'
deskctl click @w1
deskctl dblclick @w2
deskctl type "hello world"
@ -59,7 +59,7 @@ deskctl mouse drag 100 100 500 500
deskctl move-window @w1 100 120
deskctl resize-window @w1 1280 720
deskctl close @w3
deskctl launch firefox
deskctl launch chromium
```
The daemon starts automatically on first command. In normal usage you should

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# observe-act.sh - main desktop interaction loop
# usage: ./observe-act.sh <selector> [action] [action-args...]
# example: ./observe-act.sh 'title=Firefox' click
# example: ./observe-act.sh 'title=Chromium' click
# example: ./observe-act.sh 'class=terminal' type "ls -la"
set -euo pipefail