Commit Graph

63 Commits

Author SHA1 Message Date
cdump d8a93dafa3 awful.tag: add index property for custom tag order
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-12 15:14:38 +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
dodo 57746d7a62 capi.screen[scr]:tags() doesn't exist anymore
awful.tag.gettags(scr) does now the job

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-26 18:29:30 +02:00
dodo 1e4c14d306 tag.screen doesn't exist anymore
awful.tag.getscreen(tag) returns now the tag's screen index

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-26 18:28:52 +02: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 9c9b2b52b0 awful.tag.attached_connect_signal: Simplify
Signals are emitted on individual objects and on the class for a while now. This
can be used to simplify this function a lot.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-10-20 22:54:20 +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
Felix Bier fa36bd0a59 tag.viewidx should take a screen index
This makes tag.viewidx take a screen index rather than a screen object,
complying with its doc string. This fixes #963.

Signed-off-by: Felix Bier <flx.bier@googlemail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-07-01 17:18:54 +02:00
Arvydas Sidorenko 61ff9ce2b7 Ported awful 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
Arvydas Sidorenko 758c4d4972 Splashes aren't all that special (placement-wise)
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2012-05-25 15:28:32 +02: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
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
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
Julien Danjou 016b76e7bb awful.tag: do not update history when identical tags
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-10-20 17:30:57 +02:00
Julien Danjou e2083050d4 awful.tag: remove useless line
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-10-20 17:00:14 +02:00
Julien Danjou c38e326242 Revert "tag.lua: check name argument to add() is valid"
This reverts commit 6cb61939c4.
2010-09-08 10:18:21 +02:00
Uli Schlachter 3bdd4793d7 awful.tag: Add property::icon
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-26 18:11:13 +02:00
Uli Schlachter ab4c151ed8 Add signals before using them
This commit makes it an error if an unknown signal is connected, disconnected or
emitted. All signals have to be added before they can be used.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-25 23:00:36 +02:00
Julien Danjou 6d332f07a0 lua{class,object}: rename signals functions
I knew this was wrong at the beginning, f*ck.

Signed-off-by: Julien Danjou <julien@danjou.info>
2010-08-25 20:28:20 +02:00
Ignas Anikevicius (gns_ank) e6a2bf7220 Functionality for deleting a tag using awful.tag.
tag.delete(t, fb):
    Delete tags if certain criteria are met:
        - There are no clients assigned exclusively to this tag.
        - Stickied clients have somewhere to go, 'fb' the fallback tag

    If after deleting there is no tag selected then try and
    history.restore() or select the first tag on the screen.

    Return true if successful and nil otherwise.

Signed-off-by: Perry Hargrave <perry.hargrave@gmail.com>
Signed-off-by: Ignas Anikevicius <anikevicius@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2010-08-02 22:05:58 +02:00
Julien Danjou e4c8c11564 Fix missing tostring
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-06-01 11:43:45 +02:00
Perry Hargrave 6cb61939c4 tag.lua: check name argument to add() is valid
Signed-off-by: Perry Hargrave <perry.hargrave@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-06-01 10:31:24 +02:00
Perry Hargrave 2f3f84c994 tag.lua: add() create tags with full table of properties
tag.add(name, props):
    make tags and pass a table of properties to apply to it

tag.new:
    modified to use add() instead of calling capi.tag

Signed-off-by: Perry Hargrave <perry.hargrave@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-29 11:22:27 +02:00
Perry Hargrave 77e39a5f07 tag.lua: getidx() returns index of tag
tag.getidx(t):
    Return the index of 't' in the screen[]:tags() table. Return 'nil'
    if 't' is not found.

Signed-off-by: Perry Hargrave <perry.hargrave@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-29 11:07:25 +02:00
Perry Hargrave 7b60f84fd0 tag.lua: move() re-index tags
tag.move(i, t):
    move tag 't', or tag.selected(), to index 'i' in the current
    screen's tags table.

Signed-off-by: Perry Hargrave <perry.hargrave@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-05-29 11:05:36 +02:00
koniu 5b8acee224 awful.tag: register 'withcurrent' explicitly
This explicitly registers withcurrent(c) as a manage signal handler so
that it can be removed if necessary.

Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2010-01-08 19:11:29 +01:00
Julien Danjou 7f7ffca497 awful.tag: fix new when layout is nil
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-26 11:11:17 +01:00
Zsolt Udvari eb7ae0fb20 awful.tag: allow table as layout argument (FS#670)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-26 10:58:39 +01:00
Julien Danjou 9166584b96 awful.tag: fix view{only,more}
Now they do not select multiple tags at once, and they do not flicker.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-28 11:24:39 +02:00
koniu 52c4461169 awful.tag: fix typo in viewmore
Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-28 10:14:36 +02:00
Gregor Best ae0bf17af2 awful.tag: fix screen in viewonly
Signed-off-by: Gregor Best <gbe@intepi.net>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-22 16:33:53 +02:00
Julien Danjou 7c5ba1fcef awful.tag: filter out window before switching screens (FS#633)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-22 16:09:44 +02:00
Julien Danjou d4e6411971 awful.tag: make viewmore smarter
This avoids flickering.

Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-22 15:11:40 +02:00
Julien Danjou 743603d24d awful.tag: make viewonly more smart (FS#634)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-22 14:09:56 +02:00
Julien Danjou f347876af4 awful.tag: fix client auto-tag on startup (FS#618)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-22 11:57:40 +02:00
Julien Danjou c0cb4203a9 awful.tag: fix withcurrent screen choice (FS#616)
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-08 16:41:23 +02:00
Sébastien Gross 4a7dba0198 tag.lua: fix new client screen
Prevent from blinking the first screen in multiheads by using
the mouse-focused screen tag list for a new client instead of
screen 1.

Signed-off-by: Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-04 13:40:12 +02:00
koniu 8ff69e3529 awful.tag: add viewtoggle function
Helper function to toggle tag selection whilst updating history.

Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-31 10:44:34 +02:00
koniu 529502ffbf awful.tag: fix and improve tag history
This fixes a long standing tag history breakage. To store history
of tag switching we rely on a special signal "tag::history::update"
which needs to be emitted by any function which deals with tag
selection.

History is multi-level with a configurable limit:
awful.tag.history.limit = 20 (by default).

awful.tag.history.restore function gets a new argument 'idx' which can
be either 'previous' (default) which will revert to the previously
selected set of tags, or a numerical index in the tag history table.

Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-31 10:44:33 +02:00
Julien Danjou f04ba72908 awful.tag: enhance description
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-28 15:40:01 +02:00
Gregor Best df07681109 awful.tag: fix viewidx()
Signed-off-by: Gregor Best <gbe@intepi.net>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-25 14:49:53 +02:00
Julien Danjou e293a69982 screen: move the tagging on screen change to Lua
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-24 16:32:19 +02:00
Julien Danjou e298353583 awful.tag: view{next,prev} take screen as argument
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-24 08:31:44 +02:00
Julien Danjou a800696a65 awful.tag: add a new() helper function
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:50:01 +02:00
Julien Danjou 121a229492 awful.tag: add attached_add_signal()
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:48 +02:00
Julien Danjou 65825bdd22 awful: move hooks to signals
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou 7954f19417 client: emit signal on manage
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-21 15:30:47 +02:00
Julien Danjou 24ca38f751 awful.tag: do not use arrange hooks
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-10 11:43:41 +02:00
Julien Danjou ef2b18949c awful.tag: call property hooks on properties changes
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-10 11:43:08 +02:00
koniu 3c08a7621b awful.tag: viewidx ignores hidden tags
This prevents viewprev/viewnext from cycling to tags not shown in the
taglist.

Signed-off-by: koniu <gkusnierz@gmail.com>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-06-05 14:45:04 +02:00