this post was submitted on 20 Apr 2025
41 points (95.6% liked)
Linux
53358 readers
512 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
It's actually very simple:
monitors-on:
#! /bin/bash
hyprctl keyword monitor DP-1, 2560x1440@144, 0x0, 1
hyprctl keyword monitor DP-3, 2560x1440@144, 2560x0, 1
hyprctl keyword monitor HDMI-A-1, disable
monitors-off is basically same thing but reversed:
#! /bin/bash
hyprctl keyword monitor DP-1, disable
hyprctl keyword monitor DP-3, disable
hyprctl keyword monitor HDMI-A-1, 0x0@60, 1
es-de
I'm still working out some kinks with audio so I don't wanna go down the rabbit hole hell that is pactl and pavucontrol in this post. But that's more of a universal Linux gripe I have than distro specific.
Obviously you'll need to tweak the script to what your specific setup is. The first numbers are x & y axis and the second is refresh rate. This is just an example. It's also Wayland only but you can do this in x11 no problem
As far as "remotely" switching, I just assigned the scripts to keybinds in the hyprland config file. Super easy.
thank you for the instructions!