mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
214 lines
9.8 KiB
HTML
214 lines
9.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en-us" class="wf-firasans-n4-active wf-active">
|
|
<head>
|
|
<link href="http://gmpg.org/xfn/11" rel="profile">
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<!-- Enable responsiveness on mobile devices -->
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
|
|
|
|
|
<meta name="generator" content="Hugo 0.38.2" />
|
|
|
|
<title>Configuration | WTF - A Terminal Dashboard</title>
|
|
<meta content="Configuration - WTF - A Terminal Dashboard" property="og:title">
|
|
<meta content=" - " property="og:description">
|
|
<!-- CSS -->
|
|
<link rel="stylesheet" href="//cdn.rawgit.com/milligram/milligram/master/dist/milligram.min.css">
|
|
<link href="https://fonts.googleapis.com/css?family=Fira+Sans:300,300i,400,400i|Roboto+Mono:300,300i,400,400i" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://wtfutil.com/css/print.css" media="print">
|
|
<link rel="stylesheet" href="https://wtfutil.com/css/poole.css">
|
|
<link rel="stylesheet" href="https://wtfutil.com/css/hyde.css">
|
|
<link rel="stylesheet" href="https://wtfutil.com/css/syntax.css">
|
|
<link rel="stylesheet" href="https://wtfutil.com/css/wtf.css">
|
|
<!-- Font-Awesome -->
|
|
<script defer src="https://use.fontawesome.com/releases/v5.0.9/js/all.js" integrity="sha384-8iPTk2s/jMVj81dnzb/iFR2sdA7u06vHJyyLlAd4snFpCl/SnyUjRrbdJsw1pGIl" crossorigin="anonymous"></script>
|
|
|
|
<!-- Customised CSS -->
|
|
<link rel="stylesheet" href="https://wtfutil.com/css/custom.css">
|
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
|
<!--[if lt IE 9]>
|
|
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
|
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
|
<![endif]-->
|
|
<!-- Icons -->
|
|
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
|
|
<link rel="shortcut icon" href="/favicon.png">
|
|
|
|
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
|
|
|
</head>
|
|
<body>
|
|
<div class="sidebar">
|
|
<div class="container">
|
|
<div class="sidebar-about text-center">
|
|
|
|
<a href="https://wtfutil.com/"> <img src="/img/wtf.png" alt="WFT Logo" class="" width=""> </a>
|
|
<p class="lead">
|
|
|
|
</p>
|
|
</div>
|
|
|
|
<div>
|
|
<h3 style="color: white;">Content</h3>
|
|
|
|
<ul style="list-style-type: none;">
|
|
<li class="sidebar-list-item-1"><a href="/posts/overview/">Overview</a></li>
|
|
<li class="sidebar-list-item-1"><a href="/posts/installation/">Installation</a></li>
|
|
<li class="sidebar-list-item-1"><a href="/posts/configuration/">Configuration</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/configuration/attributes/">Attributes</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/configuration/iterm2/">iTerm2</a></li>
|
|
<li class="sidebar-list-item-1"><a href="https://github.com/senorprogrammer/wtf/releases">Releases</a></li>
|
|
</ul>
|
|
|
|
<ul style="list-style-type: none;">
|
|
<li class="sidebar-list-item-1"><a href="/posts/modules/">Modules</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/bamboohr/">BambooHR</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/cryptocurrencies/bittrex/">Bittrex</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/cryptocurrencies/blockfolio/">Blockfolio</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/circleci/">CircleCI</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/clocks/">Clocks</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/cryptocurrencies/cryptolive/">CryptoLive</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/cmdrunner/">CmdRunner</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/git/">Git</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/github/">GitHub</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/gitlab/">Gitlab</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/gcal/">Google Calendar</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/gspreadsheet">Google Spreadsheet</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/ipapi/">IP-API</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/ipinfo/">IPInfo</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/jenkins/">Jenkins</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/jira/">Jira</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/logger/">Logger</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/newrelic/">New Relic</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/opsgenie/">OpsGenie</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/power/">Power</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/prettyweather/">PrettyWeather</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/security/">Security</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/textfile/">Text File</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/todo/">Todo</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/trello/">Trello</a></li>
|
|
<li class="sidebar-list-item-2"><a href="/posts/modules/weather/">Weather</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<p class="copyright">
|
|
© 2018 Chris Cummer.
|
|
<br />
|
|
<a href="https://creativecommons.org/licenses/by/4.0">Some Rights Reserved</a>.
|
|
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content container">
|
|
<div class="post">
|
|
<h1>Configuration</h1>
|
|
|
|
<div class="col-sm-12 col-md-12">
|
|
<span class="text-left post-date meta">
|
|
|
|
|
|
Apr 15, 2018
|
|
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
</span>
|
|
</div>
|
|
|
|
|
|
|
|
<h2 id="index">Index</h2>
|
|
|
|
<ul>
|
|
<li><a href="#configuration-files">Configuration Files</a></li>
|
|
<li><a href="#environment-env-variables">Environment (ENV) Variables</a></li>
|
|
<li><a href="#grid-layout">Grid Layout</a></li>
|
|
</ul>
|
|
|
|
<h2 id="configuration-files">Configuration Files</h2>
|
|
|
|
<p>By default WTF looks in a <code>~/.config/wtf/</code> directory for a YAML file called
|
|
<code>config.yml</code>. If the <code>~/.config/wtf/</code> directory doesn’t exist, WTF will create that directory
|
|
on start-up, and then display instructions for creating a new
|
|
configuration file.</p>
|
|
|
|
<p>In other words, WTF expects to have a YAML config file at: <code>~/.config/wtf/config.yml</code>.</p>
|
|
|
|
<h4 id="example-configuration-files">Example Configuration Files</h4>
|
|
|
|
<p>A couple of example config files are provided in the <code>_sample_configs/</code>
|
|
directory of the Git repository.</p>
|
|
|
|
<p>To try out WTF quickly, copy
|
|
<code>simple_config.yml</code> into <code>~/.config/wtf/</code> as <code>config.yml</code> and relaunch WTF. You
|
|
should see the app launch and display the <a href="/posts/modules/security/">Security</a>,
|
|
<a href="/posts/modules/clocks/">Clocks</a> and <a href="/posts/modules/status/">Status</a> widgets onscreen.</p>
|
|
|
|
<h4 id="custom-configuration-files">Custom Configuration Files</h4>
|
|
|
|
<p>To try out different configurations (or run multiple instances of WTF),
|
|
you can pass the path to a config file via command line arguments on
|
|
start-up.</p>
|
|
|
|
<p>To load a custom configuration file (ie: one that’s not
|
|
<code>~/.config/wtf/config.yml</code>), pass in the path to configuration file as a
|
|
parameter on launch:</p>
|
|
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash"> $> wtf --config<span class="o">=</span>path/to/custom/config.yml</code></pre></div>
|
|
<h4 id="configuration-attributes">Configuration Attributes</h4>
|
|
|
|
<p>A number of top-level attributes can be set to customize your WTF
|
|
install. See <a href="/posts/configuration/attributes/">Attributes</a> for detials.</p>
|
|
|
|
<h2 id="environment-env-variables">Environment (ENV) Variables</h2>
|
|
|
|
<p>Some modules require the presence of environment variables to function
|
|
properly. Usually these are API keys or other sensitive data that one
|
|
wouldn’t want to have laying about in the config files.</p>
|
|
|
|
<p>For modules that require them, the name of the required environment
|
|
variable(s) can be found in that module’s “Required ENV Variables”
|
|
section of the documentation. See <a href="/posts/modules/opsgenie/">OpsGenie</a> for an example.</p>
|
|
|
|
<h2 id="grid-layout">Grid Layout</h2>
|
|
|
|
<p>WTF uses the <code>Grid</code> layout system from <a href="https://github.com/rivo/tview/blob/master/grid.go">tview</a> to position widgets
|
|
onscreen. It’s not immediately obvious how this works, so here’s an
|
|
explanation:</p>
|
|
|
|
<p>Think of your terminal screen as a matrix of letter positions, say <code>100</code> chrs wide and <code>58</code> chrs tall.</p>
|
|
|
|
<p>Columns breaks up the width of the screen into chunks, each chunk a specified number of characters wide. use</p>
|
|
|
|
<p><code>[10, 10, 10, 10, 10, 10, 10, 10, 10, 10]</code></p>
|
|
|
|
<p>Ten columns that are ten characters wide</p>
|
|
|
|
<p>Rows break up the height of the screen into chunks, each chunk a specified number of characters tall. If we wanted to have five rows:</p>
|
|
|
|
<p><code>[10, 10, 10, 10, 18]</code></p>
|
|
|
|
<p>The co-ordinate system starts at top-left and defines how wide and tall a widget is. If we wanted to put a 2-col, 2-row widget in the bottom of the screen, we’d position it at:</p>
|
|
|
|
<pre><code> top: 4 // top starts in the 4th row
|
|
left: 9 // left starts in the 9th column
|
|
height: 2 // span down rows 4 & 5 (18 characters in size, total)
|
|
width: 2 // span across cols 9 & 10 (20 characters in size, total)
|
|
</code></pre>
|
|
|
|
</div>
|
|
|
|
<div class="footer">
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</body>
|
|
</html>
|