termux / termux-float

Termux add-on app to show the terminal in a floating terminal window.
https://f-droid.org/en/packages/com.termux.window
Other
465 stars 77 forks source link

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

Open DreamerSSDGang opened 2 years ago

DreamerSSDGang commented 2 years ago

Feature description

x-finity commented 2 years ago

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