This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* From https://github.com/raspberrypi-ui/rc_gui/blob/master/src/rc_gui.c#L23-L70 */ | |
#define GET_CAN_EXPAND "sudo raspi-config nonint get_can_expand" | |
#define EXPAND_FS "sudo raspi-config nonint do_expand_rootfs" | |
#define GET_HOSTNAME "sudo raspi-config nonint get_hostname" | |
#define SET_HOSTNAME "sudo raspi-config nonint do_hostname %s" | |
#define GET_BOOT_CLI "sudo raspi-config nonint get_boot_cli" | |
#define GET_AUTOLOGIN "sudo raspi-config nonint get_autologin" | |
#define SET_BOOT_CLI "sudo raspi-config nonint do_boot_behaviour B1" | |
#define SET_BOOT_CLIA "sudo raspi-config nonint do_boot_behaviour B2" | |
#define SET_BOOT_GUI "sudo raspi-config nonint do_boot_behaviour B3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from FBpyGIF import fb | |
from argparse import ArgumentParser | |
parser = ArgumentParser() | |
parser.add_argument("-img", action="store", required=True, dest="image_name", help="name of splash image") | |
args = parser.parse_args() | |
BIT_DEPTH = 8 | |
FRAME_BUFFER = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source .env | |
set -eo pipefail | |
cd "$(dirname "$0")" | |
if [[ ! $UID -eq 0 ]]; then | |
echo "you must run this as root:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ ! $UID -eq 0 ]]; then | |
echo "you must run this as root:" | |
echo "sudo $0" | |
exit 1 | |
fi | |
touch /home/pi/.hushlogin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eo pipefail | |
cd "$(dirname "$0")" | |
watchman watch-del-all | |
watchman watch . | |
watchman -- trigger . sync '**/*' -- ./sync.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source .env | |
cd "$(dirname "$0")" | |
exec rsync -rlpt \ | |
--exclude '*.pyc' \ | |
--exclude '__pycache__/' \ | |
--exclude 'venv/' \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "start wifi-leaf" | |
exec python3 -m wifi-leaf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=safe-to-power-off image | |
DefaultDependencies=no | |
After=umount.target | |
Before=final.target | |
[Service] | |
ExecStart=/usr/bin/python3 /path/to/framebuffer-pythonscript.py -img /path/to/unplugimage.jpg | |
Type=oneshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=show image on starting shutdown | |
DefaultDependencies=no | |
Before=halt.target | |
[Service] | |
ExecStart=/usr/bin/python3 /path/to/framebuffer-pythonscript.py -img /path/to/powerdownimage.jpg | |
Type=oneshot | |
[Install] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=boot splash screen | |
[Service] | |
ExecStart=/usr/bin/python3 /path/to/framebuffer-pythonscript.py -img /path/to/bootimage.jpg | |
[Install] | |
WantedBy=basic.target |
NewerOlder