integrate your toys with niri!
Install niri and rust... then:
cargo install --git https://github.com/itzreesa/niri-sense
Or download the latest binary from the releases tab
and put it somewhere in your PATH, like ~/.local/bin
preview.mov
Run niri-sense inside a niri session to launch it!
You'll need a buttplug.io compatible server, like Intiface(r) Central
- Start the server.
- From
sense's REPL, useconnectto connect to your server. - Run a scan using
scan start, after finding your device usescan stopto stop the scanning. - That's it! Try moving around your workspace, you should now feel the app running!
Optionally, you can use list and select to select between one or all devices found.
I thought of this project while playing deadlock, then I jokingly DM'd oomf about this idea, because I remembered the lovelock mod that I've seen was popular on twitter.
Oh, and thanks oomf for testing, I don't actually own any hardware. My testing was on just the simulated one.
connectanddisconnect- handle the connection betweensenseand your serverscan startandscan stop- toggle scanninglist- provides a nice list of devices, their features and batteries, if found.select- will prompt you with a device index selection, where-1means all devices!test- will run a short test of vibrationsstop- will stop all server events that were currently runningpause- toggles the event processing.reload- will reload your configuration file.exit- will exit at the next niri event.
The configuration is in a toml format.
Here's a few useful fields:
addressandportcontrol where you will connect with theconnectcommand- all the fields from the
[lengths]table, will correspond to named event lengths. (time in milliseconds) - all the fields from the
[strengths]table, will correspond to named event strengths. (values in %, from 0 to 100) repeated_event_preventionfrom[events], if turned on, will try to prevent multiple outputs for some events.
Events here are formatted like that: event_name = ["state", "strength", "length"]
Where state can be either "on" or "off", and the lengths and strengths are defined above.
workspace_changed- triggers when your workspace is changed, e.g. when adding or removingwindow_opened_or_changed- triggers either when a new window is opened, or when an existing window's information changes, like on resizing.window_layout_changed- triggers on your window layout changesniri_config_reloaded- triggers on niri's config reload, off by default
Report issues in the issues tab
- make sure you have flipped the switch in your server...
- make sure you have bluetooth enabled,
- make sure you have entered the right address and port in your config
- make sure nothing is blocking the ports
- try manually settings
NIRI_SOCKETif you can't connect to niri's ipc. - if a new version is released, try deleting your config if it fails to load.
- try seeing if your devices are recognized in your server panel.
- try switching between bluetooth le and non-le
niri-sense's source code is license under the GPLv3 license