forked from Re4son/Kali-Pi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
X-menu
executable file
·39 lines (32 loc) · 1.26 KB
/
X-menu
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
#!/bin/bash
##############################################
## ##
## Menu ##
## Launches menu-1.py ##
## Best autostarted through ~/.profile ##
## ##
##############################################
## Adjust these:
export KPSCREENSIZE=3.5 ## Screensize in inch, Options= 3.5, 2.8
export KPLAYOUT=9 ## Number of buttons - Currently only 9 is supported
export KPPIN=0 ## Set to "1" to enforce PIN authentication, run ./set-pin to change PIN
export KPTIMEOUT=99 ## Minutes before screensaver kicks in, comment out for screensaver off
## End adjustments
export TFT=0 ## Set to 1 for TFT output, 0 for X Window
export MENUDIR="/home/pi/Kali-Pi/Menus/"
while true; do
## Loop to make it a bit more difficult to bypass PIN
setterm -term linux -back default -fore white -clear all
if [ $KPPIN == "1" ]; then
startpage="menu-pin.py menu-1.py"
/usr/bin/clear
/usr/bin/env python $MENUDIR$startpage
else
startpage="menu-1.py"
/usr/bin/clear
/usr/bin/env python $MENUDIR$startpage
fi
if [ $? -eq 37 ]; then
break
fi
done