2024-04-14 00:55:00 +02:00
|
|
|
# Greg-ng
|
2024-04-14 00:57:21 +02:00
|
|
|
|
2024-04-14 00:55:00 +02:00
|
|
|
New implementation of https://github.com/Programvareverkstedet/grzegorz
|
2024-08-04 04:18:43 +02:00
|
|
|
|
|
|
|
## Test it out
|
|
|
|
|
|
|
|
```sh
|
|
|
|
# NixOS
|
2025-01-06 16:32:29 +01:00
|
|
|
nix run "git+https://git.pvv.ntnu.no/Grzegorz/greg-ng#" -- --mpv-socket-path /tmp/mpv.sock
|
2024-08-04 04:18:43 +02:00
|
|
|
|
|
|
|
# Other (after git clone and rust toolchain has been set up)
|
|
|
|
cargo run -- --mpv-socket-path /tmp/mpv.sock
|
|
|
|
```
|
|
|
|
|
2025-01-06 16:32:29 +01:00
|
|
|
See also https://git.pvv.ntnu.no/Grzegorz/grzegorz-clients for frontend alternatives
|
2024-08-04 04:18:43 +02:00
|
|
|
|
|
|
|
## Debugging
|
|
|
|
|
|
|
|
```sh
|
|
|
|
RUST_LOG=greg_ng=trace,mpvipc=trace cargo run -- --mpv-socket-path /tmp/mpv.sock
|
|
|
|
```
|
2025-02-03 16:54:38 +01:00
|
|
|
|
|
|
|
Custom api call in curl examples
|
|
|
|
|
|
|
|
LOL with input command. (utilizing ydotools)
|
|
|
|
```sh
|
|
|
|
curl -X POST -H "Content-Type: application/json" -d '{"keys": "42:1 38:1 38:0 24:1 24:0 38:1 38:0 42:0"}' http://localhost:8008/api/v2/sway/input/keys
|
|
|
|
```
|
|
|
|
|
|
|
|
Launching DEFAULT_BROWSER with url, in --kiosk mode
|
|
|
|
```sh
|
|
|
|
curl -X POST -H "Content-Type: application/json" -d '{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}' http://localhost:8008/api/v2/sway/browser/launch
|
|
|
|
```
|
|
|
|
|