You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Alexander Zhirov 61df35ee17 first commit 2 years ago
source first commit 2 years ago
.gitignore first commit 2 years ago
README.md first commit 2 years ago
dub.json first commit 2 years ago
dub.selections.json first commit 2 years ago
dub.settings.json first commit 2 years ago

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