Skip to content

Instantly share code, notes, and snippets.

View indgy's full-sized avatar

indgy indgy

View GitHub Profile
@indgy
indgy / acpi_brightness
Created May 28, 2022 13:01
FreeBSD Lenovo Thinkpad screen brightness adjustments
#!/bin/sh
# /usr/local/bin/acpi_brightness
# Credit: https://www.davidschlachter.com/misc/freebsd-acpi_video-thinkpad-display-brightness
CURRENT_LEVEL=`/sbin/sysctl -n hw.acpi.video.lcd0.brightness`
UP=$1
if [ $UP == 1 ]; then
for i in 1 2 4 6 9 15 24 36 51 69 90 100; do
if [ "$CURRENT_LEVEL" -lt "$i" ]; then
@indgy
indgy / quiet_boot.sh
Last active April 12, 2022 01:39
FreeBSD Quiet Boot
#!/bin/sh
# Speed up boot slightly
sysrc background_dhclient=YES
sysrc -f /boot/loader.conf autoboot_delay=3
# Quieten boot messages
sysrc rc_startmsgs=NO
sysrc -f /boot/loader.conf boot_mute=YES
sysrc -f /boot/loader.conf beastie_disable=YES