Commit Graph

580 Commits

Author SHA1 Message Date
Sébastien Luttringer 99230fc632 Fix client screen in awful.client.setslave
Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-08-12 13:17:30 +02:00
Uli Schlachter c084eb5b08 Revert "Focus history: Don't ignore unfocusable clients"
This reverts commit c0dffca646 which caused
FS#1011. This is just too much breakage which can't easily be fixed in 3.4.
2012-07-06 17:32:53 +02:00
Sébastien Luttringer 4b61aefca6 awful.titlebar use height not width
Signed-off-by: Sébastien Luttringer <seblu@seblu.net>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-17 11:00:54 +02:00
Uli Schlachter 938ba52201 awful.client.setslave: Fix for not-visible clients
Previously, setslave() put a client only at the end of the list of visible
clients. Obviously this means that it didn't do anything helpful if the target
client was not visible.

Fix this by iterating over all clients on the target screen instead of just the
visible ones.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-05 10:06:19 +02:00
Uli Schlachter 05d991d452 Taglist: Add {bg,fg}_occupied theme options
This commit adds a new {bg,fg}_occupied option to the taglist. These control the
background and foreground color that unselected but occupied tags get in the
taglist. Occupied here means that at least one client is tagged with that tag.

Thanks to NougatRillettes for submitting this.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-06 19:23:49 +02:00
Uli Schlachter c0dffca646 Focus history: Don't ignore unfocusable clients
The only caller of focus.history.add() should be the "focus" signal, so at that
time the unfocusable client already does have the focus. At that point, there is
no reason why this shouldn't be recorded in the focus history.

(And yes, unfocusable clients can be focused. Don't ask.)

This should hopefully fix FS#778.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-06 12:24:56 +02:00
Corey Thompson 7298b3835d Remove "encoding=utf-8" from Vim modelines
Signed-off-by: Corey Thompson <cmtptr@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2012-03-26 12:19:57 +02:00
TsT 7a837bd2a6 table.foreach is deprecated: now use for + pairs
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-08 16:44:06 +01:00
TsT d89b7bb861 mistake fix: "b" local variable declaration is missing
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-08 16:44:01 +01:00
Anurag Priyam 9f2a79a2d0 add awful.client.cycle
add awful.client.cycle to iterate through clients that match a given condition

A common use case is to cycle through clients that match a given rule and take
certain action on them: raise, set or get property, etc.; see usage example in
the docs.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-17 16:54:28 +01:00
Anurag Priyam 55ee0d4dab add awful.util.table.cycle
awful.util.table.cycle iterates through elements of the table that match the
given condition.

This will help writing concise code when one wants to apply a function to
(read, take some action) on a select list of elements in a table (of say,
clients and tags).

Conflicts:

	lib/awful/util.lua.in

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-17 16:54:28 +01:00
Axel Beckert cf784bc825 awful.tag.inc*: properly pass tag parameter to set*
Signed-off-by: Julien Danjou <julien@danjou.info>
2012-01-11 10:42:41 +01:00
Anurag Priyam 50b10529fc awful.tooltip docs: replace references to undefined variable 'K' with 'myclock'
Most probably, the original author chose to use 'K' first, switched to
'myclock' later, and forgot to update remaining occurrences of 'K'.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-10 15:02:51 +01:00
Corey Thompson cacba79d49 Initialize floating_geometry on property::border_width signal (FS#826)
Initializing the client property "floating_geometry" on the
property::geometry signal is problematic since this is emitted before
client_set_border_width(), causing the internal client geometry to get
stored and later passed to client:geometry() which assumes it includes
titlebar and borders.

Signed-off-by: Corey Thompson <cmtptr@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-12-09 22:02:45 +01:00
Corey Thompson 7013b9bb70 Bump duplicated commands to the most recent in command prompt history
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-12-05 20:51:45 +01:00
Perry Hargrave adbc736b8a Prevent util.cycle from infinite loop (FS#938)
If the first argument to cycle must be > 1 or else return nil
immediately.

Signed-off-by: Perry Hargrave <resixian@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-11-10 19:42:38 +01:00
Majic 3636b884d3 Private naughty.getIcon() -> public awful.util.geticonpath()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-11-01 19:45:12 +01:00
Massimiliano Brocchini bb3fc70fb3 search in prompt history
Signed-off-by: Massimiliano Brocchini <massimiliano.brocchini@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-25 13:02:52 +02:00
Massimiliano Brocchini bf8e6418f5 no duplicate entries in prompt history
Signed-off-by: Massimiliano Brocchini <massimiliano.brocchini@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-23 17:57:44 +02:00
David Palacio 8fd3182869 Ignore desktop clients on taglist widget
Make the taglist widget skip unstickied and focused desktop clients
for status update by:
 * Ignoring focused client if it is of desktop type
 * Returning a list of clients from tag.clients without clients
   of desktop type.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-04 20:22:31 +02:00
Perry Hargrave 99a16e6467 Update tasklist when client screen changes
This handles corner case where a client has no tags (e.g. stickied), but
is moved across screens.

Signed-off-by: Perry Hargrave <resixian@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-07-08 18:18:38 +02:00
Perry Hargrave 187cf6d917 movetoscreen:Dont refocus the selected client
Signed-off-by: Perry Hargrave <resixian@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-07-08 18:18:38 +02:00
Perry Hargrave a23817718e FS#917: Dont move clients with fixed positions
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-07-03 10:05:49 +02:00
Perry Hargrave 7c3fb9edb7 awful.client.jumpto: View urgent clients smarter
Only do a tag.viewonly() if the urgent client is not visible.

Further, if the boolean 'merge' parameter is true [default false], then
to a tag.viewmore() with all the currently visible tags.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-05-13 15:14:34 +02:00
Uli Schlachter 30b0f1c654 Fix a minor typos
Thanks to anrxc for noticing the graph one.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-05-07 16:05:05 +02:00
Uli Schlachter 941658735d awful.autofocus: Also react on "tagged" signal (FS#883)
Apparently some people start a timer, switch to an empty tag and then let the
timer move a client to that empty tag. This change makes sure that this new
client will get the input focus in this case.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-16 16:02:15 +02:00
Julien Danjou 6c6e3a22f8 awful.rules: fix typo in example
Signed-off-by: Julien Danjou <julien@danjou.info>
2011-03-29 09:37:17 +02:00
Anurag Priyam 55f5ba6911 rules: allow defining exceptions to a rule - except, and except_any
So you want to make all Firefox windows floating except the main window
(instance = Navigator). You can either list all possible windows in
rules and make them floating, or make all of them floating except one:

{ rule = { class = "Firefox" },
  except = { instance = "Navigator" },
  properties = {floating = true},
}

More examples in the docs.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-29 09:26:18 +02:00
Gregor Best 44b8549770 awful.mouse: fix interclient border snapping
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-28 12:26:42 +02:00
Gregor Best 35a5a74744 awful.mouse: fix client snapping
Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-21 07:38:53 +01:00
Andres Freund 3f40feb3c4 Correct typo in awful.client.restore
This corrects a type in awful.client.restore which caused it not to restore any
client at all  if all clients are minimized.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-02 18:54:39 +01:00
Uli Schlachter b2e2959be8 awful.placement.no_overlap: Honor original position
awful.placement.no_overlap caused clients on an otherwise empty desktop to stich
to the top-left corner of the screen because it always preferred the top-left
corner of the available space.

This commit doesn't change the way in which the available area is computed, but
instead this now tries to keep the client at its original position if that is
available.

This fixes cases where calling awful.placement.no_overlap as a callback from an
awful.rule rule didn't work because the manage signal in the default config
later overrode that via calling awful.placement.no_overlap.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-01 17:55:56 +01:00
Uli Schlachter 2963a32d44 Add awful.client.restore()
This restores the first minimized client it finds on the selected tags.

Optionally, this function accepts a screen number as its first argument.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-19 22:28:36 +01:00
Uli Schlachter 64bb0bea08 tasklist: Update when a c.minimized changes
This fixes a bug where the tasklist would still show its old content after a
client was minimized/unminized because it didn't connect to the appropriate
signal.

This wasn't noticed before, because in most cases minimizing a client also
unfocuses this client which causes a tasklist update.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-19 22:28:14 +01:00
Uli Schlachter f6907e1296 awful.client.floating.toggle: Fix for dialogs
awful.client.floating.get() does some sensible defaults. E.g. dialogs are
floating by default. Since floating.toggle only checked the property, these
defaults made it break.

So floating.toggle() should use floating.get to decide if a given client is
floating. It should also use "false" instead of "nil" when the client is made
non-floating or else the default will apply again.

Thanks to vsp for making me figure this out. :)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-02-10 23:05:44 +01:00
Uli Schlachter 23ff7a8414 Don't focus a different screen on unmanage (FS#850)
When some client on the left monitor was closed while client.focus is on the
right monitor (e.g. 'sleep 5 ; exit' in a terminal), awful.autofocus would shift
the input focus to whatever client happened to be next in the focus history on
the left monitor.

Fix this by only ever moving the input focus between screens when a tag is
selected, not when some client does its magic.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-27 22:27:53 +01:00
Anurag Priyam b805492c2a add usage example for awful.menu
Added a very simple example to show the usage, and applicability of
awful.menu by dynamically constructing a menu of clients that match a
particular rule.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-26 22:10:32 +01:00
Anurag Priyam 41ba50fde2 fix minor grammar, and typo in awful.menu.new's documentation
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-26 22:10:32 +01:00
Anurag Priyam 9c3731c782 add markup to awful.menu.new's documentation
Display the possible keys to the 'menu' params as a bullet list
(unreadable otherwise).

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-26 22:10:32 +01:00
Uli Schlachter 90f0939bee Make awful.client.idx public
The luadoc API documentation already contained this function and it seems to be
useful for user configs.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-03 14:18:58 +01:00
Uli Schlachter 95403b9544 awful.client.setwfact: Handle invisible clients (FS#693)
setwfact() calls idx() on the client that it works on. When idx() is called with
a client that isn't visible, it fails while trying to find outs the client's
index in the current layout.

  event_handle_mousegrabber:119: error running function:
    lib/awful/client.lua:688: attempt to compare nil with number

Fix this by ignoring all clients that aren't visible in setwfact().

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-12-11 14:23:31 +01:00
Julien Danjou b0e8024e47 awful.prompt: add ctrl-backspace
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-10-21 09:05:55 +02:00
Julien Danjou 8805a99f73 awful.tag: do not update history when identical tags
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-10-20 17:30:48 +02:00
Julien Danjou f37d9f5c7c awful.tag: remove useless line
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-10-20 17:00:10 +02:00
Stjujsckij Nickolaj b4cc392e23 Remove last known usage of deprecated in Lua 5.1 `arg`
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-12 18:37:54 +02:00
Stjujsckij Nickolaj 7ef7fe7e03 awful.titlebar: Stop using arg
Implementing vararg functions via arg is deprecated in lua. This kind of thing
should instead be done via "...".

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-12 18:37:54 +02:00
Uli Schlachter f9c2fcacb2 awful.util.join: Stop using arg
Implementing vararg functions via arg is deprecated in lua. This kind of thing
should instead be done via "...".

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-11 17:13:51 +02:00
koniu 02cd1cbda3 awful.completion: callback functions return table of matches
Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-11 15:23:06 +02:00
koniu 595b344156 awful.prompt: add 'autoexec' argument
If set the prompt will execute the command upon completion which returns
only one match.

Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-11 15:23:06 +02:00
Uli Schlachter 9e79d18747 Tasklist: Fail less badly with invalid utf8
xterm is famous for messing up the utf8 in its title (unless correctly
configured).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 18:42:05 +02:00