]> git.phdru.name Git - dotfiles.git/blob - bin/screen-hardcopy
.xinitrc: calculate geometry for `xclock`
[dotfiles.git] / bin / screen-hardcopy
1 #! /bin/sh
2
3 SESSION=
4 WINDOW=
5
6 while getopts r:p: opt; do
7    case $opt in
8       r) SESSION="-r $OPTARG" ;;
9       p) WINDOW="-p $OPTARG" ;;
10    esac
11 done
12 shift `expr $OPTIND - 1`
13
14 i=1
15 screen $SESSION $WINDOW -X hardcopy &&
16 while [ $i -lt 30 -a \! -f hardcopy.0 ]; do
17    sleep 0.1 &&
18    i=$((i+1))
19 done &&
20 less hardcopy.0 &&
21 exec rm hardcopy.0