Hacker News new | ask | show | jobs
by charlie-83 278 days ago
I just have a bash script that runs on startup which just greps the output of xrandr to determine if I am connected to home/office/no monitors and then runs the appropriate xrandr commands to config them.

On the occasion when I (dis)connect monitors without restarting the laptop, I just have some command line aliases (home/office/laptop) which run the appropriate config

1 comments

Correct me if I'm wrong but Hyprland is Wayland so xrandr is no go.

There are some utilities for this though. nwg-displays comes to mind

Yes, but you can have a similar setup to what he is describing, just with different commands.

I'm using niri instead hyperland. I can either use `sed` on it's configuration file (on/off, resolution, position) or for some of its configurations I can use the cli (for output scale).