Commit Graph

663 Commits

Author SHA1 Message Date
Alexander Yakushev ed444f9b1a awful.prompt: Move update() out of the keygrabber.run callback
It is required to be able to call the update() function from any point
of the keygrabber.run callback.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-05 16:03:22 +01:00
Anurag Priyam 3a44fa578e awful.prompt: remove superfluous return true from keygrabber's callback
Returning true from the callback to `keygrabber` is no longer necessary to
continue grabbing the keyboard.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-04 11:40:48 +01:00
Anurag Priyam 8034e2a5d8 awful.menu: remove superfluous return true from keygrabber's callback
Returning true from the callback to `keygrabber` is no longer necessary to
continue grabbing the keyboard.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-04 10:47:59 +01:00
Uli Schlachter 4f2156299f awful.prompt: Properly stop keygrabber (FS#965)
This was broken since 014d191f66 (which made this kind of stuff mandatory,
because 'return false' is ignored now).  Whoops.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-04 10:41:25 +01:00
Ignas Anikevicius (gns_ank) 5f8f245ab6 ewmh.lua: Fix the screen_change function
Fix this function so that it respects the recent changes in the ewmh.lua
code. It also incorporates some additional logic to respect the
border-width.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-03 11:45:13 +01:00
Ignas Anikevicius (gns_ank) 524a0c1b35 ewmh.lua: Account for the border-width
Previously we were not taking into account the border-width of the
client which we ought to as otherwise the client goes of the screen by
several pixels. It's slightly more ugly when we have several screens
connected.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-02 10:21:24 +01:00
Ignas Anikevicius (gns_ank) e37efaeb8a awful: ewmh.lua Fix unmaximization (#964)
This makes awful not to overwrite the saved geometry by just storing the
two geometries in separate places.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-01 17:10:13 +01:00
Anurag Priyam 1e4bf83d3b awful.menu: always enable keyboard navigation
I don't see why people would not want keyboard-enabled-menu by default.
Without it, you can't even use 'Escape' to quit the menu or press 'Enter' to
execute an entry.  But instead of just enabling keyboard support by default, we
remove the option of disabling keyboard support altogether, which also
simplifies the implementation a bit.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-01 17:03:47 +01:00
Anurag Priyam 0d41d98468 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:20:31 +01:00
Anurag Priyam 740ec07033 add awful.util.table.cycle
add awful.util.table.cycle to iterate through elements that match 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).

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-17 16:17:45 +01:00
Arvydas Sidorenko e052bd99b0 oocairo.image_surface_create_from_png TO awesome.load_image
Replaced all references to image_surface_create_from_png to
awesome.load_image

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-29 16:18:18 +01:00
Anurag Priyam c6e92081e2 awful.placement: can now operate on any object with a set geometry
So the utility of `awful.placement` is not merely limited to client objects,
but also to wiboxes.

[us: use appropriate naming convention; catch misplaced statement]

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-15 18:04:19 +01:00
Anurag Priyam 7f8ef18cd8 awful.screen: define getbycoord() to compute screen number of a pixel
Given an object's coordinates, `awful.screen.getbycoord` can be used to
determine the screen than the object is, or should be attached to.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-15 16:52:19 +01:00
Anurag Priyam 9793ec0b71 do not set non existent, screen property on wiboxes
The `screen` property on wibox (drawin) was removed in the commit - 'drawin:
Remove screen property'.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-15 16:52:12 +01:00
Anurag Priyam 902db9a73d tasklist: indicate sticky clients with a solid square as the default
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-13 20:07:52 +01:00
Anurag Priyam 6121db9a13 tasklist: allow 'symbols' used to mark certain client properties to be themed
Symbols (or, visual hints) used to indicate that a client is: 'ontop' or
'floating' or 'maximized_horizontal' or 'maximized_vertical', can now be
defined in the theme, or passed to awful.widget.tasklist() as the last, 'style'
argument (see docs).

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-13 20:07:52 +01:00
Axel Beckert 4d69dba412 awful.tag.inc*: properly pass tag parameter to set*
Signed-off-by: Julien Danjou <julien@danjou.info>
2012-01-11 10:42:11 +01:00
Anurag Priyam ba7f7c4488 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:35 +01:00
Uli Schlachter e38c52349a awful.menu: Place submenus on the correct height
Before this commit, a submenu was border_width pixels lower than its parent menu
entry. Fix this by not adding the border_width to the submenu's position.

We still have to add the border_width to the parent menu's width so that the
border of the submenu entry doesn't overlap the content of its parent menu (the
borders of the two menus do overlap!).

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-12-15 21:28:58 +01:00
Corey Thompson 8c62698bf6 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:03:10 +01:00
Corey Thompson 47238fe6cf Bump duplicated commands to the most recent in command prompt history
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-12-05 20:51:48 +01:00
Perry Hargrave c3174f4581 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:43:17 +01:00
Majic 75ad861c7a Private naughty.getIcon() -> public awful.util.geticonpath()
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-11-01 19:45:17 +01:00
Massimiliano Brocchini 6b8357989e 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:58 +02:00
Massimiliano Brocchini 48e2f41e3b 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:51 +02:00
Ignas Anikevicius (gns_ank) 0b689058f3 Adding {fg,bg}_normal to prevent text overlapping
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-19 17:23:09 +02:00
Uli Schlachter ed022e6764 tag.withcurrent(): Also tag sticky clients (FS#934)
Tagging sticky clients shouldn't hurt anything, but it helps a lot if the client
later becomes unsticky. I'd have no tags in that case.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-19 16:34:15 +02:00
Uli Schlachter 7a6d49999a ta{g,sk}list: Cache widgets again
Instead of re-creating all the widgets for the list entries on each update, this
code now caches its widgets again and only creates new widgets when a new
client/tag appears.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-04 13:55:59 +02:00
Gregor Best c2ea920ca0 remove encoding=utf-8 from modelines
This option is no longer valid in modelines, so it has been removed from
all modelines using the following shellscript:

    #!/bin/ksh

    git ls-tree -r HEAD | cut -f2 | while read f; do
        egrep -e '^(//|--) vim: .*encoding=' $f >/dev/null || continue
        sed -E -e '/^(\/\/|--) vim:/s/:encoding=utf-8//' $f > /tmp/foo
        mv /tmp/foo $f
    done

Signed-off-by: Gregor Best <gbe@ring0.de>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-11 17:34:09 +02:00
Perry Hargrave f882477269 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:23:02 +02:00
Perry Hargrave 11487b84f0 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:23:02 +02:00
Perry Hargrave 45576b6c6f FS#917: Dont move clients with fixed positions
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-07-03 10:06:29 +02:00
dodo d0a33a38a7 aweful.menu: unicode submenu icon
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-05-18 20:25:31 +02:00
Perry Hargrave c606bc36a8 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:38 +02:00
Uli Schlachter bc116c6ef1 Fix two minor typos
Thanks to anrxc for noticing the graph one.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-05-07 16:04:04 +02:00
dodo a1941efc9c awful.menu: Callable submenu item
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-05-02 19:27:07 +02:00
Uli Schlachter 82921ef57b Correctly position wiboxes (FS#892)
Let's just quote the bug report:

A regression was introduced in commit f5a5af4001
which causes wiboxes to position themselves incorrectly on Xinerama screens
besides the first one. In lib/awful/wibox.lua.in line 49, function
set_position(), the screen number used to use wibox.screen but now just defaults
to 1. Since the screen parameter is never actually passed to set_position(),
that means that wiboxes will always use screen 1's geometry when determining the
proper position. So, if a different screen is larger or smaller or isn't aligned
with the primary screen, the wibox will either be offscreen or not on the edge.

This should be fixed by explicitly passing the right screen argument to all
functions which need it.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-30 17:13:56 +02:00
Uli Schlachter 14504de220 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:00:35 +02:00
dodo b530da1861 add set_font to wibox.widget.textbox
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-14 22:37:44 +02:00
Uli Schlachter 9f8af0ae6d awful.wibox: Fix some flickering
The menu was first made visible and then placed correctly. This caused a short,
black flicker in the top, left corner of the screen.

Fix this by removing a too early "visible = true".

This was introduced by me in 4d280365ad, sorry.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-04-02 17:26:52 +02:00
Uli Schlachter 4d280365ad awful.menu: Stop using the removed "screen" key
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-31 12:36:32 +02:00
dodo 3a4761732c awful.menu: handling with strings
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-31 12:28:51 +02:00
dodo ea40a922ed awful.menu: rewrite
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-31 12:28:45 +02:00
Julien Danjou 52dfb76819 awful.rules: fix typo in example
Signed-off-by: Julien Danjou <julien@danjou.info>
2011-03-29 09:37:30 +02:00
Anurag Priyam 448583e87c 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:24 +02:00
Gregor Best 33e88ea8d4 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:27:09 +02:00
Uli Schlachter 646eaad18e awful.menu: Fix for removal of screen property
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-27 16:36:20 +02:00
Uli Schlachter f5a5af4001 awful.wibox: Fix for removal of screen property
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-27 16:35:15 +02:00
Gregor Best 07e63bd564 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:44 +01:00
Uli Schlachter e59f17357d tasklist/taglist: Handle invalid text better
When some client sets an invalid window title, a lua error was generated while
updating the tasklist. This caused all later tasklist entries to be skipped /
missing and the last entry to be empty.

Fix this by catching lua errors with pcall.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-18 17:28:38 +01:00