Screen Auto setup

This is for a box that consistently moves between locations with different screen setups.

Create the folder ~/.config/screens and add in to it with the content below.

   1 #!/bin/bash
   2 screen=`xrandr | grep ' connected' | sort | md5sum | cut -d ' ' -f 1`
   4 #Not the best, but safe because the output from screen is an md5sum, which comes from a safe subset of chars
   6 bash -c ~/.config/screens/$
   7 ~/.config/screens/

Create the file in the same folder. It can initially be blank, but you can add in anything that you need later on. Here's a sample one.

   1 #!/bin/bash
   2 feh --bg-fill -z ~/wallpapers
   3 conky -d &

Where wallpapers is a directory with wallpapers, and conky is Conky (if you add the conky -d here, remove it from your i3 config).

HowTo/ScreenAutosetup (last edited 2018-12-01 10:10:10 by admin)