Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add screenlayout configuration script

  • Loading branch information...
commit df38dfd691f8c467b2120d45be85b1e40a66cdb4 1 parent 781513d
@crodjer authored
Showing with 17 additions and 0 deletions.
  1. +1 −0  setuphome.sh
  2. +16 −0 xrandr_config.sh
View
1  setuphome.sh
@@ -161,6 +161,7 @@ setUp(){
link xmobarrc
link Xresources
link xsessionrc
+ link screenlayout
link zshrc
link vim/vimrc vimrc
View
16 xrandr_config.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+# Automatically set my default screenlayout according the screens present
+xrandr | grep VGA | grep " connected " &> /dev/null
+
+if [ $? -eq 0 ]; then
+ # External monitor is connected, use default layout
+ /home/rohan/.screenlayout/default.sh
+ if [ $? -ne 0 ]; then
+ # Something went wrong. Autoconfigure the internal monitor and disable the external one
+ /home/rohan/.screenlayout/laptop.sh
+ fi
+else
+ # External monitor is not connected
+ /home/rohan/.screenlayout/laptop.sh
+fi
Please sign in to comment.
Something went wrong with that request. Please try again.