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 | |
# install: | |
# curl -s https://gist.githubusercontent.com/giddyhup/7013eb8d022e0ce94d68519d3cc32f68/raw/c77828c8b53f57840ef728a9923c6db942256e89/installohmyzsh_unattended.sh | bash | |
usershell=$(grep $USER /etc/passwd | grep zsh) | |
if [[ $? == 0 ]]; then | |
echo "zsh is already the user's shell, to stay on the safe side we're aborting" | |
exit | |
fi | |
if sudo -n true 2>/dev/null; then |
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
# execute with sudo or as root | |
systemctl disable NetworkManager | |
systemctl stop NetworkManager | |
systemctl disable NetworkManager-wait-online.service | |
systemctl stop NetworkManager-wait-online.service | |
systemctl disable NetworkManager-dispatcher.service | |
systemctl stop NetworkManager-dispatcher.service | |
systemctl disable network-manager.service | |
systemctl stop network-manager.service | |
systemctl enable systemd-networkd |
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 | |
export DISPLAY=:0 | |
while getopts ":ofb:" opt; do | |
case $opt in | |
o) # on | |
sudo sh -c "echo 0 > /sys/class/backlight/rpi_backlight/bl_power" | |
;; | |
f) # off | |
sudo sh -c "echo 1 > /sys/class/backlight/rpi_backlight/bl_power" |