All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
6 First, require it like this:
8 local markup = lain.util.markup
10 then you can call its functions:
15 |`-- italic() Set italicized text.
16 |`-- strike() Set strikethrough text.
17 |`-- underline() Set underlined text.
18 |`-- monospace() Set monospaced text.
19 |`-- big() Set bigger text.
20 |`-- small() Set smaller text.
21 |`-- font() Set the font of the text.
25 | |`-- color() Set background color.
26 | |`-- focus() Set focus background color.
27 | |`-- normal() Set normal background color.
28 | `-- urgent() Set urgent background color.
32 | |`-- color() Set foreground color.
33 | |`-- focus() Set focus foreground color.
34 | |`-- normal() Set normal foreground color.
35 | `-- urgent() Set urgent foreground color.
37 |`-- focus() Set both foreground and background focus colors.
38 |`-- normal() Set both foreground and background normal colors.
39 `-- urgent() Set both foreground and background urgent colors.
41 they all take one argument, which is the text to markup, except `fg.color` and `bg.color`:
43 markup.fg.color(text, color)
44 markup.bg.color(text, color)
56 If you delete a tag, any rule set on it shall be broken, so be careful.
58 Use it with key bindings like these:
60 awful.key({ modkey, "Shift" }, "n", function () lain.util.add_tag(mypromptbox) end),
61 awful.key({ modkey, "Shift" }, "r", function () lain.util.rename_tag(mypromptbox) end),
62 awful.key({ modkey, "Shift" }, "Left", function () lain.util.move_tag(1) end), -- move to next tag
63 awful.key({ modkey, "Shift" }, "Right", function () lain.util.move_tag(-1) end), -- move to previous tag
64 awful.key({ modkey, "Shift" }, "d", function () lain.util.remove_tag() end),
66 **Note** that these function won't work properly with [Copland theme](https://github.com/copycat-killer/awesome-copycats) or any other configuration that already uses a dynamic tagging module like [Eminent](https://github.com/copycat-killer/awesome-copycats/tree/master/eminent).
71 Changes `beautiful.useless_gaps_width` on the fly.
73 The function takes an integer argument, being the amount of pixel to add/remove to gaps.
75 You could use it with these keybindings:
77 -- On the fly useless gaps change
78 awful.key({ altkey, "Control" }, "+", function () lain.util.useless_gaps_resize(1) end),
79 awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end),
81 where `altkey=Mod1`, or you could use it like this:
83 mywidget:buttons(awful.util.table.join (
84 awful.button({}, 4, function() lain.util.useless_gaps_resize(-1) end),
85 awful.button({}, 5, function() lain.util.useless_gaps_resize(1) end)
89 so when hovering the mouse over `mywidget`, you can adjust useless gaps size by scrolling with the mouse wheel.
94 This function lets you jump to the next/previous non-empty tag.
95 It takes two arguments:
97 * `direction`: `1` for next non-empty tag, `-1` for previous.
98 * `sc`: Screen which the taglist is in. Default is `mouse.screen` or `1`. This
101 You can use it with key bindings like these:
103 -- Non-empty tag browsing
104 awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end),
105 awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end),
107 where `altkey = "Mod1"`.
109 menu\_clients\_current\_tags
110 ----------------------------
112 Similar to `awful.menu.clients`, but this menu only shows the clients
113 of currently visible tags. Use it with a key binding like this:
115 awful.key({ "Mod1" }, "Tab",
117 awful.menu.menu_keys.down = { "Down", "Alt_L", "Tab", "j" }
118 awful.menu.menu_keys.up = { "Up", "k" }
119 lain.util.menu_clients_current_tags({ width = 350 }, { keygrabber = true })
125 Set a client to floating and resize it in the same way the "magnifier"
126 layout does it. Place it on the "current" screen (derived from the mouse
127 position). This allows you to magnify any client you wish, regardless of
128 the currently used layout. Use it with a client keybinding like this:
130 clientkeys = awful.util.table.join(
132 awful.key({ modkey, "Control" }, "m", lain.util.magnify_client),
136 If you want to "de-magnify" it, just retype the keybinding.
138 niceborder\_{focus, unfocus}
139 ----------------------------
141 By default, your `rc.lua` contains something like this:
143 client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
144 client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
146 You can change it to this:
148 client.connect_signal("focus", lain.util.niceborder_focus(c))
149 client.connect_signal("unfocus", lain.util.niceborder_unfocus(c))
151 Now, when a client is focused or unfocused, Awesome will look up its
152 nice value in `/proc/<pid>/stat`. If it's less than 0, the client is
153 classified as "high priority"; if it's greater than 0, the client is
154 classified as "low priority". If it's equal to 0, nothing special
157 This requires to define additional colors in your `theme.lua`. For example:
159 theme.border_focus_highprio = "#FF0000"
160 theme.border_normal_highprio = "#A03333"
162 theme.border_focus_lowprio = "#3333FF"
163 theme.border_normal_lowprio = "#333366"