Skip to content

Instantly share code, notes, and snippets.

% Based on http://tex.stackexchange.com/a/24505
\documentclass{article}%
\usepackage{pgffor}%
\newcommand*{\ListOfFiles}{%
../foo/bar.tex,
bar/foo.tex,
../baz/bar,
foo/baz,
@Eyenseo
Eyenseo / extend.sh
Last active August 29, 2015 14:11 — forked from wvengen/extend.sh
#!/bin/sh
# extend non-HiDPI external display on DP1 above HiDPI internal display eDP1
# see also https://wiki.archlinux.org/index.php/HiDPI
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949
# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319
ext_w=`xrandr | sed 's/^DP1 [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
ext_h=`xrandr | sed 's/^DP1 [^0-9]* [0-9]\+x\([0-9]\+\).*$/\1/p;d'`
int_w=`xrandr | sed 's/^eDP1 [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
int_h=`xrandr | sed 's/^eDP1 [^0-9]* [0-9]\+x\([0-9]\+\).*$/\1/p;d'`
off_w=`echo $(( ($int_w-$ext_w)/2 )) | sed 's/^-//'`