]> git.donarmstrong.com Git - don.git/blobdiff - posts/autorandr.mdwn
uses spaces instead of ``` in post
[don.git] / posts / autorandr.mdwn
index c94dcc65408a3f51264ddf6add2caca409e57be3..40ca102825e966b7b3dec9931b3f9c826fb01939 100644 (file)
@@ -20,17 +20,13 @@ the
 To use it, simply install the package, and create your initial
 configuration (in my case, undocked):
 
 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):
 
 
 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).
 
 repeat for any additional configurations you have (or as you find new
 configurations).
@@ -39,19 +35,18 @@ Autorandr has `udev`, `systemd`, and `pm-utils` hooks, and `autorandr
 --change` should be run any time that new displays appear. You can
 also run `autorandr --change` or `autorandr --load workstation`
 manually too if you need to. You can also add your own
 --change` should be run any time that new displays appear. You can
 also run `autorandr --change` or `autorandr --load workstation`
 manually too if you need to. You can also add your own
-'~/.config/autorandr/$PROFILE/postswitch` script to run after a
+`~/.config/autorandr/$PROFILE/postswitch` script to run after a
 configuration is loaded. Since I run i3, my workstation configuration
 looks like this:
 
 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
 
 which fixes the dpi appropriately, sets the primary screen (possibly
 not needed?), and moves the i3 workspaces about. You can also arrange