Related articles

*   [Window manager](/index.php/Window_manager "Window manager")
*   [Comparison of tiling window managers](/index.php/Comparison_of_tiling_window_managers "Comparison of tiling window managers")
*   [Desktop environment](/index.php/Desktop_environment "Desktop environment")
*   [Display manager](/index.php/Display_manager "Display manager")
*   [File manager functionality](/index.php/File_manager_functionality "File manager functionality")
*   [Xdg-menu](/index.php/Xdg-menu "Xdg-menu")

From the [awesome website](https://awesomewm.org/):

	[awesome](https://en.wikipedia.org/wiki/awesome_(window_manager) is a highly configurable, next generation framework [window manager](/index.php/Window_manager "Window manager") for [Xorg](/index.php/Xorg "Xorg"). It is very fast and extensible [..]. It is primarily 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.

## Contents

*   [1 Installation](#Installation)
*   [2 Starting](#Starting)
    *   [2.1 KDM](#KDM)
    *   [2.2 With GNOME](#With_GNOME)
    *   [2.3 XFCE](#XFCE)
*   [3 Configuration](#Configuration)
    *   [3.1 Creating the configuration file](#Creating_the_configuration_file)
        *   [3.1.1 Examples](#Examples)
    *   [3.2 Extensions](#Extensions)
    *   [3.3 Autostart](#Autostart)
    *   [3.4 Changing keyboard layout](#Changing_keyboard_layout)
    *   [3.5 Theming](#Theming)
        *   [3.5.1 Wallpaper](#Wallpaper)
*   [4 Tips and tricks](#Tips_and_tricks)
    *   [4.1 Hide / show wibox](#Hide_.2F_show_wibox)
    *   [4.2 Screenshot](#Screenshot)
    *   [4.3 Removing window gaps](#Removing_window_gaps)
    *   [4.4 Transparency](#Transparency)
        *   [4.4.1 Conky](#Conky)
        *   [4.4.2 wiboxes](#wiboxes)
        *   [4.4.3 ImageMagick](#ImageMagick)
    *   [4.5 Passing content to widgets with awesome-client](#Passing_content_to_widgets_with_awesome-client)
    *   [4.6 Using a different panel with awesome](#Using_a_different_panel_with_awesome)
    *   [4.7 Application directories in menubar](#Application_directories_in_menubar)
    *   [4.8 Pop-up menus](#Pop-up_menus)
    *   [4.9 Applications menu](#Applications_menu)
    *   [4.10 Titlebars](#Titlebars)
    *   [4.11 Battery notification](#Battery_notification)
    *   [4.12 Media Controls](#Media_Controls)
    *   [4.13 Steam Keyboard](#Steam_Keyboard)
*   [5 Troubleshooting](#Troubleshooting)
    *   [5.1 Debugging rc.lua](#Debugging_rc.lua)
        *   [5.1.1 awmtt](#awmtt)
    *   [5.2 Log Files](#Log_Files)
    *   [5.3 Mod4 key](#Mod4_key)
        *   [5.3.1 Mod4 key vs. IBM ThinkPad users](#Mod4_key_vs._IBM_ThinkPad_users)
    *   [5.4 Fix Java (GUI appears gray only)](#Fix_Java_.28GUI_appears_gray_only.29)
    *   [5.5 Eclipse: cannot resize/move main window](#Eclipse:_cannot_resize.2Fmove_main_window)
    *   [5.6 Netbeans: code-prediction appears on wrong screen](#Netbeans:_code-prediction_appears_on_wrong_screen)
    *   [5.7 IntelliJ: menus appear on incorrect position, some windows don't open](#IntelliJ:_menus_appear_on_incorrect_position.2C_some_windows_don.27t_open)
    *   [5.8 scrot: Cannot take a mouse selected screenshot with keyboard shortcuts](#scrot:_Cannot_take_a_mouse_selected_screenshot_with_keyboard_shortcuts)
    *   [5.9 YouTube: fullscreen appears in background](#YouTube:_fullscreen_appears_in_background)
    *   [5.10 Prevent the mouse scroll wheel from changing tags](#Prevent_the_mouse_scroll_wheel_from_changing_tags)
    *   [5.11 Starting console clients on specific tags](#Starting_console_clients_on_specific_tags)
    *   [5.12 Duplicate menu-entries generated by Xdg-menu](#Duplicate_menu-entries_generated_by_Xdg-menu)
    *   [5.13 Some Shortcuts not Working in Xfce4 overlapping Keys](#Some_Shortcuts_not_Working_in_Xfce4_overlapping_Keys)
*   [6 See also](#See_also)

## Installation

[Install](/index.php/Install "Install") [awesome](https://www.archlinux.org/packages/?name=awesome). The development version is [awesome-git](https://aur.archlinux.org/packages/awesome-git/), which is considered unstable and may have a different configuration API.

## Starting

Run `awesome` with [xinit](/index.php/Xinit "Xinit"). To use the included [xsession](/index.php/Xsession "Xsession") file, see [Display manager](/index.php/Display_manager "Display manager").

### KDM

Create as root:

 `/usr/share/apps/kdm/sessions/awesome.desktop` 
```
[Desktop Entry]
Name=Awesome
Comment=Tiling Window Manager
Type=Application
Exec=/usr/bin/awesome
TryExec=/usr/bin/awesome
```

### With GNOME

You can set up [GNOME](/index.php/GNOME "GNOME") to use awesome as the visual interface, but have GNOME work in the background. See [awesome wiki](http://awesome.naquadah.org/wiki/Quickly_Setting_up_Awesome_with_Gnome) for details.

### XFCE

See [Xfce#Use a different window manager](/index.php/Xfce#Use_a_different_window_manager "Xfce").

## Configuration

The lua based configuration file is at `~/.config/awesome/rc.lua`.

### Creating the configuration file

First, run the following to create the directory needed in the next step:

```
$ mkdir -p ~/.config/awesome/

```

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:

```
$ cp /etc/xdg/awesome/rc.lua ~/.config/awesome/

```

The API for the configuration often changes when awesome updates. So, remember to repeat the command above when you get something strange with awesome, or you want to modify the configuration.

For more information about configuring awesome, check out the [configuration section at awesome docs](https://awesomewm.org/apidoc/documentation/90-FAQ.md.html#Configuration)

#### Examples

**Note:** The API for awesome configuration changes regularly, so you will likely have to modify any file you download.

Some good examples of rc.lua would be as follows:

*   [Setkeh's Awesome Configuration](https://github.com/setkeh/Awesome)
*   [Collection of user configurations on the awesome homepage](http://awesome.naquadah.org/wiki/User_Configuration_Files)
*   [User configuration that supports different themes, including a status bar](https://github.com/copycat-killer/awesome-copycats)

### Extensions

Several extensions are available for awesome (3.5+):

| Extension | Functionality |
| 

*   [Revelation](http://awesome.naquadah.org/wiki/Revelation)

 | Bring up a view of all opened clients |
| 

*   [Shifty](http://awesome.naquadah.org/wiki/Shifty)

 | Dynamic tagging |
| 

*   [Naughty](https://awesomewm.org/apidoc/libraries/naughty.html)

 | Pop-up notifications |
| 

*   [Vicious](http://awesome.naquadah.org/wiki/Vicious) ([README](http://git.sysphere.org/vicious/tree/README))
*   [Obvious](http://awesome.naquadah.org/wiki/Obvious)
*   [Bashets](http://awesome.naquadah.org/wiki/Bashets)

 | Additional [widgets](http://awesome.naquadah.org/wiki/Widgets_in_awesome) |
| 

*   [Run or raise](http://awesome.naquadah.org/wiki/Run_or_raise)

 | Start a program if no instance exists, else jump to it |

### Autostart

To autorun programs, create a shell script via

```
$ touch ~/.config/awesome/autorun.sh

```

and make it executable by

```
$ chmod +x ~/.config/awesome/autorun.sh

```

Open `autorun.sh` in an editor and insert the following:

 `.config/awesome/autorun.sh` 
```
#!/usr/bin/env bash

function run {
  if ! pgrep $1 ;
  then
    $@&
  fi
}
```

To add programs to autostart, simply append `run program [some arguments]` to `autorun.sh`. The `run` function checks whether there already is an instance of `program` running and only runs `program` if there is none. You can check your `autorun.sh` by running it:

```
$ ~/.config/awesome/autorun.sh

```

If everything is fine, add the following line to your `rc.lua`:

 `.config/awesome/rc.lua` 
```
...
awful.spawn.with_shell("~/.config/awesome/autorun.sh")
...
```

### Changing keyboard layout

There is multiple ways to configure keyboard layers. In the default config awesome already has the layout widget activated - but it wont show up until there is a choice. To set multiple layers temporary, run

```
$ setxkbmap -layout "us,de"

```

The awesome keyboard widget should appear, clicking on it should toggle the layout. If you want a keycombo to change the layout, you may append `-option "grp:alt_shift_toggle"`. This for example will let you change the layout by pressing `Shift+Alt`. So the complete command would be:

```
$ setxkbmap -layout "us,de" -option "grp:alt_shift_toggle"

```

Or you can use Awesome itself to switch(from v.4). Add the following line in the keybindings section of rc.lua:

```
awful.key({ "Shift" }, "Alt_L", function ) mykeyboardlayout.next_layout(); end) 
awful.key({ "Mod1" }, "Shift_L", function ) mykeyboardlayout.next_layout(); end)

```

This require you to set up witch keyboard layouts you want to be able to switch between, either by the setxkbmap command or in xorg.

Once you've found the appropriate command to setup your layouts, add it to [#Autostart](#Autostart).

Alternatively, see [Keyboard configuration in Xorg](/index.php/Keyboard_configuration_in_Xorg "Keyboard configuration in Xorg").

### Theming

[Beautiful](https://awesomewm.org/apidoc/libraries/beautiful.html) 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 `rc.lua`.

The default theme is at `/usr/share/awesome/themes/default`. Copy it to `~/.config/awesome/themes/default` and change `theme_path` in `rc.lua`.

```
beautiful.init(awful.util.getdir("config") .. "/themes/default/theme.lua")

```

See also [[2]](https://awesomewm.org/apidoc/libraries/beautiful.html) for additional theming options. To add a useless gap for example, add

```
beautiful.useless_gap = 5

```

At the bottom of the theming section in your `rc.lua`.

#### Wallpaper

Beautiful can handle your wallpaper, thus you do not need to set it up in your `.xinitrc` or `.xsession` files. This allows you to have a specific wallpaper for each theme.

With version 3.5 Awesome no longer provides a awsetbg command, instead it has a gears module. You can set your wallpaper inside `theme.lua` with

```
theme.wallpaper = "~/.config/awesome/themes/awesome-wallpaper.png" 

```

To load the wallpaper, make sure your `rc.lua` contains

```
beautiful.init("~/.config/awesome/themes/default/theme.lua")
for s = 1, screen.count() do
	gears.wallpaper.maximized(beautiful.wallpaper, s, true)
end

```

For a random background image, add [[3]](https://gist.github.com/anonymous/37f3b1c58d6616cab756) to `rc.lua` (v3.5+). To automatically fetch images from a given directory use [[4]](https://gist.github.com/anonymous/9072154f03247ab6e28c) instead.

To simply specify the wallpaper in your `rc.lua`, add the following line to the theming section:

```
beautiful.wallpaper = awful.util.get_configuration_dir() .. "path/to/wallpaper.png"

```

The optional `awful.util.get_configuration_dir()` simply returns the path to your `rc.lua`.

## Tips and tricks

### Hide / show wibox

For awesome 4.0:

```
awful.key({ modkey }, "b",
          function ()
              myscreen = awful.screen.focused()
              myscreen.mywibox.visible = not myscreen.mywibox.visible
          end,
          {description = "toggle statusbar"}
),

```

### Screenshot

See [Extra keyboard keys](/index.php/Extra_keyboard_keys "Extra keyboard keys") to ensure the `PrtSc` button is assigned correctly. Then install a [screen capturing program](/index.php/Taking_a_screenshot "Taking a screenshot") such as [scrot](/index.php/Taking_a_screenshot#scrot "Taking a screenshot")

Add to the `globalkeys` array:

```
 awful.key({ }, "Print", function () awful.util.spawn("scrot -e 'mv $f ~/screenshots/ 2>/dev/null'", false) end),

```

This function saves screenshots inside `~/screenshots/`, edit as needed.

### Removing window gaps

As of awesome 3.4, it is possible to remove the small gaps between windows; in the *awful.rules.rules* table there is a *properties* section, add to it

```
 size_hints_honor = false

```

### Transparency

See [composite manager](/index.php/Composite_manager "Composite manager").

In awesome 3.5, window transparency can be set dynamically using signals. For example, `rc.lua` could contain the following:

```
client.connect_signal("focus", function(c)
                              c.border_color = beautiful.border_focus
                              c.opacity = 1
                           end)
client.connect_signal("unfocus", function(c)
                                c.border_color = beautiful.border_normal
                                c.opacity = 0.7
                             end)

```

#### Conky

If using conky, you must set it to create its own window instead of using the desktop. To do so, edit `~/.conkyrc` to contain

```
own_window yes
own_window_transparent yes
own_window_type desktop

```

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.

#### wiboxes

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:

```
bg_normal = #000000AA

```

where "AA" is the transparency value.

To change transparency for the actual selected window by pressing `Modkey + PgUp/PgDown` you can also use [transset-df](https://www.archlinux.org/packages/?name=transset-df) and the following modification to your `rc.lua`:

```
globalkeys = awful.util.table.join(
    -- your keybindings
    [...]
    awful.key({ modkey }, "Next", function (c)
        awful.util.spawn("transset-df --actual --inc 0.1")
    end),
    awful.key({ modkey }, "Prior", function (c)
        awful.util.spawn("transset-df --actual --dec 0.1")
    end),
    -- Your other key bindings
    [...]
)

```

#### ImageMagick

You may have problems if you set your wallpaper with imagemagick's *display* command. It does not work well with xcompmgr. Please note that awsetbg may be using *display* if it does not 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).

### Passing content to widgets with awesome-client

You can easily send text to an awesome widget. Just create a new widget:

```
mywidget = widget({ type = "textbox", name = "mywidget" })
mywidget.text = "initial text"

```

To update the text from an external source, use awesome-client:

```
echo -e 'mywidget.text = "new text"' | awesome-client

```

Do not forget to add the widget to your wibox.

### Using a different panel with awesome

If you like awesome's lightweightness and functionality but do not like the way its default panel looks, you can install a different panel, for example [xfce4-panel](https://www.archlinux.org/packages/?name=xfce4-panel).

Then add it to the [autorun section](#Autostart) of your `rc.lua`. You may also comment out the section which creates wiboxes for each screen (starting from `mywibox[s] = awful.wibox({ position = "top", screen = s })`) but it is not necessary. Do not forget to check your `rc.lua` for errors by typing:

```
$ awesome -k rc.lua

```

You should also change your `*modkey*+R` keybinding, in order to start some other application launcher instead of built in awesome. See [List of applications#Application launchers](/index.php/List_of_applications#Application_launchers "List of applications") for examples. Do not forget to add:

```
      properties = { floating = true } },
    { rule = { instance = "$yourapplicationlauncher" },

```

to your `rc.lua`.

### Application directories in menubar

[awesome](https://www.archlinux.org/packages/?name=awesome) includes [menubar](https://awesomewm.org/apidoc/libraries/menubar.html). By default, pressing `*Mod*+p` will open a dmenu-like applications menu at the top of the screen. However, this menu only searches for `.desktop` files in `/usr/share/applications` and `/usr/local/share/applications`.

To change this, add the following line to `rc.lua`, ideally, under *Menubar configuration*:

```
app_folders = { "/usr/share/applications/", "~/.local/share/applications/" }

```

Note that the `.desktop` files are re-read each time awesome starts, thereby slowing down the startup. If you prefer other means of launching programs, the menubar can be disabled in `rc.lua` by removing `local menubar = require("menubar")` and other references to the `menubar` variable.

### Pop-up menus

There is a simple menu by default in awesome 3, simplifying custom menus. [[5]](https://awesomewm.org/apidoc/libraries/awful.menu.html) If you want a freedesktop.org menu, you could take a look at *[awesome-freedesktop](https://github.com/copycat-killer/awesome-freedesktop)*.

### Applications menu

If you prefer to see a more traditional applications menu when you click on the Awesome icon, or right-click on an empty area of the desktop, you can follow the instructions in [Xdg-menu#Awesome](/index.php/Xdg-menu#Awesome "Xdg-menu"). However this menu is not updated when you add or remove programs. So, be sure to run the command to update your menu. It may look something like:

```
 xdg_menu --format awesome --root-menu /etc/xdg/menus/arch-applications.menu >~/.config/awesome/archmenu.lua

```

### Titlebars

It is easy to enable titlebars in awesome by simply setting the variable titlebars_enabled to true in the config file. However, you may want to be able to toggle the titlebar on or off. You can do this by simply adding something like this to your key bindings:

```
awful.key({ modkey, "Control" }, "t",
   function (c)
       -- toggle titlebar
       awful.titlebar.toggle(c)
   end)

```

Then you may want to initially hide the titlebars. To do that just add this immediately after the title bar is created:

```
awful.titlebar.hide(c)

```

### Battery notification

See [this blog post](http://bpdp.blogspot.be/2013/06/battery-warning-notification-for.html) for a simple battery notification to add to `rc.lua`. Note that it needs *naughty* for the notifications (installed by default in version 3.5). Other examples are available at [awesome wiki](https://awesome.naquadah.org/wiki/Gigamo_Battery_Widget#Simple_modular_version_for_3.4).

4/10/2018: The above mentioned wiki no longer exists. [(Reddit comment: What happened to the wiki?)](https://www.reddit.com/r/awesomewm/comments/5k9vob/what_happened_to_the_wiki/)

From the linked Reddit comment:

**Workaround:**

For those still interested in it's content: [https://github.com/gutierri/awesomewm-wiki-dump/tree/master/markdown](https://github.com/gutierri/awesomewm-wiki-dump/tree/master/markdown) has a partial markdown conversion of the old wiki (and the raw dump in xml format too).

[Here](https://github.com/gutierri/awesomewm-wiki-dump/blob/master/markdown/Acpitools-based_battery_widget.md) is the only Battery widget from the partial wiki. It is based on [ACPI](/index.php/ACPI_modules "ACPI modules") and written for version 3.5\. I am not reproducing it here b/c there may be additional steps to get it working.

**NOTE: This partial wiki only covers versions up to 3.x**

### Media Controls

It is possible to control both volume and media playback via a combination of amixer (available via the [alsa-utils](https://www.archlinux.org/packages/?name=alsa-utils) package) and [playerctl](https://www.archlinux.org/packages/?name=playerctl). The following can be added to the relevant key binding section of your rc.lua configuration file:

```
   -- Volume Keys
   awful.key({}, "XF86AudioLowerVolume", function ()
     awful.util.spawn("amixer -q -D pulse sset Master 5%-", false)
   end),
   awful.key({}, "XF86AudioRaiseVolume", function ()
     awful.util.spawn("amixer -q -D pulse sset Master 5%+", false)
   end),
   awful.key({}, "XF86AudioMute", function ()
     awful.util.spawn("amixer -D pulse set Master 1+ toggle", false)
   end),
   -- Media Keys
   awful.key({}, "XF86AudioPlay", function()
     awful.util.spawn("playerctl play-pause", false)
   end),
   awful.key({}, "XF86AudioNext", function()
     awful.util.spawn("playerctl next", false)
   end),
   awful.key({}, "XF86AudioPrev", function()
     awful.util.spawn("playerctl previous", false)
   end)

```

### Steam Keyboard

The on screen Steam Keyboard that can be activated by the [Steam Controller](/index.php/Gamepad#Steam_Controller "Gamepad") appears to freeze after trying to type one character. This is because the client that is supposed to receive the input has to be focussed to receive it and the keyboard will wait until this input is successfully send. Manually focussing another client will send the input to this client and unfreeze the keyboard again until the next character is entered.

The trick to getting the keyboard to work correctly is to prevent it ever receiving focus. Add the following signal to your config (or merge with an existing client focus signal):

```
client.connect_signal("focus", function(c)
    if awful.rules.match(c, { name = "^Steam Keyboard$" }) then
        awful.client.focus.history.previous()
    end
end)

```

This will return the focus to the last client whenever the keyboard receives focus. As the input to the keyboard is handled by the [Steam](/index.php/Steam "Steam") client and as such doesn't need focus, inputting text will now work correctly.

## Troubleshooting

### Debugging rc.lua

[xorg-server-xephyr](https://www.archlinux.org/packages/?name=xorg-server-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:

```
$ Xephyr :1 -ac -br -noreset -screen 1152x720 &
$ DISPLAY=:1.0 awesome -c ~/.config/awesome/rc.lua.new

```

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.

#### awmtt

[awmtt](https://aur.archlinux.org/packages/awmtt/) (Awesome WM Testing Tool) is an easy to use wrapper script around Xephyr. By default, it will use ~/.config/awesome/rc.lua.test. If it cannot find that test file, it will use your actual rc.lua. You can also specify the location of the configuration file you want to test:

```
$ awmtt start -C ~/.config/awesome/rc.lua.new

```

When you are done testing, close the window with:

```
$ awmtt stop

```

Or immediately see the changes you are doing to the configuration file by issuing:

```
$ awmtt restart

```

### Log Files

If you are using [LightDM](/index.php/LightDM "LightDM"), awesome will log errors to `$HOME/.xsession-errors`. If you use `.xinitrc` to start awesome, the entry "Where are logs, error messages or something?" in [the FAQ](https://awesomewm.org/apidoc/documentation/90-FAQ.md.html) may be a helpful resource.

### Mod4 key

Awesome recommends to remap `mod4`, which by default should be **Win key**. If for some reason it is not mapped to `mod4`, use [xmodmap](/index.php/Xmodmap "Xmodmap") to find out what is. To change the mapping, use `xev` to find the keycode and name of the key to be mapped. Then add something like the following to `~/.xinitrc`

```
xmodmap -e "keycode 115 = Super_L" -e "add mod4 = Super_L"
exec awesome

```

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.

To remap `mod4` with `setxkbmap` (conflict with `xmodmap`) see:

```
tail -50 /usr/share/X11/xkb/rules/evdev

```

To set the caps lock key as `mod4` add the following to `~/.xinitrc`:

```
setxkbmap -option caps:hyper

```

#### Mod4 key vs. IBM ThinkPad users

IBM ThinkPads, IBM Model M's and Chromebooks 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:

```
modkey = "Mod4"

```

by:

```
modkey = "Mod1"

```

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.

If you have a Chromebook or 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

```
clear lock
add mod4 = Caps_Lock

```

and run `xmodmap ~/.Xmodmap` to (re)load the file. 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.

Recent updates of xorg related packages break mentioned remapping the second line can be replaced by (tested on a DasKeyboard and IBM Model M and xorg-server 1.14.5-2):

```
keysym Caps_Lock = Super_L Caps_Lock

```

### Fix Java (GUI appears gray only)

See [awesome wiki](http://awesome.naquadah.org/wiki/Problems_with_Java) and [[6]](https://bbs.archlinux.org/viewtopic.php?pid=450870).

### Eclipse: cannot resize/move main window

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.

`workbench.xml` can be found in `*eclipse_workspace*/.metadata/.plugins/org.eclipse.ui.workbench/`. Edit the line:

```
<window height="xx" maximized="true" width="xx" x="xx" y="xx"

```

### Netbeans: code-prediction appears on wrong screen

If you have two displays and use code-prediction (Ctrl + Space) in Netbeans, the code-predictions might appear on the wrong screen. This fixed it for me:

 `.config/awesome/rc.lua` 
```
awful.rules.rules = {
        ...
	{
		rule_matches = { -- Fix Netbeans
			class = {
				"sun-awt-X11-XWindowPeer", "NetBeans IDE 8.2"
			},
			name = {
				"win1"
			}
		}, properties = { screen = 1 } -- even with screen 1 here, this still works on the seccond screen, too (don't know why).
	},
        ...

}
```

### IntelliJ: menus appear on incorrect position, some windows don't open

See [GitHub issue #2204](https://github.com/awesomeWM/awesome/issues/2204).

This fixed it for me:

 `.config/awesome/rc.lua` 
```
clientbuttons_jetbrains = gears.table.join(
    awful.button({ modkey }, 1, awful.mouse.client.move),
    awful.button({ modkey }, 3, awful.mouse.client.resize)
)

...

awful.rules.rules = {
        ...
	{
            rule = {
                class = "jetbrains-.*",
            }, properties = { focus = true, buttons = clientbuttons_jetbrains }
        },
        {
            rule = {
                class = "jetbrains-.*",
                name = "win.*"
            }, properties = { titlebars_enabled = false, focusable = false, focus = true, floating = true, placement = awful.placement.restore }
        },
        ...
}
```

### scrot: Cannot take a mouse selected screenshot with keyboard shortcuts

When using [scrot](https://en.wikipedia.org/wiki/Scrot "w:Scrot"), you may have problems at assigning a keyboard shortcut to the mouse selection option (formally `scrot -s`). To fix it, add the following line to your `rc.lua`:

```
awful.key( { modkey,	 }, <shortcut>, function () awful.util.spawn_with_shell("sleep 0.5 && scrot -s") end)

```

### YouTube: fullscreen appears in background

If YouTube videos appear underneath your web browser when in fullscreen mode, or underneath the panel with controls hidden, add this to `rc.lua`

```
{ rule = { instance = "plugin-container" },
  properties = { floating = true } },

```

With Chromium add

```
{ rule = { instance = "exe" },
  properties = { floating = true } },

```

or:

```
{ rule = { role = "_NET_WM_STATE_FULLSCREEN" },
  properties = { floating = true } },

```

See [[7]](https://bbs.archlinux.org/viewtopic.php?pid=1085494#p1085494).

### Prevent the mouse scroll wheel from changing tags

In your rc.lua, change the Mouse Bindings section to the following;

```
-- {{{ Mouse bindings
root.buttons(awful.util.table.join(
    awful.button({ }, 3, function () mymainmenu:toggle() end)))
-- }}}

```

### Starting console clients on specific tags

It does not work when the console application is invoked from a GTK terminal (e.g. LXTerminal). [URxvt](/index.php/URxvt "URxvt") is known to work.

### Duplicate menu-entries generated by Xdg-menu

Xdg-menu will generate duplicate entries if you copy desktop-files from /usr/share/applications to ~/.local/share/applications even though it might be preferable to simply override the originals, for example using a different theme for a specific application. One solution to the problem is to filter the generated output trough awk to remove entries with a name identical to the previous entry.

```
 xdg_menu --format awesome --root-menu /etc/xdg/menus/arch-applications.menu | awk -F, '{if (a!=$1) print $a; a=$1}' >~/.config/awesome/archmenu.lua

```

### Some Shortcuts not Working in Xfce4 overlapping Keys

Check your

```
$ xfce4-keyboard-settings

```

for Overlapping keys like "Super L" or Key Combinations which should be run by Awesome

## See also

*   [https://awesomewm.org/apidoc/documentation/90-FAQ.md.html](https://awesomewm.org/apidoc/documentation/90-FAQ.md.html) - FAQ
*   [http://www.lua.org/pil/](http://www.lua.org/pil/) - Programming in Lua (first edition)
*   [https://awesomewm.org/](https://awesomewm.org/) - The official awesome website
*   [https://bbs.archlinux.org/viewtopic.php?id=88926](https://bbs.archlinux.org/viewtopic.php?id=88926) - share your awesome!