Awesome window manager

Home

Table of Contents

1 Reference

man awesome

2 configuration

/etc/xdg/awesome/rc.lua

~/.config/awesome/rc.lua

2.1 Automatically autostart programs when awesome start

For example, to start kupfer and synergy, add the following lines at the end of ~/.config/awesome/rc.lua

awful.util.spawn_with_shell("pgrep --exact kupfer > /dev/null ||  kupfer ");
awful.util.spawn_with_shell("pgrep --exact synergy > /dev/null ||  synergy ");

2.2 Setting keyboard language and options

Swap caps lock and left Ctrl http://www.emacswiki.org/emacs/MovingTheCtrlKey

You can run the following lines in a bash shell, or write a script:

#!/bin/bash
setxkbmap -option ctrl:swapcaps

##set keyboard to us english:
setxkbmap  us

## us  (international Altgr keys, verbose output)
setxkbmap -v 10  us  altgr-intl

2.3 Install awesome in Debian 8 running with lightdm session manager

create the following new file:

/usr/share/xsessions/awesome.desktop

[Desktop Entry]
Encoding=UTF-8
Name=awesome
Comment=Highly configurable framework window manager
TryExec=awesome
Exec=awesome
Type=Application

then you should be able to see a new entry for awesome in the session manager.


If you want lightdm to read a ~/.xinitrc file:

Create a new file /usr/share/xsessions/custom.desktop with:

[Desktop Entry]
Name=Xsession
Exec=/etc/X11/Xsession

You should now have a new session option during login, Xsession will load the user's ~/.xinitrc.

2.4 Dual monitor

After loading awesome for the first time, I needed to use the video driver configuration tool to configure dual monitor support:

AMD RADEON Catalyst center:

$ amdcccle

2.5 other stuff (draft, need re-arrange)

--------------------------------------------------

$ locate rc.lua

file:/etc/xdg/awesome/rc.lua
file:/usr/share/awesome/lib/flaw/tests/rc.lua
file:/usr/share/awesome/lib/shifty/example.rc.lua
file:/usr/share/doc/awesome-extra/examples/example.rc.lua.gz



http://vincent.bernat.im/en/blog/2012-awesome-wm.html
https://github.com/vincentbernat/awesome-configuration


Files

file:~/.config/awesome/rc.lua
file:/etc/xdg/awesome/rc.lua


file:~/.config/awesome/rc.lua



Programming in Lua
http://www.lua.org/pil/

Lua API documentation
http://awesome.naquadah.org/doc/api/

awesomerc(5) manpage.




file:/usr/share/doc/awesome/luadoc/



file:/usr/share/awesome/lib/awful/
autofocus.lua   dbus.lua   layout         prompt.lua  startup_notification.lua  util.lua
button.lua      hooks.lua  menu.lua       remote.lua  tag.lua                   wibox.lua
client.lua      init.lua   mouse          rules.lua   titlebar.lua              widget
completion.lua  key.lua    placement.lua  screen.lua  tooltip.lua




Window Properties
----------------
http://awesome.naquadah.org/wiki/Understanding_Rules

http://awesome.naquadah.org/wiki/Example_of_applications_rules

xprop
  get details about class, name, instance of windows.


In the xprop output, the class is the second value of the WM_CLASS property.



To change the instance value of a particular emacs frame,
create it with the -name parameter from command line:

emacs -name testinstancename

In the xprop output, the instance is the first value of the WM_CLASS property.




Some instance, class properties of common applications:

WM_CLASS(STRING) = INSTANCE,  CLASS
WM_CLASS(STRING) = "vdpau", "mplayer2"





Ejemplos


{ rule = { class = "VirtualBox" },
  except = { name = "Oracle VM VirtualBox Manager" },
  properties = { floating = true } },


Other common application you probably want to have in floating mode:

{ rule_any = { class = { "MPlayer", "pinentry", "Gimp", "Guake", "feh" } },
  properties = { floating = true } },



==================================================

How to lock the screen when I am away?
--------------------------------------

You can use any screen locking utility; xlock, xscreensaver, slock, kscreenlocker...

Example key binding for your globalkeys:

 awful.key({ modkey }, "F12", function () awful.util.spawn("xlock") end)

How to execute a shell command?
-------------------------------

If you want to execute a shell command or need to execute a command that uses redirection, pipes and so on, do not use the awful.util.spawn function but awful.util.spawn_with_shell. Here is an example:

 awful.key({ modkey }, "F10", function () awful.util.spawn_with_shell("cal -m | xmessage -timeout 10 -file -") end)

On zsh, any changes to $PATH you do in ~/.zshrc will not be picked up (because this is only run for interactive shells). Use ~/.zshenv instead to make additions to the path you want to use in awesome.



Where are logs, error messages or something?
--------------------------------------------

When hacking your own configuration, something inevitably would go wrong. awesome prints error messages to its stderr stream. When run with usual $ startx, it'd be printed right in tty. If you use something more complicated (some kind of DM, like kdm or gdm), stderr is usually redirected somewhere else. To see where, run the following command:

$ ls -l /proc/$(pidof awesome)/fd/2

3 default key bindings (that I want to remember)

Mod4 = windows key (in my keyboard is between left Ctrl and Alt )

Mod4 + Control + space
Toggle client floating status.

Author: Sebastian Emilio Narvaez

Created: 2019-10-12 Sat 22:16

Emacs 25.2.2 (Org mode 8.2.10)

Validate