Advertisement
Jackspade9624

termux custom cd and extra keys

Feb 25th, 2025
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. ▪︎Termux Customizable cd and Extra Keys
  2.  
  3. (Date, Time, Directory,, Session Count, Font Color Output)
  4.  
  5. Customize your colors, bash-colors.md
  6. https://gist.github.com/JBlond/2fea43a3049b38287e5e9cefc87b2124
  7.  
  8. cd ~
  9.  
  10.  
  11.  
  12. nano .bashrc
  13.  
  14. PS1='\[\033[1;91m\]\D{%b-%d-%Y} \[\033[1;93m\]\@
  15. \[\033[01;94m\]\w\[\033[1;97m\] \#\[\e[1;92m\] '
  16.  
  17. (Without date and time)
  18.  
  19. PS1='\[\033[01;34m\]\w\[\033[0;97m\] \#\[\e[0;32m\] '
  20.  
  21. CTRL o
  22. press enter to save file modifications
  23.  
  24. CTRL x
  25. exit nano .bashrc
  26.  
  27. source ~/.bashrc
  28.  
  29. termux-reload-settings
  30.  
  31. exit terminal and start new session
  32.  
  33. ▪︎ Extra Keys and Modifications
  34.  
  35. cd .termux
  36.  
  37. nano termux.properties
  38.  
  39. extra-keys = [ \
  40. ['ESC','/','-','HOME','UP','END','PGUP','BKSP'], \
  41. ['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN','ENTER'] \
  42. ]
  43.  
  44. (add to bottom of existing file, customize your layout, change keys)
  45.  
  46. CTRL o
  47. press enter to save file modifications
  48.  
  49. CTRL x
  50. exit nano termux.properties
  51.  
  52. termux-reload-settings
  53.  
  54. exit terminal and start new session
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement