\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{im\_Tavo (gamejia90)} \pdfinfo{ /Title (tmux.pdf) /Creator (Cheatography) /Author (im\_Tavo (gamejia90)) /Subject (tmux Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{3E3E3E} \definecolor{LightBackground}{HTML}{F8F8F8} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{tmux Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{im\_Tavo (gamejia90)} via \textcolor{DarkBackground}{\uline{cheatography.com/39342/cs/22415/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}im\_Tavo (gamejia90) \\ \uline{cheatography.com/gamejia90} \\ \uline{\seqsplit{www}.github.com/Athesto} \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 25th November, 2020.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{\{\{fa-terminal\}\} Outside Sessions}} \tn % Row 0 \SetRowColor{LightBackground} \{\{ar\}\}\{\{nobreak\}\}`tmux` & {\bf{tmux: }} start a new termux session \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \{\{ar\}\}\{\{nobreak\}\}`tmux {\bf{ls}}` & {\bf{list-sessions: }}show listed session \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \{\{ar\}\}\{\{nobreak\}\}`tmux attach {[}-t foo{]}`\{\{nl\}\}\{\{ar\}\}\{\{nobreak\}\}`tmux {\bf{a}} {[}-t foo{]}`\{\{nl\}\} & {\bf{attach-session: }} attach to target session `foo` \tn % Row Count 9 (+ 5) % Row 3 \SetRowColor{white} \{\{ar\}\}\{\{nobreak\}\}`tmux {\bf{kill-server}}` & {\bf{kill-server: }} tmux kill all sessions \tn % Row Count 11 (+ 2) % Row 4 \SetRowColor{LightBackground} \{\{ar\}\}\{\{nobreak\}\}`tmux {\bf{kill-session}} {[}-t target{]}` & {\bf{kill-session: }}destroy the `target` session \tn % Row Count 14 (+ 3) % Row 5 \SetRowColor{white} \{\{ar\}\}\{\{nobreak\}\}`tmux {\bf{new}} {[}-s foo{]}` & {\bf{ new-session: }}start session named as `foo` \tn % Row Count 17 (+ 3) % Row 6 \SetRowColor{LightBackground} \{\{ar\}\}\{\{nobreak\}\}`tmux {\bf{rename}} {[}-t foo{]} bar` & {\bf{rename-session: }}rename the target session as `bar`. \tn % Row Count 20 (+ 3) % Row 7 \SetRowColor{white} \{\{ar\}\}\{\{nobreak\}\}`tmux {\bf{lscm}}` & {\bf{list-commands: }}list all commands supported \tn % Row Count 23 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{to more `cmds` about session check the Official Manual \{\{link="https://man.openbsd.org/tmux"\}\}{[}link{]}\{\{/link\}\}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{\{\{fa-file-text-o\}\} .tmux.conf}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\#setting prompt color \newline set -g default-terminal "xterm-256color" \newline \newline TMUX\_CONF="\textasciitilde{}/.tmux.conf" \newline TMUX\_EDITOR="vim" \newline \newline unbind C-b \# disable default \textless{}prefix\textgreater{} \newline set -g prefix C-a \# \textless{}prefix\textgreater{} as C-a \newline bind a send-prefix \# \textless{}prefix\textgreater{}a as normal C-a \newline bind C-a send-prefix \# \textless{}prefix\textgreater{}C-a as normal C-a \newline set -g base-index 1 \# start at 1 \newline setw -g pane-base-index 1 \newline set -g mouse 1 \newline \newline \# =========VIM========= \newline \#Move to the panel as VIM -\textgreater{} \textless{}prefix\textgreater{}hjkl \newline bind h select-pane -L \# \textless{}prefix\textgreater{}h select left-pane \newline bind j select-pane -D \# \textless{}prefix\textgreater{}j select down-pane \newline bind k select-pane -U \# \textless{}prefix\textgreater{}k select up-pane \newline bind l select-pane -R \# \textless{}prefix\textgreater{}l select right-pane \newline bind C-h previous-window \# M-h select previous-window \newline bind C-l next-window \# M-l select next-window \newline \newline bind r source-file \$TMUX\_CONF \textbackslash{}; display "\$TMUX\_CONF reloaded" \# \textless{}prefix\textgreater{}r as reload config\_file \newline bind e new-window -n "\$TMUX\_CONF" "\$TMUX\_EDITOR \$TMUX\_CONF \&\& tmux source \$TMUX\_CONF" \# \textless{}prefix\textgreater{}e open config\_file \newline bind '\%' split-window -h -c "\#\{pane\_current\_path\}" \newline bind '"' split-window -v -c "\#\{pane\_current\_path\}" \newline \newline \# =======TESTING=======} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{.tmux.conf}} is the configuration file and you can create it in the \$HOME directory `\textasciitilde{}/.tmux.conf` \newline download last version \{\{link="https://gist.githubusercontent.com/Athesto/6ce0a9f114bec7b99a876f3f4484cdd0/raw/.tmux.conf"\}\}link\{\{/link\}\}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{\{\{fa-keyboard-o\}\} Shortcuts tmux}} \tn % Row 0 \SetRowColor{LightBackground} \{\{ar\}\}\{\{nobreak\}\}`C-a` + `\%` & ◫ Split terminal Vertically \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \{\{ar\}\}\{\{nobreak\}\}`C-a` + `"` & ⊟ Split terminal Horizontally \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \{\{ar\}\}\{\{nobreak\}\}`C-a` + {[}`h\{\{fa-arrow-left\}\} j\{\{fa-arrow-down\}\} k\{\{fa-arrow-up\}\} l\{\{fa-arrow-right\}\}`{]} & ◨ Move between panels \tn % Row Count 10 (+ 6) % Row 3 \SetRowColor{white} \{\{ar\}\}\{\{nobreak\}\}`C-a` + `q` + `{[}number{]}` & \{\{fa-th-large\}\} show/select panel `{[}number{]}` \tn % Row Count 13 (+ 3) % Row 4 \SetRowColor{LightBackground} \{\{ar\}\}\{\{nobreak\}\}`C-a` + `{[}space{]}` & \{\{fa-repeat\}\} Reorder panels \tn % Row Count 15 (+ 2) % Row 5 \SetRowColor{white} \{\{ar\}\}\{\{nobreak\}\}`C-a` + {[}`\textless{}\{\{fa-arrow-left\}\} \textgreater{}\{\{fa-arrow-right\}\}`{]} & \{\{fa-exchange\}\} Swap Panel \tn % Row Count 19 (+ 4) % Row 6 \SetRowColor{LightBackground} \{\{ar\}\}\{\{nobreak\}\}`C-a` + `x` & \{\{fa-times\}\} Close panel `C-a` + `:kill-panel` \tn % Row Count 22 (+ 3) % Row 7 \SetRowColor{white} \{\{ar\}\}\{\{nobreak\}\}`C-a` + `z` & \{\{fa-window-maximize\}\} Toogle Maximaize Panel \tn % Row Count 25 (+ 3) % Row 8 \SetRowColor{LightBackground} \{\{ar\}\}\{\{nobreak\}\}`C-a` + `c` & \{\{fa-plus\}\} Create new window \tn % Row Count 27 (+ 2) % Row 9 \SetRowColor{white} \{\{ar\}\}\{\{nobreak\}\}`C-a` + {[}`C-h\{\{fa-arrow-left\}\} C-l\{\{fa-arrow-right\}\}`{]} & \{\{fa-window-restore\}\} move between windows \tn % Row Count 31 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{\{\{fa-keyboard-o\}\} Shortcuts tmux (cont)}} \tn % Row 10 \SetRowColor{LightBackground} \{\{ar\}\}\{\{nobreak\}\}`C-a` + `{[}number{]}` & \{\{fa-window-restore\}\} Select window `{[}number{]}` \tn % Row Count 3 (+ 3) % Row 11 \SetRowColor{white} \{\{ar\}\}\{\{nobreak\}\}`C-a` + `{[}tab{]}` & \{\{fa-window-restore\}\} Previous window \tn % Row Count 5 (+ 2) % Row 12 \SetRowColor{LightBackground} \{\{ar\}\}\{\{nobreak\}\}`C-a` + `\&` & \{\{fa-times\}\} Close window `C-a` + `:kill-window` \tn % Row Count 8 (+ 3) % Row 13 \SetRowColor{white} \{\{ar\}\}\{\{nobreak\}\}`C-a` + `{[}m{]}` & \{\{fa-mouse-pointer\}\} Toggle mouse mode \tn % Row Count 10 (+ 2) % Row 14 \SetRowColor{LightBackground} \{\{ar\}\}\{\{nobreak\}\}`C-a` + `e` & \{\{fa-file-text-o\}\} Open `\textasciitilde{}/.tmux.conf.local` \tn % Row Count 13 (+ 3) % Row 15 \SetRowColor{white} \{\{ar\}\}\{\{nobreak\}\}`C-a` + `r` & \{\{fa-refresh\}\} reload `.tmux.conf` \tn % Row Count 15 (+ 2) % Row 16 \SetRowColor{LightBackground} \{\{ar\}\}\{\{nobreak\}\}`C-a` + `{[}Enter{]}` & \{\{fa-copy\}\} Enter into copy-mode \tn % Row Count 17 (+ 2) % Row 17 \SetRowColor{white} \{\{ar\}\}\{\{nobreak\}\}`C-a` + `:` & \{\{fa-terminal\}\} go to tmux command-line \tn % Row Count 19 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{`C-a` is the prefix, the default prefix is `C-b` \newline full command list \newline https://github.com/gpakosz/.tmux} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.68758 cm} x{2.28942 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{list of commands in commad-line}} \tn % Row 0 \SetRowColor{LightBackground} \{\{ar\}\}\{\{nobreak\}\}`kill-server` & Kill all instances of tmux \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \{\{ar\}\}\{\{nobreak\}\}`kill-window` & Close window `C-a` + `\&` \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} \{\{ar\}\}\{\{nobreak\}\}`kill-panel` & Close panel `C-a` + `x` \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{More Info}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{\seqsplit{https://tmuxcheatsheet.com/} \newline % Row Count 1 (+ 1) \seqsplit{https://github.com/gpakosz/.tmux}% Row Count 2 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}