aboutsummaryrefslogtreecommitdiff
path: root/provision/desktop-basic
blob: 85674749545b5e7f420d3963d465eb0f3b8e80ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
#
# Basic desktop provisioner.
#

# Parameters
DIRNAME="`dirname $0`"
APT_INSTALL="LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y"

cat <<-EOF | sudo tee /etc/default/keyboard > /dev/null
# KEYBOARD CONFIGURATION FILE

# Consult the keyboard(5) manual page.

XKBMODEL="abnt2"
XKBLAYOUT="br"
XKBVARIANT="thinkpad"
XKBOPTIONS="compose:ralt,terminate:ctrl_alt_bksp"

BACKSPACE="guess"
EOF

# Dependencies
sudo apt-get update
$APT_INSTALL git

# Tools
if [ ! -e "$apps" ]; then
  git clone --recursive https://git.fluxo.info/rhatto/apps
fi

apps/inception init
apps/inception load

# Environment
$APT_INSTALL lightdm ratpoison awesome firefox-esr chromium

# Configuration
sudo cp $DIRNAME/files/etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf

mkdir -p .custom

cat <<-EOF | tee .custom/xsession > /dev/null
#
# Custom X11 session config
#
WINDOW_MANAGER="ratpoison"
PROGRAMS="$PROGRAMS terminal"

#
# Set screen size
#

# On stretch onwards Virtual-0 was renamed to Virtual-0
# Modeline determined by running "cvt 1280 780"
xrandr --newmode "1280x780_60.00"   81.50  1280 1352 1480 1680  780 783 793 810 -hsync +vsync
xrandr --addmode Virtual-0 1280x780_60.00

# Modeline determined by running "cvt 1368 748"
xrandr --newmode "1368x748_60.00"   83.00  1368 1440 1576 1784  748 751 761 777 -hsync +vsync
xrandr --addmode Virtual-0 1368x748_60.00

# Set default modeline
#xrandr --output Virtual-0 --mode 1368x748_60.00
xrandr --output Virtual-0 --mode 1280x780_60.00
EOF