Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A shell script for setting a projector with a laptop

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 README.md
Octocat-spinner-32 set-projector
README.md

Bash Script for Setting Up a Projector with a Laptop

Introduction

This is a modest Bash script that sets up a projector with a Laptop. It assumes that the preferred resolution for the LCD is 1366x768. If you want a different resolution as the default then edit the script and change it to whichever resolution you want.

It assumes that your laptop has an HDMI output and/or a Mini Display Port. If your laptop has different outputs you must edit the code and change/add the output name as reported by xrandr.

Installation

Clone the repo or just download the snapshot tarball and unpackit in a directory you have set either the PATH to or define an alias in your .bash_aliases or .bashrc file.

Caveats

Be mindful that the script turns off the screensaver and the power saving options. You should re-enable them after the presentation with:

xset +dpms
xset s on

You can also define a handy alias for it.

echo "alias projector-off='xset +dmps; xset s on'" >> ~/.bash_aliases

Then source the file source ~/.bash_aliases. Now issue projector-off to re-enable the power sabing options and screensaver.

Something went wrong with that request. Please try again.