Skip to content

Instantly share code, notes, and snippets.

@bb441db
bb441db / README.md
Last active April 29, 2022 10:03
Ubuntu 22.04 automatically update color scheme preference at night

Place the .timer and .service file in ~/.config/systemd/user

Place the update-color-scheme file somewhere in $PATH

Enable and start the timer

systemctl --user enable update-color-scheme-preference.timer
systemctl --user start update-color-scheme-preference.timer
@bb441db
bb441db / swiftenv-ubuntu-22.04.patch
Created April 29, 2022 09:57
Patch for swiftenv on ubuntu 22.04
diff --git a/libexec/swiftenv-install b/libexec/swiftenv-install
index db974b9..c8d9631 100755
--- a/libexec/swiftenv-install
+++ b/libexec/swiftenv-install
@@ -41,6 +41,8 @@ get_os_release() {
if [ "$ID" = "amzn" ]; then
echo "amazonlinux$VERSION_ID"
+ elif ([ "$ID" = "ubuntu" ] && [ "$VERSION_ID" = "22.04" ]); then
+ echo "ubuntu20.04"
@bb441db
bb441db / adb-screenshot
Created April 28, 2022 09:51
Capture screenshot using ADB and save it on host
if ! [ -x "$(command -v adb)" ]; then
echo "adb is not installed" >&2
exit 1
fi
if [ $1 ]; then
adb exec-out screencap -p > $1
if [ ! -f $1 ]; then
echo "Did not create file $1"
exit 1