From 4eadc23a8fb8457438b65de1af671eb3b2489e1a Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 6 Nov 2017 19:59:40 -0800 Subject: [PATCH] change the inline code bits --- posts/autorandr.mdwn | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/posts/autorandr.mdwn b/posts/autorandr.mdwn index c94dcc6..d758834 100644 --- a/posts/autorandr.mdwn +++ b/posts/autorandr.mdwn @@ -20,17 +20,13 @@ the To use it, simply install the package, and create your initial configuration (in my case, undocked): -``` -autorandr --save undocked -``` + autorandr --save undocked then, dock your laptop (or plug in your external monitor(s)), change the configuration using xrandr (or whatever you use), and save your new configuration (in my case, workstation): -``` -autorandr --save workstation -``` + autorandr --save workstation repeat for any additional configurations you have (or as you find new configurations). @@ -43,15 +39,14 @@ manually too if you need to. You can also add your own configuration is loaded. Since I run i3, my workstation configuration looks like this: -``` -#!/bin/bash + #!/bin/bash + + xrandr --dpi 92 + xrandr --output DP2-2 --primary + i3-msg '[workspace="^(1|4|6)"] move workspace to output DP2-2;' + i3-msg '[workspace="^(2|5|9)"] move workspace to output DP2-3;' + i3-msg '[workspace="^(3|8)"] move workspace to output DP2-1;' -xrandr --dpi 92 -xrandr --output DP2-2 --primary -i3-msg '[workspace="^(1|4|6)"] move workspace to output DP2-2;' -i3-msg '[workspace="^(2|5|9)"] move workspace to output DP2-3;' -i3-msg '[workspace="^(3|8)"] move workspace to output DP2-1;' -``` which fixes the dpi appropriately, sets the primary screen (possibly not needed?), and moves the i3 workspaces about. You can also arrange -- 2.39.2