doc: porting guide corrections, addition, and cleanup (#1486)
- added note that `awesome.quit` must be wrapped in an anonymous function when used as a menu command. - corrected tasklist diff to include missing lines from rc.lua. the porting guide code doesn't make much sense otherwise. - cleaned up diff columns on a couple other code blocks. Signed-off-by: Justin Charette <charetjc@gmail.com>
This commit is contained in:
parent
a1a5e18b62
commit
420f672661
|
@ -94,6 +94,19 @@ work. Remove this section.
|
||||||
- end
|
- end
|
||||||
--- }}}
|
--- }}}
|
||||||
|
|
||||||
|
The `quit` menu command must be wrapped in a function, otherwise an error
|
||||||
|
occurs due to mismatched argument types from the v4.0 `awful.menu` library.
|
||||||
|
|
||||||
|
-- {{{ Menu
|
||||||
|
-- Create a laucher widget and a main menu
|
||||||
|
myawesomemenu = {
|
||||||
|
{ "manual", terminal .. " -e man awesome" },
|
||||||
|
{ "edit config", editor_cmd .. " " .. awesome.conffile },
|
||||||
|
{ "restart", awesome.restart },
|
||||||
|
- { "quit", awesome.quit }
|
||||||
|
+ { "quit", function() awesome.quit() end}
|
||||||
|
}
|
||||||
|
|
||||||
The textclock is now part of the `wibox` library, rename it.
|
The textclock is now part of the `wibox` library, rename it.
|
||||||
|
|
||||||
-- {{{ Wibar
|
-- {{{ Wibar
|
||||||
|
@ -105,7 +118,7 @@ The textclock is now part of the `wibox` library, rename it.
|
||||||
Widgets were previously added to static global tables. This isn't going to
|
Widgets were previously added to static global tables. This isn't going to
|
||||||
behave correctly when screen are added and removed. Remove this section.
|
behave correctly when screen are added and removed. Remove this section.
|
||||||
|
|
||||||
-- Create a wibox for each screen and add it
|
--- Create a wibox for each screen and add it
|
||||||
-mywibox = {}
|
-mywibox = {}
|
||||||
-mypromptbox = {}
|
-mypromptbox = {}
|
||||||
-mylayoutbox = {}
|
-mylayoutbox = {}
|
||||||
|
@ -143,6 +156,7 @@ they are still supported, but will be removed in the next release.
|
||||||
awful.button({ }, 1, function (c)
|
awful.button({ }, 1, function (c)
|
||||||
if c == `client.focus` then
|
if c == `client.focus` then
|
||||||
c.minimized = true
|
c.minimized = true
|
||||||
|
else
|
||||||
-- Without this, the following
|
-- Without this, the following
|
||||||
-- :isvisible() makes no sense
|
-- :isvisible() makes no sense
|
||||||
c.minimized = false
|
c.minimized = false
|
||||||
|
@ -153,6 +167,7 @@ they are still supported, but will be removed in the next release.
|
||||||
end
|
end
|
||||||
-- This will also un-minimize
|
-- This will also un-minimize
|
||||||
-- the client, if needed
|
-- the client, if needed
|
||||||
|
`client.focus` = c
|
||||||
c:raise()
|
c:raise()
|
||||||
end
|
end
|
||||||
end),
|
end),
|
||||||
|
|
Loading…
Reference in New Issue