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
#include <clight/public.h> | |
#include <stdlib.h> | |
#include <time.h> | |
/** | |
* Small example custom module for Clight. | |
* | |
* It just hooks on INHIBIT state updates and: | |
* -> when entering INHIBIT state (eg: start watching a movie), disables automatic calibration, | |
* set low kbd brightness and timeout, and pauses any gamma adjustment |
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
var menuOpts = { | |
a:{ | |
"Reboot Userspace":()=>{ | |
shellrun("launchctl reboot userspace") | |
}, | |
Respring:()=>{ | |
device.respring() | |
}, | |
"Safe Mode":()=>{ | |
shellrun("killall -SEGV SpringBoard") |
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
#include <clight/public.h> | |
#include <stdlib.h> | |
#include <pwd.h> | |
#include <sys/stat.h> | |
CLIGHT_MODULE("TRENDLOG"); | |
/* | |
* Rename to: trendlog.c | |
* |
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
#!/bedrock/libexec/busybox sh | |
# | |
# brl all | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# version 2 as published by the Free Software Foundation. | |
# | |
# Copyright (c) 2012-2019 Daniel Thau <danthau@bedrocklinux.org> | |
# |
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
function FindProxyForURL(url, host) | |
{ | |
return "SOCKS localhost:6060"; | |
} |
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
#!/usr/bin/env bash | |
# Script that can be run daily to autocommit /bedrock/* changes | |
bedotcmd(){ git --git-dir=/bedrock/.git --work-tree=/bedrock "${@}"; } | |
sedotcmd(){ /bedrock/bin/strat -r "$1" git --git-dir=/etc/.git --work-tree=/etc "${@:2}"; } | |
mapfile -t bedotmod < <(bedotcmd ls-files --modified --exclude-standard) | |
bedotdel="$(bedotcmd ls-files --deleted --exclude-standard)" | |
strata=( debian arch ) | |
for stratum in "${strata[@]:1}"; do |
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/sh | |
dir="/boot/efi/EFI/refind/timeout.conf" | |
timeout="5" | |
if [ "$2" = "hibernate" ]; then | |
case "$1" in | |
pre) | |
echo "refindhibernate.sh: Setting timeout to -1" | |
sed 's/timeout.*/timeout -1/g' "$dir" > "$dir"~ |
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
#!/usr/bin/env sh | |
[ -n "$1" ] && input=$1 || return | |
for stratum in $(brl list -ei); do | |
/bedrock/bin/strat -r $stratum /usr/bin/env sh -c "command -v $input 1>/dev/null && printf \"$stratum provides $input\"\\\n" || true | |
done |