-
Notifications
You must be signed in to change notification settings - Fork 88
/
papirus-setup
38 lines (32 loc) · 973 Bytes
/
papirus-setup
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
#!/usr/bin/env bash
# Make sure only root can run our script
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
# Install fuse driver
apt-get install libfuse-dev -y
# Install fonts
apt-get install fonts-freefont-ttf -y
rm -R /tmp/papirus
mkdir /tmp/papirus
cd /tmp/papirus
git clone https://github.com/repaper/gratis.git
cd /tmp/papirus/gratis
make rpi EPD_IO=epd_io.h PANEL_VERSION='V231_G2'
make rpi-install EPD_IO=epd_io.h PANEL_VERSION='V231_G2'
systemctl enable epd-fuse.service
# Let the user specify the screen size
SIZE=""
while [ "$SIZE" = "" ]; do
SIZE=$(whiptail --title "Please select your screen size" --menu "" 12 50 5 \
" 1.44" "Inch (128 * 98) " \
" 1.9" "Inch (144 * 128) " \
" 2.0" "Inch (200 * 96) " \
" 2.6" "Inch (232 * 128) " \
" 2.7" "Inch (264 * 176) " 3>&1 1>&2 2>&3)
if [ $? = 1 ]; then
whiptail --msgbox "No size selected. Try again" 8 40
fi
done
papirus-set $SIZE