mirror of
https://github.com/mentos1386/dotfiles.git
synced 2025-01-31 00:35:42 +00:00
docs(README): update readme
This commit is contained in:
parent
a2805c0b67
commit
e0b897449e
1 changed files with 16 additions and 125 deletions
141
README.md
141
README.md
|
@ -1,19 +1,13 @@
|
||||||
![Ubuntu](https://github.com/mentos1386/env/workflows/Ubuntu/badge.svg)
|
![Ubuntu](https://github.com/mentos1386/workspace/workflows/Ubuntu/badge.svg)
|
||||||
![Fedora](https://github.com/mentos1386/env/workflows/Fedora/badge.svg)
|
![Fedora](https://github.com/mentos1386/workspace/workflows/Fedora/badge.svg)
|
||||||
![Packages](https://github.com/mentos1386/env/workflows/Packages/badge.svg)
|
![Packages](https://github.com/mentos1386/workspace/workflows/Packages/badge.svg)
|
||||||
|
|
||||||
my workspace/environment as a docker container
|
my workspace as a docker container
|
||||||
==============================================
|
==================================
|
||||||
|
|
||||||
- [Introduction](#introduction)
|
- [Introduction](#introduction)
|
||||||
- [Clipboard](#clipboard)
|
- [Clipboard](#clipboard)
|
||||||
- [Disclamer](#disclamer)
|
|
||||||
- [Setup](#setup)
|
|
||||||
- [Development setup with docker](#development-setup-with-docker)
|
|
||||||
- [Start and stop service](#start-and-stop-service)
|
|
||||||
- [Access host from the blink](#access-host-from-the-blink)
|
|
||||||
- [References](#references)
|
- [References](#references)
|
||||||
- [Demo](#demo)
|
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
|
|
||||||
|
@ -34,9 +28,18 @@ for apple mobile devices.
|
||||||
For some folks, like me that's a tool #1, I spent most of the time in terminal
|
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).
|
(also I work mostly from the iPad pro).
|
||||||
|
|
||||||
Here I share blink-related dotfiles and create a development repository.
|
In this repo, i'm trying to create a full development/living workspace inside docker containers.
|
||||||
|
|
||||||
Feel free to use, share and of course to contribute!
|
One of the requirements is that docker image produced should work on arm-based devices as well as on amd64. To allow for same experiance if you are on RaspberryPi or on your VPS.
|
||||||
|
|
||||||
|
## Why so complex
|
||||||
|
|
||||||
|
First i planed to just create a Dockerfile and build it using buildx multiarch capabilities.
|
||||||
|
But i soon run in to issue that tools i use aren't available for ARM.
|
||||||
|
As a solution, i started compiling them myself which resulted in a bunch of Dockerfiles and
|
||||||
|
duplicated github actions. To solve this, i created "workspace" cli tool to manage this.
|
||||||
|
|
||||||
|
Yeah i know, oeverengineering. But i want to have a simple way of bumping and adding new packages.
|
||||||
|
|
||||||
# Clipboard
|
# Clipboard
|
||||||
|
|
||||||
|
@ -47,119 +50,7 @@ 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
|
As for now, the perfect solution is to use OSC52 escape codes, these works well
|
||||||
with ssh and recent `mosh`.
|
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](https://brew.sh) (yes, it works with linux too!)
|
|
||||||
|
|
||||||
# Setup
|
|
||||||
|
|
||||||
Clone repository to the .dotfiles folder:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
git clone http://github.com/andrius/blink-dotfiles ~/.dotfiles
|
|
||||||
```
|
|
||||||
|
|
||||||
Tmux setup:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
ln -s ~/.dotfiles/tmux/tmux.conf ~/.tmux.conf
|
|
||||||
```
|
|
||||||
|
|
||||||
VIM or neovim setup:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
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:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# 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:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker-compose rm --stop --force
|
|
||||||
```
|
|
||||||
|
|
||||||
## Access host from the blink
|
|
||||||
|
|
||||||
Each time when you build new docker image, SSH keys would be updated, so cleanup
|
|
||||||
known hosts file first:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
rm ~/.ssh/known_hosts
|
|
||||||
```
|
|
||||||
|
|
||||||
SSH access:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
ssh -oPort=22022 blink@host
|
|
||||||
```
|
|
||||||
|
|
||||||
mosh access:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
mosh blink@host -P 22022 -p 22022
|
|
||||||
```
|
|
||||||
|
|
||||||
(if there is issue due to the busy UDP port, you might kill mosh-server first):
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker-compose exec alpine killall mosh-server
|
|
||||||
```
|
|
||||||
|
|
||||||
# References
|
# References
|
||||||
|
|
||||||
[vim-oscyank plugin](https://github.com/ojroques/vim-oscyank)
|
[vim-oscyank plugin](https://github.com/ojroques/vim-oscyank)
|
||||||
|
|
||||||
# Demo
|
|
||||||
|
|
||||||
Screencast
|
|
||||||
|
|
||||||
[download link](./docs/sceencast.mp4)
|
|
||||||
|
|
||||||
![screencast](https://raw.githubusercontent.com/andrius/blink-dotfiles/main/docs/sceencast.mp4)
|
|
||||||
|
|
Loading…
Reference in a new issue