Module awful.tag

Useful functions for tag manipulation.

Author:

Julien Danjou <julien@danjou.info>

Copyright© 2008 Julien Danjou

Release: v3.4.5

Functions

attached_add_signal (screen, ...) Add a signal to all attached tag and all tag that will be attached in the future.
getdata (tag) Get tag data table.
geticon (tag, t) Get the tag icon
getmwfact (t) Get master width factor.
getncol (t) Get number of column windows.
getnmaster (t) Get the number of master windows.
getproperty (tag, prop) Get a tag property.
history.restore (screen, idx) Revert tag history.
history.update (obj) Update the tag history.
incmwfact (add, t) Increase master width factor.
incncol (add, t) Increase number of column windows.
incnmaster (add, t) Increase the number of master windows.
new (names, screen, layout) Create a set of tags and attach it to a screen.
selected (s) Return only the first visible tag.
selectedlist (s) Return a table with all visible tags
seticon (icon, tag) Set the tag icon
setmwfact (mwfact, t) Set master width factor.
setncol (ncol, t) Set number of column windows.
setnmaster (nmaster, t) Set the number of master windows.
setproperty (tag, prop, value) Set a tag property.
viewidx (i, screen) View a tag by its taglist index.
viewmore (tags, screen) View only a set of tags.
viewnext (screen) View next tag.
viewnone (screen, Optional) View no tag.
viewonly (t) View only a tag.
viewprev (screen) View previous tag.
viewtoggle (t, tag) Toggle selection of a tag
withcurrent (c, startup) Tag a client with the set of current tags.


Functions

attached_add_signal (screen, ...)
Add a signal to all attached tag and all tag that will be attached in the future. When a tag is detach from the screen, its signal is removed.

Parameters

  • screen: The screen concerned, or all if nil.
  • ...:
getdata (tag)
Get tag data table.

Parameters

  • tag: The Tag.

Return value:

The data table.
geticon (tag, t)
Get the tag icon

Parameters

  • tag:
  • t: the tag
getmwfact (t)
Get master width factor.

Parameters

  • t: Optional tag.
getncol (t)
Get number of column windows.

Parameters

  • t: Optional tag.
getnmaster (t)
Get the number of master windows.

Parameters

  • t: Optional tag.
getproperty (tag, prop)
Get a tag property.

Parameters

  • tag: The tag.
  • prop: The property name.

Return value:

The property.
history.restore (screen, idx)
Revert tag history.

Parameters

  • screen: The screen number.
  • idx: Index in history. Defaults to "previous" which is a special index toggling between last two selected sets of tags. Number (eg 1) will go back to the given index in history.
history.update (obj)
Update the tag history.

Parameters

  • obj: Screen object.
incmwfact (add, t)
Increase master width factor.

Parameters

  • add: Value to add to master width factor.
  • t:
incncol (add, t)
Increase number of column windows.

Parameters

  • add: Value to add to number of column windows.
  • t:
incnmaster (add, t)
Increase the number of master windows.

Parameters

  • add: Value to add to number of master windows.
  • t:
new (names, screen, layout)
Create a set of tags and attach it to a screen.

Parameters

  • names: The tag name, in a table
  • screen: The tag screen, or 1 if not set.
  • layout: The layout or layout table to set for this tags by default.

Return value:

A table with all created tags.
selected (s)
Return only the first visible tag.

Parameters

  • s: Screen number.
selectedlist (s)
Return a table with all visible tags

Parameters

  • s: Screen number.

Return value:

A table with all selected tags.
seticon (icon, tag)
Set the tag icon

Parameters

  • icon: the icon to set, either path or image object
  • tag: the tag
setmwfact (mwfact, t)
Set master width factor.

Parameters

  • mwfact: Master width factor.
  • t:
setncol (ncol, t)
Set number of column windows.

Parameters

  • ncol: The number of column.
  • t:
setnmaster (nmaster, t)
Set the number of master windows.

Parameters

  • nmaster: The number of master windows.
  • t: Optional tag.
setproperty (tag, prop, value)
Set a tag property. This properties are internal to awful. Some are used to draw taglist, or to handle layout, etc.

Parameters

  • tag: The tag.
  • prop: The property name.
  • value: The value.
viewidx (i, screen)
View a tag by its taglist index.

Parameters

  • i: The relative index to see.
  • screen: Optional screen number.
viewmore (tags, screen)
View only a set of tags.

Parameters

  • tags: A table with tags to view only.
  • screen: Optional screen number of the tags.
viewnext (screen)
View next tag. This is the same as tag.viewidx(1).

Parameters

  • screen: The screen number.
viewnone (screen, Optional)
View no tag.

Parameters

  • screen:
  • Optional: screen number.
viewonly (t)
View only a tag.

Parameters

  • t: The tag object.
viewprev (screen)
View previous tag. This is the same a tag.viewidx(-1).

Parameters

  • screen: The screen number.
viewtoggle (t, tag)
Toggle selection of a tag

Parameters

  • t:
  • tag: Tag to be toggled
withcurrent (c, startup)
Tag a client with the set of current tags.

Parameters

  • c: The client to tag.
  • startup: Optional: don't do anything if true.

Valid XHTML 1.0!