What about sleep, display management when pluging in another monitor? etc.
You might need X11 python bindings and other dependencies that in general should be available on most distros.
See if it works for you, enjoy:
https://github.com/riccardomc/rcs/blob/master/scripts/.scrip...
$mod+Shift+p exec "xrandr --output HDMI1 --auto --right-of eDP1"
(that with enable second screen through HDMI when Win+Shift+p is pressed) $mod+Shift+o exec "xrandr --output HDMI1 --off"
(that disables second screen) bindsym $mod+Shift+x move workspace to output HDMI1
(that moves an entire workspace to the 2nd screen or any screen with the given id)