wayfire
wayfire copied to clipboard
Stream fake monitor ?
Hi,
I couldn't find the info but, can we create a fake monitor?
I use sunshine to stream on my tablet but my screen has a resolution of 2560x1080 21:9 and my tablet 1600x2176 4:3 Creating a fake monitor might be the idea, but I don't know how to do it
If you have another idea I take it too :)
You can have wayfire create a headless output by setting something like WLR_BACKENDS=libinput,drm,headless
before starting wayfire. You probably have to configure it in settings too. Drop something like this in wayfire.ini:
[input-device:wlr_virtual_pointer_v1]
output = HEADLESS-1
[output:HEADLESS-1]
mode = 1280x1024
position = 4160, 0
scale = 1.000000
transform = normal
I just tried quickly, the mode is not compatible and wayfire does not start.
But the logs talk about a custom mode I'll look tomorrow if it's a track
You might have a look at this issue. I think the order of the backends matter, for one.
Unfortunately, after many attempts I have errors
if i add WLR_BACKENDS=headless
Couldn't find matching mode 1600x2176@60 for output HEADLESS-1. Trying to use custom mode
or if i add WLR_BACKENDS=libinput,drm,headless
Could not add backend: multiple renderers at the same time aren't supported
failled to add backend 'headless'
i have nixos as distro
Here is a small python script I hacked together for my personal use, allowing me to use my laptop as my wireless second display in a local network:
import wayfire_socket as ws
import os
import signal
addr = os.getenv('WAYFIRE_SOCKET')
sock = ws.WayfireSocket(addr)
info = sock.create_headless_output(1920, 1080)['output']
sock.set_option_values({
'output:HDMI-A-1/position' : '1920,0',
f'output:{info["name"]}/position' : '0,0',
f'output:{info["name"]}/mode' : '1920x1080',
})
# Wait for keyboard interrupt
def shutdown(a, b):
del a, b
print("Shutting down...")
sock.destroy_headless_output(output_id=info['id'])
sock.set_option_values({'output:HDMI-A-1/position' : '0,0'})
for signum in [signal.SIGINT, signal.SIGTERM, signal.SIGHUP]:
signal.signal(signum, shutdown)
os.system("wayvnc -v 127.0.0.1 5678")