initial termux emacs daemon setup

This commit is contained in:
KemoNine 2022-08-06 14:13:56 -04:00
parent a724f54fa3
commit e3496c43b6
4 changed files with 13 additions and 1 deletions

View file

@ -52,12 +52,18 @@ if grep -q "Android" <<< `uname -a`; then
if ! [ -d ~/.shortcuts ]; then if ! [ -d ~/.shortcuts ]; then
mkdir ~/.shortcuts mkdir ~/.shortcuts
fi fi
# boot scripts
if ! [ -d ~/.termux/boot ]; then
mkdir ~/.termux/boot
fi
# cannot use symlinks -- termux forces full path execution from android launcher shortcuts # cannot use symlinks -- termux forces full path execution from android launcher shortcuts
cp $PATH_PREFIX/shortcuts/* ~/.shortcuts cp $PATH_PREFIX/shortcuts/* ~/.shortcuts/
cp $PATH_PREFIX/boot/* ~/.termux/boot/
# reload settings # reload settings
termux-reload-settings termux-reload-settings
fi fi
echo "ensure Termux:Boot android helper app is installed from f-droid"
echo "exa fd bat tmux htop nano most ripgrep emacs zsh lf restic rclone glow" echo "exa fd bat tmux htop nano most ripgrep emacs zsh lf restic rclone glow"
echo "copy restic.sh if desired/needed" echo "copy restic.sh if desired/needed"
echo "run tmux and do <prefix>-I to install plugins and finish setup" echo "run tmux and do <prefix>-I to install plugins and finish setup"

2
boot/99-emacs-code.sh Executable file
View file

@ -0,0 +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'

2
boot/99-emacs-org.sh Executable file
View file

@ -0,0 +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'

2
zshrc
View file

@ -85,6 +85,8 @@ alias ls="exa"
if grep -q "Android" <<< `uname -a`; then if grep -q "Android" <<< `uname -a`; then
alias proot-distro-keeb-root="proot-distro login keeb" alias proot-distro-keeb-root="proot-distro login keeb"
alias proot-distro-keeb="proot-distro login --user keeb --termux-home keeb -- /bin/bash" alias proot-distro-keeb="proot-distro login --user keeb --termux-home keeb -- /bin/bash"
alias emacs="echo 'daemon mode -- use em [profile] instead'"
alias em="/data/data/com.termux/files/usr/bin/emacsclient -t -a '' -s "
fi fi
# dont allow mosh prediction (override in zshrc.local) # dont allow mosh prediction (override in zshrc.local)