Commit Graph

876 Commits

Author SHA1 Message Date
Uli Schlachter 92dc63fe02 Remove unused argument to awful.client.property.persist
This is a left-over from an old version of the patch which introduced this new
function.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-04-21 19:30:03 +02:00
Daniel Hahler 6d04528bd8 Add persistent client properties
`client.property.persist` can be used to make properties persistent
across restarts. This works by backing them up via X properties (using
the `awful.client.property.` prefix).

`client.property.persist(c, "floating", "boolean")` is used to make the
floating property persistent by default.

Based on a patch from Uli, source: https://gist.github.com/psychon/10320743

doc, only set current prop in 'persist'

Fix xprop/prop mixup in 'persist'

Only call set for non-nil values
2014-04-20 14:54:21 +02:00
Uli Schlachter e998e3fe20 awful.client.shape: Import client shape handling (FS#1051)
This new awful module reacts to shapes that a client sets on itself and sets the
shape of awesome's frame window to match. This way, xeyes really gets
transparent parts again.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-04-14 10:04:56 +02:00
Uli Schlachter dcc348d75e Fix some random ldoc warnings
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-04-13 18:06:49 +02:00
Uli Schlachter d76d3e0b6a Merge git://github.com/Teknocrat/awesome 2014-04-12 16:15:11 +02:00
Uli Schlachter 1090719d67 remove awful.widget.taglist.gettag (FS#1256)
It's been broken since ages.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-04-12 12:18:34 +02:00
Gino! b4b6e6c1fc Fix Icon Finding in awful.util
This should also fix naughty failures to display the correct icons
2014-04-11 17:43:23 -04:00
Uli Schlachter ec8db18289 awful.tag.setscreen: Check if old_screen == new_screen (FS#1249)
Setting a tag's screen to what it already is shouldn't have any bad effects.
However, this code messed up the tag order and selection status.

Fix this by returning early if the tag already has the right screen.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-04-09 22:06:21 +02:00
Uli Schlachter 27f483a601 awful.tag.move: Fix tag index setting (FS#1249)
Since commit 9c69e857ed, awful.tag.setscreen() unsets a tag's index to make
sure things end up in a sane order on the new screen. Thus, the call to
setscreen() removed the "index" property that tag.move just set.

Fix this by setting the index after the screen.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-04-09 22:06:10 +02:00
Daniel Hahler df23964b20 Make callbacks to rules.execute optional 2014-04-01 10:48:18 +02:00
Uli Schlachter 6dfe48690b awful.tooltip: Add (and use) :set_markup() function
Since commit 5b4666432f, we use set_text() instead of set_markup()
on the tooltip's textbox. This means it is no longer possible to use pango
markup in the tooltip which was not intended.

Fix this (properly) by introducing a :set_markup() function on tooltips (and use
it in the timer function to restore the old behavior).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-30 23:35:35 +02:00
Uli Schlachter 90226d0ccf awful.tooltip: Small reorganization
This inlines the set_defaults() function into its only caller and makes us less
stupid with the font property.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-30 23:31:38 +02:00
Uli Schlachter 271f084735 screen: Turn into proper lua object
This makes the screen objects use our existing infrastructure for implementing
classes and objects with lua instead of hand-rolling an own version.

This results in some small API change: Screen objects no longer have an
add_signal() function and instead this function exists on the parent screen
class.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-30 16:37:19 +02:00
Uli Schlachter 2dc28b29e9 Merge remote-tracking branch 'blueyed/fix-restore-in-tag.delete' 2014-03-29 18:12:37 +01:00
Uli Schlachter 3cbdc2a79f Use awful.layout.layouts for implementing optional parameters
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-28 13:29:16 +01:00
Emmanuel Lepage Vallee bfc6065ad9 Make 'layouts' global 2014-03-28 13:24:04 +01:00
Daniel Hahler bc4a5f38c9 manage signal handler: use awesome.startup
The `manage` arg is gone.
2014-03-27 13:50:19 +01:00
Emmanuel Lepage Vallee 8bddba170b Fix tag screen switching
The bugs this fix are:

 * Invalid request using nil as screen
 * Stop messing indexes in the old screen
 * Prevent c.screen <-> t.screen mismatch
 * Prevent no tags being selected in the old screen
2014-03-26 23:14:09 +01:00
Uli Schlachter d91d36c69c awful.tag.withcurrent: Try harder at finding a tag (FS#1196)
When a screen doesn't have any tags selected, then just tag the new client with
all of the screen's tags. That way, we don't lose clients.

Also, if we failed at coming up with tags for a client, don't completely untag
it. This means that it can keep its old tags if it had any.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-26 14:29:02 +01:00
Uli Schlachter eed605bf7f Revert "awful.client.movetoscreen: Don't untag clients completely (FS#1196)"
This reverts commit bbe86e4e25. That commit caused
unintuitive, special behavior. Instead, when someone wants us to set a screen,
we really should do so.
2014-03-26 14:28:04 +01:00
Uli Schlachter a73bcd732a Merge remote-tracking branch 'blueyed/magnifier-fix-raising' 2014-03-24 22:22:11 +01:00
Uli Schlachter 6116c90210 Merge remote-tracking branch 'blueyed/client-set-screen-with-tags' 2014-03-24 22:18:27 +01:00
Uli Schlachter 981acad29d awful.tag: Don't tag clients before manage() (FS#1238)
This commit partly reverts commit b4c83d0e70.

Because the C code emits property::screen before manage, this caused
awful.tag.withcurrent() to run on a client before it really was being managed.
This then tagged the client. Because of this tag changes, awful.layout reacted
and ran the layout code. Because c.type wasn't set up at this point yet, the
client wasn't considered to be floating yet. This caused the client's geometry
to change and thus its floating geometry was messed up.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-24 22:05:21 +01:00
Daniel Hahler fc9284fc53 Drop focus:raise() in magnifier.arrange
This is a useful fix in general, but especially after commit 620732a
(Remove raise call from mouse.client.move).

Ref: https://github.com/awesomeWM/awesome/pull/9#issuecomment-37736135
2014-03-24 17:20:49 +01:00
Daniel Hahler 8194d555ec Set c.screen in ewmh.tag and before tags in rules.execute
The current premise is that c.screen should be the same as
awful.tag.getscreen(t).

The addition in `ewmh.tag` appears to be the important part here,
changing the order in awful.rules.execute is (maybe) only for
consistency across the codebase.
2014-03-24 17:01:52 +01:00
Uli Schlachter df49d180dd Revert "Set c.screen in ewmh.tag and before tags in rules.execute"
This reverts commit 3f9c439311.
2014-03-24 09:49:30 +01:00
Uli Schlachter 92b86a56f7 Merge remote-tracking branch 'blueyed/client-set-screen-with-tags' 2014-03-24 09:21:13 +01:00
Daniel Hahler c11153c630 Fix the call to tag.history.restore from tag.delete
By default, tag.history.restore switches between the previous history
states, which is not what should get done when deleting a tag.

Without this, deleting multiple tags in a row, will jump back to the
first/fallback tag, instead of the older history entries.
2014-03-24 01:17:54 +01:00
Daniel Hahler 3f9c439311 Set c.screen in ewmh.tag and before tags in rules.execute
The current premise is that c.screen should be the same as
awful.tag.getscreen(t).

The addition in `ewmh.tag` appears to be the important part here,
changing the order in awful.rules.execute is (maybe) only for
consistency across the codebase.
2014-03-24 00:18:35 +01:00
Uli Schlachter b4c83d0e70 Use signals on classes instead of instances where appropriate
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-23 19:48:07 +01:00
Uli Schlachter 82efb1b69e awful.client: Add marked and unmarked signals (FS#1227)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-23 16:34:04 +01:00
Uli Schlachter ae996ee8d6 awful.rules: Emit request::activate on the client
There is a strong hint that you are doing something wrong: You call
client.emit_signal(some_signal, c). Chances are high that this signal is
supposed to be emitted on the client object 'c' instead of the underlying client
class.

This applies to awful.rules' usage of this signal.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-18 16:01:04 +01:00
Uli Schlachter 873358a0b8 EWMH: Handle _NET_WM_DESKTOP in lua
We now handle all "important" EWMH messages in lua and lua can decide to do
different things than the current obvious one.

Consistency!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-17 16:15:20 +01:00
Uli Schlachter bbe86e4e25 awful.client.movetoscreen: Don't untag clients completely (FS#1196)
If a client gets moved to a screen without any selected tags, that client
disappears and it is non-trivial to get it back. Since this is unexpected and
annoying, make movetoscreen do nothing if the target screen has no tags
selected.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-16 21:53:58 +01:00
Daniel Hahler edaca590f6 Only set client's urgent after startup
This looks at awesome.startup in the default 'request::activate' signal
handler.
2014-03-16 21:26:05 +01:00
Daniel Hahler 9a5a8dc6e8 Factor `awful.rules.apply_do` out of `apply`
This allows to apply properties and callbacks to a client like
awful.rules.apply would do, without the matching part.

This is useful with the new startup notifications, and lets you apply
the same properties and callbacks from e.g. a manage signal handler.
2014-03-16 20:20:14 +01:00
Uli Schlachter 40e28be700 awful.tooltip: Work with all gears.colors as foreground
This fixes awful.tooltip so that colors other than "#123456" can be used.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-16 13:25:01 +01:00
Emmanuel Lepage Vallee d6e06450d3 Add end to end support for spawning tracking using startup notifications
This allow to spawn something, then apply some properties or rules when
the client show up ("manage").

This commit add:
 * "startup_id" property for all clients object (immutable, can be nil)
 * Second return value to awful.util.spawn() with the startup_id
 * Update the documentation

Example:

  local wait_for_it = {}

  local pid,snid = awful.util.spawn("urxvtc")
  wait_for_it[snid] = {ontop=true,sticky=false,
     tag = awful.tag.gettags(mouse.screen)[1] }

  client.connect_signal("manage", function (c, startup)
     if c.startup_id and wait_for_it[c.startup_id] then
        for k,v in pairs(wait_for_it[c.startup_id]) do
           c[k] = v
        end
        if wait_for_it[c.startup_id].tag then
           c:tags({wait_for_it[c.startup_id].tag})
        end
     end
  end)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-15 23:14:02 +01:00
Daniel Hahler d9aed1b21e awful.rules: add does_match and matching_rules functions (FS#1224)
Signed-off-by: Daniel Hahler <git@thequod.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-15 09:00:20 +01:00
Daniel Hahler a15e53deec Minor doc fixes 2014-03-15 08:52:14 +01:00
Daniel Hahler 31e3399abe Fallback to comparing layout names in awful.layout.inc
This helps in cases where you have accidentally cloned an entry from
`layouts`.

Previously, no current index would be found and the function would
silently fail.

Signed-off-by: Daniel Hahler <git@thequod.de>
2014-03-14 20:37:24 +01:00
Daniel Hahler 11f7b5aa3d Add a "deep" option to awful.util.table.clone
This allows for having clones of a table, where its entries are still
references to the original values.

This is useful for copying a "default props" table, where you want to
keep the reference to entries like `awful.layout.suit.tile`.

Signed-off-by: Daniel Hahler <git@thequod.de>
2014-03-14 20:36:26 +01:00
Daniel Hahler c855b1babb Do not raise clients in client_manage
Instead, use stack_client_push and emit the `request::activate` signal
from awful.rules.apply, if the client gets focus.

Signed-off-by: Daniel Hahler <git@thequod.de>
2014-03-12 16:01:01 +01:00
Massimiliano Brocchini b965adc33f prompt: CTRL+DELETE deletes history entries
Pressing CTRL+DELETE removes the visible history entry, if any, then moves to the next history entry (like pressing DOWN would do).
If the last history entry is removed the previous one is shown in the prompt (like pressing UP would do).
CTRL+DELETE works on history entries only: i.e. it has no effect on a command entered but not executed yet.
To implement above behaviour I added saving history table to file on Escape key press.

Signed-off-by: Massimiliano Brocchini <massimiliano.brocchini@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-12 10:16:27 +01:00
Daniel Hahler c8cbada899 Emit tag::history::update signal from tag.history.restore
Restoring a previous history entry changes the tag history (in the
meaning of currently selected tags), and therefore should also emit the
tag::history::update signal.

A use case might be to automatically hide tags with no clients on them.

Signed-off-by: Daniel Hahler <git@thequod.de>
2014-03-12 01:49:10 +01:00
Campbell Barton 620732a015 Remove raise call from mouse.client.move
This makes move consistent with 'resize' which doesn't raise either.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-11 09:41:20 +01:00
Uli Schlachter 2ac95b4ae8 Fix handling of _NET_CURRENT_DESKTOP messages (FS#1219,FS#1217)
Instead of having the C code mess with which tags are selected, we now emit a
signal on the tag that says that something requested it to be selected. Lua can
then handle this by only switching tags on the correct monitor and by updating
the focus history correctly.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-08 15:33:34 +01:00
Uli Schlachter f19912900d awful.util.spawn*: Remove obsolete screen argument
Ever since commit 6b2e4352b (from 2010!), awesome.spawn() doesn't have a screen
argument anymore and the extra argument from util.spawn was just ignored. Fix
the code and the luadoc for these functions.

Thanks to blueyed for noticing this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-07 10:54:52 +01:00
Uli Schlachter 8cf48d1fe8 Revert "awful.ewmh: Enforce client geometry (FS#764,FS#1216)"
This reverts commit 20afb26080.

The commit caused endless loops with tracebacks like this (shortened):

        lib/awful/ewmh.lua.in:122: in function <lib/awful/ewmh.lua.in:117>
        [C]: in function 'geometry'
        lib/awful/ewmh.lua.in:122: in function <lib/awful/ewmh.lua.in:117>
        [C]: in function 'geometry'
        lib/awful/ewmh.lua.in:122: in function <lib/awful/ewmh.lua.in:117>
        [C]: in function 'geometry'
2014-03-06 22:08:00 +01:00
Uli Schlachter 20afb26080 awful.ewmh: Enforce client geometry (FS#764,FS#1216)
When a client's geometry changes (and I consider the border width to be part of
the geometry here) and that client is one of fullscreen or
maximized_{horizontally,vertically}, make sure that the geometry as specified by
the state is still obeyed.

This also (accidentally) fixes things when a client gets moved to another
screen!

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-06 18:08:55 +01:00
Uli Schlachter 23e9258fb5 awful.ewmh: Correctly handle bw change for maximized clients
Due to a copy&paste error, maximized_vertical and maximized_horizontal were
handled the same. Of course, vertical and horizontal aren't the same direction.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-06 17:58:03 +01:00
Uli Schlachter 04dee81d13 client: Add request::activate signal (FS#848)
When we receive a _NET_ACTIVE_WINDOW request on the root window, we used to just
focus and raise the window. This didn't do much for clients which are on
non-selected tags.

Thus, this commit makes awesome emit request::activate on the client instead.
This is used in awful.ewmh to implement the old behavior again, but with
additionally marking the client as urgent if it isn't visible.

People who don't like this behavior can use client.disconnect_signal to disable
this behavior again. To make this really possible, awful.ewmh becomes a
"non-nil" module.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-03-06 17:47:55 +01:00
Massimiliano Brocchini b8c172a2dc prompt: search in prompt history using exact string match
The default value for the second argument to :find() is 1, so nothing is changed
here. The third arguments disables pattern matching and instead gets us literal
interpretation of strings. This means that pattern characters like e.g. [, ] and
. don't get interpreted.

Signed-off-by: Massimiliano Brocchini <massimiliano.brocchini@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-02-22 16:32:34 +01:00
Massimiliano Brocchini 77a2b27426 prompt: fix search term ctrl+up/ctrl+down when starting from existing entries
Signed-off-by: Massimiliano Brocchini <massimiliano.brocchini@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-02-22 16:32:34 +01:00
Fabienne Ducroquet 94a8c72596 layouts: spiral: Avoid gaps between windows
When an area is split in two, for example horizontally, one of the windows
should have height math.floor(previous height / 2) and the other
math.ceil(previous height / 2), to be certain that no gaps are left between the
windows.

For instance, if the first window has height h and the second window has height
math.floor(h / 2), the height of the third window should be math.ceil(h / 2)
instead of the same as for the second window.

So to compute the size of window n + 1 it’s necessary to remember the size of
window n - 1 as well as that of window n.

Signed-off-by: Fabienne Ducroquet <fabiduc@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-01-23 18:39:52 +01:00
Rocco Aliberti 64dc578efc awful.menu.clients: Remove useless line (FS#1200)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-01-20 16:30:24 +01:00
Uli Schlachter 479f7b990c awful.menu.clients: Fix API (FS#1200)
This gets rid of the unused first argument and adds a new second argument that
can influence individual items.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2014-01-11 21:23:23 +01:00
Uli Schlachter 5cd8c7e540 awful.tag.viewmore: Make screen optional (FS#1203)
The documentation says that screen, the last argument to viewmore(), is an
optional argument. However, the implementation only treated it as an optional
argument in one place.

Fix this by always setting the screen variable itself to a screen.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-12-30 11:33:09 +01:00
Uli Schlachter 2936f63d67 awful.menu: Add missing "local" declaration
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-12-26 16:13:01 +01:00
Enrico Scholz 77e92e17a1 menu: do not double escape name in 'menu:clients()' (FS#1202)
Label of menu entries will be escaped automatically.  Doing it manually
in menu:clients() will escape it it twice.

Patch removes the util.escape() call in menu:clients()

Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-12-26 16:12:31 +01:00
Jan Larres 9723f23f26 taglist: Add [bg|fg]_empty
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-12-02 15:10:10 +01:00
Uli Schlachter d4b12bb1b2 awful.tag.delete: Deactivate tags
The activated property was added to tag objects between awesome 3.4 and 3.5.
This is used in the C code to keep tags alive even when nothing else refers to
it and includes a tag e.g. in some root window properties.

Thus, to get rid of a tag and to make the C code drop its reference to it, we
have to set activated to false in this function.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-11-23 14:54:13 +01:00
Uli Schlachter 15f0881966 tasklist: Add default colors for broken themes
In case loading the theme failed and we don't have fg_normal or bg_normal, add
default values for these properties. All the other colors are only used if they
are defined, but these two always need to be defined.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-11-18 15:19:54 +01:00
heithe 80aa6b1922 Add awful.titlebar.widget.minimizebutton
Signed-off-by: heithe <heithe01@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-11-03 09:47:11 +01:00
Uli Schlachter 4abf42b92f awful.tag.withcurrent: Also act on restarts (FS#1155)
When awesome restarts because a new screen was added or removed, clients can end
up being on a different screen than before the restart. However, the tags will
be carried across the restart. This means that a client could end up being
tagged with a tag from another screen. This results in weird behavior of tag
switches and confuses users.

To work around this, remove the client from any tags that are on a different
screen during startup. If the client ends up without any tags, it will then be
tagged with the currently selected tags.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-10-08 10:45:22 +02:00
Uli Schlachter f3573dbb19 awful.client.tiled: Ignore fullscreen (etc) clients (FS#1106)
I am looking forward to the bug reports requesting awful.client.floating.set(c,
true) to also automatically un-fullscreen the client...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-10-04 12:04:16 +02:00
Uli Schlachter a6466864f9 awful.screen.focus: Don't move mouse to (0, 0) first (FS#1173)
Setting mouse.screen moves the pointer to the top left corner of that screen.
However, the very next line would then move the pointer elsewhere again. Thus,
the first one wasn't needed at all.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-10-04 11:27:35 +02:00
Uli Schlachter d82342e386 awful.titlebar: Add show, hide, toggle functions
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-09-19 14:37:07 +02:00
Uli Schlachter 14daf85fe9 awful.tooltip: Set the bg color correctly (FS#1148)
Well, whoops. There is no .bg property on wiboxes for quite a while already, it
is now a :set_bg member function.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-05-13 19:27:19 +02:00
Jo De Boeck e0a163cba0 Fix calculation of distance between clients
This fixes move by direction

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-21 15:11:35 +01:00
Emmanuel Lepage Vallee a484ef076d Allow to disable taglist icons.
This is used if the user want to use a custom drawing method.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-17 23:43:29 +01:00
Emmanuel Lepage Vallee 67710d0008 Add ability to set background images for empty tag
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-17 23:43:29 +01:00
Emmanuel Lepage Vallee e920c74fd9 Add ability to disable tasklist icons and restore ability to set bg_images
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-17 23:43:29 +01:00
Emmanuel Lepage Vallee 1c76560da7 Add external function for {tag,task,tab}list background image
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-17 23:43:28 +01:00
Uli Schlachter 7a47355c99 awful.mouse: Follow C API changes
Whoops. This was broken ages ago. Thanks to Elv13 for making me notice.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-17 22:52:39 +01:00
Uli Schlachter 2b0398c59b awful.tag: Use sane tag index values (FS#1125)
Since commit d8a93dafa3, tags have an "index" property which decides about
the order in which they are displayed in the taglist. If a tag doesn't have this
property set, the next call to awful.tag.gettags() will fix this and "invent" an
index for this new tag.

However, if multiple tags didn't have an "index" property, gettags() would
assign all of them the same index. The following call to table.sort() would then
do random magic to these tags (remember: table.sort() is not a stable sorting
algorithm, so it is allowed to randomly swap around entries which have the same
sorting key).

Fix this by making sure that the new "index" properties are different from each
other.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-16 16:51:55 +01:00
cdump d8a93dafa3 awful.tag: add index property for custom tag order
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-12 15:14:38 +01:00
Uli Schlachter 4540b8927a awful.util.spawn_with_shell: Use table as argument
Thanks to the previous commit, spawn_with_shell() can now easily fix lots of
problems that we previously had with escaping the argument to the shell.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-10 15:00:05 +01:00
Uli Schlachter 23b30be106 Move size hints handling back into C (FS#1117)
Having this in lua means that size hints are only applied after the client got
resized. The bad side effect of this is some flickering if awesome is being
slow. And apparently, it is slow for way too many people...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-10 12:13:32 +01:00
Poggles 2876718210 Make awful.util.cycle() less while'y
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-10 11:19:37 +01:00
Poggles bd05219a72 Make awful.layout.inc() accept a screen number
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-02-19 19:49:07 +01:00
Felix Bier e4be0017ff Incorrect calculation of unused size (FS#1108)
Signed-off-by: Felix Bier <flx.bier@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-02-11 16:10:48 +01:00
Lukáš Hrázký 02ea5f9b23 awful.widget.common: remove unsed function
Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 23:05:30 +01:00
Lukáš Hrázký dd29a41c4e tasklist: add a theme option for a plain task name
If theme.tasklist_plain_task_name is set to true, the various client
state marks will not be prepended to the task name.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 23:05:30 +01:00
Lukáš Hrázký 4463f89b15 {tag,task}list: add update_function and base_widget constructor arguments
The arguments are optional, making it possible to use a custom function
to create the {tag,task}list layout. The base_widget arguments can be
used to override the base layout of the {tag,task}list widget.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 23:05:30 +01:00
Lukáš Hrázký 8560de597c wibox.layout.align: make the middle widget really centered
Centers the middle widget in the align layout in the remaining space
left by the widgets on the sides.

Signed-off-by: Lukáš Hrázký <lukkash@email.cz>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 23:05:30 +01:00
Uli Schlachter 987c2b9b30 awful.screen.getbycoord(): Always return a valid screen
No callers expect a nil result from this function. In fact, this broke
awful.tooltip because it tried to get the workarea of screen nil.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 20:56:20 +01:00
Uli Schlachter 1fa23fef81 awful.tooltip: Don't place tooltips when text changes
The tooltip is now only placed when it is made visible, not while it is
invisible.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-01-05 20:54:38 +01:00
Uli Schlachter 7d1a963352 awful.placement.no_offscreen: Fix border handling (FS#1065)
The (x,y) position of a client is outside of the border, but the width/height
does not include the border (so the real width is width+2*border).

This means that we have to also subtract 2*border to make sure that the client
including its border really is inside of the expected area.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-12-16 18:11:57 +01:00
Uli Schlachter 823cd10be7 awful.widget.button: Fix name clash (FS#1064)
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-12-15 10:08:23 +01:00
Uli Schlachter 487fb3f945 mouse.resize: Allow resize across screens (FS#1059)
No clue why this code is here, but it only allowed floating clients to be
resized beyond the edge of their screen. Clients on a floating layout were
forced to stay on their screen. Quite an unintuitive behavior and now this
behavior is gone.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-12-14 19:38:30 +01:00
Björn Åström 6db7bdfcb9 Fix minimizedcurrenttags filter with sticky clients
Sticky clients showed up in the tasklist without being minimized when using the minimizedcurrenttags filter.
This patch fixes that.

Signed-off-by: Björn Åström <bjoast@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-12-13 18:01:40 +01:00
Uli Schlachter 4c094a279d Fix various instances of global variables
The modules awful.menu and awful.util were placing variables in the global
environment which is a bad thing. Fix this by adding the right module name
prefixes to these variables.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-30 22:46:55 +01:00
Uli Schlachter e24c09e828 Update titlebar color when focus changes (FS#1056)
The current code relied on some widget to cause a redraw when the focus changes.
Obviously, this assumption is wrong.

Instead, the code now uses the proper "focus" and "unfocus" signals for setting
titlebar colors, but it also needs to set these colors when a new titlebar is
created (v1 of this patch forgot that). For this reason, update_colors has to be
saved for when a titlebar's colors are updated.

This commit also reverts the ugly redraw_hook hack from commit a1918b8306.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-29 16:52:19 +01:00
Uli Schlachter c50d62749b Fix errors from missing themes
This patch gets rid of lots of errors that happen when beautiful.init() is not
called in the config. Most of them were missing default values.

Thanks to panthar for reporting this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-27 22:55:42 +01:00
Uli Schlachter fbecd40c62 awful.menu.clients: Fix client icons
This was passing c.icon as the icon of a menu entry. However, this is just a
light userdata which has to be turned into an lgi cairo surface object. Luckily,
surface.load() does that for us.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-25 21:18:23 +01:00
Uli Schlachter fd1e751919 awful.menu: Handle themes without border_width
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-25 19:17:27 +01:00
Uli Schlachter 38c41a2f7a awful.client.toggletag: Use tag.getscreen()
Thanks to muni for reporting this bug.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-19 18:56:18 +01:00
Uli Schlachter d13b825c36 Fix warnings from LDoc
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-19 15:35:32 +01:00
Uli Schlachter 96e03cb45d Lots of random documentation fixes
This is mostly about mis-named parameters, but also other small things.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-11-19 14:09:10 +01:00