\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{fievel (fievel)} \pdfinfo{ /Title (awesome-window-manager-3-x.pdf) /Creator (Cheatography) /Author (fievel (fievel)) /Subject (Awesome Window Manager 3.x 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}{04075E} \definecolor{LightBackground}{HTML}{F7F7F9} \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{Awesome Window Manager 3.x Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{fievel (fievel)} via \textcolor{DarkBackground}{\uline{cheatography.com/20997/cs/3845/}}} \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}fievel (fievel) \\ \uline{cheatography.com/fievel} \\ \uline{\seqsplit{www}.fievel.be} \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 7th April, 2015.\\ Updated 10th May, 2016.\\ 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} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Awesome}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Configuration file is \$XDG\_CONFIG\_HOME\textasciicircum{}1\textasciicircum{}/awesome/rc.lua% Row Count 2 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\textasciicircum{}1\textasciicircum{} should be \$HOME/.config} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.44333 cm} x{3.53367 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Mouse Buttons}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Button1}} & Left \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{Button2}} & Middle (scroll-wheel click) \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} {\bf{Button3}} & Right \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} {\bf{Button4}} & Scroll-wheel up \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} {\bf{Button5}} & Scroll-whell down \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{For a classical right-handled mouse} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.09034 cm} x{2.88666 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Keys}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Mod4}} & Windows key \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{For a classical PC keyboard} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.38896 cm} x{2.58804 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Window Manager Control (Keyboard)}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Mod4 + Control + r}} & Restart awesome. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{Mod4 + Shift + q}} & Quit awesome. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{Mod4 + r}} & Run prompt. \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} {\bf{Mod4 + x}} & Run Lua code prompt. \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} {\bf{Mod4 + Return}} & Spawn terminal emulator. \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} {\bf{Mod4 + w}} & Open main menu. \tn % Row Count 9 (+ 1) \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}{Clients (Keyboard)}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Mod4 + m}} & Maximize client. \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{Mod4 + n}} & Minimize client. \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} {\bf{Mod4 + Control + n}} & Restore client. \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} {\bf{Mod4 + f}} & Set client fullscreen. \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} {\bf{Mod4 + Shift + c}} & Kill focused client. \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} {\bf{Mod4 + t}} & Set client on-top. \tn % Row Count 8 (+ 1) \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}{Navigation (Mouse)}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Button1}} on tag name & View tag \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{Button4, Button5}} on tag name & Switch to previous or next tag. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{Button4, Button5}} on root window & Switch to previous or next tag. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} {\bf{Button1, Button3, Button4, Button5}} on layout symbol & Switch to previous or next layout. \tn % Row Count 9 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.94103 cm} x{3.03597 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Navigation (Keyboard)}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Mod4 + j}} & Focus next client. \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{Mod4 + k}} & Focus previous client. \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} {\bf{Mod4 + u}} & Focus first urgent client. \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} {\bf{Mod4 + Left}} & View previous tag. \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} {\bf{Mod4 + Right}} & View next tag. \tn % Row Count 7 (+ 2) % Row 5 \SetRowColor{white} {\bf{Mod4 + 1-9}} & Switch to tag 1-9. \tn % Row Count 8 (+ 1) % Row 6 \SetRowColor{LightBackground} {\bf{Mod4 + Control + j}} & Focus next screen. \tn % Row Count 10 (+ 2) % Row 7 \SetRowColor{white} {\bf{Mod4 + Control + k}} & Focus previous screen. \tn % Row Count 12 (+ 2) % Row 8 \SetRowColor{LightBackground} {\bf{Mod4 + Escape}} & Focus previously selected tag set. \tn % Row Count 14 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.38896 cm} x{2.58804 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Layout Modification (Mouse)}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Mod4 + Button1}} on tag name & Tag current client with this tag only. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{Mod4 + Button3}} on tag name & Toggle this tag for client. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{Button3}} on tag name & Add this tag to current view. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} {\bf{Mod4 + Button1}} on client window & Move window. \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} {\bf{Mod4 + Button3}} on client window & Resize window. \tn % Row Count 10 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.18988 cm} x{2.78712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Layout Modification Key Bindings}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Mod4 + Shift + j}} & Switch client with next client. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} {\bf{Mod4 + Shift + k}} & Switch client with previous client. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{Mod4 + o}} & Send client to next screen. \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} {\bf{Mod4 + h}} & Decrease master width factor by 5\%. \tn % Row Count 8 (+ 2) % Row 4 \SetRowColor{LightBackground} {\bf{Mod4 + l}} & Increase master width factor by 5\%. \tn % Row Count 10 (+ 2) % Row 5 \SetRowColor{white} {\bf{Mod4 + Shift + h}} & Increase number of master windows by 1. \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} {\bf{Mod4 + Shift + l}} & Decrease number of master windows by 1. \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} {\bf{Mod4 + Control + h}} & Increase number of columns for non-master windows by 1. \tn % Row Count 17 (+ 3) % Row 8 \SetRowColor{LightBackground} {\bf{Mod4 + Control + l}} & Decrease number of columns for non-master windows by 1. \tn % Row Count 20 (+ 3) % Row 9 \SetRowColor{white} {\bf{Mod4 + space}} & Switch to next layout. \tn % Row Count 21 (+ 1) % Row 10 \SetRowColor{LightBackground} {\bf{Mod4 + Shift + space}} & Switch to previous layout. \tn % Row Count 23 (+ 2) % Row 11 \SetRowColor{white} {\bf{Mod4 + Control + space}} & Toggle client floating status. \tn % Row Count 25 (+ 2) % Row 12 \SetRowColor{LightBackground} {\bf{Mod4 + Control + Return}} & Swap focused client with master. \tn % Row Count 27 (+ 2) % Row 13 \SetRowColor{white} {\bf{Mod4 + Control + 1-9}} & Toggle tag view. \tn % Row Count 29 (+ 2) % Row 14 \SetRowColor{LightBackground} {\bf{Mod4 + Shift + 1-9}} & Tag client with tag. \tn % Row Count 31 (+ 2) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{2.18988 cm} x{2.78712 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Layout Modification Key Bindings (cont)}} \tn % Row 15 \SetRowColor{LightBackground} {\bf{Mod4 + Shift + Control + 1-9}} & Toggle tag on client. \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} p{0.4977 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Personal shortcuts}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) % Row 1 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) % Row 7 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{This is an empty section where you can put your personal shortcuts} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}