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
termux: _prepare dotfiles termux ## Bootstrap new termux
termux:
@./install -c config/termux.conf.yml
dotfiles: ## Update dotfiles
@./install

11
README.md

@ -12,6 +12,17 @@ Set up using dotbot:
# under 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
- 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
- ~/.tmux
- create:
- ~/.config/kitty
- shell:
- description: Clone zinit
quiet: true
@ -38,3 +41,35 @@
}
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: ['~']
- create:
- ~/.config/kitty
- link:
~/.dotfiles:
force: true
@ -37,33 +34,3 @@
~/.ideavimrc:
if: '[ `uname` = Darwin ]'
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 ..."
# https://github.com/4679/oh-my-termux
pkg install -y libcurl wget curl openssh vim git zsh unrar unzip less
pkg install -y tsu neofetch
pkg install -y libcurl wget curl openssh vim git zsh unrar unzip less tree htop tsu neofetch
echo -e "Successfully Installed"
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
if [ ! -d $HOME/.termux ]; then
mkdir $HOME/.termux
fi
curl -fsLo $HOME/.termux/colors.properties --create-dirs https://github.com/einverne/dotfiles/raw/master/termux/colors.properties
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
ln -s "$HOME/dotfiles/termux/.termux" "$HOME/.termux"
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
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
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