aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHsieh Chin Fan <typebrook@gmail.com>2021-11-12 20:27:06 +0800
committerHsieh Chin Fan <typebrook@gmail.com>2021-11-12 20:27:06 +0800
commitb98727858e177804e2975736384de8e2dfac99be (patch)
tree88886c6ec5f86758c79c5b7e0f64df5a4a9c6879
parentc1f0eec24f66025589b37e8451b845e0a2c06bf3 (diff)
update
-rw-r--r--alias10
1 files changed, 7 insertions, 3 deletions
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'
243alias rmcache='rm -rf ~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/*' 243alias rmcache='rm -rf ~/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jdk7/*'
244alias adb.screenshot='DIR=/sdcard/Pictures/Screenshots/; adb pull $DIR/`adb shell ls -t $DIR | head -1` .' 244alias adb.screenshot='DIR=/sdcard/Pictures/Screenshots/; adb pull $DIR/`adb shell ls -t $DIR | head -1` .'
245alias adb.camera='DIR=/sdcard/DCIM/Camera; adb pull $DIR/`adb shell ls -t $DIR | head -1` .' 245alias adb.camera='DIR=/sdcard/DCIM/Camera; adb pull $DIR/`adb shell ls -t $DIR | head -1` .'
246alias adb.camera='DIR=/sdcard/DCIM/Camera; adb pull $DIR/`adb shell ls -t $DIR | head -1` .'
247alias adb.input='adb shell input text'
246adb.push() { 248adb.push() {
247 adb push $1 /sdcard/Download 249 adb push $1 /sdcard/Download
248} 250}
@@ -306,15 +308,17 @@ alias xo='xsel -ob'
306alias xl='history | tail -1 | grep -oP "^\s*[0-9]+\s\s\K.*" | xsel -ib && echo Copied to clipboard && xsel -ob' 308alias xl='history | tail -1 | grep -oP "^\s*[0-9]+\s\s\K.*" | xsel -ib && echo Copied to clipboard && xsel -ob'
307 309
308# image 310# image
309image_vertical() { 311image.vertical() {
310 suffix=${1##*.} 312 suffix=${1##*.}
311 convert "$@" -append $(basename -s .$suffix $1)-$(basename -s .$suffix ${@: -1}).${format:-$suffix} 313 convert "$@" -append $(basename -s .$suffix $1)-$(basename -s .$suffix ${@: -1}).${format:-$suffix}
312} 314}
313image_horizontal() { 315image.horizontal() {
314 convert "$@" +append output.png 316 convert "$@" +append output.png
315} 317}
316image_from_data_url() { 318image.from_data_url() {
319 [[ $1 == '' ]] && echo File name needed && return 1
317 xsel -ob | sed -E 's/^.+,//' | base64 -d >$1 320 xsel -ob | sed -E 's/^.+,//' | base64 -d >$1
321 identify $1
318} 322}
319 323
320# thunderbird 324# thunderbird