From b98727858e177804e2975736384de8e2dfac99be Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Fri, 12 Nov 2021 20:27:06 +0800 Subject: update --- alias | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'alias') diff --git a/alias b/alias index 779bd09..d55fd43 100644 --- a/alias +++ b/alias @@ -243,6 +243,8 @@ alias adb.list='adb shell dumpsys package d' alias rmcache='rm -rf ~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/*' alias adb.screenshot='DIR=/sdcard/Pictures/Screenshots/; adb pull $DIR/`adb shell ls -t $DIR | head -1` .' alias adb.camera='DIR=/sdcard/DCIM/Camera; adb pull $DIR/`adb shell ls -t $DIR | head -1` .' +alias adb.camera='DIR=/sdcard/DCIM/Camera; adb pull $DIR/`adb shell ls -t $DIR | head -1` .' +alias adb.input='adb shell input text' adb.push() { adb push $1 /sdcard/Download } @@ -306,15 +308,17 @@ alias xo='xsel -ob' alias xl='history | tail -1 | grep -oP "^\s*[0-9]+\s\s\K.*" | xsel -ib && echo Copied to clipboard && xsel -ob' # image -image_vertical() { +image.vertical() { suffix=${1##*.} convert "$@" -append $(basename -s .$suffix $1)-$(basename -s .$suffix ${@: -1}).${format:-$suffix} } -image_horizontal() { +image.horizontal() { convert "$@" +append output.png } -image_from_data_url() { +image.from_data_url() { + [[ $1 == '' ]] && echo File name needed && return 1 xsel -ob | sed -E 's/^.+,//' | base64 -d >$1 + identify $1 } # thunderbird -- cgit v1.2.3-70-g09d2