docs(readme): format readme with prettier-js

This commit is contained in:
2023-04-11 19:23:52 +01:00
parent 957229a1e8
commit d147958750

122
README.md
View File

@@ -3,18 +3,18 @@
Tmuxify your Tmux. Create, edit, manage and load complex Tmux session, window
and pane configurations with ease.
In short, Tmuxifier allows you to easily create, edit, and load "layout"
files, which are simple shell scripts where you use the `tmux` command and
helper commands provided by `tmuxifier` to manage Tmux sessions and windows
In short, Tmuxifier allows you to easily create, edit, and load "layout" files,
which are simple shell scripts where you use the `tmux` command and helper
commands provided by `tmuxifier` to manage Tmux sessions and windows
### Window Layouts
Window layouts create a new Tmux window, optionally setting the window title
and root path where all shells are cd'd to by default. It allows you to easily
split a window into specifically sized panes and more as you wish.
Window layouts create a new Tmux window, optionally setting the window title and
root path where all shells are cd'd to by default. It allows you to easily split
a window into specifically sized panes and more as you wish.
You can load a window layout directly into your current Tmux session, or into
a session layout to have the window created along with the session.
You can load a window layout directly into your current Tmux session, or into a
session layout to have the window created along with the session.
### Session Layouts
@@ -25,10 +25,11 @@ defined directly within the session layout file.
## Example
Given we have a window layout file called [example.window.sh][] which
looks like:
Given we have a window layout file called [example.window.sh][] which looks
like:
[example.window.sh]: https://github.com/jimeh/tmuxifier/blob/master/examples/example.window.sh
[example.window.sh]:
https://github.com/jimeh/tmuxifier/blob/master/examples/example.window.sh
```bash
window_root "~/Desktop"
@@ -39,8 +40,8 @@ split_h 60
select_pane 0
```
You can then load that window layout into a new window in the
current tmux session using:
You can then load that window layout into a new window in the current tmux
session using:
tmuxifier load-window example
@@ -57,19 +58,19 @@ Clone the repo to your machine:
Then add `$HOME/.tmuxifier/bin` to your PATH to make the `tmuxifier` executable
available to you:
__In bash & zsh:__
**In bash & zsh:**
```bash
export PATH="$HOME/.tmuxifier/bin:$PATH"
```
__In tcsh:__
**In tcsh:**
```tcsh
set path = ( "~/.tmuxifier/bin" $path )
```
__In fish:__
**In fish:**
```bash
set -gx PATH "~/.tmuxifier/bin" $PATH
@@ -83,7 +84,7 @@ added to your PATH making the `tmuxifier` executable available to you.
## Setup
__In bash & zsh:__
**In bash & zsh:**
And add the following to your `~/.profile`, `~/.bash_profile`, `~/.zshrc` or
equivalent:
@@ -92,7 +93,7 @@ equivalent:
eval "$(tmuxifier init -)"
```
__In tcsh:__
**In tcsh:**
Add the following to your `~/.cshrc`, `~/.tcshrc` or equivalent:
@@ -100,7 +101,7 @@ Add the following to your `~/.cshrc`, `~/.tcshrc` or equivalent:
eval `tmuxifier init -`
```
__In fish:__
**In fish:**
And add the following to your `~/.config/fish/config.fish` or equivalent:
@@ -110,9 +111,9 @@ eval (tmuxifier init - fish)
### Custom Tmux Arguments
If you need to pass custom arguments to `tmux` itself, you can do so by
setting the `TMUXIFIER_TMUX_OPTS` environment variable. For example to set
custom arguments globally:
If you need to pass custom arguments to `tmux` itself, you can do so by setting
the `TMUXIFIER_TMUX_OPTS` environment variable. For example to set custom
arguments globally:
```bash
export TMUXIFIER_TMUX_OPTS="-L my-awesome-socket-name"
@@ -134,7 +135,7 @@ git pull
## Usage
*__Note:__ This section needs expanding upon.*
_**Note:** This section needs expanding upon._
For a quick reference on available commands and their aliases, please run:
@@ -142,8 +143,8 @@ For a quick reference on available commands and their aliases, please run:
Tmuxifier doesn't come with any layouts, so you'll want to create your own
window and session layout files. New layout files are populated with examples
and comments explaining what things do. Also, having a look at the
[examples][] directory will also give you a good idea.
and comments explaining what things do. Also, having a look at the [examples][]
directory will also give you a good idea.
### Window Layouts
@@ -151,16 +152,16 @@ First off you'll want to define a window layout:
tmuxifier new-window my-awesome-window
This will create a new layout file called `my-awesome-window.window.sh` in
your `$TMUXIFIER_LAYOUT_PATH`, and open it with the editor defined in
`$EDITOR`. Customize it as you wish, and save.
This will create a new layout file called `my-awesome-window.window.sh` in your
`$TMUXIFIER_LAYOUT_PATH`, and open it with the editor defined in `$EDITOR`.
Customize it as you wish, and save.
You can now load *my-awesome-window* with the following command:
You can now load _my-awesome-window_ with the following command:
tmuxifier load-window my-awesome-window
You should now have a new Tmux window open created from your custom and
awesome window layout.
You should now have a new Tmux window open created from your custom and awesome
window layout.
### Session Layouts
@@ -170,8 +171,9 @@ To create your first session layout, run:
Same deal as with creating a new window, except the filename ends with
`.session.sh` instead of `.window.sh`, and the file's pre-populated content
looks different. To have your awesome window loaded, add `load_window
"my-awesome-window"` to the session layout next to existing examples.
looks different. To have your awesome window loaded, add
`load_window "my-awesome-window"` to the session layout next to existing
examples.
To load the session layout simply run:
@@ -195,8 +197,8 @@ export TMUXIFIER_LAYOUT_PATH="$HOME/.tmux-layouts"
### Disable Shell-Completion
Tmuxifier comes with shell-completion for bash, zsh, tcsh, and fish. If for
any reason you need to disable it, just set `$TMUXIFIER_NO_COMPLETE`.
Tmuxifier comes with shell-completion for bash, zsh, tcsh, and fish. If for any
reason you need to disable it, just set `$TMUXIFIER_NO_COMPLETE`.
```bash
export TMUXIFIER_NO_COMPLETE=1
@@ -208,13 +210,12 @@ export TMUXIFIER_NO_COMPLETE=1
Tmuxifier supports iTerm2's [Tmux integration][]. It can be used in two ways:
- Passing `-CC` as a second argument to the `load-session` command. For
example:
- Passing `-CC` as a second argument to the `load-session` command. For example:
tmuxifier load-session my-awesome-session -CC
tmuxifier load-session my-awesome-session -CC
- Setting the `TMUXIFIER_TMUX_ITERM_ATTACH` environment variable to `-CC`
before calling the `load-session` command.
- Setting the `TMUXIFIER_TMUX_ITERM_ATTACH` environment variable to `-CC` before
calling the `load-session` command.
[tmux integration]: https://gitlab.com/gnachman/iterm2/wikis/TmuxIntegration
@@ -226,16 +227,16 @@ example:
## Tmuxifier vs. Tmuxinator
Though Tmuxifier is largely inspired by the excellent [Tmuxinator][] project,
it does set itself apart in a number of ways:
Though Tmuxifier is largely inspired by the excellent [Tmuxinator][] project, it
does set itself apart in a number of ways:
- Uses shell scripts to define Tmux sessions and windows instead of YAML
files. The benefit is total control over Tmux, but the definition files are
more complicated to work with.
- Uses shell scripts to define Tmux sessions and windows instead of YAML files.
The benefit is total control over Tmux, but the definition files are more
complicated to work with.
- Instead of using a "project" concept, Tmuxifier uses a concept of "sessions"
and "windows" just like Tmux itself. This allows you to load a whole session
with multiple pre-defined window configurations, or just load a single
window configuration into your existing session.
with multiple pre-defined window configurations, or just load a single window
configuration into your existing session.
- Tmuxifier is a set of shell scripts, meaning it doesn't require Ruby to be
installed on the machine.
@@ -244,8 +245,8 @@ it does set itself apart in a number of ways:
## Todos
* Improve Readme, specially Usage section.
* Write up a detailed reference for all available layout helper functions.
- Improve Readme, specially Usage section.
- Write up a detailed reference for all available layout helper functions.
## License
@@ -253,20 +254,19 @@ it does set itself apart in a number of ways:
Copyright (c) 2014 Jim Myhrberg.
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:
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 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
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
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.