diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 0000000..535d22d
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1 @@
+github: Xarishark
diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml
new file mode 100644
index 0000000..f3d7c45
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature.yml
@@ -0,0 +1,34 @@
+name: Feature request
+description: Something Director should do, or an external tool it could replace
+labels: [enhancement]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Director aims to do its job without helper tools. If you use an external command-line tool or script for displays, sound, TVs, frame-rate limits, or apps and links around a scene, tell us which one; the goal is to build it in natively.
+ - type: textarea
+ id: goal
+ attributes:
+ label: What do you want to do?
+ description: The setup or switch you're trying to make, in your own words.
+ validations:
+ required: true
+ - type: input
+ id: tool
+ attributes:
+ label: Tool or script this would replace
+ description: Optional. For example NirCmd, a display-switching CLI, rtss-cli, or a TV script, with the command you run.
+ - type: dropdown
+ id: where
+ attributes:
+ label: Where would you use it?
+ multiple: true
+ options:
+ - In a scene
+ - On the Now page
+ - From the command line, a shortcut or a Stream Deck
+ - type: input
+ id: hardware
+ attributes:
+ label: Hardware involved
+ description: GPU, monitors, audio devices or TV model, if it matters.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index c51918c..0aecec9 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -7,6 +7,7 @@ Thanks for helping. Bug reports, TV compatibility reports and pull requests are
- **Crashes**: Director saves a crash report and offers **Report on GitHub** the next time it starts. That opens a pre-filled issue; attach the crash file from `%LOCALAPPDATA%\Director\Logs\Crashes` if you can.
- **Bugs**: open an issue with your Windows version, your Director version (`director --version` or **Options โ About**), the steps that went wrong, and recent log lines from **Options โ Open logs folder** if they help. Logs never contain pairing keys, but they can contain device names; trim anything you'd rather not share.
- **TV compatibility**: follow [Test a Samsung or TCL TV](docs/TV_TESTING.md) and attach the exported report.
+- **Feature requests**: use the [feature request form](https://github.com/Xarishark/Director/issues/new?template=feature.yml). If an external command-line tool or script fills a gap in your setup, name it; the aim is to build it into Director.
- **Security issues**: please don't open a public issue; see [SECURITY.md](SECURITY.md).
## Building
diff --git a/README.md b/README.md
index a1af9a7..e6d8f7a 100644
--- a/README.md
+++ b/README.md
@@ -1,27 +1,66 @@
-

+
Director
-Switch your monitors, sound, and TV with one scene.
-Windows x64 ยท Preview
-
-Latest release ยท All releases
-
-Moving from your desk to the living room? A **TV Gaming** scene can wake the TV, switch your picture and sound to HDMI, cap the frame rate, and open Steam Big Picture. A **Desk** scene puts everything back. Every change is checked, and if a step fails Director restores what it changed.
+Switch your monitors, sound, TV and frame-rate limit with one click.
Desk to couch and back, from the window, a shortcut or a Stream Deck.
-
-
+
+
+
+
+
-## What it does
+
+
+
+
+
+All screenshots
+
+| | |
+| --- | --- |
+|
|
|
+| **Scenes**: switch everything in one click | **Scene steps**: run in order, undone together |
+|
|
|
+| **Now**: change screens, sound and FPS live | **Displays**: saved layouts with exact modes and HDR |
+|
| |
+| **TVs**: wake, switch inputs, turn off | |
+
+
+
+Moving from your desk to the living room? A **TV Gaming** scene wakes the TV, switches it to your PC, turns on the TV as your only screen, sends the sound over HDMI, caps the frame rate and opens Steam Big Picture. A **Desk** scene puts it all back. Director checks every change it makes, and if any step fails it restores what it changed.
+
+## Highlights
+
+- ๐บ **TV control built in.** Pair **LG webOS**, **Samsung Tizen** and **TCL Android / Google TV** TVs directly over your network to wake them, switch inputs and turn them off. You don't need Python or Node scripts, TV command-line tools or a companion app. LG is fully supported; Samsung and TCL support is an early trial that still needs testing on real TVs, and [test reports](docs/TV_TESTING.md) are very welcome. [TVs โ](docs/TVS.md)
+- ๐ฌ **Scenes run as one flow.** Before โ TV โ Displays โ Sound โ FPS limit โ After, in that order, with each change checked. If a step fails, Director restores your displays, default devices, volumes and FPS limit together. [Scenes โ](docs/SCENES.md)
+- โณ **Waits for your hardware.** A scene waits for the TV to wake and report the right input, then for its HDMI audio to appear after the screens switch. It never quietly picks a different device. **TV input protection** takes the input back when a console or streaming box grabs it at power-on.
+- ๐ฏ **Frame-rate limits.** Set the global NVIDIA or RTSS limit per scene, including a **VRR-safe cap** worked out from the refresh rate of the screen you just switched to. [FPS โ](docs/FPS.md)
+- ๐ช **Leave and come back.** When-leaving steps close what the scene opened (for example `steam://close/bigpicture`), turn the TV off, and **End** returns you to your desk scene.
+- ๐ฅ๏ธ **Sets up screens that are off.** Detects a TV's real resolutions, refresh rates and HDR by turning it on briefly, then restores your layout, so you can build its preset while it's off. [Displays โ](docs/DISPLAYS.md)
+
+## What a scene can change
+
+| Area | What you can set |
+| --- | --- |
+| **Displays** | Which screens are on, their arrangement and primary, resolution, exact refresh rate, orientation, extend or mirror, and HDR |
+| **Sound** | Default output (or the TV's HDMI audio), volume, mute, a separate calls device, and the microphone with its own volume and mute |
+| **TV** | Wake it, switch to your PC's input, keep that input, turn it off when you leave |
+| **FPS limit** | Global NVIDIA or RTSS limit, a VRR-safe cap, or no limit |
+| **Apps and links** | Run apps (optionally waiting for them), open links or URIs, close apps, before, after or when leaving |
+| **Return** | The scene to go back to when you end this one: **End** (or running the scene again) runs its leave steps and then applies the Return scene, for example your Default desk setup |
+
+**Now** changes the same things live without saving anything, and every command is also available from the [command line](#command-line).
+
+## No helper tools needed
+
+Director talks to Windows, the NVIDIA driver, RTSS and your TV directly, from one native app written in Rust with a WinUI 3 interface. Setups held together with NirCmd, display-switching command-line tools, rtss-cli or TV scripts can retire them.
-- **Scenes** switch everything together: a display layout, sound, a TV, an FPS limit, and apps or links to run before, after or when you leave. Run one from the window, a shortcut, a script or a Stream Deck.
-- **Now** changes what's active right now without saving anything: arrange and switch screens, pick the output and volume, set the FPS limit.
-- **Displays** saves monitor layouts: which screens are on, their arrangement, primary, resolution, refresh rate, orientation, mirroring and HDR.
-- **TVs** pairs LG webOS TVs (plus Samsung Tizen and TCL Android / Google TV as previews) to wake them, switch inputs and turn them off over your network.
+**Still using an external command-line tool for something in this space?** If it's about displays, sound, TVs, frame-rate limits, or apps and links around a scene, [open a feature request](https://github.com/Xarishark/Director/issues/new?template=feature.yml) saying which tool and what you use it for. The goal is to build that into Director natively.
## Install
-Director needs **Windows 11, version 24H2 or newer** (x64). Download **Director-x64-setup.exe** with the button above and run it; setup installs the Windows App Runtime if it's missing and adds `director` to PATH. See [Install](docs/INSTALL.md) for details, quiet installs and uninstalling.
+Director needs **Windows 11, version 24H2 or newer** (x64), because switching HDR per screen uses display APIs that Windows added in 24H2. Download **Director-x64-setup.exe** with the button above and run it. Setup installs the Windows App Runtime if it's missing and adds `director` to PATH. See [Install](docs/INSTALL.md) for quiet installs, updates and uninstalling.
## Quick start
@@ -32,18 +71,52 @@ Director needs **Windows 11, version 24H2 or newer** (x64). Download **Director-
## Command line
-Every scene, preset, TV, screen and audio device has a CLI name: its name in lowercase with dashes, so "TV Gaming" is `tv-gaming`. The **>\_** button next to a name copies the exact command.
+Every scene, preset, TV, screen and audio device has a CLI name: its name in lowercase with dashes, so "TV Gaming" is `tv-gaming`. The **>\_** button next to a name copies the exact command, ready for a [Stream Deck button or shortcut](#stream-deck-and-shortcuts).
```powershell
-director list
director scene apply tv-gaming
director scene end
director display apply desk-monitors
director audio volume +5
director tv toggle living-room-tv
+director fps set nvidia vrr
+director list
+```
+
+`director --help` lists every command. Commands run without opening the window and return a non-zero exit code when something fails.
+
+## Stream Deck and shortcuts
+
+To run a command from a Stream Deck button, a desktop shortcut or a hotkey tool without a terminal window ever appearing, start it through Windows' console host in headless mode:
+
+```text
+conhost.exe --headless cmd.exe /c director scene apply tv-gaming
```
-`director --help` lists every command. Commands run without opening the window.
+On a Stream Deck, add a **System โ Open** action and paste the whole line into its **App / File** field. Some useful buttons:
+
+| Button | Command |
+| --- | --- |
+| Couch โ desk | `conhost.exe --headless cmd.exe /c director scene apply tv-gaming` |
+| Back to desk | `conhost.exe --headless cmd.exe /c director scene end` |
+| Volume up / down | `conhost.exe --headless cmd.exe /c director audio volume +5` (or `-5`) |
+| Mute | `conhost.exe --headless cmd.exe /c director audio mute toggle` |
+| TV on / off | `conhost.exe --headless cmd.exe /c director tv toggle living-room-tv` |
+
+### One button to the couch and back
+
+1. Save your everyday setup as a scene: the **Save everyday scene** card on an empty Scenes page saves it as **Default**.
+2. Make a **TV Gaming** scene with the TV, the TV layout, **TV's sound** and anything else you want, such as an **After** link `steam://open/bigpicture` to open Steam Big Picture.
+3. Optionally, add a **When leaving** link `steam://close/bigpicture` and turn on **Turn off the TV when you leave this scene** in its Prepare TV step.
+4. In the TV Gaming scene, open **Return**, switch it on and choose **Default**. Save.
+5. On your Stream Deck, add a **System โ Open** action with `conhost.exe --headless cmd.exe /c director scene apply tv-gaming`.
+
+Now the same button does both:
+
+- **First press:** TV Gaming becomes active. The TV wakes, the screens and sound switch, and Big Picture opens.
+- **Second press:** because TV Gaming is already active, Director runs its leave steps (Big Picture closes, the TV turns off) and then applies Default.
+
+Turn on **Notify when CLI scenes fail** in Options to get a Windows notification if a press doesn't complete.
## Guides
@@ -53,6 +126,8 @@ director tv toggle living-room-tv
## Contributing
-Bug reports, TV compatibility reports and pull requests are welcome: see [CONTRIBUTING.md](CONTRIBUTING.md). Report security problems privately as described in [SECURITY.md](SECURITY.md). Release notes are in [CHANGELOG.md](CHANGELOG.md).
+Bug reports, TV test reports, feature requests and pull requests are welcome; see [CONTRIBUTING.md](CONTRIBUTING.md). Please report security problems privately as described in [SECURITY.md](SECURITY.md). Release notes are in [CHANGELOG.md](CHANGELOG.md).
+
+## License
-Director is written in Rust with a native WinUI 3 interface, and licensed under the [MIT License](LICENSE).
+[MIT](LICENSE). Third-party components are listed in [THIRD_PARTY_LICENSES.md](THIRD_PARTY_LICENSES.md).
diff --git a/docs/SCENES.md b/docs/SCENES.md
index 953d79a..874e8f2 100644
--- a/docs/SCENES.md
+++ b/docs/SCENES.md
@@ -48,7 +48,7 @@ Before running any leave steps, Director checks that the Return scene still exis
## Shortcuts and the command line
-The **>\_** button after a scene's name shows the commands for it, each with **Copy**: by CLI name (`director scene apply tv-gaming`, easy to read) and by ID (keeps working after a rename). Paste either into a Stream Deck action, a shortcut or a script. Setup adds `director` to PATH.
+The **>\_** button after a scene's name shows the commands for it, each with **Copy**: by CLI name (`director scene apply tv-gaming`, easy to read) and by ID (keeps working after a rename). Paste either into a Stream Deck action, a shortcut or a script. Setup adds `director` to PATH. To run it without a terminal window appearing, prefix it with `conhost.exe --headless cmd.exe /c`, as shown in the [README](../README.md#stream-deck-and-shortcuts). With a **Return** step, one button applies the scene and a second press takes you back.
```text
director scene list
diff --git a/docs/images/displays.png b/docs/images/displays.png
index 05b504b..17df9b9 100644
Binary files a/docs/images/displays.png and b/docs/images/displays.png differ
diff --git a/docs/images/now.png b/docs/images/now.png
new file mode 100644
index 0000000..178e0f6
Binary files /dev/null and b/docs/images/now.png differ
diff --git a/docs/images/scene-editor.png b/docs/images/scene-editor.png
new file mode 100644
index 0000000..e56a2da
Binary files /dev/null and b/docs/images/scene-editor.png differ
diff --git a/docs/images/scenes.png b/docs/images/scenes.png
index 5d8029f..b719c76 100644
Binary files a/docs/images/scenes.png and b/docs/images/scenes.png differ
diff --git a/docs/images/slideshow.webp b/docs/images/slideshow.webp
new file mode 100644
index 0000000..6fa8838
Binary files /dev/null and b/docs/images/slideshow.webp differ
diff --git a/docs/images/tv-controls.png b/docs/images/tv-controls.png
new file mode 100644
index 0000000..c4175bf
Binary files /dev/null and b/docs/images/tv-controls.png differ
diff --git a/src/gui/now_ui.rs b/src/gui/now_ui.rs
index 7ef6dbd..c50a9ae 100644
--- a/src/gui/now_ui.rs
+++ b/src/gui/now_ui.rs
@@ -264,6 +264,10 @@ impl DirectorApp {
if crate::gui::preset_cards_preview::ENABLED.load(std::sync::atomic::Ordering::Acquire) {
self.fps = crate::gui::fps_ui::FpsState::fixture();
self.now.fps_dirty = false;
+ let (layout, options) = crate::gui::preset_cards_preview::now_displays();
+ self.now.set_displays(layout, options);
+ self.now
+ .set_devices(self.outputs.clone(), self.inputs.clone());
return;
}
self.fps.live = None;
diff --git a/src/gui/preset_cards_preview.rs b/src/gui/preset_cards_preview.rs
index 835bbac..4da3f3c 100644
--- a/src/gui/preset_cards_preview.rs
+++ b/src/gui/preset_cards_preview.rs
@@ -14,6 +14,10 @@ pub(crate) fn output(name: &str) -> std::path::PathBuf {
std::fs::create_dir_all(&dir).unwrap();
dir.join(name)
}
+/// The demo screens and their modes, for the Now page in the preview.
+pub(crate) fn now_displays() -> (Layout, Vec) {
+ (layout(), options())
+}
fn layout() -> Layout {
let mut monitors = vec![];
for (i, name) in ["Desk monitor", "Portrait monitor", "Living room TV"]
diff --git a/src/gui/tv_controls_ui.rs b/src/gui/tv_controls_ui.rs
index d616ee1..8a76049 100644
--- a/src/gui/tv_controls_ui.rs
+++ b/src/gui/tv_controls_ui.rs
@@ -1006,7 +1006,7 @@ impl DirectorApp {
self.tv.ready_for_controls_preview();
self.tv.tvs = vec![Tv {
id: "test-controls-preview-missing-record".into(),
- name: "TV controls preview (test fixture)".into(),
+ name: "Living room TV".into(),
address: "192.0.2.50".into(),
brand: Default::default(),
samsung: Default::default(),
diff --git a/src/gui/tv_ui.rs b/src/gui/tv_ui.rs
index 02bd473..47ad144 100644
--- a/src/gui/tv_ui.rs
+++ b/src/gui/tv_ui.rs
@@ -1403,11 +1403,11 @@ impl DirectorApp {
self.tv.ready = true;
self.tv.displays = vec![DisplayLink {
device_path: "test-preview-display".into(),
- name: "Preview Windows display (test fixture)".into(),
+ name: "LG TV".into(),
}];
self.tv.draft = Some(Tv {
id: "test-guide-preview".into(),
- name: "TV guide preview (test fixture)".into(),
+ name: "Living room TV".into(),
address: "192.0.2.50".into(),
brand: Default::default(),
samsung: Default::default(),