termux-float icon indicating copy to clipboard operation
termux-float copied to clipboard

Is there any ways to copy & paste on termux float??

Open DreamerSSDGang opened this issue 3 years ago • 1 comments

Feature description

DreamerSSDGang avatar Dec 07 '21 20:12 DreamerSSDGang

If you using zsh, you can paste

  1. Install termux-api.apk
  2. Install termux-api in shell (pkg install termux-api)
  3. add this to the end of .zshrc:
function pfc () {
        COMND=$(termux-clipboard-get)
        RBUFFER=${COMND}${RBUFFER}
        CURCUS=$CURSOR
        CURSOR=$#BUFFER
        CURSOR=$(($CURCUS + $#COMND))
}
zle -N pfc
bindkey "^[v" pfc

restart shell or execute "exec zsh" this will bind paste to Alt-V

x-finity avatar Feb 06 '22 19:02 x-finity