From d0addc284c1642a590e2ebba78a9b48f9b17645c Mon Sep 17 00:00:00 2001 From: KemoNine Date: Sat, 6 Aug 2022 15:46:25 -0400 Subject: [PATCH] fix emacsd script naming ; improve setup on android ; add tasker to android --- _setup.sh | 10 +++++++++- boot/99-emacs-code.sh => emacsd/emacsd-code.sh | 2 +- boot/99-emacs-org.sh => emacsd/emacsd-org.sh | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) rename boot/99-emacs-code.sh => emacsd/emacsd-code.sh (59%) rename boot/99-emacs-org.sh => emacsd/emacsd-org.sh (60%) diff --git a/_setup.sh b/_setup.sh index 4af80e1..a583b2c 100755 --- a/_setup.sh +++ b/_setup.sh @@ -42,6 +42,9 @@ fi # termux tuning if grep -q "Android" <<< `uname -a`; then + # grab always run in background permission during early setup + termux-wake-lock + termux-wake-unlock if ! [ -d ~/.termux ]; then mkdir ~/.termux fi @@ -56,9 +59,14 @@ if grep -q "Android" <<< `uname -a`; then if ! [ -d ~/.termux/boot ]; then mkdir ~/.termux/boot fi + # tasker scripts (in case boot ones fail, they can be poked via tasker automations) + if ! [ -d ~/.termux/tasker ]; then + mkdir ~/.termux/tasker + fi # cannot use symlinks -- termux forces full path execution from android launcher shortcuts cp $PATH_PREFIX/shortcuts/* ~/.shortcuts/ - cp $PATH_PREFIX/boot/* ~/.termux/boot/ + cp $PATH_PREFIX/emacsd/* ~/.termux/boot + cp $PATH_PREFIX/emacsd/* ~/.termux/tasker # reload settings termux-reload-settings fi diff --git a/boot/99-emacs-code.sh b/emacsd/emacsd-code.sh similarity index 59% rename from boot/99-emacs-code.sh rename to emacsd/emacsd-code.sh index 67301b3..51b755e 100755 --- a/boot/99-emacs-code.sh +++ b/emacsd/emacsd-code.sh @@ -1,2 +1,2 @@ #!/data/data/com.termux/files/usr/bin/sh -/data/data/com.termux/files/usr/bin/tmux new-session -d -s emacs-code '/data/data/com.termux/files/usr/bin/emacs --with-profile code' +/data/data/com.termux/files/usr/bin/tmux new-session -d -s emacsd-code '/data/data/com.termux/files/usr/bin/emacs --with-profile code' diff --git a/boot/99-emacs-org.sh b/emacsd/emacsd-org.sh similarity index 60% rename from boot/99-emacs-org.sh rename to emacsd/emacsd-org.sh index 9e6c2c0..ec5c538 100755 --- a/boot/99-emacs-org.sh +++ b/emacsd/emacsd-org.sh @@ -1,2 +1,2 @@ #!/data/data/com.termux/files/usr/bin/sh -/data/data/com.termux/files/usr/bin/tmux new-session -d -s emacs-org '/data/data/com.termux/files/usr/bin/emacs --with-profile org' +/data/data/com.termux/files/usr/bin/tmux new-session -d -s emacsd-org '/data/data/com.termux/files/usr/bin/emacs --with-profile org'