Getting Started With Awesome Window Manager

DistroTube
233 followers
Oct 25, 2024
on a recent video of mine I suggested
that you guys if you've never installed
a window manager before especially a
tiling window manager you should give it
a try because it's easy it won't hurt
your existing system in any way and the
one I suggested you guys start with was
the awesome window manager why did I
suggest awesome is because you know
these tiling window managers have
varying degrees of complexity especially
in the beginning awesome
comes with a nice desktop if you will
out of the box it has a panel with some
widgets already installed it has a menu
system and it has sensible keyboard
defaults where on the other end of the
spectrum you have things like DWM and
especially X Mon ed when you log into X
mode after installing it it's just a
black screen and if you don't know how
to bring up a terminal at that point you
really can't do anything with X Monet
we're awesome
like I said you know you can install
sudo apt install awesome login to
awesome and can actually do work right
away and awesome so some of you guys
took me up on the offer and you guys
have installed awesome but now you're
wondering ok I've installed it what do i
do how do I can figure it you know what
do I need to do well let me show you the
first thing you want to do is of course
install awesome if you haven't already
installed it so I'm gonna pull up a VM
this is a boon to 2004 but again you can
install this on anything I just assumed
most people are probably running a
debian or an a boon tube based system
anyway so I'm gonna use a boon - for
this example and I'm logged in in a bun
- ctrl alt T brings up a terminal so we
need to bring up a terminal here let me
zoom in so you guys can see this but you
need to run this command sudo apt
install awesome hit enter give it your
root password and it's gonna install a
few packages awesome does have some
dependencies not many awesome is
configured in the Lua programming
language so if you don't have Lua on the
system it might may want to install that
it should just take a second though to
install alright and the installation has
completed and now what you need to do is
close that terminal and let's log out
so logout of genome or if you were using
plasma or xfce logout of your desktop
environment go back to your login
manager and in your login manager
somewhere you should see some kind of
cog or setting or hamburger menu
whatever it is and it lists all your
current sessions that are available now
you should in addition to genome or
plasma or whatever you should have a
session called awesome let's login to
awesome this is awesome
out-of-the-box it has a panel at the top
and it gives you a menu system you have
this funny-looking AIDS the awesome logo
here if you click on it you have a menu
you could use this menu most people that
use telling window managers don't use
this kind of menu system many people
just delete this from the panel but it's
there if you want it also you can
right-click on the desktop the same way
you right-click and get the menu and
open box or some cases xfce it's
actually the same menu as this button
both of them bring up the same menu your
layouts if you click this icon here
right now we are in the floating layout
see if you hover over it it gives you
the hint that you're in the floating
layout that's the tiled layout tile lift
top bottom tile top the font it's kind
of small I apologize fair Vee fair h
spiraled wendell max full screen
magnifier there's a whole bunch of
layouts here by default and the reason I
suggest awesome for a first tiling
window manager is the fact that they
have so much stuff in the config they
include like a dozen different layouts
then it's easy for you to get into that
config and comment out all the layouts
you're not gonna use you're not gonna
use most of those layouts but it's cool
they include all of them by default for
the new user because you can actually
see what the layouts are what you like
what you don't like super enter brings
up a terminal so you need to know that
key binding that's that's very important
I believe super shift see closes the
terminal yes so super enter to open a
terminal
super shift see closes the window with
focus it doesn't necessarily have to be
a terminal super or get you a run prompt
and you see in the panel it's very small
text I apologize but you now have a run
prompt it says run : and then you have a
prompt you can start typing something so
if I wanted to launch my browser or file
manager or whatever it is the file
manager on Ubuntu is Nautilus that's the
only one available I probably shouldn't
launch that because it's gonna try to do
some weird stuff to the desktop I think
well let's try it let me launch Nautilus
no it doesn't and older versions of
Nautilus it used to take over your
desktop and draw a wallpaper over the
screen you really didn't want to use
Nautilus anaise minimal window manager
like all these tiling window managers it
actually caused problems but it looks
like it's fine here now the first thing
we want to do is we want to find the
config file so the awesome config file
should be in a hidden folder in your
home directory dot config the dot config
folder is really where every program
should put their config files their user
config files and in this folder you
should have a folder called awesome we
do not we could create one and you know
what that's what I'll do right now just
right-click I'm gonna say create new
folder and we'll call it awesome if I
can type and in this folder there needs
to be a document called RC Lua we don't
have one obviously we could create one
and start writing it from scratch but
really what we need to do is copy over a
default or C dot Lua because there is a
default on the system it's the one that
awesome is using right now it's just not
in our home users dot config slash
awesome directory it's somewhere
probably in the root filesystem so let's
find it it's a called RC Lua so it's
super enter to bring up a terminal but I
want to run this command so I want you
to search in the root filesystem
for a file or directory called RC Lua
and it's gonna complain about not having
root permissions especially to search in
the root directory so sudo find root -
named RC Lua give it the root password
and there you go it's in / Etsy / x DJ /
awesome RC dot
copy that so to copy that we want to see
B for copy space the path to that file
space and then the tilde character slash
for our home directory the tilde is
alias for our home directory
dot config slash awesome and we're just
going to copy that over hit enter now
let me see D into dot config and do an
LS CD into awesome doing LS and there
you go we have a our C Lua file now in
that directory I'm gonna close the
terminal again because this is geared
toward new to tiling window manager
users maybe even new to Linux users I
know the terminal can be kind of scary
and we did need the terminal to find
that file that's why I pulled it up but
most of this can be done in your
graphical file manager and with
graphical text editors so that's what
I'm gonna use today so let's open up our
file manager again remember super are
gets our run prompt C run at the top we
have a prompt just start typing the name
of a program in my case because this was
a boon to I know the file manager that
is installed by default is Nautilus so I
type Nautilus hit enter and then I get
our file manager here and then we need
to go back in there that dot config
folder there is awesome and there is our
C dot Laura if I right-click on it let's
see what applications we can open it
with just the text editor which is G
edit the default text editor in Ubuntu
so let's open it in G edit and this is
our config file now we can start
changing things so I don't want to get
into a programming tutorial or a Lua
tutorial I'm not a programmer and a
little bit of programming I dunno I
don't know really much about Lilith but
you don't really need to know these
programming languages to heck on these
window managers because they're pretty
self-explanatory especially when the
developers leave you comments in the
files so in lua the comments are the
lines that begin with two dashes these
are not code these are just comments
standard awesome library it's telling
you what these are so all this stuff
here
that says local and then a name after it
that is just pulling in some Lua
libraries you import all these Lua
libraries so later you can use all these
various functions going further down the
config you see terminal equals X
terminal emulator now you could set that
to anything the X terminal emulator is
your default terminal on your system if
you have one set but you could change
that you are X V T or X term or st or
termite or alacrity or whatever it is
you want to use and I would probably
just set that to alacrity in my case but
you guys set it to whatever you want to
set it to you can also set a default
editor so if you want to edit in vim or
Emacs or Genie or G editor or sublime or
whatever it is you want to use you know
set a default editor on that line right
there the mod key is the super key but
it doesn't have to be you can set the
mod key instead of mod 4 which is super
you can set it to mod 1 which is the Alt
key I think most users probably would
prefer the super key so I will leave
that the first thing you want to do
though with any window manager is set
some things to auto start meaning when
you first log into awesome it runs these
commands and the commands you wanted to
run you wanted to launch a compositor
you know so you can have transparency
and drop shadow in you know nice
graphical effects without all the screen
tearing you also want it to auto-launch
some kind of wallpaper sitter so it
actually draws a wallpaper on the screen
so you didn't for sure what those two
things to auto start you may want some
systrace stuff to auto start maybe a
network manager or volume control or you
know whatever it is you're gonna have a
few things that you want to always start
as soon as you log into your window
manager how do you do that in awesome
well what I'm gonna do is I'm just gonna
scroll all the way to the bottom of the
config it's just get completely out of
the way here I'm gonna make some space
here at the end of the config and let's
actually type something so I do
apologize if you're not great at typing
but this is not complicated here let's
make a comment it's just so if we ever
come back to this config we know exactly
what we did so
gonna do two dashes to leave a comment
and I'm gonna write Auto Start
applications and hit enter and then the
command you want to write to auto start
something is awful got spawn dot with
underscore shell you see that awful dot
spawn dot with underscore shell and then
you need parentheses now something needs
to go in the parentheses what needs to
go into parentheses whatever it is that
you want to auto start now you may want
three or four different programs to auto
start so what I would do is I would just
ctrl C here in G edit just to copy that
and you know paste a few different lines
with that and then you just need to add
the Auto Start programs you want to add
they need to be in quotes single quotes
or double quotes I'm gonna use double
quotes here so inside these double
quotes I know we're gonna want Compton
for a compositor I also know we're gonna
want nitrogen to set our wallpaper by
the way neither Compton or nitrogen is
probably installed we need to run
nitrogen space dash dash restore that
draws our wallpaper and if you had
anything else that you wanted to
automatically launch such as network
manager or volume control or whatever it
is like I said you could just keep
adding lines but I'm just gonna go with
those two for now I'm gonna save and if
we restarted awesome hopefully Compton
and nitrogen would launch but of course
they're not gonna do anything until we
install them so super enter to bring up
a terminal what you guys want to do is
sudo apt install you need to install
Compton and you need to install nitrogen
hit enter
give it your root password these are
very small programs as well should just
take a second to install alright it
finished installing so let me close this
super shift see to kill the window with
focus and then super are to get our run
prompt and I want to actually run
nitrogen before we do anything else
because you actually have to run
nitrogen before you can do the nitrogen
dash dash restore because what this does
it restores the last wallpaper you set
with nitrogen
but until you actually use nitrogen at
least one time there's nothing to do so
when you launch nitrogen go into
preferences we need to add a directory
of a directory where it looks for
wallpapers now because this is a VM I
don't have my wallpaper directory or
anything installed by default but on
most Linux systems you can find
wallpaper in the root directory so if I
go to file system here you'll find
wallpapers usually in user share
backgrounds and this is where you find
the default wallpaper pack here and a
boon to you'll also find sometimes
they'll have sub directories and
backgrounds they'll have / monta for a
monta wallpaper pack or / getting on for
Agra gnome wallpaper pack but we're just
good with user shared backgrounds I'm
gonna hit select and it won't hit okay
and now all the wallpapers I can choose
are available here and I'm just gonna
choose one of the wallpapers here I'm
going to choose that one with the boat
it looks very nice hit apply and it just
set my wallpaper nitrogen good so now
that we've saved our our Salewa file and
it will now auto start both Compton and
nitrogen space - - restore let's see
this in action I'm gonna actually close
all of this and I'm gonna log out I'm
gonna quit awesome I'm not sure what the
key binding is by the thought I can
guess but you guys what you can always
do remember we do actually have a menu
now so the great thing about this menu
is if you don't know the key bindings
you know you have this menu something
else I haven't told you guys about is
you can actually quickly find all the
key bindings in your awesome config file
with super s so if you hit super s it
brings up this cheat sheet it has all
the key bindings that you've placed in
your RC lua and what they do how cool is
that so - reload awesome I can see
control super R reloads awesome so well
since I took the trouble to actually
find that control super R
we just relaunched awesome and I noticed
the font got a bigger here in the penile
let me restart that again control super
or yeah okay I guess that's the way it
is but it is working you see we have
wallpaper and I'm assuming if I get
super inter Compton is working we would
have transparency if we wanted to enable
transparency now where before without a
compositor you couldn't have
transparency
let's see if this terminal gives us the
option to do some transparent
backgrounds so the colors use
transparency use transparent background
not exactly sure why I can't choose use
transparent background tick that off
tick that off there we go
we can set some transparency and you can
see that our compositor is working
because we have transparency close that
terminal I notice we need to play with
nitrogen a little bit so let me super
are and run nitrogen again I don't like
having to type the full name nitrogen
whatever built in run prompt they have
here and awesome I actually want to
install it much better when we should
probably install daemon you but anyway
the scaling right here it says automatic
we probably want that skilled it apply
and now yeah we get the full screen
wallpaper here I'm gonna super enter so
to make your lives a lot easier you're
not gonna like that run prompt I can
tell you I would install daemon you
personally if you prefer something else
like Rafi or Albert or you know some
other run prompt you're free to install
them but just for purposes of this video
and I know it's a small program let's
sudo apt install D menu I know I'm gonna
want that I'm probably not gonna want to
keep using Nautilus as my file manager
I'll install PC man fum it's like fast
I'm not gonna keep wanting to use this
terminal either and it's probably the
genome terminal I'm sure it's alright
but just for purposes of this video
let's just go with termite you know it's
a fine terminal and let's install these
programs there is no eka CH for D menu
it says selecting suppli stools instead
okay
that is interesting let's go with suppli
s-- - tools unable to locate termites so
we can't find termite in the Ubuntu
hurry pose either well that's fine
because I could use any terminal I'll
just stick with the genome terminal for
now I could install st but i'd have to
patch st to make it work alright so
let's install the menu and pc man mmm so
to run d menu from the terminal here
type d menu underscore run hit enter yes
and this is a much better run prompt
because i don't have to type the full
path to nitrogen or the pool the full
file name i can just start typing and
when it gets to what
thinks I'm searching for all I had to do
was type NIT I could hit in her and open
nitrogen where the built-in run prompt
here and awesome I actually have to type
the full path that kind of sucks so I
want to change super R instead of giving
me that built in run prompt I wanted to
give me demon you how do you do that
well we need to open up our file manager
so super R and this time we will have to
type PC man mmm the full name until we
get this fixed and this is PC man mmm
instead of Nautilus and let's
right-click and show hidden files let's
go into dot config and then awesome our
C dot Lua we'll open it with G edit and
we want to find the key binding for that
run prompt which we know is super R so
we could just scroll down and try to
find it
hopefully they left a comment that's
obvious like hey here's the run launcher
but I don't know I mean I could sit here
and read or if I wanted to I could do a
search I could do that
I bet ctrl F to find here in G edit if I
did launcher create a launcher no that's
not yet about run prompt yeah there we
go scroll up you see mod key which is
the super key and our run this command
which basically is the run prompt
command I don't want that to do that
anymore I want that to actually run D
menu so where it says awful dot key mod
key + R run this function and then the
function it runs is this I'm gonna
delete those two lines right there
underneath the mod key or function
delete those lines we want that to run a
new function and the function we want
this to run is awful dot util dot spawn
and then parentheses space and then the
word end and then a comma now where
would you have gotten information about
awful dot util dot spawn well it may
occur somewhere in this config but what
I would suggest is you guys go
- awesome WM org that it's the homepage
for the awesome window manager you have
doc right here this is the documentation
and you go into the documentation Lua
API documentation for stable release and
this is where you would find all the
various libraries and functions and
everything awful dot util is right here
I mean you could there's so many and
it's hundreds maybe thousands of stuff
you can do here with the various lua
functions here and awesome it is a very
configurable window manager extreme
customizability if you actually want to
really deep dive into awesome I suggest
reading the documentation if you really
want to learn Lua I suggest reading the
documentation but most people you know
they just want to do some simple configs
and I gave you this one here you'll use
this one a lot this is for pretty much
all your key bindings awful utils Mon
basically it's saying hey if you type
mod key + R I want you to spawn this
program what do we want it to spawn
spawn we want it to spawn deep menu
underscore run because that's what we
want it to run I think that needs to be
in quotes either single quotes or double
quotes I will do since I did double
quotes earlier I'll do double quotes
again for this one let's save and
remember control super R restarts
awesome so let's restart awesome so I
get an error you know it defaults back
to the default awesome config because
remember you have a default awesome
config in the slash Etsy folder so this
is really cool with awesome when the
window manager crashes it doesn't
actually kick you back out to the login
manager and you then you can't even log
in because your awesome is broken now I
just defaults to that default config
that's on your system and you need to
fix your config so obviously I know this
here what I was just editing calls the
problem really it was just this one line
and just thinking about this a little
bit I deleted two lines earlier but I
only added one line the second line was
a description
actually I'm looking at it right here in
the second line any time you add a key
binding you probably want to add a
description it's kind of important why
is the description important because
remember super s gives you your key
bindings how does it know what to put
here well it knows what to put here is
because you put it in your config you're
saying you know this key binding Super
are runs the menu and then you're also
putting this line description it will
show them a new bar group equals
launcher though that's exactly what will
appear in here I go down you will see
super R says run prompt Super pieces
show the menu menu bar excuse me
of course I copied this from down here
we actually want this description to say
run D menu group equals launcher that's
the group that appears in because you
see there's groups of key bindings and
you have a launcher group down here yeah
that's fine
I will keep it in that group but I want
the description to actually say run D
menu now now I noticed that the
description in these squiggly braces has
a parenthesis at the very end of the
line you guys see that that parenthesis
at the end of the line where was the
opening parenthesis it was way back here
so that was what was causing the error
we needed this line but we really needed
that closing parenthesis so let's save
and let's do the control super R and
we're still having a problem let's see
let me look at the code and see if I can
figure out what I have done here it's
just taking a guess I bet there needs to
be a comma at the end of that line let's
save ctrl super R again and no more
errors so I think that was okay and if
that was ok then super or should run
demon you super r runs demon you so
perfect the only thing I noticed is it
did not relaunch nitrogen dash dash
restore down here yeah it's not doing
that but super or to run demon
utilization this time I can just type
NIT and yeah there is a wallpaper here
you know what let's make sure that is
working so let me quit out of awesome
now to quit out of awesome I could hit
super s to get all my default key
bindings and it will tell me super shift
Q quits awesome so super shift Q to quit
awesome kicks you back out into the
volume manager you got to log back in
make sure awesome is chosen is let's log
back in yeah it's not yeah no it did it
drew our wallpaper so our auto start
stuff is working so that's that's fine
let me launch our terminal here and let
me run that last X render command I did
earlier so I'm gonna do the exclamation
point followed by X render no spaces hit
enter and it runs the last command that
I ran that evolved the word X Ranger
it's a little bash trick but when I run
it and it redraws the screen it has the
default wallpaper super control are to
restart the window manager yeah it draws
it again that is a little glitch
probably because I'm in a VM and I'm
adjusting the screen resolution you guys
are probably not going to be playing
with the screen resolution but when you
are playing with that resolution you
know it kind of conflicts right
you end up getting kicked back to the
default wallpaper instead of the one
that nitrogen is setting they're kind of
overriding each other but you guys
already see how pretty easy it is to
hack on this thing so now that what you
have daemon you installed super or get
you a much better run prompt here so PC
man you know it's already here go back
into dot config awesome your RC Lua go
ahead and open it and whatever text
editor you want to open it with and
already I've shown you enough stuff you
can really do whatever you want to do
with this showing you how to do the Auto
Start applications here and I should
have zoomed in here so you could
actually see that if I can zoom in here
I don't normally use G edit assuming
ctrl + + know one of the things about
using tools that you don't normally use
is I don't even know how to zoom in here
so I do apologize about this guys I'm
sure there's a way I just I don't know
anything about this text editor
I will try to leave some notes in the
documentation may be in the show
description exactly how we did the Auto
Start application and then adding your
own key bindings are pretty
self-explanatory we already did this one
right here for the prompt here which is
not really the prompt anymore it's
daemon you so will leave a comment but
if I wanted to do some other key
bindings well let's just copy so I'm
gonna copy that and then I'm gonna paste
another one down here and maybe I don't
need a key binding to launch Firefox
everybody needs a key binding to launch
their browser I mean that's one of the
things everybody uses all the time right
is the web browser so we're going to do
mod key plus something to launch the web
browser Mikey B I'm gonna assume well
let's not assume let's Super S to bring
up our key bindings and just quickly
peruse this does it look like there is
anything set to mod key B I don't see
one and it's very important because if
you have something that's conflicting
you know you're gonna have an error so
mod key B for browser will run this
command Firefox then we need to give it
a description the description is in
Firefox and then the group let's see
what kind of groups we have to choose
from that are already here we have
awesome client launcher layout screen
tags T MUX stuff let's create a new
group then about applications I like
that hit save then super control or
again for restore awesome and of course
our wallpaper gets messed up but again
that's just a bug here in the VM but it
restarted just fine so superbee should
launch Firefox and it does by the way we
are in floating mode here that's why
Firefox is covering everything but of
course you can adjust this to be in
tiling mode full-screen mode here
magnifier let's get back to towel
although it didn't tell but it should
tell I think from now on yeah now you
actually have tiling mode super shift C
to close the windows by the way you can
read all of this in the default
config' but super jay and super k to
switch focus if I had something launched
here H stop is on the left and it has
focused but I could super shift J to
move it to the other side or super shift
J to move it back or super shift K to go
the other direction yeah and that if I
had more than two things open you would
see super J goes one direction in the
stack Super K goes the other direction
in the stack and then I could grab
something with super shift J and K so
super shift J moves the window through
the stack and super shift K moves it
through the stack the other direction
super chef C closes and of course this
terminal this horrible genome terminal
is asking me do I really want to close
yes I do
anyway that's just a little bit of what
you can do very briefly getting started
with awesome I didn't want to spend a
ton of time configuring awesome because
I want you guys to figure out what you
want to do on your own if you're really
just confused about what to do with
awesome I mean you can grab my configs
if you want to you can go to my dot
files repository over on get lab and if
you go into dot files
you see dot config imagine this is my
home directory dot config right awesome
and then you can grab all of this stuff
I've got more than just our C dot lua in
mine i have an auto start dot s h file
that basically is where I put all my
auto start stuff but you can actually
put it directly in the RC lua the way I
did on this video I also have some
themes you know my my awesome looks you
know quite a bit different than the
default awesome I don't recommend though
you guys just grab somebody else's
config and try to use it you can grab my
configs and look at what i'm doing see
what works for you see what doesn't but
it's best if you write it from script up
you know from the start yourself because
then it's a lot easier for you to make
it it's to it when you have something
that you want done and awesome hey I
wonder if awesome can do this or can do
that especially when you go back and are
trying to fix your own configs since you
wrote it you you know what you did
before where if you're trying to fool
with somebody else's configs it's kind
of hard to go back after the fact and
hack on that thing because you didn't
write it in the first place and just for
a little bit of inspiration I will go
ahead and show you guys my awesome
desktop here and I've got the panel
workspaces various widgets of course it
drawls the wallpaper
I've got rid of all the window
decorations as well I don't need close
buttons or whatever that are in there by
default and awesome again that's to help
new to tiling window manager users but
it's extra space and you're never gonna
use it because super shifts see to close
a window right you're gonna get rid of
all that stuff eventually you know it's
just my config and play around with the
layouts a little bit here anyway that's
enough of me goofing off here before I
go I need to thank these folks right
here this episode was produced by
Michael Mitchell Chris DJ Donnie Dylan
George hello Nate Lambda Omri Rob Sean
and Willie these guys are the producers
of the show they're my highest tiered
patrons over on patreon without these
guys this show wouldn't have been
possible show was also brought to you by
all these names you're seeing on the
screen these are all my patrons over on
patreon again sincere thank you to each
and every one of those folks you want to
support the channel you'll find me at
distro tube over on patreon alright guys
peace
you
