dotfiles/README.md

78 lines
3.8 KiB
Markdown
Raw Normal View History

2017-06-12 16:22:05 +02:00
# brethil's dotfiles #
2020-02-14 16:37:41 +01:00
A set of zsh dotfiles
2017-06-12 16:22:05 +02:00
## Description ##
1. brethil_dotfile.sh: main file sourced by ~/.bash_profile
2017-07-14 21:20:20 +02:00
2. aliases.sh: contains alias definitions (sources ~/.dotfiles_aliases)
3. functions.sh: contains function definitions (sources ~/.dotfiles_functions)
2017-06-12 16:22:05 +02:00
4. colors.sh: contains color definitions
5. install.sh: run to install brethil's dotfiles
## Installation ##
Copy the dotfiles folder to the location where you want to keep it and then run install:
$ cd dotfiles && bash install.sh
Installs oh-my-zsh and sources aliases.sh, functions.sh and colors.sh, as well as installing
2017-07-14 21:20:20 +02:00
a a few utilities (see `install.sh`).
2017-06-12 16:22:05 +02:00
### Installed ###
2017-06-12 16:22:05 +02:00
2017-07-14 21:20:20 +02:00
0. oh-my-zsh (zsh config framework, lots of plugins available at https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins)
Two zsh themes: brethil and brethil-minimal.
2017-06-12 16:22:05 +02:00
1. byobu (wrapper/config for tmux, a screen multiplexer)
2017-07-14 21:20:20 +02:00
2. grc/ccze (output colorizers, color output of any command). Usage:
$ grc programname
$ programname | ccze
2017-06-12 16:22:05 +02:00
3. bmon (bandwidth monitor, shows graphs for bandwith usage)
2017-07-14 21:20:20 +02:00
4. rmate remote for Textmate (can be called with `mate`/`rmate`)
5. mtr (my traceroute, traceroute+ping network utility)
2017-06-12 16:22:05 +02:00
2017-07-14 21:20:20 +02:00
### Available Functions ###
0. `cheat`, show cheat sheet for commands using cheat.sh (`cheat commandname`)
2017-06-12 16:22:05 +02:00
1. Quickly edit/reload profile (`esource`/`resource`)
2. `ramdisk` (only on OSX) create a RAM disk. Default size: 1GB
` ramdisk 4`
creates a 4GB RAM disk
3. `color` to print colored text (see 3. in the Misc section):
2017-07-14 21:20:20 +02:00
color $Red "This will be printed in red"
color $Yellow "This will be printed in red"
2017-06-12 16:22:05 +02:00
4. `mecp` to copy files back to the machine from wich you are ssh-ing.
For this to work an ssh tunnel with Remoteforward is needed:
ssh -R 22:localhost:2222 YOURHOSTNAMEHERE
or specify this in ~/.ssh/config:
Host YOURHOSTNAMEHERE
Remoteforward 2222 localhost:22
2017-07-14 21:20:20 +02:00
This can be enabled in ~/.ssh/config globally for all hosts by uncommenting the relevant `Host * Remoteforward`.
2017-06-12 16:22:05 +02:00
You might have to manually edit the username in the mecp definition in functions.sh if this is
different between the two machines. mecp copies by default on the local machine on ~/Desktop/
2017-07-17 02:00:15 +02:00
5. Many more. Type "list_functions" to list defined functions and a small description
2017-06-12 16:22:05 +02:00
### Files/Folders ###
1. `~/bin`, `~/git`, `~/projects` folders
2017-06-12 16:22:05 +02:00
2. ssh config (`~/.ssh/config`):
* Create ssh keys if not defined already
* Keep connections alive by increasing timeout time
* Include multiplexer to allow quick multiple connections to the same host
* (Optional: Compression, this should allow more responsive shells with slow connections,
but will slow things down when copying large files. My suggestion is to have compression enabled
on a by-host basis in `~/.ssh/config`)
3. brethil.zsh-theme, brethil-minimal.zsh-themes, themes for oh-my-zsh, symlinked in `$ZSH/custom/themes` ($ZSH=~/.oh-my-zsh)
2017-06-12 16:22:05 +02:00
4. ~/.dotfiles_functions, ~/.dotfiles_aliases are sourced by this dotfiles, allowing for custom functions/aliases
5. useful_commands contains a list of useful commands (the first rule of the tautology club...)
2017-06-12 16:22:05 +02:00
### Misc ###
1. Colored output (via `grc`) for: `diff`, `configure`, `make`, `gcc`, `g`, `as`, `gas`, `ld`, `netstat`, `ping`, `traceroute`, `head`, `tail`, `dig`, `mount`, `ps`, `mtr`
2017-06-12 16:22:05 +02:00
2. Easy names for ANSI color escapes (Black, Red, Green, Yellow, Blue, Cyan, Purple, White, CLEAR),
for example:
`echo -e "${Green}This text will be green${CLEAR}"`
2017-07-14 21:20:20 +02:00
will result in green text. Use `$CLEAR` to clear previous escape sequences add B before the variable (check colors.sh)
2017-06-12 16:22:05 +02:00
name to use **bold** and U to underline (examples: $BRed, $UBlack for bold red and underlined black)
3. Type `esc` twice to add `sudo` before the current command
4. Autoupdate script running every two weeks, autoupdate function: dotfiles_selfupdate (or `git pull` from `$DOTFILES` folder)
2020-02-14 16:37:41 +01:00
5.