Linux Format - UK (2019-12)

(Antfer) #1
60 LXF257 December 2019 http://www.linuxformat.com

from the Contributor Covenant, which only helps
highlight the maturity behind the project.
The project supports many different modes of
installation, depending on user preference. In addition
to installing the binary, which we’ll discuss in a moment,
you can also install it via Homebrew and Scarf. It’s also
possible to compile it from source, but that’s a slightly
more involved process, though not cumbersome. Since
WTF is a standalone binary, the easiest method is to
download latest binary release from GitHub:
$ cd Downloads/projects
$ wget -c https://github.com/wtfutil/wtf/releases/
download/v0.22.0/wtf_0.22.0_linux_amd64.tar.gz
$ tar xf wtf_0.22.0_linux_amd64.tar.gz
$ cd wtf_0.22.0_linux_amd64.tar.gz
$ sudo cp wtfutil /usr/local/bin
$ sudo chmod u+x /usr/local/bin/wtfutil
Here, we’ve downloaded the compressed tarball,
extracted files from it, moved it to the /usr/local/bin
directory and then made the file executable. You can
now run WTF with the wtfutil command.
Irrespective of how you choose to install WTF, it’ll be
mighty helpful if you also clone the Git repository locally
with the git clone https://github.com/wtfutil/wtf.git
command. We are primarily interested in the sample
configs and the modules directory. The former has
screenshots and several sample configuration files, to
help you better gauge the possibilities of WTF. You will
also find a list of all the supported modules within the

hat does a Dodge Charger have in common
with business server distributions such as
Zentyal and ClearOS? Having recently done a
Roundup featuring the latter two (LXF256) and also
driven the former while on vacation in the USA, the
author can confidently report that they all feature a
rather interactive and impressive-looking dashboard. In
computing terms, a dashboard is a user interface that
provides an organised layout for a variety of information
for quick assimilation. With WTF, you can quickly
configure a multi-paned dashboard for your terminal.
Distributed under the Mozilla Public Licence and
written in Go, the WTF project prominently features a
list of all its many contributors on its GitHub page. It
also has a rather detailed code of conduct , adopted

A dashboard for


your terminal


Dashboards usually provide a quick rundown of information at a glance.


Shashank Sharma reveals how you can set one up for your terminal.


Shashank Sharma
is a trial lawyer in
New Delhi and avid
Arch user. He’s
always on the hunt
for geeky
memorabilia.

CONFIGURING WTF


Put simply, rows break up the height of the WTF interface into
different elements. Similarly, columns break the width of the interface
into different elements. Our tests revealed that columns that are less
than 30 characters in width are unsuitable for most types of
information modules in WTF. With that in mind, let’s create a layout
using four columns of uniform width 35, and also three rows:
grid:
columns: [35, 35, 35, 35]
rows: [10, 10, 4]
The different columns and rows are numbered from 0 starting
from the left. So, the first widget will have top and left positions set at


  1. The second widget in the first row will have top set to 0 but left set
    to 1, and so on. Similarly, the third widget in the second row will have
    top set to 1, but left position set to 2.
    For each widget, you must also specify its height and width. A multi-
    column widget spans horizontally, whereas a multi-row widget spans
    vertically. In the screenshot on page 63, the position for the Delhi
    High Court widget is:
    position:
    top: 1
    left: 0
    height: 1
    width: 3


OUR
EXPERT

TUTORIALS


The author’s home city is experiencing an unpleasant haze, which
translates into a dull representation in the weather widget. California,
on the other hand, is quite sunny.

W


WTF!


60 LXF257December 2019 6660Decmbr 219a0s 1

fromtheContributorCovenant,whichonlyhelps
highlightthematuritybehindtheproject.
Theprojectsupportsmanydifferentmodesof
installation,dependingonuserpreference.Inaddition
toinstallingthebinary,whichwe’lldiscussinamoment,
youcanalsoinstallitviaHomebrewandScarf.It’salso
possibletocompileitfromsource,butthat’saslightly
moreinvolvedprocess,thoughnotcumbersome.Since
WTFisastandalonebinary,theeasiestmethodisto
downloadlatestbinaryreleasefromGitHub:
$ cdDownloads/projects
$ wget-chttps://github.com/wtfutil/wtf/releases/
download/v0.22.0/wtf_0.22.0_linux_amd64.tar.gz
$ tarxfwtf_0.22.0_linux_amd64.tar.gz
$ cdwtf_0.22.0_linux_amd64.tar.gz
$ sudocpwtfutil/usr/local/bin
$ sudochmodu+x/usr/local/bin/wtfutil
Here,we’vedownloadedthecompressedtarball,
extractedfilesfromit,movedittothe/usr/local/bin
directoryandthenmadethefileexecutable.Youcan
nowrunWTFwiththewtfutil command.
IrrespectiveofhowyouchoosetoinstallWTF,it’llbe
mightyhelpfulifyoualsoclonetheGitrepositorylocally
withthegitclonehttps://github.com/wtfutil/wtf.git
command.Weareprimarilyinterestedinthesample
configsandthemodulesdirectory.Theformerhas
screenshotsandseveralsampleconfigurationfiles,to
helpyoubettergaugethepossibilitiesofWTF.Youwill
alsofindalistofallthesupportedmoduleswithinthe

hatdoesaDodgeChargerhaveincommon
withbusinessserverdistributionssuchas
ZentyalandClearOS?Havingrecentlydonea
Roundupfeaturingthelattertwo(LXF256)andalso
driventheformerwhileonvacationintheUSA,the
authorcanconfidentlyreportthattheyallfeaturea
ratherinteractiveandimpressive-lookingdashboard.In
computingterms,adashboardisauserinterfacethat
providesanorganisedlayoutforavarietyofinformation
forquickassimilation.WithWTF,youcanquickly
configureamulti-paneddashboardforyourterminal.
DistributedundertheMozillaPublicLicenceand
writteninGo,theWTFprojectprominentlyfeaturesa
listofallitsmanycontributorsonitsGitHubpage.It
alsohasaratherdetailedcodeofconduct,adopted

A dashboard for


your terminal


Dashboardsusuallyprovideaquickrundownofinformationataglance.


Shashank Sharmarevealshowyoucansetoneupforyourterminal.


ShashankSharma
isatriallawyerin
NewDelhiandavid
Archuser.He’s
alwaysonthehunt
forgeeky
memorabilia.

CONFIGURINGWTF


Putsimply,rowsbreakuptheheightoftheWTFinterfaceinto
differentelements.Similarly,columnsbreakthewidthoftheinterface
intodifferentelements.Ourtestsrevealedthatcolumnsthatareless
than 30 charactersinwidthareunsuitableformosttypesof
informationmodulesinWTF.Withthatinmind,let’screatealayout
usingfourcolumnsofuniformwidth35,andalsothreerows:
grid:
columns:[35,35,35,35]
rows:[10,10,4]
Thedifferentcolumnsandrowsarenumberedfrom 0 starting
fromtheleft.So,thefirstwidgetwillhavetopandleftpositionssetat
0.Thesecondwidgetinthefirstrowwillhavetopsetto 0 butleftset
to1,andsoon.Similarly,thethirdwidgetinthesecondrowwillhave
topsetto1,butleftpositionsetto2.
Foreachwidget,youmustalsospecifyitsheightandwidth.Amulti-
columnwidgetspanshorizontally,whereasamulti-rowwidgetspans
vertically.Inthescreenshotonpage63,thepositionfortheDelhi
HighCourtwidgetis:
position:
top: 1
left: 0
height: 1
width: 3

OUR
EXPERT

TUTORIALS


The author’s home city is experiencing an unpleasant haze, which
translates into a dull representation in the weather widget. California,
on the other hand, is quite sunny.

W


WTF!

Free download pdf