Merge branch 'readme' into main

This commit is contained in:
Christian Baer 2021-01-24 21:42:44 +01:00
commit 12ae1e614d
4 changed files with 96 additions and 125 deletions

117
README.md
View File

@ -2,9 +2,11 @@
These are my dotfiles. They are awesome.
This repo contains my dotfiles which I use at OS X and FreeBSD systems. This set features a nice and fast zsh config, a neat vim environment and a tmux config.
This repo contains my dotfiles which I use at macOS, FreeBSD and Linux systems. This set features a nice and fast zsh config, a neat vim environment and a tmux config.
![Image](https://raw.githubusercontent.com/chrisb86/dotfiles/main/screenshot.png)
The workstation realted stuff is mostly tested on macOS. Especially the key bindings may be not portable at the moment.
![Alacritty window using the dotfiles by chrisb86](https://raw.githubusercontent.com/chrisb86/dotfiles/main/screenshot.png)
The zsh prompt is handcrafted to look neat and provide some extra info. When you are root the user- and hostname color changes from blue to red. If you are connected via ssh, the prompt will show some green arrows behind the working path and when you are in a git repository, it will show some git infos at the right side.
@ -12,20 +14,45 @@ The tmux config contains some nice settings to make my work a bit easier and loo
My color scheme is the awesome [Nord Color scheme](https://www.nordtheme.com) by Arctic Ice Studio and my font is [~~FiraCode~~](https://github.com/tonsky/FiraCode) [Source Code Pro](https://adobe-fonts.github.io/source-code-pro/).
The repo ships with a bootstrap script that you can use to deploy and update the dotfiles.
The repo ships with a Makefile that you can use to deploy and update the dotfiles.
# bootstrap.sh help
Usage: bootstrap.sh command {params}
list List all files that will be copied
update Update the git repo and the included submodules
deploy Copy the files to ~
install Update and deploy these dotfiles
help Show this screen
```shell
# make help
help This help
all Update repo, decrypt secrets and run deploy-macos
install Update repor and run deploy-base
deploy-base Only deploy basic conf files for shell usage
deploy-workstation Deploy workstation specific config files (inherits deploy-shell)
deploy-macos Deploy macOS specific config files (inherits deploy-workstation)
gen-vscodium-plugin-list Update the list of VSCodium plugins
git-secrets-hide Hide secrets with git-secret
git-secrets-reveal Reveal secrets with git-secret
git-fetch Fetch changes from origin
git-push Push changes to origin
git-update-submodules Update all submodules
brew-bundle Install applications with brew bundle
brew-bundle-cleanup Removew all appplications that are not listed in Brewfile
deploy-alacritty Deploy alacritty config
deploy-bitbar Deploy BitBar config
deploy-duti Deploy duti config
deploy-espanso Deploy espanso config
deploy-htop Deploy htop config
deploy-skhd Deploy skhd config
deploy-tmux Deploy tmux config
deploy-vim Deploy vim config
deploy-vscodium Deploy VSCodium config
deploy-yabai Deploy yabai config
deploy-youtubedl Deploy youtube-dl config
deploy-zsh Deploy zsh config
deploy-brewfile Deploy Brewfile
deploy-ssh Deploy SSH config
deploy-hushlogin Deploy .hushlogin
```
The dotfiles will be copied to your **~**.
The repo is initialized for beeing used with git-secret. My own personal secrets are pushed to the repo as well and can be decrypted with my GPG key.
## ZSH with bells and whistles
The ZSH config doesnt use any frameworks and is tuned for speed.
@ -52,22 +79,70 @@ The tmux config rebinds the prefix key to C-a. It features different shortcuts t
It also supports nested sessions with a modified color scheme. Thats nice when using tmix.
![Image](https://raw.githubusercontent.com/chrisb86/dotfiles/main/screenshot-tmix.png)
![Alacritty window using the dotfiles by chrisb86 in a tmix session](https://raw.githubusercontent.com/chrisb86/dotfiles/main/screenshot-tmix.png)
## Alacritty
I love Alacritty because it's a damn fast Terminal emulator that's configured with a simple text file config.
I've configured it to use tmux for tabs and multiplexing and configured some usefull keybindings.
### Keybindings:
| Key | Modifier(s) | Description |
| -------- | ----------- | ------------------------ |
| N | ⌘ | Spawn a new instance |
| 0 (Zero) | ⌘ | Reset font size |
| + | ⌘ | Increase font size |
| - | ⌘ | Decrease font size |
| J | ⌘ | Move to next session |
| K | ⌘ | Move to previous session |
| T | ⌘ | Create window |
| H | ⌘ | Move to previous window |
| L | ⌘ | Move to next window |
| X | ⌘ | Kill pane/window |
| A | ⌘ | Split pane vertically |
| S | ⌘ | Split pane horizontally |
| Z | ⌘ | Maximize pane |
| T | ⌘⇧ | Create window in nested session |
| H | ⌘⇧ | Move to previous window in nested session |
| L | ⌘⇧ | Move to next window in nested session |
| X | ⌘⇧ | Kill pane/window in nested session |
| A | ⌘⇧ | Split pane vertically in nested session |
| S | ⌘⇧ | Split pane horizontally in nested session |
| Z | ⌘⇧ | Maximize pane in nested session |
| , | ⌘ | Open Alacritty config directory |
| ⌫ | ⌘ | Delete word/line |
| ← | ⌥ | Move one word left |
| → | ⌥ | Move one word right |
| ← | ⌘ | Move to beginning of the line |
| → | ⌘ | Move to end of the line |
## Installation
1. Get the dotfiles.
## ### Getting the dotfiles.
git clone https://git.debilux.org/chbaer/dotfiles.git
```shell
git clone https://github.com/chrisb86/dotfiles.git
```
2. Deploy
### Deploying the dotfiles
./make.sh install
3. Enjoy!
If you want to update to the newest version, run ``bootstrap.sh update`` from within the dotfiles folder and ``bootstrap.sh deploy`` to copy the updated files.
For installing the base set for shell usage run
```shell
make install
```
For the fullfl edged setup with decrypting of the secrets use
```shell
make install
```
To list all avaliable commands run:
```shell
make help
```
## Credits

104
make.sh
View File

@ -1,104 +0,0 @@
#!/bin/sh
# make.sh
# Copyright 2016 Christian Baer
# https://git.debilux.org/chbaerr/dotfiles
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTI
exclude="README.md|init|Makefile|screenshot.png|.png|.git|.gitignore|.gitmodules|.gitsecret|.DS_Store|make.sh"
self=`basename -- "$0"`
basedir=`dirname "$0"`
# Show help screen
# Usage: help exitcode
help () {
echo "Usage: ${self} command {params}"
echo
echo "list List all files that will be copied"
echo "update Update the git repo and the included submodules"
echo "deploy Copy the files to ~"
echo "install Update and deploy these dotfiles"
echo "help Show this screen"
exit $1
}
# Update git repo and submodules
# Usage: df_update
df_update () {
echo "#### Updating git repos and submodules"
git pull origin
git submodule init
git submodule update
git submodule foreach git pull origin
}
# Deploy files to ~
# Usage: df_deploy
df_deploy () {
list_dirs=$(find . -type d | cut -d "/" -f 2- | grep -vE "${exclude}")
list_files=$(find . -type f | cut -d "/" -f 2- | grep -vE "${exclude}")
for dir in ${list_dirs}; do
mkdir -p ${HOME}/${dir}
done
for file in ${list_files}; do
cp -f ${file} ${HOME}/${file}
done
}
# List files that will be copied
# Usage: df_list
df_list () {
find . -print | grep -vE "$exclude"
}
case "$1" in
######################## bootstrap.sh HELP ########################
help)
help 0
;;
######################## bootstrap.sh LIST ########################
list)
# Lists all files in repo, except those specified in $exclude"
df_list
;;
######################## bootstrap.sh DEPLOY ########################
deploy)
df_deploy
;;
######################## bootstrap.sh UPDATE ########################
update)
df_update
;;
######################## bootstrap.sh INSTALL ########################
install)
df_update
df_deploy
;;
*)
help 1
;;
esac

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 KiB

After

Width:  |  Height:  |  Size: 493 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 KiB

After

Width:  |  Height:  |  Size: 558 KiB