Commit Graph

1017 Commits

Author SHA1 Message Date
Ignas Anikevicius (gns_ank) 6809f6afcf Menubar: Cleanup the environment grabbing
All of the capi should be in a capi table. This make the code more
consistent. Also, it is not worth importing awful.prompt as a different
variable as it is used only once. Calling it awful.prompt make the code
clearer as there are other variables called prompt.

Signed-off-by: Ignas Anikevicius (gns_ank) <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-05 09:49:56 +02:00
dodo 3901369410 no keygrabber in menubar needed
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-01 14:09:11 +02:00
dodo 200a5272fa use awful.keygrabber in awful.prompt
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-01 14:09:11 +02:00
dodo ac5af147f0 use awful.keygrabber in awful.menu
this makes the use of cur_menu obsolete because now every menu and submenu gets its own keygrabber. there is no need anymore to track the latest opened menu globaly.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-01 14:09:11 +02:00
dodo 56c15da307 awful.keygrabber: capi.keygrabber stack
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-01 14:09:10 +02:00
Alexander Yakushev 394bacacea gears.debug: Print plain non-table values in dump_raw
dump_raw function wasn't printing the plain (non-table) value if the
tag was not specified.

Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-20 22:40:31 +02:00
Uli Schlachter 5c7a3501d0 wibox: Add pseudo-transparency support
If you now set a wibox' background to e.g. "#00000080", the wibox will do fake
transparency and draw the wallpaper as its background.

This should cover 90% of uses of wibox transparency. For the remaining 10% I'll
wait for bug reports. :-)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-07 21:54:51 +02:00
Alexander Yakushev 3ce52aaab2 menubar.utils: Fix generator usage
:lines() generator in parse_dir function was not used properly which
caused problems when using LuaJIT.

Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-07 11:12:44 +02:00
Uli Schlachter 6841999a47 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:21:40 +02:00
Uli Schlachter 819daca18c 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:19:12 +02:00
Anurag Priyam 0cf3da1adc introduce awful.client.run_or_raise
Jump to client if running, else launch it.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-02 14:37:47 +02:00
Anurag Priyam c623734632 rename the iterator methods named cycle to iterate, and prettify luadoc a bit
To avoid collision and confusion with other methods having the same name.  So,

    awful.client.cycle -> awful.client.iterate (renamed)
    awful.util.table.cycle -> awful.util.table.iterate (renamed)

These methods were added in commit "add awful.client.cycle", and "add
awful.util.table.cycle".

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-02 14:37:47 +02:00
Anurag Priyam cca672faa8 awful.client.jumpto: add missing luadoc for the parameter 'c'
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-04-01 21:46:48 +02:00
Alexander Yakushev 067e91e5a8 gears.debug: Add functions for inspecting tables
Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-26 16:34:03 +02:00
Alexander Yakushev 60cf963bce menubar: Introduce menubar extension
Menubar is a dmenu-like applications menu for Awesome

Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-09 13:43:26 +01:00
TsT b5a8936d58 table.foreach is deprecated: now use for + pairs
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-08 15:47:31 +01:00
TsT c33aa4a512 mistake fix: "b" local variable declaration is missing
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-08 15:46:35 +01:00
Anurag Priyam 55cbbac45b introducing awful.client.jumpto
I simply moved out the code to 'jumpto' a client from
`awful.client.urgent.jumpto` into a separate function of its own so that it can
be reused.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-07 13:30:30 +01:00
Alexander Yakushev f9dd1c3389 awful.prompt: Introduce changed_callback and keypressed_callback to prompt.run
changed_callback allows to execute arbitrary code any time the
command string changes.
keypressed_callback allows to intercept keypresses before
awful.prompt.run code handles them and run arbitrary code depending on
the key pressed and modificators.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-03-05 16:04:46 +01:00
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 69a96fc505 gears.color: call the correct creator function in local string_pattern function
The corresponding pattern factory that `string_pattern` delegates to is stored
in the `creator` parameter, and not `v`; probably a typo.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-29 20:58:01 +01:00
Uli Schlachter efee293dd2 wibox: Allow tables as color specification
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-17 17:50:31 +01:00
Uli Schlachter 2216b6a341 gears.color: Add table-based color definitions
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-02-17 17:48:11 +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 54a9ecbd27 gears.color docs: replace literal '<' and '>' with respective HTML entities
Luadoc confuses '<stop>' with an HTML tag otherwise.

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 d3e8dfed2b gears.colors() docs: fix pattern string used in the example
In general, patterns are specified as 'type:arguments', where 'arguments' is
specific to the pattern used.  The example provided in the documentation,
defined the pattern type to be 'linear', but used arguments meant to create
radial pattern.  So we modify the example to use the correct type -- 'radial'.

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 765db33757 gears.color: expose documentation for create_(linear|radial)_pattern functions
The documentation for these functions were hidden (intentionally?) from luadoc
because of misspelt @class and @name tags. Fixed the spelling, so luadoc can do
its job.

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 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 6f61bde6f2 wibox.widget.base.make_widget: Remove outdated cruft
This never should have ended up in git. AFAIR :size() was replaced by :fit()
long, long ago.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-01-04 17:11:06 +01:00
Julien Danjou f2872190d5 naughty: remove score system, merge presets
Scoring is broken, it's more useful to merge all presets, and declares that
order matters.
2011-12-27 11:24:35 +01:00
Uli Schlachter 20cafb4851 drawin: Remove bg_color property
The default background color (None) means that the server will leave the
window's content untouched when an exposure happens. This should get rid of all
cases of "flashing window".

The real background will later be drawn while awesome is handling the expose
event.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-12-23 16:54:55 +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