Go to file
Alexander Zhirov 056f01658b development 2022-05-20 18:21:10 +03:00
source development 2022-05-20 18:21:10 +03:00
.gitignore development 2022-05-20 18:21:10 +03:00
README.md first commit 2022-05-20 16:28:04 +03:00
dub.json first commit 2022-05-20 16:28:04 +03:00
dub.selections.json first commit 2022-05-20 16:28:04 +03:00
dub.settings.json first commit 2022-05-20 16:28:04 +03:00

README.md

Monitor switch (based on XrandR)

Switching occurs only if 2 monitors are connected to the computer!

dub

How to build

Install gcc and X11 development libraries. Also install dmd or ldc compiler. Run:

git clone https://git.zhirov.website/alexander/mswitch.git
cd mswitch
dub

or

dub -- ~/mswitch.log

Something similar will be output to the log file mswitch.log, and the monitors will be changed:

[Monitor("eDP-1", true, 1366, 768), Monitor("HDMI-1", false, 1920, 1080)]
-- Switch monitors --
[Monitor("HDMI-1", true, 1920, 1080), Monitor("eDP-1", false, 1366, 768)]

where first (or second) line:

  • eDP-1 - output
  • true - is primary
  • 1366 - width
  • 768 - height