forked from Re4son/Kali-Pi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu
executable file
·62 lines (53 loc) · 2.21 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
##############################################
## ##
## Menu ##
## Launches menu-1.py ##
## Best autostarted through ~/.profile ##
## ##
##############################################
## Adjust these:
export KPSCREENSIZE=2.8 ## Screensize, Options:
## 7.0 = 800 x 480
## 5.0 = 800 x 480
## 3.5 = 430 x 320
## 2.8 = 320 x 240
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=2 ## Minutes before screensaver kicks in, comment out for screensaver off
export KISMETVER=1 ## Set to "2" to launch kismet github version, "1" to use classic stable version
export TFT=1 ## Set to "0": no TFT screen,
## "1": TFT touchscreen,
## "2": TFT screen with external mouse,
## "3": resistive HDMI touchscreen, or
## "4": Raspberry Pi 7" Touchscreen
## "5": Pimoroni HyperPixel 4.0
## End adjustments
if [ -z "$SUDO_USER" ]; then
SUDO_USER=pi
fi
export KPUSER="$SUDO_USER"
if [ $TFT == "1" ] || [ $TFT == "2" ]; then
export FRAMEBUFFER=/dev/fb1
else
export FRAMEBUFFER=/dev/fb0
fi
#export MENUDIR="/home/pi/Kali-Pi/Menus/"
export MENUDIR=`dirname "$0"`/Menus/
while true; do
## Loop to make it a bit more difficult to bypass PIN
setterm -term linux -back default -fore black -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
/bin/bash $MENUDIR/launch-bg.sh
/usr/bin/env python $MENUDIR$startpage
fi
## if [ $? -eq 37 ]; then
## break
## fi
done