termbox

所属分类:操作系统开发
开发工具:Shell
文件大小:100KB
下载次数:0
上传日期:2020-10-29 19:02:20
上 传 者sh-1993
说明:  以命令行为中心的工作流的流浪箱
(Vagrant boxes for command-line centric workflows)

文件列表:
_common (0, 2020-10-30)
_common\ansible-playbooks (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\group_vars (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\group_vars\all (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\playbook.yml (177, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\bat (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\bat\handlers (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\bat\handlers\main.yml (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\bat\tasks (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\bat\tasks\main.yml (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\fzf (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\fzf\handlers (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\fzf\handlers\main.yml (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\fzf\tasks (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\fzf\tasks\main.yml (673, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\fzf\vars (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\fzf\vars\Fedora.yml (80, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\fzf\vars\Ubuntu.yml (88, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\fzf\vars\default.yml (4, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\git (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\git\handlers (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\git\handlers\main.yml (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\git\tasks (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\git\tasks\main.yml (335, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\git\vars (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\git\vars\Fedora.yml (24, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\git\vars\Ubuntu.yml (25, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\git\vars\defaults.yml (13, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\lnav (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\lnav\handlers (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\lnav\handlers\main.yml (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\lnav\tasks (0, 2020-10-30)
_common\ansible-playbooks\command-line-utilities\roles\lnav\tasks\main.yml (666, 2020-10-30)
... ...

# termbox `termbox` is a project that provides Vagrant boxes meant to be used as base boxes for work that requires command-line intensive workflows. The repository contains the scripts, Ansible playbooks, and configuration files needed to generate the Vagrant boxes using link:https://www.packer.io[Hashicorp's Packer]. All `termbox` VMs are provisioned with a handful of highly useful command line utilities to provide a powerful, user-friendly command-line experience out-of-the-box. `termbox` images were designed for those who want to boot up a fresh VM for the purpose of building a temporary lab environment or testing out a new piece of software and would like to have some familiar command line tools installed withoutdoing any manual provisioning. They work equally well as base boxes for building more complex VMs. The tools that are included in `termbox` aide in tasks such as: - searching for and editing files - navigating the filesystem - file management - system monitoring - browsing & interacting with local git repositories - searching and navigating logs In addition to being a solid base box for creating a virtual lab environment, `termbox` is also a great playground for those who are new to the command-line and want to familiarize themselves with some of the more powerful tools available to them. For these users, I hope that these VMs will make their journey less cumbersome. For those that wish to extend the functionality of `termbox`, the Ansible playbooks used to provision the boxes are located at `_common/ansible-playbooks`. == Generating the boxes All `termbox` images are generated from using a minimal install ISO, and thus contain really just the necessary software to run the system and the tools mentioned below before installing the softwares listed below. To generate a Fedora 32 Vagrant box using Virtualbox as the provider, for example, just run: [source,bash] cd fedora packer build -only=virtualbox-iso -vars-file=32.vars fedora.json The `-vars-file` argument will contain the `packer` variables for the major release of the distribution chosen to build, and the final argument will be the json file corresponding to the distribution. Possible providers include: - `virtualbox-iso` - `vmware-iso` - `parallels-iso` Possible distributions include: - Ubuntu - Fedora - CentOS == Command-line Utilities Upon booting up a `termbox` VM, the following commands will be immediately available: [cols="3*",options="header"] |=== |command |description |type |link:https://github.com/sharkdp/fd[fd] |an intuive, powerful alternative to the `find` command |binary |link:https://github.com/BurntSushi/ripgrep[rg] |an extremely fast way to recursively search files using regular expressions |binary |link:https://github.com/sharkdp/bat[bat] |a clone of cat that supports syntax highlighting |binary |link:https://github.com/junegunn/fzf[fzf] |a powerful fuzzy finder useful for both finding files as well as useful when integrated with `vim` |binary |link:https://github.com/Peltoche/lsd[lsd] |an colorful, featureful alternative to the `ls` command |binary |link:https://l0xy.sh/code/tagger[tagger] |a tool for using extended file attributes to tag and organize files and directories |shell script |link:https://github.com/koalaman/shellcheck[shellcheck] |a shell script static analysis tool that gives warnings and suggestions for bash/sh shell scripts |binary |link:https://github.com/imsnif/bandwhich[bandwhich] |a TUI network monitor including bandwidth stats and active connections |binary |link:https://kmon.cli.rs[kmon] |a TUI kernel module monitor |binary |link:https://github.com/jarun/nnn[nnn] |a lightweight but powerful TUI file manager |package |link:https://github.com/jonas/tig[tig] |a powerful TUI interface for git, particularly useful for browsing the history of repositories on the local machine |package |link:https://httpie.org[httpie] |a user-friendly command-line HTTP client for the API era |package |link:https://stedolan.github.io/jq[jq] |a lightweight and flexible command-line JSON processor |package |link:https://dev.yorhel.nl/ncdu[ncdu] |a disk usage analyzer with an ncurses interface |package |link:https://github.com/l0xy/shell-functions/blob/master/upload.sh[upload] |upload files from the local machine to file-sharing sites and displays a QR code containing a link to the file for easily open/share the link on a mobile device |shell function |link:https://github.com/l0xy/shell-functions/blob/master/files.sh[trspaces] |replaces all spaces with underscores in files in the working directory |shell function |link:https://github.com/l0xy/shell-functions/blob/master/explain.sh[explain] |takes a command and a switch for that command as arguments, e.g. `explain tar -x`, and prints out the relevant section of the man page explaining what that switch does |shell function |=== === binaries The pre-compiled binaries are provisioned via another tool I created named link:https://github.com/l0xy/provii[provii]. These binaries are all installed in `/usr/local/bin`. If man pages are available for the program in question, they are installed in `/usr/local/share/man/`. Finally, if shell completions are available they are installed in `/usr/local/lib/omz/completion`. === packages All packages are installed using the systems native package manager and should be managed thus. === shell scripts All shell scripts are installed in `/usr/local/bin`. === shell functions All shell functions are installed in `/etc/zsh`. == Zsh The default shell for `termbox` is `zsh`, a robust and powerful shell that offers many extensions beyond the standard `bash` shell. Both `zsh` and `oh-my-zsh`, a large set of `zsh` plugins, are installed system-wide. To modify the `zsh` init files, i.e. add a custom script or alias, simply add it to a file with the `.zsh` extension to the `/etc/zsh` directory or modify the system `zshrc` located at `/etc/zshrc`. == Neovim In addition to the command line utitlies above `termbox` also comes pre-installed with `nvim` and a handful of useful plugins. Additionally, the `nvim` initialization files include some handy keybindings. === plugins link:https://github.com/dense-analysis/ale[ ale ]/link:https://github.com/maximbaz/lightline-ale[ lightline-ale ]:: check syntax in vim/neovim asynchronously and fix files link:https://github.com/tpope/vim-commentary[ vim-commentary ]:: intelligently comment/uncomment lines based on filetype link:https://github.com/tpope/vim-surround[ vim-surround ]:: surround or strip quotes, parenthesis, etc. to/from areas of text link:https://github.com/tpope/vim-fugitive[ vim-fugitive ]:: an amazing git wrapper for vim/neovim link:https://github.com/junegunn/fzf.vim[ fzf.vim ]:: fuzzy search (in buffer, across buffers, in current directory, etc.) link:https://github.com/sheerun/vim-polyglot[ vim-polyglot ]:: a pleathora of useful syntax files for various file formats link:https://github.com/itchyny/lightline.vim[ lightline.vim ]:: enhanced, lightweight vim/neovim status bar link:https://github.com/preservim/nerdtree[ nerdtree ]/link:https://github.com/Xuyuanp/nerdtree-git-plugin[ nerdtree-git-plugin ]:: browse files in project directory while displaying git status for each file link:https://github.com/mcchrish/nnn.vim[ nnn.vim ]:: open `nnn` in a popup window, useful for moving/rename files link:https://github.com/preservim/tagbar[ tagbar ]/link:https://github.com/ludovicchabant/vim-gutentags[ vim-gutentags ]:: display tags generated by gutentags in a sidebar for nagivation link:https://github.com/benmills/vimux[ vimux ]:: pipe output of commands run in vim/neovim into a new tmux pane === keybindings The leader key has been changed to `;` for convenience. Below are some of the most useful keybindings available (see `/etc/vimrc.local` for all available bindings): [source,vim] ---- let mapleader = ";" ---- ==== change window [source,vim] ---- " Move the cursor to the window... " ;k - above current one nmap k k " ;j - below current one nmap j j " ;h - to the left of the current one nmap h h " ;l - to the right of the current one nmap l l " ; - previously selected nmap p ---- ==== split window [source,vim] ---- " Split current window, creating a new view of the current buffer... " C-j - below the current one nmap :belowright split " C-k - above the current one nmap :split " C-h - to the left of the current one nmap :vsplit " C-l - to the right of the current one nmap :belowright vsplit ---- ==== new window [source,vim] ---- " Interactively populate a new window with an open buffer... " ;J - below the current window nmap J :belowright new +Buffers " ;K - above the current window nmap K :new +Buffers " ;H - to the left the current window nmap H :vnew +Buffers " ;L - to the right of the current window nmap L :belowright vnew +Buffers ---- ==== resize window [source,vim] ---- " CTRL + arow keys nmap - nmap + nmap < nmap > ---- ==== previous/next syntax error [source,vim] ---- " C-e - jump to next syntax error nmap (ale_next_wrap) " C-E - jump to previous syntax error nmap (ale_previous_wrap) ---- ==== file browsing/management [source,vim] ---- " ;n - toggle nnn file manager nmap n :NnnPicker " ;e - toggle NERDTree file browser nmap e :NERDTree ---- ==== tagbar [source,vim] ---- " ;t - open/close tagbar nmap tt :TagbarToggle " ;tt - temporarily open tagbar to jump to a particular tag nmap t :TagbarOpenAutoClose ---- ==== fuzzy searching [source,vim] ---- " C-/ - fuzzy find lines in all open buffers nmap C-/ :Lines " ;/ - fuzzy find lines in current buffer nmap / :BLines " ;f - fuzzy find files in current working directory nmap f :Files " ;b - fuzzy find open buffers nmap b :Buffers ---- ==== miscellaneous [source,vim] ---- " ;c - comment/uncomment selected lines lines vmap c :Commentary " ;d - show changes made since file was last saved nmap d :DiffOrig ---- ==== git [source,vim] ---- " ;gs - show status of current Git repository in a new tab nmap gs :tab :Gstatus " ;gl - show Git log in a new tab nmap gl :tab :Gclog ----

近期下载者

相关文件


收藏者