func invert(img image.Image) *image.RGBA {
bounds := img.Bounds()
imgSet := image.NewRGBA(bounds)
for y := 0; y < bounds.Max.Y; y++ {
for x := 0; x < bounds.Max.X; x++ {
r, g, b, a := img.At(x, y).RGBA()
col := color.RGBA{
255 - uint8(r/256), 255 - uint8(g/256),
255 - uint8(b/256), uint8(a / 256),
}
imgSet.Set(x, y, col)
}
}
return imgSet
}
async def handle_monitor_hotplug(ctx: Hyprland, data: str) -> None:
global wallpaper_task
if wallpaper_task is not None:
wallpaper_task.cancel()
wallpaper_task = asyncio.create_task(delayed_paint())# Start a tunnel interactively (remembers previous values)
$ tunnelctl up grafana
Host: dev-vm
Local port: 3000
Remote port: 3000
tunnel 'grafana': started (pid 12345, localhost:3000 -> dev-vm:3000)