by nickjj · 1y ago · 0 comments
For example, imagine this screencast recording set up:
- You have a 4k monitor
- You only want to record a 1920x1080 section of your screen (OBS can do this in both set ups)
- You only want certain windows to appear in that 1920x1080 zone
- You want other adhoc windows (notepad, etc.) floating around that recording zone
- You want to easily be able to pick and flip between the apps in that 1920x1080 zone
On Windows this is quite possible and requires almost nothing to be done. You could install a tool like Sizer to resize and position windows into a specific spot and just drag / drop everything else around as needed. You could also optimize things with AHK to make it easier to only open apps in that zone.With Hyprland this isn't as easy to pull off. A maintainer mentioned to me that I'd likely have to write a Hyprland plugin which would be C++. I'm not a C++ developer though.
I guess you could probably make a workable but not as good solution by hyprctl dispatching commands in a shell script to position specific windows into the zone and then have a notepad like app dedicated to always floating, but when you record hundreds of videos you want an optimized solution to the highest degree.
In Hyprland's defense I've only been using it for a few days but I saw nothing in their docs or the internet that would indicate there's features built into the tool to make this less painful.
If I could find a solution for this, I'd install it on my main machine.
I don't know of any reason that wouldn't work, but I haven't tried it so I'm not certain it would.
If it were possible to pull off, that would be the perfect combo:
- A dedicated 1920x1080 recording zone, using Hyrpland's config file to automatically resize and position this Hyprland session in whatever spot makes the most sense (top middle of a 4k monitor, etc.)
- The nested session could use 1.5x or 2x scaling so fonts are larger on video[0]
- There's no BS or manual steps because the nested session is a full fledged Hyprland set up, so tiling, floats, workspaces and app launching is fully working
- Free to float whatever you want around the recording zone from the main Hyprland set up
[0]: On Windows with WSL 2 I work around this with a shell script I made to adjust my terminal's font size, etc.. I'd love to be able to drop that and have things be perfectly sized all the time when recording.Edit:
The Hyprland docs mentions you should make a separate config and also avoid running any exec/exec-once commands. That could be a problem because I would want my wallpaper, mako, waybar and walker to come up in the videos which means running multiple copies of these.
Maybe it could work tho in the end. I will play with it and see how it goes. Thank you for introducing me to the idea, even if it doesn't work, it's an interesting concept.
It's probably going to get complicated though due to wanting to run waybar, walker, wallpaper, etc. in the nested session but if you do anything that's going to modify its state in that session is also going to affect the outer one since only 1 process runs for those tools.
It's almost like you need a separate copy for everything that runs in exec but with a different process name too.
You'd end up with 2 copies of it running and you typically killall/pkill to reload it because it's expected you'd only run 1 copy but now with this nested solution there's 2 copies running.
The only thing really stopping me from Niri is it doesn't seem to have dynamic configs to let you have 1 main config and then source in a smaller 2nd config to overwrite settings in the main config.
That's really useful for having personalized changes per device or overwriting specific colors to change themes.
Hyprland has a `source` feature for this.