Commit Graph

139 Commits

Author SHA1 Message Date
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 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
Uli Schlachter 8348d44444 Tags: Remove screen property
A tag's screen is now implemented purely in lua and it is no longer C's
business.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-23 10:05:34 +02:00
Uli Schlachter 2ada67b730 Added a functions for getting all tags on a screen
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-20 22:54:20 +02:00
Uli Schlachter ce9932f17f Fix various minor errors after the lua 5.2 conversion
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 21:12:26 +02:00
Arvydas Sidorenko ce19cabae3 Fixed bug with global `tags` in rc.lua
awful.wibox.tasklist was overwritting `tags` variable breaking all the
functionality which uses it.

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko c3ebfd99fc Ported awful.widget to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-16 17:37:30 +02:00
Arvydas Sidorenko 4e67027a97 Ported wibox.layout to lua 5.2
Tested with lua 5.1: all good

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
2012-06-16 17:37:30 +02:00
Uli Schlachter f702c4ea04 Simplify the graph drawing code
Instead of having to handle the border width all the time, let's make cairo
worry about that.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-13 18:06:05 +02:00
Uli Schlachter 7a1acd4a98 awful.widget.graph: Various minor fixes
For example, the rightmost pixel of a border-less graph wasn't draw and all
drawing was shifted one pixel to the left.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-13 17:59:07 +02:00
dodo cafd28027f awful.widget.graph: don't draw bg color over fg color
behavior before: draw fg color everywhere and draw each value inverted as bg color.
if not enough values available "remove" the free area (draw a big rectangle with bg color over it).

behavior now: draw each value onto background as fg stroke.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-06-13 17:24:58 +02:00
Uli Schlachter 4f30dfd198 Switch from oocairo to lgi.cairo
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-27 19:20:34 +02:00
Felix Bier 4170c77a08 Return condition value instead of conditional true/false
Signed-off-by: Felix Bier <flx.bier@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-13 10:49:10 +02:00
Felix 1a91fd64b9 Return condition value instead of conditional true/false
Patterns like

if condition then
  return true
else
  return false
end

could be simplified to

return condition

Signed-off-by: Felix <flx.bier@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-12 10:38:38 +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
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
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 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
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 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
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
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
dodo 5d9fa5614e display ontop mode for clients in awful.widget.tasklist
Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-03-08 19:40:42 +01:00
Uli Schlachter 9d0cf27593 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 21:42:39 +01:00
Uli Schlachter 40958f9d21 Use ._NAME for identifying oocairo surfaces
image:type() was removed from oocairo, because the ._NAME property already
exists and there's no need for two functions doing the same job.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2011-01-21 19:54:27 +01:00
Danny Navarro a44439a6c0 Add awful.widget.tasklist.filter.minimizedcurrenttags
Added function to show only minimized clients in the taskbar for the
 current tag.

 Signed-off-by: Danny Navarro <j@dannynavarro.net>

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-17 15:45:56 +02:00
Uli Schlachter 8712be7265 awful.widget.prompt: Fix error display
This has to use :set_text() now.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-14 21:17:02 +02:00
Uli Schlachter 38d4602425 margin: Accept individual margins
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-08 17:22:00 +02:00
Uli Schlachter 2ca25128a5 Remove outdate require("awful.widget.layout")
The file isn't present any more and it's not needed anyway.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 21:46:52 +02:00
Uli Schlachter 650b3d6df5 Progressbar: Fix border
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 13:52:32 +02:00
Uli Schlachter 734973c60c Graph: Fix border and geometry
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 13:50:44 +02:00
Uli Schlachter 9d4e5d31bf awful.widget.layout: Remove
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-07 11:07:25 +02:00
Uli Schlachter 27d448bc97 awful.widget.common: Add background to the icon
The icon should get the same background everything else gets. Fix this by making
the background the outer-most widget in each item.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 18:45:50 +02:00
Uli Schlachter 661a8a7b38 Some more minor fixes, make "strict" happy
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 16:27:38 +02:00
Uli Schlachter c271ed7b13 tasklist: Use a fixed layout
We need a fixed layout here to make tag names like "media" work. Without this,
every take would get the same space, no matter how long its name is.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 15:48:50 +02:00
Uli Schlachter b55dc20319 awful.widget.textclock: Port to new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 14:30:45 +02:00
Uli Schlachter 0cb3569e3e awful.widget.layoutbox: Port to new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 14:30:00 +02:00
Uli Schlachter 3b9150f05a awful.widget.button: Port to new widget layout
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 14:28:43 +02:00
Uli Schlachter 1b134b2361 lua.widget.prompt: Port to new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 14:27:16 +02:00
Uli Schlachter bf23ebdf46 graph,progressbar: Port to new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 14:25:59 +02:00
Uli Schlachter 97ed5e70b8 {task,tag}list: Port to new widget system
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-10-06 14:23:36 +02:00
Uli Schlachter c8b93cec76 progressbar: Remove gradients
gears.color can do the same in better and they are currently broken anyway.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-29 19:26:23 +02:00
Uli Schlachter d8dce35269 progressbar: Port to oocairo
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-29 19:24:36 +02:00
Uli Schlachter 048064b8ef graph: Remove gradients
They can and should now be done via gears.color instead. It was porting ever
since this was ported to oocairo anyway...

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-29 19:02:03 +02:00
Uli Schlachter 6375ce4175 graph: Port to oocairo
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-29 18:57:52 +02:00
Uli Schlachter fce09d4d42 tasklist: Remove unused local variables
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-09-29 16:18:21 +02:00