README.md 5.38 KB
Newer Older
Felix Hamann's avatar
Felix Hamann committed
1
# dotfiles #
Felix Hamann's avatar
Felix Hamann committed
2

Felix Hamann's avatar
Felix Hamann committed
3 4
All the nice things to make my daily life easier.

Felix Hamann's avatar
Felix Hamann committed
5

Felix Hamann's avatar
Felix Hamann committed
6
## Description ##
Felix Hamann's avatar
Felix Hamann committed
7

8
General configurations and fish functions. The installer script
Felix Hamann's avatar
Felix Hamann committed
9
`install.fish` automatically links these files:
10 11

* `~/.tmux.conf`
Felix Hamann's avatar
Felix Hamann committed
12
* `~/.emacs.d/mod.d`
13 14
* `.config/fish/config.fish`
* `.config/fish/functions/*`
Felix Hamann's avatar
Felix Hamann committed
15 16 17


## Installation ##
Felix Hamann's avatar
Felix Hamann committed
18

Felix Hamann's avatar
Felix Hamann committed
19 20 21 22
Run `./install.fish`. This creates symlinks for fish related stuff in
`~/.config`, the emacs configuration in `~/.emacs.d/mod.d` and the
tmux configuration `~/.tmux.conf`. This script is invoked by
`install.apt.sh`.
Felix Hamann's avatar
merged  
Felix Hamann committed
23

Felix Hamann's avatar
Felix Hamann committed
24
You need to add this to your `.emacs`
Felix Hamann's avatar
Felix Hamann committed
25

Felix Hamann's avatar
Felix Hamann committed
26 27 28 29 30
```
(defvar ktz/is-server nil)
(defvar ktz/mod-dir "~/.emacs.d/mod.d")
(load (concat ktz/mod-dir "/init"))
```
Felix Hamann's avatar
merged  
Felix Hamann committed
31

Felix Hamann's avatar
Felix Hamann committed
32
For the server configuration use `(defvar ktz/is-server t)`.
Felix Hamann's avatar
merged  
Felix Hamann committed
33 34


35
## Documentation ##
Felix Hamann's avatar
Felix Hamann committed
36

Felix Hamann's avatar
Felix Hamann committed
37
### alias.fish - Alias framework ###
Felix Hamann's avatar
Felix Hamann committed
38

39
#### Miscellaneous ####
Felix Hamann's avatar
Felix Hamann committed
40

Felix Hamann's avatar
Felix Hamann committed
41 42 43 44 45 46
| Command          | Equivalent                 |
|------------------|----------------------------|
| `ll <args>`      | `ls -lhAp <args>`          |
| `e <args>`       | `emacs -nw <args>`         |
| `e -gui <args>`  | `emacs <args>`             |
| `s <args>`       | `sudo fish -c "<args>"`    |
Felix Hamann's avatar
Felix Hamann committed
47

Felix Hamann's avatar
Felix Hamann committed
48 49
#### c - systemctl and journalctl ####

Felix Hamann's avatar
Felix Hamann committed
50 51
| Command     |                             |
|-------------|-----------------------------|
Felix Hamann's avatar
Felix Hamann committed
52
| `c`         | `systemctl`                 |
Felix Hamann's avatar
Felix Hamann committed
53
| `c dis [0]` | `systemctl disable [0]`     |
Felix Hamann's avatar
Felix Hamann committed
54 55
| `c dr`      | `systemctl daemon-reload    |
| `c en [0]`  | `systemctl enable [0]`      |
Felix Hamann's avatar
Felix Hamann committed
56 57 58
| `c j [0]`   | `journalctl -u [0] -b`      |
| `c jf [0]`  | `journalctl -u [0] -b -f`   |
| `c m [0]`   | `systemctl mask [0]`        |
Felix Hamann's avatar
Felix Hamann committed
59 60
| `c rl [0]`  | `systemctl reload [0]`      |
| `c rs [0]`  | `systemctl restart [0]`     |
Felix Hamann's avatar
Felix Hamann committed
61 62 63 64
| `c sa [0]`  | `systemctl start [0]`       |
| `c so [0]`  | `systemctl stop [0]`        |
| `c st [0]`  | `systemctl status [0]`      |
| `c u [0]`   | `systemctl unmask [0]`      |
Felix Hamann's avatar
Felix Hamann committed
65 66


67
#### a - apt-* shortcuts ####
Felix Hamann's avatar
Felix Hamann committed
68

Felix Hamann's avatar
Felix Hamann committed
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
| Command    |                        |
|------------|------------------------|
| `a`        | `apt`                  |
| `a ar`     | `apt autoremove`       |
| `a c`      | `apt-get clean`        |
| `a dg`     | `apt full-upgrade`     |
| `a i [0]`  | `apt install [0]`      |
| `a pg [0]` | `apt purge [0]`        |
| `a r [0]`  | `apt remove [0]`       |
| `a ug`     | `apt upgrade`          |
| `a up`     | `apt update`           |
| `a d [0]`  | `apt-get download [0]` |
| `a s [0]`  | `apt-cache search [0]` |
| `a fs [0]` | `apt-file search [0]`  |
| `a sh [0]` | `apt show [0]`         |
Felix Hamann's avatar
Felix Hamann committed
84 85 86 87 88

#### g - Git shortcuts ####

Shortcuts for `git`. `args` may be optional.

Felix Hamann's avatar
Felix Hamann committed
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
| Command        | Equivalent               | Description            |
|----------------|--------------------------|------------------------|
| `g `           | `git`                    | `git`                  |
| `g a   <args>` | `git add <args>`         | `git help add`         |
| `g b   <args>` | `git branch <args>`      | `git help branch`      |
| `g c   <args>` | `git commit <args>`      | `git help commit`      |
| `g f   <args>` | `git fetch <args>`       | `git help fetch`       |
| `g cl  <args>` | `git clone <args>`       | `git help clone`       |
| `g co  <args>` | `git checkout <args>`    | `git help checkout`    |
| `g d   <args>` | `git diff <args>`        | `git help diff`        |
| `g gpl <args>` | -                        | pull from all remotes  |
| `g gps <args>` | -                        | push to all remotes    |
| `g h   <args>` | `git help <args>`        | `git help`             |
| `g l   <args>` | `git log <args>`         | `git help log`         |
| `g mg  <args>` | `git merge <args>`       | `git help merge`       |
| `g mv  <args>` | `git mv <args>`          | `git help mv`          |
| `g ps  <args>` | `git push <args> <args>` | `git help push <args>` |
| `g pl  <args>` | `git pull <args>`        | `git help pull`        |
| `g plr <args>` | `git pull --rebase <a>`  | `git help pull`        |
| `g rm  <args>` | `git rm <args>`          | `git help rm`          |
| `g rt  <args>` | `git remote <args>`      | `git help remote`      |
| `g s   <args>` | `git status <args>`      | `git help status`      |
| `g st  <args>` | `git stash <args>`       | `git help stash`       |
| `g u   <args>` | `git reset HEAD <args>`  | unstage file           |
| `g v`          | `git version`            | -                      |
Felix Hamann's avatar
Felix Hamann committed
114 115 116 117 118 119 120 121 122 123 124 125


#### t - tmux shortcuts ####

Shortcuts for `tmux`. `args` may be optional.

| Command                         | Equivalent                                     | Description                |
|---------------------------------|------------------------------------------------|----------------------------|
| `t ls`                          | `tmux list-sessions`                           | List current tmux sessions |
| `t a [<session-name>] [<args>]` | `tmux attach-session <args> -t <session-name>` | Create new client          |
| `t n [<session-name>] [<args>]` | `tmux new-session <args> -s <session-name>`    | Create new sessions        |

Felix Hamann's avatar
Felix Hamann committed
126

Felix Hamann's avatar
Felix Hamann committed
127
## Notes ##
Felix Hamann's avatar
Felix Hamann committed
128

Felix Hamann's avatar
Felix Hamann committed
129 130
__Some handy commands__

Felix Hamann's avatar
Felix Hamann committed
131
* Switch alt and cmd when using Apple™ Keyboards: `setxkbmap -option altwin:swap_alt_win` or `echo 1 | sudo tee /sys/module/hid_apple/parameters/swap_opt_cmd`
Felix Hamann's avatar
Felix Hamann committed
132 133 134

__Environment__

135 136
To change the $PATH environmental variable simply set/change
`$fish_user_paths`:
Felix Hamann's avatar
Felix Hamann committed
137 138

```
Felix Hamann's avatar
Felix Hamann committed
139
set -U fish_user_paths your/own/path $fish_user_paths
Felix Hamann's avatar
Felix Hamann committed
140 141
```

Felix Hamann's avatar
Felix Hamann committed
142 143 144
Further information can be found with `help set`.  If you need a
persistent PATH variable change `/etc/paths` or your `~/.bashrc` or
`~/.profile` files.