No description
Find a file
2020-12-21 14:06:10 +01:00
.github/workflows ci(buildx): add buildx workflow 2020-12-21 14:06:10 +01:00
bin Initial commit 2020-11-30 11:31:22 +01:00
docs Demo (raw iPad screencast) 2020-12-03 09:54:29 +01:00
nvim Updated vim plugin 2020-12-11 14:53:26 +01:00
ssh feat: post-fork cleanup 2020-12-21 13:46:15 +01:00
tmux Initial commit 2020-11-30 11:31:22 +01:00
docker-compose.yml feat: post-fork cleanup 2020-12-21 13:46:15 +01:00
Dockerfile.ubuntu feat: post-fork cleanup 2020-12-21 13:46:15 +01:00
LICENSE Initial commit 2020-11-28 17:47:08 +01:00
README.md feat: post-fork cleanup 2020-12-21 13:46:15 +01:00

my workspace/environment as a docker container

TODO:

  • Multiarch build
  • Github actions
  • Add the tools i use
    • zsh, spaceship-prompt, git
  • Add the configurations i have
    • zsh, git, nextcloud

Introduction

blink shell is an excellent minimalistic SSH and mosh client for apple mobile devices.

For some folks, like me that's a tool #1, I spent most of the time in terminal (also I work mostly from the iPad pro).

Here I share blink-related dotfiles and create a development repository.

Feel free to use, share and of course to contribute!

Clipboard

Paste from iPad to blink works out of the box, but in opposite it depends. If we copy wrapped lines, usually they breaks. I don't mind apps with menus and interfaces (i.e. mc, tmux with window splits, editors, etc.)

As for now, the perfect solution is to use OSC52 escape codes, these works well with ssh and recent mosh.

Disclamer

In order to get clipboard setup working, we need recent software: tmux 3+, mosh 1.3+, vim 8+ or neovim 4.3+

Check your repository first! Usually it means that such apps should be compiled or installed using brew (yes, it works with linux too!)

Setup

Clone repository to the .dotfiles folder:

git clone http://github.com/andrius/blink-dotfiles ~/.dotfiles

Tmux setup:

ln -s ~/.dotfiles/tmux/tmux.conf ~/.tmux.conf

VIM or neovim setup:

mkdir -p ~/.config
ln -s ~/.dotfiles/nvim ~/.config/nvim
ln -s ~/.dotfiles/nvim/vimrc ~/.vimrc
git clone https://github.com/Shougo/dein.vim ~/.cache/vim/dein/repos/github.com/Shougo/dein.vim
# vim users: replace nvim by vim below
nvim -V1 -es -i NONE -N --noplugin -u "/home/${SSH_USER}/.config/nvim/config/vimrc" \
  -c "try | call dein#clear_state() | call dein#update() | finally | messages | qall! | endtry"

Development setup with docker

It is possible to test stuff with docker. Given dockerfiles just contains openssh-server and mosh-server, and minimal setup to get things working. It is possible to test them directly from the blink shell

Supported docker services (and operating systems):

  • alpine

    tmux, mosh and neovim installed with apk, clipboard does not work with mosh;

  • debian

    tmux and mosh compiled, vim installed as a package. Clipboard works correctly;

  • brew

    debian with homebrew installed. tmux, mosh and neovim installed with brew, everything works;

  • ubuntu

    ubunut 20.10 with apt-get installed tmux, mosh and vim. Clipboard works correctly.

Start and stop service

To start:

# assign alpine, debian, brew or ubuntu to the SERVICE
SERVICE=alpine && \
docker-compose build --force-rm --pull ${SERVICE} && \
docker-compose up -d ${SERVICE} && \
docker-compose logs -ft --tail=100 ${SERVICE}

To stop:

docker-compose rm --stop --force

Each time when you build new docker image, SSH keys would be updated, so cleanup known hosts file first:

rm ~/.ssh/known_hosts

SSH access:

ssh -oPort=22022 blink@host

mosh access:

mosh blink@host -P 22022 -p 22022

(if there is issue due to the busy UDP port, you might kill mosh-server first):

docker-compose exec alpine killall mosh-server

References

vim-oscyank plugin

Demo

Screencast

download link

screencast