From d6ecadf101569feae1deaf5f68362c6541545f2b Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 16 Sep 2016 12:57:44 -0700 Subject: [PATCH] Add symlink_xorg task --- resources/xorg.conf | 1 + tasks/arch.py | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/resources/xorg.conf b/resources/xorg.conf index 8ad96fc2..d30aaffd 100644 --- a/resources/xorg.conf +++ b/resources/xorg.conf @@ -23,6 +23,7 @@ EndSection Section "Monitor" Identifier "DVI-D-0" Option "Primary" "true" + Option "DPI" "96 x 96" EndSection Section "Monitor" diff --git a/tasks/arch.py b/tasks/arch.py index 5d5d8a8a..f5c25b5c 100644 --- a/tasks/arch.py +++ b/tasks/arch.py @@ -31,3 +31,14 @@ SERVICES = [ @task def install_pacaur(ctx): ctx.run(os.path.join(RESOURCES_DIRECTORY, "install_pacaur.sh")) + + +@task +def symlink_xorg(ctx, xorg_target="/etc/X11/xorg.conf"): + ctx.run("sudo mv {} {}".format( + xorg_target, xorg_target + ".backup" + )) + ctx.run("sudo ln -s {} {}".format( + os.path.join(RESOURCES_DIRECTORY, "xorg.conf"), + xorg_target, + ))