-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdashboard.sh
31 lines (22 loc) · 963 Bytes
/
dashboard.sh
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
#!/usr/bin/env bash
# Modified from: https://github.com/puzzle/lightning-beer-tap/blob/master/dashboard/dashboard.sh
DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
CHROME_ZOOM="1.0"
KIOSK_ARGS="--kiosk --hide-scrollbars --disable-translate --incognito --force-device-scale-factor=${CHROME_ZOOM} ${DIR}/index.html"
# Don't sleep, don't blank, waste energy!
os_name=$(uname -s)
# Check if the system is Mac (Darwin) and execute the command accordingly
if [ "$os_name" = "Darwin" ]; then
echo "Running on macOS"
open -a 'Brave Browser' ${DIR}/index.html
elif [ "$os_name" = "Linux" ]; then
DISPLAY=:0 xset s off
DISPLAY=:0 xset s noblank
DISPLAY=:0 unclutter &
DISPLAY=:0 unclutter &
DISPLAY=:0 nohup chromium-browser $KIOSK_ARGS &> /dev/null &
echo "Running on Raspberry Pi (Raspberry Pi OS)"
else
echo "Running on an unsupported operating system"
# Add your command for unsupported systems here if needed
fi