Browse Source

Add termux support (#6)

master
Ein Verne 2 years ago committed by GitHub
parent
commit
1246f97bdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      Makefile
  2. 11
      README.md
  3. 35
      config/bootstrap.conf.yml
  4. 33
      config/install.conf.yml
  5. 22
      config/termux.conf.yml
  6. 0
      termux/.termux/colors.properties
  7. 0
      termux/.termux/font.ttf
  8. 1
      termux/.termux/termux.properties
  9. 15
      termux/setup.sh
  10. 1
      termux/termux.properties

5
Makefile

@ -11,6 +11,11 @@ _bootstrap:
bootstrap: _prepare dotfiles _bootstrap ## Bootstrap new machine bootstrap: _prepare dotfiles _bootstrap ## Bootstrap new machine
termux: _prepare dotfiles termux ## Bootstrap new termux
termux:
@./install -c config/termux.conf.yml
dotfiles: ## Update dotfiles dotfiles: ## Update dotfiles
@./install @./install

11
README.md

@ -12,6 +12,17 @@ Set up using dotbot:
# under macOS # under macOS
make macos make macos
## Termux setup
Install dependency first:
pkg install make python vim git
then:
git clone [email protected]:einverne/dotfiles.git
cd dotfiles
make termux
## Overview ## Overview
- using [dotbot](https://github.com/anishathalye/dotbot/) to manage dotfiles, [read more](https://blog.einverne.info/post/2020/08/use-dotbot-dotfiles-management.html) - using [dotbot](https://github.com/anishathalye/dotbot/) to manage dotfiles, [read more](https://blog.einverne.info/post/2020/08/use-dotbot-dotfiles-management.html)

35
config/bootstrap.conf.yml

@ -3,6 +3,9 @@
- ~/.zinit - ~/.zinit
- ~/.tmux - ~/.tmux
- create:
- ~/.config/kitty
- shell: - shell:
- description: Clone zinit - description: Clone zinit
quiet: true quiet: true
@ -38,3 +41,35 @@
} }
update_shell update_shell
- link:
~/.config/espanso:
if: '[ `uname` = Linux ]'
path: espanso
~/Library/Preferences/espanso:
if: '[ `uname` = Darwin ]'
path: espanso
~/.hammerspoon:
if: '[ `uname` = Darwin ]'
path: hammerspoon
~/.mackup.cfg:
if: '[ `uname` = Darwin ]'
path: mackup/mackup.cfg
~/.Brewfile:
if: '[ `uname` = Darwin ]'
path: Brewfile
~/.config/kitty/kitty.conf:
if: '[ `uname` = Darwin ]'
path: kitty/kitty.conf
~/.config/kitty/base16-solarized-dark-256.conf:
if: '[ `uname` = Darwin ]'
path: kitty/base16-solarized-dark-256.conf
~/.skhdrc:
if: '[ `uname` = Darwin ]'
path: skhd/skhdrc
~/.yabairc:
if: '[ `uname` = Darwin ]'
path: yabai/yabairc
~/.yabai_focus_display:
if: '[ `uname` = Darwin ]'
path: yabai/yabai_focus_display

33
config/install.conf.yml

@ -5,9 +5,6 @@
- clean: ['~'] - clean: ['~']
- create:
- ~/.config/kitty
- link: - link:
~/.dotfiles: ~/.dotfiles:
force: true force: true
@ -37,33 +34,3 @@
~/.ideavimrc: ~/.ideavimrc:
if: '[ `uname` = Darwin ]' if: '[ `uname` = Darwin ]'
path: idea/.ideavimrc path: idea/.ideavimrc
~/.config/espanso:
if: '[ `uname` = Linux ]'
path: espanso
~/Library/Preferences/espanso:
if: '[ `uname` = Darwin ]'
path: espanso
~/.hammerspoon:
if: '[ `uname` = Darwin ]'
path: hammerspoon
~/.mackup.cfg:
if: '[ `uname` = Darwin ]'
path: mackup/mackup.cfg
~/.Brewfile:
if: '[ `uname` = Darwin ]'
path: Brewfile
~/.config/kitty/kitty.conf:
if: '[ `uname` = Darwin ]'
path: kitty/kitty.conf
~/.config/kitty/base16-solarized-dark-256.conf:
if: '[ `uname` = Darwin ]'
path: kitty/base16-solarized-dark-256.conf
~/.skhdrc:
if: '[ `uname` = Darwin ]'
path: skhd/skhdrc
~/.yabairc:
if: '[ `uname` = Darwin ]'
path: yabai/yabairc
~/.yabai_focus_display:
if: '[ `uname` = Darwin ]'
path: yabai/yabai_focus_display

22
config/termux.conf.yml

@ -0,0 +1,22 @@
- shell:
- description: backup .termux
command: |
mv "$HOME/.termux" "$HOME/.termux.bak.$(date +%Y.%m.%d-%H:%M:%S)"
- description: install tools
command: |
pkg install -y termux-tools libcurl wget curl openssh vim git zsh unrar unzip less tree htop tsu neofetch fzf ncurses-utils
- link:
~/.termux:
path: termux/.termux
- shell:
- description: Clone zinit
quiet: true
command: |
if cd ~/.zinit/bin;
then git pull;
else git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin; fi
- chsh -s zsh
- termux-reload-settings
- echo "Done!"

0
termux/colors.properties → termux/.termux/colors.properties

0
termux/font.ttf → termux/.termux/font.ttf

1
termux/.termux/termux.properties

@ -0,0 +1 @@
extra-keys = [['ESC','/','|','HOME','UP','END','PGUP'],['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]

15
termux/setup.sh

@ -2,25 +2,26 @@
echo -e "Installing dependencies ..." echo -e "Installing dependencies ..."
# https://github.com/4679/oh-my-termux # https://github.com/4679/oh-my-termux
pkg install -y libcurl wget curl openssh vim git zsh unrar unzip less pkg install -y libcurl wget curl openssh vim git zsh unrar unzip less tree htop tsu neofetch
pkg install -y tsu neofetch
echo -e "Successfully Installed" echo -e "Successfully Installed"
if [ -d "$HOME/.termux" ]; then if [ -d "$HOME/.termux" ]; then
mv $HOME/.termux $HOME/.termux.bak mv "$HOME/.termux" "$HOME/.termux.bak.$(date +%Y.%m.%d-%H:%M:%S)"
fi fi
if [ ! -d $HOME/.termux ]; then if [ ! -d $HOME/.termux ]; then
mkdir $HOME/.termux mkdir $HOME/.termux
fi fi
curl -fsLo $HOME/.termux/colors.properties --create-dirs https://github.com/einverne/dotfiles/raw/master/termux/colors.properties ln -s "$HOME/dotfiles/termux/.termux" "$HOME/.termux"
curl -fsLo $HOME/.termux/termux.properties --create-dirs https://github.com/einverne/dotfiles/raw/master/termux/termux.properties
curl -fsLo $HOME/.termux/font.ttf --create-dirs https://github.com/einverne/dotfiles/raw/master/termux/font.ttf
git clone git://github.com/robbyrussell/oh-my-zsh.git $HOME/.oh-my-zsh --depth 1 git clone https://github.com/robbyrussell/oh-my-zsh $HOME/.oh-my-zsh --depth 1
cp $HOME/.oh-my-zsh/templates/zshrc.zsh-template $HOME/.zshrc cp $HOME/.oh-my-zsh/templates/zshrc.zsh-template $HOME/.zshrc
sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="agnoster"/' $HOME/.zshrc sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="agnoster"/' $HOME/.zshrc
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.zsh-syntax-highlighting" --depth 1
echo "source $HOME/.zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> "$HOME/.zshrc"
chsh -s zsh chsh -s zsh
termux-setup-storage termux-setup-storage

1
termux/termux.properties

@ -1 +0,0 @@
extra-keys = [['ESC','/','-','HOME','UP','END','PGUP'],['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]
Loading…
Cancel
Save