-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbashrc_termux
41 lines (37 loc) · 1.15 KB
/
bashrc_termux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
kill-termux() {
killall com.termux || {
PID=$$
while [ -e "/proc/$PID" ]; do
PID=`/system/bin/ps -p $PID -o ppid= | tr -d " \n"`
done
kill $PID
}
}
googlecamera-panorama-save() {(
set -e
DATA_PATH="/sdcard/Android/data/com.google.android.GoogleCamera"
SAVE_PATH="/sdcard/DCIM/googlecamera-panorama"
mkdir -p "$SAVE_PATH"
for d in cache files; do
if [ -d "$DATA_PATH/$d/panorama_sessions" ]; then
SAVE_FILE="$SAVE_PATH/googlecamera-panorama-$(date +%s).tar.gz"
echo "Saving '$SAVE_FILE'..."
tar -C "$DATA_PATH/$d" -vzcf "$SAVE_PATH/googlecamera-panorama-$(date +%s).tar.gz" panorama_sessions
rm -rf "$DATA_PATH/$d/panorama_sessions"
fi
done
)}
sshd-start-stop() {
if killall sshd 2> /dev/null; then
echo -e "\e[1;31mSSHD STOPPED\e[0m"
else
sshd
echo -e "\e[1;32mSSHD STARTED\e[0m"
echo
mylocalip
>&2 echo
bcast-ip android
fi
}
alias vlc-open="am start -n org.videolan.vlc/org.videolan.vlc.gui.video.VideoPlayerActivity -a android.intent.action.VIEW -d"