Awesome
From Gentoo Linux Wiki
| This article is not very long. You could help Gentoo-Wiki by editing this article. |
awesome is tiling window manager that is keyboard centric and is highly configurable using the Lua programming language. awesome was originally derived from the dwm source code after the author of awesome decided he disagreed with how dwm handled certain situations.
Contents |
[edit] Installation
[edit] USE Flags
- doc - Add extra documentation.
- gtk - Use x11-libs/gtk+ as renderer. Disabling gtk will enable rendering through media-libs/imlib2.
- dbus - Add support for dbus notifications, you want this
[edit] Installation
The normal rules apply to installing awesome, if you want to get the latest version of awesome you can add the "~ARCH" keyword to either make.conf or /etc/portage/package.keywords file (where ARCH is probably x86 or amd64). For more information, see portage. Once you are ready you can install awesome by typing the following.
When everything is done, edit your ~/.xinitrc.
exec /usr/bin/awesome
If you are using a login manager, you also need to do the following:
Create a soft link to .Xsession
OK! Now select Xsession in your Session list at the login interface, then you can login into awesome!
[edit] Basic Usage
The usage of Awesome depends highly on your configuration, so we will only discuss the default usage here. Please note that you can find a comprehensive list of these instructions in the awesome man pages:
Come on, this manual is really short.
When you start awesome there isn't much to look at, so here are the basic commands (meta is usually the win, although in some configurations it could be alt. Windows key was chosen to prevent conflicts with other applications:
[edit] Viewing tags and windows
- meta + <number> takes you to a different numbered tag
- meta + shift + <number> throws the current window to a different numbered tag
[edit] Moving windows
- meta + j, meta+k move around tiled windows.
- meta + shift + j or meta + shift + k move swap two windows
- meta + Space changes the layout
[edit] Launching, starting, opening, etc
- meta + Enter Starts a terminal.
- meta + <F1> or meta + r Runs a program, depending on the version of awesome
[edit] Exiting, closing, quitting, etc
- meta+shift+c closes a window
- meta+shift+r restarts awesome
- meta+shift+q quits awesome
[edit] Configuration
The gentoo ebuild ships with a default configuration in /etc/xdg/awesome/rc.lua, which provides you with a working multi-desktop setup. However, you'll probably want to tweak your configuration, so head to Awesome 3 configuration on the official wiki to learn a bit about the API.
[edit] Modify rc.lua
Since rc.lua is huge, we just discuss some important part of it.
[edit] Miscellaneous
-- the following line points out the theme you are using now, it's really simple theme_path = "/usr/share/awesome/themes/default/theme" -- the default terminal you are using, xterm can't display chinese correctly, If you are a chinese, choose urxvt, (emerge rxvt-unicode) terminal = "urxvt" -- here you can replace Mod4 to any other key you want! modkey = "Mod4"
-- put a specific application in a floating window
[edit] Floating Window
floatapps =
{
["MPlayer"] = true,
["gimp"] = true,
["smplayer"] = true,
["mocp"] = true,
["Dialog"] = true,
["Download"] = true,
["empathy"] = true,
}
-- put the specific application into a specific screen's specific tag ( what a strange sentence ;-p )
apptags =
{
["smplayer"] = { screen = 1, tag = 7 },
["amarok"] = { screen = 1, tag = 8 },
["VirtualBox"] = { screen = 1, tag = 9 },
["Firefox"] = { screen = 1, tag = 1},
["Linux-fetion"] = { screen = 1, tag = 6 },
}
[edit] Status Bar
The status bar can be modified by changing rc.lua in /etc/xdg/awesome/rc.lua. Additionally, since awesome supports a system tray by default, just adding the name of systray app to .xinitrc will give you access to to the app, see the section Additional Configuration.
[edit] Wicked
There is a standard set of widgets, called wicked, which doesn't come with awesome by default, but is available from the akoya overlay. See layman to read more about overlays. To get the overlay and install wicked:
- layman -a akoya
If this is your first overlay, you may need to install layman and add the overlays to your make.conf, again see layman.
- emerge -av wicked
and example rc.lua file using wicked:
[edit] Additional Configuration
You have installed Awesome on your pc (or something else :-) ), but most of you will soon find out there's almost nothing in it, the interface is very ugly, where's my theme?!Now let's add something in your xinitrc to make it fine.Of course, if you think this default interface is beautiful, you can jump over this part :-).
For gnome:
#!/usr/bin/env bash #open screensaver gnome-screensaver & #open your theme, otherwise it's ugly gnome-settings-daemon & #open power manager gnome-power-manager & #open net work manager nm-applet & #open auto update update-notifier & exec /usr/local/bin/awesome
For xfce4:
#!/usr/bin/env bash
sleep 100
#open your theme
xfce-settings-show &
#Not needed if you set your GTK theme in ~/.gtkrc-2.0, see below
#open net work manager
nm-applet &
exec /usr/local/bin/awesome
You can use x11-themes/gtk-theme-switch or x11-themes/gtk-chtheme to set your GTK theme (which is the one xfce uses). As these save your setting in ~/.gtkrc-2.0, you don't need to call xfce-setting-show in your .xinitrc to load your theme and don't see a popup.
Please change this two xinitrc if you have a better one, thanks!
[edit] Troubleshooting
[edit] Crashes during certain applications
I experienced crashes when using firefox to go to certain sites, especially drudgereport.com . The cause of the problem was the need for UTF support. To fix this, make sure you locale is listed in /etc/locale.gen. For example, to use the US locale modify locale.gen to look like this:
en_US ISO-8850-1 en_US.UTF-8 UTF-8
Then run
Now that the locales are installed you just need to make sure that they are being used. To do that add the following file to /etc/env.d:
LANG="en_US.UTF-8"
You can also set this environmental variable in your bashrc script if you want a per-user locale. More details can be found here: http://www.gentoo.org/doc/en/guide-localization.xml