This file contains hidden or 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
if hash scrcpy 1>&2 2>/dev/null ; then | |
function _mirror_droid_connect { | |
scrcpy --stay-awake --turn-screen-off 2>&1 >>~/.scrcpy.log | |
} | |
function _mirror_droid_repeat { | |
while : | |
do | |
adb wait-for-usb-device | |
_mirror_droid_connect |
This file contains hidden or 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 | |
# Copyright (c) 2021 Matthew Strasiotto | |
# This work is licensed under the terms of the MIT license. | |
# For a copy, see <https://opensource.org/licenses/MIT>. | |
function ascend_to_root { | |
local top_level="$(pwd)" | |
if top_level="$(git rev-parse --show-toplevel 2>/dev/null)" ; then | |
cd "$top_level" |