Skip to content

Commit

Permalink
(#26) Put window selection feature under experimental flag
Browse files Browse the repository at this point in the history
  • Loading branch information
rexim committed Dec 26, 2019
1 parent fbeadeb commit 9416175
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
30 changes: 8 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,16 @@ $ nimble build -d:developer
This will enable:
- Reloading the shaders with `Ctrl+R`

## Experimental Live Update
## Experimental Features Compilation Flags

See issue [#26]. For an experimental Live Update feature compile the application with the following flags:
Experimental or unstable features can be enabled by passing the following flags to `nimble build` command:

```console
$ nimble build -d:live
```

Live update feature makes more sense right now in the windowed mode to enabled windowed mode use the following flags:

```console
$ nimble build -d:live -d:windowed
```

For a faster Live Update feature based on MIT-SHM X11 extension use `-d:mitshm`:

```console
$ nimble build -d:live -d:windowed -d:mitshm
```

The MIT-SHM support would probably not work for you until
[nim-lang/x11#31](https://github.com/nim-lang/x11/pull/31) is merged.

The feature is really unstable and experimental, so use it at your own risk.
| Flag | Description |
|---------------|--------------------------------------------------------------------------------------------------------------------------------|
| `-d:live` | Live image update. See issue [#26]. |
| `-d:mitshm` | Enables fater Live image update using MIT-SHM X11 extension. Should be used along with `-d:live` to have an effect |
| `-d:windowed` | Run boomer in windowed mode instead of fullscreen. |
| `-d:select` | Application lets the user to click on te window to "track" and it will track that specific window instead of the whole screen. |

## NixOS Overlay

Expand Down
8 changes: 6 additions & 2 deletions src/boomer.nim
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,12 @@ proc main() =
defer:
discard XCloseDisplay(display)

echo "Please select window:"
var trackingWindow = selectWindow(display)

when defined(select):
echo "Please select window:"
var trackingWindow = selectWindow(display)
else:
var trackingWindow = DefaultRootWindow(display)

var screenConfig = XRRGetScreenInfo(display, DefaultRootWindow(display))
let rate = XRRConfigCurrentRate(screenConfig)
Expand Down

0 comments on commit 9416175

Please sign in to comment.