• 0 Posts
  • 2 Comments
Joined 2 years ago
cake
Cake day: June 1st, 2023

help-circle
  • 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.


  • Adding onto this a bit as I also use a KVM to stream games from my bedroom PC to the living room 4k TV.

    Hyprland has been great for this. I used to use KDE, then i3. KDE was a PITA for this setup, no fault of their own it is just fundamentally a different one, and i3 worked to some extent but I was still constantly fiddling with stuff to get audio and video exactly how I wanted to (and to do it easily).

    Hyprland just works for me and I love it. I press a keybind and run a script I wrote to turn off my desk monitors, set audio, and launch the emulator front end (emulationstation-DE). Which can also launch all my steam and lutris games, as well as emulators all the way up to PS3 and switch games.

    I even mounted a remote start button on the wall and turn my PC on from the other room