Commit Graph

1003 Commits

Author SHA1 Message Date
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
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
Uli Schlachter d8f0bd13bf textbox: Actually tell pango which space we have (FS#933)
In the textbox' draw() callback we forgot to set the pango layout's width and
height. Whoops.

This was tested with the following code which makes it visible when the textbox
draws outside of its assigned space:

local w = wibox({ screen = 1 })
w.y = 10
w.x = 10
w.width = 150
w.height = 150
w.visible = true

local wi = wibox.widget.base.make_widget()
local t = wibox.widget.textbox()
t:set_markup("Foo <b>bar</b> <i>Foobar</i> und so weiter")

wi.draw = function(d, wibox, cr, width, height)
	cr:move_to(24.5, 0)
	cr:line_to(24.5, 150)
	cr:move_to(0, 24.5)
	cr:line_to(150, 24.5)
	cr:move_to(124.5, 0)
	cr:line_to(124.5, 150)
	cr:move_to(0, 124.5)
	cr:line_to(150, 124.5)
	cr:set_line_width(1)
	cr:stroke()

	cr:translate(25, 25)
	t.draw(t, wibox, cr, 100, 100)
end
w:set_widget(wi)

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-10-19 19:05:25 +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
Julien Danjou c1d0dee20d naughty: fix image data copy
Signed-off-by: Julien Danjou <julien@danjou.info>
2011-10-04 15:23:27 +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
Uli Schlachter ff646a361a Where's my brown paper bag?
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-08 08:21:36 +02:00
Uli Schlachter f3f01b82d9 naughty: Fix replaces_id
Replacing a popup only worked when it wasn't the newest notification we had. Fix
this to also work if no new notification showed up in between.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-07 21:41:47 +02:00
Uli Schlachter 5accf0014b textbox: Cause less memory allocations
Instead of creating a pango layout all the time (e.g. twice per redraw), we now
only create a single layout which we keep around all the time and update as
needed. Hopefully this helps a little.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-09-07 21:41:32 +02:00
Anurag Priyam d9e4c1e866 naughty: add helper function, toggle() - suspend/resume notifications
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-07-24 19:31:18 +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