diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +* diff --git a/manuscript/00-foreword.md b/manuscript/00-foreword.md index 51c917a..2b8db09 100644 --- a/manuscript/00-foreword.md +++ b/manuscript/00-foreword.md @@ -81,7 +81,7 @@ on Super User. In tmux, shortcuts require a [prefix key](#prefix-key) to be sent beforehand. For instance, `Prefix` + `d` will detach a tmux client from its session. This -prefix, by default, is `Ctrl-B`, but users can override it. This is discussed in +prefix, by default, is ``, but users can override it. This is discussed in greater detail in *the prefix key* section and [*configuration*](#config). ## How this book is structured @@ -172,8 +172,10 @@ I will update digital versions of the book with the changes where applicable. ## Thanks -Thanks to the [contributors](https://github.com/git-pull/tao-of-tmux/graphs/contributors), -who helped me spot errors in this book. +Thanks to the [contributors](https://github.com/git-pull/tao-of-tmux/graphs/contributors) +for spotting errors in this book and submitting errata through GitHub. In +addition, readers like Graziano Misuraca, who looked through the book closely, +providing valuable feedback. Some copy, particularly in [cheatsheets](#appendix-cheatsheets), comes straight out of the manual of tmux, which is [ISC-licensed](https://github.com/tmux/tmux/blob/master/COPYING). @@ -186,7 +188,7 @@ As of January 2017, it's trivial to push out minor changes to Leanpub. Kindle is harder. tmux does intermittently receive updates. I've accommodated many over the past 5 -years on my personal configurations and software libraries set with [continuous integration tests against multiple tmux versions](https://github.com/tony/libtmux/blob/master/.travis.yml). +years on my personal configurations and software libraries set with [continuous integration tests against multiple tmux versions](https://github.com/tmux-python/libtmux/blob/master/.github/workflows/tests.yml). Sometimes, publishers overplay version numbers to make it seem as if it's worth striking a new edition of a book over it. It's effective for them, but I'd rather be honest to my readership. diff --git a/manuscript/01-thinking-tmux.md b/manuscript/01-thinking-tmux.md index 3ef431a..e9e1279 100644 --- a/manuscript/01-thinking-tmux.md +++ b/manuscript/01-thinking-tmux.md @@ -8,7 +8,7 @@ In the world of modern computing, user interaction has 2 realms: 1. The text realm 2. The graphical realm -tmux lives in the graphical realm in which fixed-width fonts appear in +tmux lives in the text realm in which fixed-width fonts appear in a rectangular grid in a window, like in a terminal from the 1980s. ![](images/info/server-with-laptop.png) @@ -55,12 +55,12 @@ a display server such as [X](https://en.wikipedia.org/wiki/X.Org_Server). Here are a few common scenarios: -- Running `tail -F /var/log/apache2/error.log` in a +- Running `$ tail -F /var/log/apache2/error.log` in a pane to get a live stream of the latest system events. - Running a file watcher, like [watchman](https://github.com/facebook/watchman), [gulp-watch](https://github.com/gulpjs/gulp/blob/master/docs/API.md#gulpwatchglob-opts-tasks), [grunt-watch](https://github.com/gruntjs/grunt-contrib-watch), [guard](https://github.com/guard/guard), - or [entr](http://entrproject.org/). On file change, you could do stuff like: + or [entr](https://eradman.com/entrproject/). On file change, you could do stuff like: - rebuild LESS or SASS files, minimize CSS and/or assets and static files - lint with linters, like [cpplint](https://github.com/google/styleguide/tree/gh-pages/cpplint), [Cppcheck](http://cppcheck.sourceforge.net/), [rubocop](https://github.com/bbatsov/rubocop), @@ -72,7 +72,7 @@ Here are a few common scenarios: while leaving two others open for CLI commands and building via `make` or `ninja`. -![vim + building a C++ project w/ CMake + Ninja using entr to rebuild on file changes, lldb bottom right](images/01-thinking-tmux/dev-watch.png) +![vim + building a C++ project w/ CMake + Ninja using entr to rebuild on file changes, LLDB bottom right](images/01-thinking-tmux/dev-watch.png) With tmux, you quickly have the makings of an IDE! And on your terms. diff --git a/manuscript/02-terminal-fundamentals.md b/manuscript/02-terminal-fundamentals.md index deb8d2e..663c6a3 100644 --- a/manuscript/02-terminal-fundamentals.md +++ b/manuscript/02-terminal-fundamentals.md @@ -5,7 +5,7 @@ reviewed. Often, we're so used to using these out of street smarts and muscle memory, a great deal of us never see the relation of where these tools stand next to each other. -Seasoned developers are familiar with zsh, Bash, iTerm2, konsole, /dev/tty, +Seasoned developers are familiar with Zsh, Bash, iTerm2, konsole, /dev/tty, shell scripting, and so on. If you use tmux, you'll be around these all the time, regardless whether you're in a GUI on a local machine or SSH'ing into a remote server. diff --git a/manuscript/03-practical-usage.md b/manuscript/03-practical-usage.md index a982cd8..1b0ff25 100644 --- a/manuscript/03-practical-usage.md +++ b/manuscript/03-practical-usage.md @@ -80,14 +80,14 @@ in one of your panes, on the remote machine, you can attach the client via `tmux attach` as you normally would. To send the prefix key to the machine's tmux client, not your local one, hit the prefix key again. -So, if your prefix key is the default, ``, do `` + `b` again, +So, if your prefix key is the default, ``, do `` + `b` again, *then* hit the shortcut for what you want to do. Example: If you wanted to create a window on the remote machine, which would normally be `` + `c` locally, it'd be `` + `b` + `c`. Hereinafter, the book will refer to shortcuts by `Prefix`. Instead -of ` + d`, you will see `Prefix` + `d`. +of ` + d`, you will see `Prefix` + `d`. ## Session persistence and the server model diff --git a/manuscript/04-server.md b/manuscript/04-server.md index a8ec75b..c242901 100644 --- a/manuscript/04-server.md +++ b/manuscript/04-server.md @@ -115,7 +115,7 @@ sessions, windows, and panes. Much like vi, tmux handles copying as a mode in which a pane is temporarily placed. When inside this mode, text can be selected and copied to -the *paste buffer*, tmux' clipboard. +the *paste buffer*, tmux's clipboard. The default key to enter copy mode is `Prefix` + `[`. @@ -134,6 +134,9 @@ I> # Vi copypaste mode I> set-window-option -g mode-keys vi I> bind-key -t vi-copy 'v' begin-selection I> bind-key -t vi-copy 'y' copy-selection +I> # starting with tmux version 2.6 this changes to: +I> bind-key -Tcopy-mode-vi 'C-v' send -X begin-selection +I> bind-key -Tcopy-mode-vi 'C-y' send -X copy-selection In addition to the "copy mode", tmux has advanced functionality to programmatically copy and paste. Later in the book, the [Capturing pane content](#capture-pane) diff --git a/manuscript/05-session.md b/manuscript/05-session.md index d808b6a..4d8175d 100644 --- a/manuscript/05-session.md +++ b/manuscript/05-session.md @@ -5,7 +5,7 @@ instance. Server instances are forked to the background upon starting a fresh instance and reconnected to when reattaching sessions. Your interaction with tmux will have *at least* one session running. -A session holds one or more [windows](#windows). +A session holds one or more [windows](#windows). ![](images/info/session.png) @@ -66,12 +66,12 @@ You can name it whatever you want. Typically, if I'm working on multiple web projects in one session, I'll name it "web". If I'm assigning one software project to a single session, I'll name it after the software project. You'll likely develop your own naming conventions, but anything is more descriptive -than the default. +than the default. -![Renaming a session 'zsh' to 'renamed'](images/05-session/rename.png) +![Renaming a session '0' to 'react web'](images/05-session/rename.png) If you don't name your sessions, it'll be difficult to keep track of what the -session contains. Sometimes, you may forget you have a project opened, +session contains. Sometimes, you may forget you have a project opened, especially if your machine has been running for a few days, weeks, or months. You can save time by reattaching your session and avoid creating a duplicate. diff --git a/manuscript/06-window.md b/manuscript/06-window.md index 6b7859f..1547e10 100644 --- a/manuscript/06-window.md +++ b/manuscript/06-window.md @@ -35,7 +35,7 @@ the eighth. Just like with sessions, windows can have names. Labelling them helps keep track of what you're doing inside them. -![Renaming](images/06-window/rename.png) +![Renaming a window 'zsh' to 'renamed'](images/06-window/rename.png) When inside tmux, the shortcut `Prefix` + `,` is most commonly used. It opens a prompt in the tmux status line, where you can alter the name of the @@ -60,7 +60,7 @@ Prompt for a window index (useful for indexes greater than 9) with `Prefix` + `'`. If the window index is 10 or above, this will help you a lot. I> ### Tip: Search + Traverse Windows for Text -I> +I> I> You can forward to a window with a match of a text string by doing `Prefix` + I> `f`. @@ -141,14 +141,21 @@ Layouts can also be custom. To get the custom layout snippet for your current window, try this: {language=shell, line-numbers=off} + # awk(1) + $ tmux lsw -F "#{window_active} #{window_layout}" | awk '$1{print $2}' + + # grep(1) + cut(1) $ tmux lsw -F "#{window_active} #{window_layout}" | grep "^1" | cut -d " " -f2 To apply this layout: {language=shell, line-numbers=off} - $ tmux lsw -F "#{window_active} #{window_layout}" | grep "^1" | cut -d " " -f2 + $ tmux lsw -F "#{window_active} #{window_layout}" | awk '$1{print $2}' > 5aed,176x79,0,0[176x59,0,0,0,176x19,0,60{87x19,0,60,1,88x19,88,60,2}] + # Alternant to above: + $ tmux lsw -F "#{window_active} #{window_layout}" | grep "^1" | cut -d " " -f2 + # resize your panes or try doing this in another window to see the outcome $ tmux select-layout "5aed,176x79,0,0[176x59,0,0,0,176x19,0,60{87x19,0,60,1,88x19,88,60,2}]" diff --git a/manuscript/08-configuration.md b/manuscript/08-configuration.md index 7ffc64b..3d1c2bb 100644 --- a/manuscript/08-configuration.md +++ b/manuscript/08-configuration.md @@ -10,13 +10,9 @@ Configuration of tmux is managed through `.tmux.conf` in your `$HOME` directory. The paths `~/.tmux.conf` and `$HOME/.tmux.conf` should work on OS X, Linux, and BSD. -Configuration is done via the file being run upon initially starting tmux, when -the server is started. tmux is configured using the same commands as tmux does via -shell. For instance, `$ tmux set-window-option -g automatic-rename` in a shell -is the same as `set-window-option -g automatic-rename` in your config. - -Configuration can be updated later via `source-file`, which is discussed in -this chapter. +Configuration is applied upon initially starting tmux. The contents of the +configuration are tmux commands. The file can be reloaded later via +`source-file`, which is discussed in this chapter. For a sample config, I maintain a pretty decked out one at . It's permissively licensed, and you're @@ -71,6 +67,9 @@ I> `bind r source ~/.tmux.conf\; display "~/.tmux.conf sourced!"` I> I> Now, you can type `Prefix` + `r` to get the config to reload. +Note that reloading the configuration only *re-runs* the configuration file. It +will not reset keybindings or styling you apply to tmux. + ## How configs work The tmux configuration is processed just like [run commands](https://en.wikipedia.org/wiki/Run_commands) @@ -128,7 +127,9 @@ generic options, and the next section goes into snippets involving keybindings. ### Base index -Set the starting number (base index) for windows: +This was mentioned earlier in the book, but it's a favorite tweak of many tmux +users, who find it more intuitive to start their window counting at *1*, rather +than the default, *0*. To set the starting number (base index) for windows: {line-numbers=off} set -g base-index 1 @@ -142,11 +143,14 @@ same thing. ### Automatic window naming -Windows can be automatically renamed via setting `automatic-rename`: +Setting `automatic-rename` alters the name of the window based upon its active +pane: {line-numbers=off} set-window-option -g automatic-rename +Automatic renaming will be disabled for the window if you rename it manually. + ## Keybindings ### Prefix key @@ -160,7 +164,7 @@ it by setting a new prefix and unsetting the default. To set the prefix to unbind-key C-b bind-key a send-prefix -### New window w/ prompt +### New window with prompt Prompt for window name upon creating a new window, `Prefix` + `C` (capital C): diff --git a/manuscript/09-status-bar.md b/manuscript/09-status-bar.md index 0527679..61cc440 100644 --- a/manuscript/09-status-bar.md +++ b/manuscript/09-status-bar.md @@ -52,16 +52,16 @@ You can also call applications, such as [tmux-mem-cpu-load](https://github.com/t [conky](https://github.com/brndnmtthws/conky), and [powerline](#powerline). For this example, we'll use `tmux-mem-cpu-load`. This works on Unix-like systems -like FreeBSD, Linux distributions as well as macOS. +like FreeBSD, Linux distributions, and macOS. -It requires installing [CMake](https://cmake.org) and `git` through your package -manager. You must have a C++ compiler. On macOS, install Xcode CLI Utilities. -You can do this by going to Applications -> Utilities, launching Terminal.app -and typing `$ xcode-select --install`. macOS can use [Homebrew](https://brew.sh/) -to install the CMake and git package. Linux distributions allow installing -CMake, clang and git via package manager. +To build from source, you must have [CMake](https://cmake.org) and `git`, which +are available through your package manager. You must have a C++ compiler. On +macOS, install Xcode CLI Utilities. You can do this by going to *Applications -> +Utilities*, launching *Terminal.app* and typing `$ xcode-select --install`. +macOS can use [Homebrew](https://brew.sh/) to install the CMake and git package. +Major Linux distributions package CMake, clang, and git. -Before this step, you can `cd` into any directory you're ok keep code in. +Before this step, you can `cd` into any directory you're ok keeping code in. {language=shell, line-numbers=off} $ git clone https://github.com/thewtex/tmux-mem-cpu-load.git @@ -109,7 +109,7 @@ tmux session via `$ tmux set-option -g status-right`: $ tmux set-option -g status-right '"#{=21:pane_title}" #(tmux-mem-cpu-load) %H:%M %d-%b-%y' Also, note how I switched out the double quotes on either side of the option -with single quotes. This is recommended, since there are double quotes inside. +with single quotes. This is required, since there are double quotes inside. You can do this with anything, for instance, try adding [`uptime`](https://linux.die.net/man/1/uptime). This could be done by adding `#(uptime)` to your status line. Typically the diff --git a/manuscript/10-scripting.md b/manuscript/10-scripting.md index 01af704..d8a9b49 100644 --- a/manuscript/10-scripting.md +++ b/manuscript/10-scripting.md @@ -10,7 +10,7 @@ people's flows. Full tables are in the [cheatsheets](#appendix-cheatsheets). ## Aliases {#aliases} tmux supports a variety of alias commands. With aliases, instead of typing -`tmux attach-session` to attach a session, `$ tmux attach` could do the trick. +`$ tmux attach-session` to attach a session, `$ tmux attach` could do the trick. Most aliases come to mind via intuition and are a lot friendlier than typing the full hyphenated commands. @@ -69,7 +69,7 @@ patterns. For instance, you need not type `$ tmux attach-session` every time. First, there's the [alias](#aliases) of `$ tmux attach`, but additionally, more concise commands can be used if they partially match the name of the command or -the target. tmux' pattern matching allows `$ tmux attac`, `$ tmux att`, `$ tmux at` +the target. tmux's pattern matching allows `$ tmux attac`, `$ tmux att`, `$ tmux at` and `$ tmux a` to reach `$ tmux attach`. Every tmux command has shorthands; let's try this for `$ tmux new-session`: @@ -222,10 +222,10 @@ client at `/dev/ttys004`: ### `$ tmux switch-client [-c target-client] [-t target-session]` {language=shell, line-numbers=off} - $ tmux suspend-client -c /dev/ttys004 -t othersession + $ tmux switch-client -c /dev/ttys004 -t othersession # Within current client, -c is assumed - $ tmux suspend-client -t othersession + $ tmux switch-client -t othersession ## Formats {#formats} @@ -253,7 +253,7 @@ Let's try to output it: $ tmux list-windows -F "#{window_id} #{window_name}" > @0 zsh -Here's a cool trick; list all panes with the x and y coordinates of the cursor +Here's a cool trick to list all panes with the x and y coordinates of the cursor position: {language=shell, line-numbers=off} @@ -282,7 +282,7 @@ Pane variables: `cursor_x`, `cursor_y`, `pane_active`, `pane_current_command`, This book focuses on separating the concept of server, sessions, windows, and panes. With the knowledge of targets and formats, this -separation takes shape in tmux' internal attributes. If you `list-panes` all +separation takes shape in tmux's internal attributes. If you `list-panes` all variables up the ladder, including window, session and server variables are available for the panes being listed. Try this: @@ -403,10 +403,10 @@ Output of cal(1).](images/10-scripting/send-keys-cal.png) `$ tmux capture-pane` will copy a panes' contents. -By default, the contents will be saved to tmux' internal clipboard, the *paste +By default, the contents will be saved to tmux's internal clipboard, the *paste buffer*. You can run `capture-pane` within any pane, then navigate to an editor, paste the contents (don't forget to `:set paste` and go into insert mode -with `i` on vim), and save it to a file. To [paste](#clipbpard), use `Prefix` + +with `i` in vim), and save it to a file. To [paste](#clipboard), use `Prefix` + `]` inside the pane you're pasting into. You can also add the `-p` flag to print it to [stdout](https://en.wikipedia.org/wiki/Standard_streams#Standard_output_.28stdout.29). @@ -429,7 +429,7 @@ To check what's inside: $ cat ./test Like with `send-keys`, [targets](#targets) can be specified with `-t`. Let's -copy a pane into tmux' clipboard ("paste buffer") and paste it into a text +copy a pane into tmux's clipboard ("paste buffer") and paste it into a text editor in a third pane: ![Top-left: Listing panes, Bottom-left: Capturing pane output of top-left pane, @@ -446,10 +446,10 @@ a powerful way of retrieving information on its objects between `list-panes`, `list-windows` and `list-sessions` and formats. This makes tmux not only accessible and configurable, but also scriptable. -The ability to target information explicitly and reliably down to the point of -tracking a pane by its ID and collecting its pane contents, even sending in -keys. Used by the skilled programmer, opening the possibility of orchestrating -the terminals in ways that were previously unrealistic; anything from niche +The ability to retrieve explicitly and reliably, from a session down to +a pane. All it takes is a pane's ID to capture its contents or even send it +keys. Used by the skilled programmer, scripting tmux can facilitate orchestrating +terminals in ways previously deemed unrealistic; anything from niche shell scripts to monitor and react to behavior on systems to high-level, intelligent and structured control via object oriented libraries, like [libtmux](https://libtmux.git-pull.com). @@ -458,6 +458,7 @@ In the next chapter, we delve into optimizations that showcase the latest generation of unix tools that build upon old, time-tested concepts, like [man pages](https://en.wikipedia.org/wiki/Man_page) and [piping](https://en.wikipedia.org/wiki/Pipeline_(Unix)), while maintaining portability across differences in platforms and graceful degradation to ensure -development tooling works on machines missing optional tools. In addition, a -class of powerful, high-level applications that leverage tmux' scripting -capabilities to consistently build tmux workspace via declarative configurations. +development tooling works on machines missing optional tools. Also, the chapter +will introduce *session managers*, a powerful, high-level tool leveraging tmux's +scripting capabilities to consistently load workspace via a declarative +configuration. diff --git a/manuscript/11-tips-and-tricks.md b/manuscript/11-tips-and-tricks.md index 8dbc828..3509570 100644 --- a/manuscript/11-tips-and-tricks.md +++ b/manuscript/11-tips-and-tricks.md @@ -2,9 +2,9 @@ ## Read the tmux manual in style -`$ man tmux` is the command to load up the "[man page](https://en.wikipedia.org/wiki/Man_page)" -for tmux. You can do the same to find instructions for any command or entity -with a manpage entry; here's two fun ones: +`$ man tmux` is the command to load up the man page for tmux. You can do the +same to find instructions for any command or entity with a manpage entry; here +are some fun ones: {language=shell, line-numbers=off} $ man less @@ -89,7 +89,7 @@ linters, and so on. It gives you, as a developer, instant feedback in the terminal, empowering a tmux workspace to have IDE-like features, without the bloat, memory, and CPU fans roaring. -I eventually settled on [`entr(1)`](http://entrproject.org/), which works +I eventually settled on [`entr(1)`](https://eradman.com/entrproject/), which works superbly across Linux distros, BSDs and OS X / macOS. The trick to make entr work is to [pipe](https://en.wikipedia.org/wiki/Pipeline_(Unix)) @@ -127,14 +127,14 @@ snippet in conjunction with a [session manager](#session-manager): entr -c go test ./...; else go test ./...; fi If the project is a team or open source project, where a user never used the -command before and could missing a required software package, we can give +command before and could be missing a required software package, we can give a helpful message. This shows a notice to the user to install entr if not installed on the system: {language=shell, line-numbers=off} $ if command -v entr > /dev/null; then find . -print | grep -i '.*[.]go' | \ entr -c go test ./...; else go test ./...; echo "\nInstall entr(1) to \" - echo "run tasks when files change. \nSee http://entrproject.org/"; fi + echo "run tasks when files change. \nSee https://eradman.com/entrproject/"; fi Here's why you want patterns like above: You can put it into a [`Makefile`](https://en.wikipedia.org/wiki/Makefile) and commit it to your project's [VCS](https://en.wikipedia.org/wiki/Version_control), @@ -148,7 +148,7 @@ Let's see what a `Makefile` with this looks like: {language=makefile, line-numbers=off} watch_test: - if command -v entr > /dev/null; then find . -print | grep -i '.*[.]go' | entr -c go test ./...; else go test ./...; echo "\nInstall entr(1) to run tasks when files change. \nSee http://entrproject.org/"; fi + if command -v entr > /dev/null; then find . -print | grep -i '.*[.]go' | entr -c go test ./...; else go test ./...; echo "\nInstall entr(1) to run tasks when files change. \nSee https://eradman.com/entrproject/"; fi To run this, do `$ make watch_test` in the same directory as the `Makefile`. @@ -162,7 +162,7 @@ backslash (`\`): grep -i '.*[.]go' | entr -c go test ./...; \ else go test ./...; \ echo "\nInstall entr(1) to run tasks on file change. \n"; \ - echo "See http://entrproject.org/"; fi + echo "See https://eradman.com/entrproject/"; fi Another would be to break the command into variables and `make` subcommands. So: @@ -178,7 +178,7 @@ Another would be to break the command into variables and `make` subcommands. So: @echo " ! File watching functionality non-operational ! " @echo " " @echo " Install entr(1) to run tasks on file change. " - @echo " See http://entrproject.org/ " + @echo " See https://eradman.com/entrproject/ " @echo "-------------------------------------------------" watch_test: @@ -225,7 +225,7 @@ panes in a certain order. In addition, there's the burden of assuring the shell scripts are portable. A declarative configuration in YAML or JSON configuration abstracts out the -commands, layout, and options of tmux. It'd prevent the mistakes and repetition +commands, layout, and options of tmux. It prevents the mistakes and repetition scripting entails. These applications are called tmux *session managers*, and in different ways, they programmatically create tmux workspaces by running a series of commands based on a config. @@ -237,11 +237,11 @@ Ruby. There's also [tmuxomatic](https://github.com/oxidane/tmuxomatic), where you can "draw" your tmux sessions in text and have tmuxomatic build the layout. I sort of have a home team advantage here, as I'm author of [tmuxp](https://github.com/tony/tmuxp). -I wrote it, already having used teamocil and tmuxinator, but with many more -features. For one, it builds on top of [libtmux](https://github.com/tony/libtmux), +Already having used teamocil and tmuxinator, I wrote my own in python instead of +ruby, with many more features. For one, it builds on top of [libtmux](https://github.com/tony/libtmux), a library which abstracts tmux [server](#server), [sessions](#sessions), [windows](#windows) and [panes](#panes) to build the state of tmux sessions. In -addition, it has a naive form of session freezing, support for JSON, more +addition, it can save active tmux sessions fo a layout file (JSON or yaml), more flexible configuration options, and it will even offer to attach exiting sessions, instead of redundantly running script commands against the session if it's already running. @@ -284,16 +284,16 @@ paths](#troubleshoot-site-paths) in the appendix. I've dusted off a C++ space shooter and a new go webapp I've been playing with. They're licensed under MIT so, you can use them, copy and paste from them, etc: -- c++14 [space shooter minigame](https://github.com/tony/tot-cpp-shmup) - side +- C++14 [space shooter minigame](https://github.com/tony/tot-cpp-shmup) - side scrolling [shmup](https://en.wikipedia.org/wiki/Shoot_'em_up) demo (sdl2, - cmake, json resource manifests, linux/BSD/OS X compatible) -- golang [tmux web frontend](https://github.com/tony/tot-go-webapp) - display + cmake, json resource manifests, Linux/BSD/OS X compatible) +- Go [tmux web frontend](https://github.com/tony/tot-go-webapp) - display current tmux session and window information via browser ([gin](https://github.com/gin-gonic/gin), [bower](https://bower.io/)) Both support `tmuxp load .` within the project directory to load up the project. -Make sure to install [`entr(1)`](http://entrproject.org/) beforehand! +Make sure to install [`entr(1)`](https://eradman.com/entrproject/) beforehand! ## tmux-plugins and tpm diff --git a/manuscript/12-takeaway.md b/manuscript/12-takeaway.md index f0c2d8a..044d844 100644 --- a/manuscript/12-takeaway.md +++ b/manuscript/12-takeaway.md @@ -6,19 +6,19 @@ your brain around concepts. You do not have to understand the intricacies of tmux, let alone the terminal, in a single sitting. Acclimation happens over time. -tmux' userbase varies in skill level. Some readers of this book may have just -learned how to use the Prefix key yesterday. Others are looking to tweak their +tmux's userbase varies in skill level. Some readers of this book may have just +learned how to use the `Prefix` key yesterday. Others are looking to tweak their configurations and host it in their "dot files" on github. There also exists a -very clever hacker, who utilizes the advanced scripting capabilities tmux +very clever hacker who utilizes the advanced scripting capabilities tmux offers to pilot the terminal in ways previously thought impossible. We've covered the [server](#server), [session](#sessions), [window](#windows), -and [pane](#panes) concepts. Panes are shells, aka pseudoterminals or -PTYs. The command system. That [configurations](#config) are basically a file +and [pane](#panes) concepts. Panes are shells, AKA pseudoterminals or +PTYs. The command system. That [configuration](#config) is basically a file filled with commands. An overview of the [target](#targets) system lets you specify objects to interact with tmux commands. A breeze through [formats](#formats), -a template system with variables to retrieve information on tmux' current state. -How to [send keystrokes](#send-keys) and [copy from tmux panes](#capture-pane) +a template system with variables to retrieve information on tmux's current +state. How to [send keystrokes](#send-keys) and [copy from tmux panes](#capture-pane) programmatically. A lot of [terminal tricks](#tips-and-tricks) that work across platforms and well with tmux, including a [file watching workflow](#file-watching) to run linting, testing, and build commands on file changes. [Two permissively licensed open source projects](#example-projects) diff --git a/manuscript/99-installation.md b/manuscript/99-installation.md index 981e700..a86e8bf 100644 --- a/manuscript/99-installation.md +++ b/manuscript/99-installation.md @@ -26,6 +26,13 @@ ### CentOS / Fedora / Redhat, etc. +dnf: + +{language=shell, line-numbers=off} + $ sudo dnf install tmux + +yum: + {language=shell, line-numbers=off} $ sudo yum install tmux