https://wiki.archlinux.org/api.php?action=feedcontributions&user=Drelyn86&feedformat=atomArchWiki - User contributions [en]2024-03-29T12:27:30ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Awesome&diff=276039Awesome2013-09-19T13:21:00Z<p>Drelyn86: /* Application directories in menubar */ new "Tips & Tricks" section</p>
<hr />
<div>[[Category:Dynamic WMs]]<br />
[[Category:Tiling WMs]]<br />
[[cs:Awesome]]<br />
[[es:Awesome]]<br />
[[fr:Awesome3]]<br />
[[it:Awesome]]<br />
[[ja:Awesome]]<br />
[[ko:Awesome]]<br />
[[ru:Awesome]]<br />
[[sv:Awesome]]<br />
[[zh-CN:Awesome]]<br />
{{Lowercase title}}<br />
<br />
{{Article summary start}}<br />
{{Article summary text|A guide on how to install, use, configure, and customize awesome window manager.}}<br />
{{Article summary end}}<br />
<br />
From the [[Wikipedia:awesome (window manager)|awesome]] website:<br />
<br />
"''[http://awesome.naquadah.org/ awesome] is a highly configurable, next generation framework window manager for X. It is very fast, extensible and licensed under the GNU GPLv2 license.''<br />
<br />
''It is primarly targeted at power users, developers and any people dealing with every day computing tasks and who want to have fine-grained control on its graphical environment.''"<br />
<br />
==Installation==<br />
<br />
Install {{pkg|awesome}} from the [[official repositories]].<br />
<br />
For pre-release versions, an {{aur|awesome-git}} build is in the [[Arch User Repository|AUR]]. These versions are not considered stable and may have a different configuration syntax.<br />
<br />
== Run awesome ==<br />
<br />
=== Without login manager ===<br />
To run awesome without a login manager, simply add {{Ic|exec awesome}} to the startup script of your choice (e.g. ~/.xinitrc.)<br />
<br />
See [[xinitrc]] for details, such as preserving the logind session.<br />
<br />
You can also start awesome as preferred user without even logging in. See [[Start X at Login]].<br />
<br />
=== With login manager ===<br />
To start awesome from a login manager, see [[Display Manager|this article]].<br />
<br />
==== GDM, LightDM, others using /usr/share/xsessions/ ====<br />
<br />
Awesome automatically installs a config file for these display managers. You don't need to do anything special to see awesome offered at login.<br />
<br />
==== KDM ====<br />
<br />
Create as root:<br />
{{hc|/usr/share/apps/kdm/sessions/awesome.desktop|2=<br />
[Desktop Entry]<br />
Name=Awesome<br />
Comment=Tiling Window Manager<br />
Type=Application<br />
Exec=/usr/bin/awesome<br />
TryExec=/usr/bin/awesome<br />
}}<br />
<br />
==Configuration==<br />
Awesome includes some good default settings right out of the box, but sooner or later you'll want to change something. The lua based configuration file is at {{Ic|~/.config/awesome/rc.lua}}.<br />
<br />
===Creating the configuration file===<br />
First, run the following to create the directory needed in the next step:<br />
$ mkdir -p ~/.config/awesome/<br />
<br />
Whenever compiled, awesome will attempt to use whatever custom settings are contained in ~/.config/awesome/rc.lua. This file is not created by default, so we must copy the template file first:<br />
$ cp /etc/xdg/awesome/rc.lua ~/.config/awesome/<br />
<br />
The syntax of the configuration often changes when awesome updates. So, remember to repeat the command above when you get something strange with awesome, or you'd like to modify the configuration.<br />
<br />
For more information about configuring awesome, check out the [http://awesome.naquadah.org/wiki/Awesome_3_configuration configuration page at awesome wiki]<br />
<br />
===More configuration resources===<br />
{{Note|The syntax of awesome configuration changes regularly, so you will likely have to modify any file you download.}}<br />
<br />
Some good examples of rc.lua would be as follows:<br />
<br />
* http://git.sysphere.org/awesome-configs/tree/ - Awesome 3.4 configurations from Adrian C. (anrxc).<br />
* http://pastebin.com/f6e4b064e - Darthlukan's awesome 3.4 configuration. <br />
* http://www.ugolnik.info/downloads/awesome/rc.lua - Awesome 3.1 configuration with small titlebar and statusbar.<br />
* https://github.com/setkeh/Awesome - [[User:Setkeh|Setkeh]]'s 3.4 Configuration.<br />
* https://github.com/setkeh/Awesome-Laptop-3.5 - [[User:Setkeh|Setkeh]]'s 3.5 Configuration.<br />
* http://awesome.naquadah.org/wiki/User_Configuration_Files - Collection of user configurations on the awesome homepage.<br />
<br />
===Debugging rc.lua===<br />
<br />
====Using Xephyr====<br />
[https://www.archlinux.org/packages/?q=xephyr Xephyr] allows you to run X nested in another X's client window. This allows you to debug rc.lua without breaking your current desktop. Start by copying rc.lua into a new file (e.g. rc.lua.new), and modify it as needed. Then run new instance of awesome in Xephyr, supplying rc.lua.new as a config file like this:<br />
<br />
$ Xephyr :1 -ac -br -noreset -screen 1152x720 &<br />
$ DISPLAY=:1.0 awesome -c ~/.config/awesome/rc.lua.new<br />
<br />
The advantage of this approach is that if you introduce bugs you do not break your current awesome desktop, potentially crashing X apps and losing work. Once you are happy with the new configuration, copy rc.lua.new to rc.lua and restart awesome.<br />
<br />
====Using awmtt====<br />
{{aur|awmtt}} (Awesome WM Testing Tool) is an easy to use wrapper script around Xephyr. If you want to debug your rc.lua.new, just pass it as a parameter:<br />
<br />
$ awmtt start --config=~/.config/awesome/rc.lua.new<br />
<br />
When you are done testing, close the window with:<br />
<br />
$ awmtt stop<br />
<br />
===Changing Keyboard Layout===<br />
<br />
If it were necessary for someone to need a different keyboard layout [qwerty -> dvorak] there are methods for such listed [http://awesome.naquadah.org/wiki/Change_keyboard_maps#Display.2Fchange_keyboard_map here on the awesome wiki].<br />
<br />
==Themes==<br />
<br />
[http://awesome.naquadah.org/wiki/Beautiful Beautiful] is a lua library that allows you to theme awesome using an external file, it becomes very easy to dynamically change your whole awesome colours and wallpaper without changing your {{ic|rc.lua}}. <br />
<br />
The default theme is at {{ic|/usr/share/awesome/themes/default}}. Copy it to {{ic|~/.config/awesome/themes/default}} and change {{ic|theme_path}} in {{ic|rc.lua}}. <br />
beautiful.init(awful.util.getdir("config") .. "/themes/default/theme.lua")<br />
<br />
More details [http://awesome.naquadah.org/wiki/Beautiful here]<br />
<br />
A few sample [http://awesome.naquadah.org/wiki/Beautiful_themes themes]<br />
<br />
===Setting up your wallpaper===<br />
<br />
Beautiful can handle your wallpaper, thus you do not need to set it up in your {{ic|.xinitrc}} or {{ic|.xsession}} files. This allows you to have a specific wallpaper for each theme.<br />
<br />
====version <3.5 (out of date)====<br />
<br />
If you take a look at the default theme file you'll see a wallpaper_cmd key, the given command is executed when {{ic|beautiful.init}}("path_to_theme_file") is run. You can put here you own command or remove/comment the key if you do not want Beautiful to interfere with your wallpaper business.<br />
<br />
For instance, if you use {{ic|awsetbg}} to set your wallpaper, you can write in the {{ic|theme.lua}} page that you just selected:<br />
<br />
theme.wallpaper_cmd = { "awsetbg -f .config/awesome/themes/awesome-wallpaper.png" }<br />
<br />
{{Note|For awsetbg to work you need to have a program that can manage desktop backgrounds installed. For example '''[[Feh]]'''.}}<br />
<br />
====version >= 3.5====<br />
<br />
With version 3.5 Awesome no longer provides a awsetbg command, instead it has a gears module. You can set your wallpaper inside {{ic|theme.lua}} with <br />
<br />
theme.wallpaper = "~/.config/awesome/themes/awesome-wallpaper.png" <br />
<br />
To load the wallpaper, make sure your {{ic|rc.lua}} contains<br />
<br />
beautiful.init("~/.config/awesome/themes/default/theme.lua")<br />
for s = 1, screen.count() do<br />
gears.wallpaper.maximized(beautiful.wallpaper, s, true)<br />
end<br />
<br />
====Random Background Image====<br />
<br />
add this to your {{ic|rc.lua}}(for awesome >= 3.5 ):<br />
{{bc|1=<br />
-- configuration - edit to your liking<br />
wp_index = 1<br />
wp_timeout = 10<br />
wp_path = "/path/to/wallpapers/"<br />
wp_files = { "01.jpg", "02.jpg", "03.jpg" }<br />
<br />
-- setup the timer<br />
wp_timer = timer { timeout = wp_timeout }<br />
wp_timer:connect_signal("timeout", function()<br />
<br />
-- set wallpaper to current index for all screens<br />
for s = 1, screen.count() do<br />
gears.wallpaper.maximized(wp_path .. wp_files[wp_index], s, true)<br />
end<br />
<br />
-- stop the timer (we don't need multiple instances running at the same time)<br />
wp_timer:stop()<br />
<br />
-- get next random index<br />
wp_index = math.random( 1, #wp_files)<br />
<br />
--restart the timer<br />
wp_timer.timeout = wp_timeout<br />
wp_timer:start()<br />
end)<br />
<br />
-- initial start when rc.lua is first run<br />
wp_timer:start()<br />
}}<br />
<br />
to automatically fetch images from a given directory you might want instead to add this to your {{ic|rc.lua}}(for awesome >= 3.5 ):<br />
{{bc|1=<br />
-- {{{ Function definitions<br />
<br />
-- scan directory, and optionally filter outputs<br />
function scandir(directory, filter)<br />
local i, t, popen = 0, {}, io.popen<br />
if not filter then<br />
filter = function(s) return true end<br />
end<br />
print(filter)<br />
for filename in popen('ls -a "'..directory..'"'):lines() do<br />
if filter(filename) then<br />
i = i + 1<br />
t[i] = filename<br />
end<br />
end<br />
return t<br />
end<br />
<br />
-- }}}<br />
<br />
-- configuration - edit to your liking<br />
wp_index = 1<br />
wp_timeout = 10<br />
wp_path = "/path/to/wallpapers/"<br />
wp_filter = function(s) return string.match(s,"%.png$") or string.match(s,"%.jpg$") end<br />
wp_files = scandir(wp_path, wp_filter)<br />
<br />
-- setup the timer<br />
wp_timer = timer { timeout = wp_timeout }<br />
wp_timer:connect_signal("timeout", function()<br />
<br />
-- set wallpaper to current index for all screens<br />
for s = 1, screen.count() do<br />
gears.wallpaper.maximized(wp_path .. wp_files[wp_index], s, true)<br />
end<br />
<br />
-- stop the timer (we don't need multiple instances running at the same time)<br />
wp_timer:stop()<br />
<br />
-- get next random index<br />
wp_index = math.random( 1, #wp_files)<br />
<br />
--restart the timer<br />
wp_timer.timeout = wp_timeout<br />
wp_timer:start()<br />
end)<br />
<br />
-- initial start when rc.lua is first run<br />
wp_timer:start()<br />
}}<br />
<br />
To rotate the wallpapers randomly, just comment the {{ic|wallpaper_cmd}} line above, and add a script into your {{ic|.xinitrc}} with the codes below(for awesome <= 3.4 ):<br />
{{bc|<br />
while true;<br />
do<br />
awsetbg -r <path/to/the/directory/of/your/wallpapers><br />
sleep 15m<br />
done &<br />
}}<br />
<br />
==Tips & Tricks==<br />
Feel free to add any tips or tricks that you would like to pass on to other awesome users.<br />
<br />
===Use awesome as GNOME's window manager===<br />
GNOME has the advantage of being very "ready to use" and integrating. You can set up GNOME to use awesome as the visual interface, but have GNOME work in the background for your pleasure. If you are using GNOME 3, you can simply install the [https://aur.archlinux.org/packages.php?ID=53096 awesome-gnome] package, then when logging in with GDM, choose the session type "Awesome GNOME". See the [http://awesome.naquadah.org/wiki/Quickly_Setting_up_Awesome_with_Gnome awesome wiki] for details.<br />
<br />
===Expose effect like compiz===<br />
{{out of date | Revelation has been marked as deprecated in the awesome wiki and the repository may be deleted at any time.}}<br />
Revelation brings up a view of all your open clients; left-clicking a client pops to the first tag that client is visible on and raises/focuses the client. In addition, the Enter key pops to the currently focused client, and Escape aborts. <br />
<br />
http://awesome.naquadah.org/wiki/Revelation<br />
<br />
===Hide / show wibox in awesome 3===<br />
<br />
To map Modkey-b to hide/show default statusbar on active screen (as default in awesome 2.3), add to your ''globalkeys'' in rc.lua:<br />
<br />
awful.key({ modkey }, "b", function ()<br />
mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible<br />
end),<br />
<br />
===Enable printscreens===<br />
<br />
To enable printscreens in awesome through the PrtScr button you need to have a screen capturing program.<br />
Scrot is a easy to use utility for this purpose and is available in Arch repositories.<br />
<br />
Just type:<br />
# pacman -S scrot<br />
<br />
and install optional dependencies if you feel that you need them.<br />
<br />
Next of we need to get the key name for PrtScr, most often this is named "Print" but one can never be too sure.<br />
<br />
Start up:<br />
# xev<br />
<br />
And press the PrtScr button, the output should be something like:<br />
KeyPress event ....<br />
root 0x25c, subw 0x0, ...<br />
state 0x0, keycode 107 (keysym 0xff61, '''Print'''), same_screen YES,<br />
....<br />
<br />
In my case as you see, the keyname is Print.<br />
<br />
Now to the configuration of awesome!<br />
<br />
Somewhere in your globalkeys array (doesn't matter where) type:<br />
<br />
Lua code:<br />
<br />
awful.key({ }, "Print", function () awful.util.spawn("scrot -e 'mv $f ~/screenshots/ 2>/dev/null'") end),<br />
<br />
Also, this function saves screenshots inside ~/screenshots/, edit this to fit your needs.<br />
<br />
===Dynamic tagging===<br />
<br />
[http://awesome.naquadah.org/wiki/Eminent Eminent] is a small lua library that monkey-patches awful to provide you with effortless and quick wmii-style dynamic tagging. Unlike shifty, eminent does not aim to provide a comprehensive tagging system, but tries to make dynamic tagging as simple as possible. In fact, besides importing the eminent library, you do not have to change your rc.lua at all, eminent does all the work for you.<br />
<br />
[http://awesome.naquadah.org/wiki/Shifty Shifty] is an Awesome 3 extension that implements dynamic tagging. It also implements fine client matching configuration allowing YOU to be the master of YOUR desktop only by setting two simple config variables and some keybindings!<br />
<br />
===Space Invaders===<br />
[http://awesome.naquadah.org/wiki/Space_Invaders Space Invaders] is a demo to show the possibilities of the Awesome Lua API.<br />
<br />
Please note that it is no longer included in the Awesome package since the 3.4-rc1 release.<br />
<br />
===Naughty for popup notification===<br />
See [http://awesome.naquadah.org/wiki/Naughty the awesome wiki page on naughty].<br />
<br />
===Popup Menus===<br />
There's a simple menu by default in awesome3, and customed menus seem very easy now. However, if you're using 2.x awesome, have a look at ''[http://awesome.naquadah.org/wiki/Awful.menu awful.menu]''.<br />
<br />
If you want a freedesktop.org menu, you could take a look at ''[https://github.com/terceiro/awesome-freedesktop awesome-freedesktop]'' .<br />
<br />
An example for awesome3:<br />
{{bc|1=<br />
myawesomemenu = {<br />
{ "lock", "xscreensaver-command -activate" },<br />
{ "manual", terminal .. " -e man awesome" },<br />
{ "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },<br />
{ "restart", awesome.restart },<br />
{ "quit", awesome.quit }<br />
}<br />
<br />
mycommons = {<br />
{ "pidgin", "pidgin" },<br />
{ "OpenOffice", "soffice-dev" },<br />
{ "Graphic", "gimp" }<br />
}<br />
<br />
mymainmenu = awful.menu.new({ items = { <br />
{ "terminal", terminal },<br />
{ "icecat", "icecat" },<br />
{ "Editor", "gvim" },<br />
{ "File Manager", "pcmanfm" },<br />
{ "VirtualBox", "VirtualBox" },<br />
{ "Common App", mycommons, beautiful.awesome_icon },<br />
{ "awesome", myawesomemenu, beautiful.awesome_icon }<br />
}<br />
})<br />
}}<br />
<br />
===More Widgets in awesome===<br />
''Widgets in awesome are objects that you can add to any widget-box (statusbars and titlebars), they can provide various information about your system, and are useful for having access to this information, right from your window manager. Widgets are simple to use and offer a great deal of flexibility.'' -- Source [http://awesome.naquadah.org/wiki/Widgets_in_awesome Awesome Wiki: Widgets].<br />
<br />
There's a widely used widget library called '''Wicked''' (compatible with awesome versions '''prior to 3.4'''), that provides more widgets, like MPD widget, CPU usage, memory usage, etc. For more details see the [http://awesome.naquadah.org/wiki/Wicked Wicked page].<br />
<br />
As a replacement for Wicked in awesome v3.4 check '''[http://awesome.naquadah.org/wiki/Vicious Vicious]''', '''[http://awesome.naquadah.org/wiki/Obvious Obvious]''' and '''[http://awesome.naquadah.org/wiki/Bashets Bashets]'''. If you pick vicious, you should also take a good look at [http://git.sysphere.org/vicious/tree/README vicious documentation].<br />
<br />
===Transparency===<br />
Awesome has support for true transparency through a [[Xorg#Composite | compositing manager]] such as {{Pkg|xcompmgr}}({{AUR|xcompmgr-git}}), compton({{AUR|compton-git}}) or {{AUR|cairo-compmgr-git}}.<br />
<br />
To use xcompmgr, add this to your {{ic|~/.xinitrc}}:<br />
xcompmgr &<br />
See ''man xcompmgr'' or [[xcompmgr]] for more options.<br />
<br />
{{Note|Some users have seen strange behavior such as windows not touching the bottom when enabling composite. To fix this issue, install {{AUR|unagi}} from the [[AUR]] and add this to your {{ic|~/.xinitrc}}:<br />
unagi &<br />
}}<br />
<br />
{{out of date | Awesome 3.5 has come and add_signal API has changed to connect_signal}}<br />
In awesome 3.4, window transparency can be set dynamically using signals. For example, your rc.lua could contain the following:<br />
<br />
client.add_signal("focus", function(c)<br />
c.border_color = beautiful.border_focus<br />
c.opacity = 1<br />
end)<br />
client.add_signal("unfocus", function(c)<br />
c.border_color = beautiful.border_normal<br />
c.opacity = 0.7<br />
end)<br />
'''If you got error messages about add_signal, use connect_signal instead.''' <br />
<br />
Note that if you are using conky, you must set it to create its own window instead of using the desktop. To do so, edit ~/.conkyrc to contain:<br />
<br />
own_window yes<br />
own_window_transparent yes<br />
own_window_type desktop<br />
<br />
Otherwise strange behavior may be observed, such as all windows becoming fully transparent. Note also that since conky will be creating a transparent window on your desktop, any actions defined in awesome's rc.lua for the desktop will not work where conky is.<br />
<br />
As of Awesome 3.1, there is built-in pseudo-transparency for wiboxes. To enable it, append 2 hexadecimal digits to the colors in your theme file (~/.config/awesome/themes/default, which is usually a copy of /usr/share/awesome/themes/default), like shown here:<br />
<br />
bg_normal = #000000AA<br />
<br />
where "AA" is the transparency value.<br />
<br />
To change transparency for the actual selected window by pressing Modkey + PageUp/PageDown you can also use tansset-df available through the community package repository and the following modification to your rc.lua:<br />
<br />
globalkeys = awful.util.table.join(<br />
-- your keybindings<br />
[...]<br />
awful.key({ modkey }, "Next", function (c)<br />
awful.util.spawn("transset-df --actual --inc 0.1")<br />
end),<br />
awful.key({ modkey }, "Prior", function (c)<br />
awful.util.spawn("transset-df --actual --dec 0.1")<br />
end),<br />
-- Your other key bindings<br />
[...]<br />
)<br />
<br />
==== ImageMagick ====<br />
You may have problems if you set your wallpaper with imagemagick's ''display'' command, it doesn't work well with xcompmgr. Please note that awsetbg may be using ''display'' if it doesn't have any other options. Installing habak, feh, hsetroot or whatever should fix the problem (''grep -A 1 wpsetters /usr/bin/awsetbg'' to see your options).<br />
<br />
===Autorun programs===<br />
''See also [https://awesome.naquadah.org/wiki/Autostart the Autostart page on the Awesome wiki].''<br />
<br />
awesome doesn't run programs set to autostart by the Freedesktop specification like GNOME or KDE. However, awesome does provide a few functions for starting programs (in addition to the Lua standard library function {{Ic|os.execute}}). To run the same programs on startup as GNOME or KDE, you can install [https://aur.archlinux.org/packages.php?ID=41099 dex] from the [[AUR]] and then run that in your rc.lua:<br />
<br />
os.execute"dex -a -e Awesome"<br />
<br />
If you just want to set up a list of apps for awesome to launch at startup, you can create a table of all the commands you want to spawn and loop through it:<br />
<br />
do<br />
local cmds = <br />
{ <br />
"swiftfox",<br />
"mutt",<br />
"consonance",<br />
"linux-fetion",<br />
"weechat-curses",<br />
--and so on...<br />
}<br />
<br />
for _,i in pairs(cmds) do<br />
awful.util.spawn(i)<br />
end<br />
end<br />
<br />
(You could also run calls to {{Ic|os.execute}} with commands ending in '{{Ic|&}}', but it's probably a better idea to stick to the proper spawn function.)<br />
<br />
To run a program only if it is not currently running, you can spawn it with a shell command that runs the program only if {{Ic|pgrep}} doesn't find a running process with the same name:<br />
function run_once(prg)<br />
awful.util.spawn_with_shell("pgrep -u $USER -x " .. prg .. " || (" .. prg .. ")")<br />
end<br />
<br />
So, for example, to run {{Ic|parcellite}} only if there is not a {{Ic|parcellite}} process already running:<br />
<br />
run_once("parcellite")<br />
<br />
===Passing content to widgets with awesome-client===<br />
<br />
You can easily send text to an awesome widget. Just create a new widget:<br />
{{bc|<nowiki><br />
mywidget = widget({ type = "textbox", name = "mywidget" })<br />
mywidget.text = "initial text"<br />
</nowiki>}}<br />
To update the text from an external source, use awesome-client:<br />
{{bc|<nowiki> <br />
echo -e 'mywidget.text = "new text"' | awesome-client<br />
</nowiki>}}<br />
Don't forget to add the widget to your wibox.<br />
<br />
===Using a different panel with awesome===<br />
<br />
If you like awesome's lightweightness and functionality but do not like the way its default panel looks, you can install a different panel. Just install xfce4-panel by issuing:<br />
{{bc|<br />
sudo pacman -S xfce4-panel<br />
}}<br />
Of course any other panel will do as well. <br />
Then add it to autorun section of your rc.lua (how to do that is written elsewhere on this wiki). You can also comment out the section which creates wiboxes for each screen (starting from "mywibox[s] = awful.wibox({ position = "top", screen = s })" ) but it isn't necessary. Any way do not forget to check your rc.lua for errors by typing <br />
{{bc|<br />
awesome -k rc.lua<br />
}}<br />
Also you should change your "modkey+R" keybinding, in order to start some other application launcher instead of built in awesome. Xfrun4, bashrun, etc. Check the Application launchers section of [[Openbox_Themes_and_Apps#Application_launchers|Openbox]] article for examples. Don't forget to add<br />
{{bc|<nowiki><br />
properties = { floating = true } },<br />
{ rule = { instance = "$yourapplicationlauncher" },<br />
</nowiki>}}<br />
to your rc.lua.<br />
<br />
===Fix Java (GUI appears gray only)===<br />
Guide taken from [https://bbs.archlinux.org/viewtopic.php?pid=450870].<br />
#Install {{Pkg|wmname}} from community<br />
#Run the following command or add it to your {{ic|.xinitrc}}: {{bc|wmname LG3D}}<br />
<br />
{{Note|<br />
If you use a non-reparenting window manager and Java 6, you should uncomment the corresponding line in {{Ic|/etc/profile.d/openjdk6.sh}}<br />
<br />
If you use a non-reparenting window manager and Java 7, you should uncomment the corresponding line in <br />
{{Ic|/etc/profile.d/jre.sh}} <br />
}}<br />
<br />
{{Note|<br />
As of Java 1.7 and Awesome 3.5 (as installed by the awesome-git package) the fixes described above may cause undesirable behaviour related to menus not receiving proper focus. Awesome is now, apparently, a reparenting window manager as of [http://git.naquadah.org/?p&#61;awesome.git;a&#61;commit;h&#61;102063dbbdfb0bc9f43268d98f7dcb5269547395 this commit]. <br />
<br />
If you are experiencing problems having applied the 'wmname' and '_JAVA_AWT_WM_NONREPARENTING' fixes against a recent Java and Awesome, try removing both fixes.<br />
}}<br />
<br />
===Prevent Nautilus from displaying the desktop (Gnome3)===<br />
Run dconf-editor. Navigate to org->gnome->desktop->background and uncheck "draw-background" as well as "show-desktop-icons" for good measure. That's it!<br />
<br />
Another option is moving /usr/bin/nautilus to a new location and replacing it with a script that runs 'nautilus --no-desktop' passing any arguments it receives along.<br />
<br />
#!/bin/sh<br />
/usr/bin/nautilus-real --no-desktop $@<br />
<br />
===Transitioning away from Gnome3===<br />
Run 'gnome-session-properties' and remove programs that you won't be needing anymore (e.g Bluetooth Manager, Login Sounds, etc).<br />
<br />
If you'd like to get rid of GDM, make sure that your rc.conf DAEMONS list includes "dbus" (and "cupsd" if you have a printer). It's advisable to get a different login manager (like [https://wiki.archlinux.org/index.php/SLiM SLiM]), but you can do things manually if you wish. That entails setting up your [https://wiki.archlinux.org/index.php/Udev .xinitrc properly] and installing something like devmon ([https://aur.archlinux.org/packages.php?ID=45842 AUR]).<br />
<br />
If you want to keep a few convenient systray applets and your GTK theme, append this to your rc.lua;<br />
function start_daemon(dae)<br />
daeCheck = os.execute("ps -eF | grep -v grep | grep -w " .. dae)<br />
if (daeCheck ~= 0) then<br />
os.execute(dae .. " &")<br />
end<br />
end<br />
<br />
procs = {"gnome-settings-daemon", "nm-applet", "kupfer", "gnome-sound-applet", "gnome-power-manager"}<br />
for k = 1, #procs do<br />
start_daemon(procs[k])<br />
end<br />
<br />
===Prevent the mouse scroll wheel from changing tags===<br />
In your rc.lua, change the Mouse Bindings section to the following;<br />
-- {{{ Mouse bindings<br />
root.buttons(awful.util.table.join(<br />
awful.button({ }, 3, function () mymainmenu:toggle() end)))<br />
-- }}}<br />
<br />
===Application directories in menubar===<br />
<br />
The awesome package in [community] includes [http://awesome.naquadah.org/wiki/Menubar/3.5 menubar] (by default, pressing modkey+p will open a dmenu-like applications menu at the top of the screen). However, it only searches for .desktop files in /usr/share/applications and /usr/local/share/applications (the latter of which may not exist on most Arch users' systems). To change this, add the following line to rc.lua (ideally, under the "Menubar configuration" section):<br />
<br />
app_folders = { "/usr/share/applications/", "~/.local/share/applications/" }<br />
<br />
==Troubleshooting==<br />
<br />
===Grey Java GUIs===<br />
Some Java Applications may render just grey, empty windows. This is related to nonreparenting.<br />
<br />
A fix might be uncommenting the last line in /etc/profile.d/jre.sh or set this manually.<br />
<br />
export _JAVA_AWT_WM_NONREPARENTING=1<br />
<br />
other Methods could be found here: http://awesome.naquadah.org/wiki/Problems_with_Java<br />
<br />
===LibreOffice===<br />
If you encounter UI problems with libreoffice install libreoffice-gnome.<br />
<br />
===Mod4 key===<br />
<br />
The Mod4 is by default the '''Win key'''. If it's not mapped by default, for some reason, you can check the keycode of your Mod4 key with<br />
<br />
$ xev<br />
<br />
It should be 115 for the left one. Then add this to your ~/.xinitrc<br />
<br />
xmodmap -e "keycode 115 = Super_L" -e "add mod4 = Super_L"<br />
exec awesome<br />
<br />
The problem in this case is that some xorg installations recognize keycode 115, but incorrectly as the 'Select' key. The above command explictly remaps keycode 115 to the correct 'Super_L' key.<br />
<br />
====Mod4 key vs. IBM ThinkPad users====<br />
<br />
IBM ThinkPads do not come equipped with a Window key (although Lenovo have changed this tradition on their ThinkPads). As of writing, the Alt key is not used in command combinations by the default rc.lua (refer to the Awesome wiki for a table of commands), which allows it be used as a replacement for the Super/Mod4/Win key. To do this, edit your rc.lua and replace:<br />
<br />
modkey = "Mod4"<br />
<br />
by:<br />
<br />
modkey = "Mod1"<br />
<br />
Note: Awesome does a have a few commands that make use of Mod4 plus a single letter. Changing Mod4 to Mod1/Alt could cause overlaps for some key combinations. The small amount of instances where this happens can be changed in the rc.lua file.<br />
<br />
If you do not like to change the awesome standards, you might like to remap a key. For instance the caps lock key is rather useless (for me) adding the following contents to ~/.Xmodmap <br />
<br />
clear lock <br />
add mod4 = Caps_Lock<br />
<br />
and [[Extra Keyboard Keys in Xorg#Step 2: Testing|(re)load]] the file.<br />
This will change the caps lock key into the mod4 key and works nicely with the standard awesome settings. In addition, if needed, it provides the mod4 key to other X-programs as well.<br />
<br />
Not confirmed, but if recent updates of xorg related packages break mentioned remapping the second line can be replaced by (tested on a DasKeyboard with no left Super key):<br />
<br />
keysym Caps_Lock = Super_L Caps_Lock<br />
<br />
===Eclipse: cannot resize/move main window===<br />
If you get stuck and cannot move or resize the main window (using mod4 + left/right mouse button) edit the workbench.xml and set fullscreen/maximized to false (if set) and reduce the width and height to numbers smaller than your single screen desktop area.<br />
{{Note|workbench.xml can be found in: <eclipse_workspace>/.metadata/.plugins/org.eclipse.ui.workbench/ and the line to edit is <window height&#61;"xx" maximized&#61;"true" width&#61;"xx" x&#61;"xx" y&#61;"xx">.}}<br />
<br />
===YouTube: fullscreen appears in background===<br />
[https://bbs.archlinux.org/viewtopic.php?pid=1085494#p1085494] If YouTube videos appear underneath your web browser when in fullscreen mode, or underneath the panel with controls hidden, add this to your rc.lua<br />
<br />
{ rule = { instance = "plugin-container" },<br />
properties = { floating = true } },<br />
<br />
With Chromium add<br />
<br />
{ rule = { instance = "exe" },<br />
properties = { floating = true } },<br />
<br />
===Starting console clients on specific tags===<br />
It does not work when the console application is invoked from a GTK terminal (e.g. LXTerminal). [[URxvt]] is known to work. <br />
<br />
===Redirecting console output to a file===<br />
Some GUI application are very verbose when launched from a terminal. As a consequence, when started from Awesome, they output everything to the TTY from where Awesome was started, which tend to get messy. To remove the garbage output, you have to redirect it. However, the {{ic|awful.util.spawn}} function does not handle pipes and redirections very well as stated in [http://awesome.naquadah.org/wiki/FAQ#How_to_execute_a_shell_command.3F the official FAQ].<br />
<br />
As example, let's redirect [[Luakit]] output to a temporary file:<br />
<br />
awful.key({ modkey, }, "w", function () awful.util.spawn_with_shell("luakit 2>>/tmp/luakit.log") end),<br />
<br />
==External Links==<br />
* http://awesome.naquadah.org/wiki/FAQ - FAQ<br />
* http://www.lua.org/pil/ - Programming in Lua (first edition)<br />
* http://awesome.naquadah.org/ - The official awesome website<br />
* http://awesome.naquadah.org/wiki/Main_Page - the awesome wiki<br />
* http://www.penguinsightings.org/desktop/awesome/ - A review<br />
* https://bbs.archlinux.org/viewtopic.php?id=88926 - share your awesome!</div>Drelyn86