From ec3788bf7332bcc85dd3e045c6d2fea58ddc703f Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Mon, 8 Mar 2021 15:55:32 +0100 Subject: [PATCH 1/4] docs(g.table): Improve parameter descriptions --- lib/gears/table.lua | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/gears/table.lua b/lib/gears/table.lua index 118971c20..ee35a2d81 100644 --- a/lib/gears/table.lua +++ b/lib/gears/table.lua @@ -230,14 +230,16 @@ end -- `first_index` has to be specified. -- -- @tparam table t The input table. --- @param value A value from the table. --- @tparam[opt=1] number step_size How many element forward (or backward) to pick. --- @tparam[opt=nil] function filter An optional function. When it returns --- `false`, the element are skipped until a match if found. It takes the value --- as its sole parameter. +-- @param value The start value. Must be an element of the input table `t`. +-- @tparam[opt=1] number step_size The amount to increment the index by. +-- When this is negative, the function will cycle through the table backwards. +-- @tparam[opt=nil] function filter An optional filter function. It receives a +-- value from the table as parameter and should return a boolean. If it +-- returns `false`, the value is skipped and `cycle_value` tries the next one. -- @tparam[opt=1] number start_at Where to start the lookup from. --- @return The value. If no element match, then `nil` is returned. --- @treturn number|nil The element (if any) key. +-- @return The next eligible value. If no value matches, `nil` is returned. +-- @treturn number|nil If a value is found, this is its index within the input +-- table. -- @staticfct gears.table.cycle_value function gtable.cycle_value(t, value, step_size, filter, start_at) local k = gtable.hasitem(t, value, true, start_at) From f68939bfc1f8885e269051ed95fd277438f11505 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Mon, 8 Mar 2021 16:03:30 +0100 Subject: [PATCH 2/4] chore(g.table): Add missing modeline --- lib/gears/table.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/gears/table.lua b/lib/gears/table.lua index ee35a2d81..d1f24e953 100644 --- a/lib/gears/table.lua +++ b/lib/gears/table.lua @@ -402,3 +402,5 @@ function gtable.map(f, tbl) end return gtable + +-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 From 8907f5bfbb89156ceef4ec4bd05f35b46b926f61 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 31 Mar 2021 08:17:46 +0200 Subject: [PATCH 3/4] docs(tutorial): Improve instructions to edit theme Fixes #3306. Signed-off-by: Lucas Schwiderski --- docs/07-my-first-awesome.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/07-my-first-awesome.md b/docs/07-my-first-awesome.md index b9113ceba..5b6129a13 100644 --- a/docs/07-my-first-awesome.md +++ b/docs/07-my-first-awesome.md @@ -65,20 +65,18 @@ overview now also provides a cheat sheet for controlling Vim. ## Change the theme -Awesome has four themes you can choose from: *default*, *sky*, *xresources*, and -*zenburn*. +Awesome has four builtin themes you can choose from: *default*, *sky*, +*xresources*, and *zenburn*. -To change the theme, open your rc.lua and edit this line near the beginning of -the file: +To change the theme, open your `rc.lua`, find this line near the beginning of +the file, and change `default` to one of the other values mentioned: beautiful.init(gears.filesystem.get_themes_dir() .. "default/theme.lua") -For this tutorial we will stick with the default theme. - -Now we will customize the theme. Copy -`/usr/share/awesome/themes/default/theme.lua` to `~/.config/awesome/` and change -the above line in your theme like this (remember to replace `USER` with your -user name): +However, for this tutorial we will copy and customize the default theme. +Copy `/usr/share/awesome/themes/default/theme.lua` to `~/.config/awesome/` +and change the line shown above in `rc.lua` like this. Make sure to replace +`USER` with your user name. beautiful.init("/home/USER/.config/awesome/theme.lua") From 112dc8054e6094b61704cea1f28a83ad200a807d Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Wed, 31 Mar 2021 08:22:42 +0200 Subject: [PATCH 4/4] docs(tutorial): Fix line wrap Signed-off-by: Lucas Schwiderski --- docs/07-my-first-awesome.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/07-my-first-awesome.md b/docs/07-my-first-awesome.md index 5b6129a13..e991104a0 100644 --- a/docs/07-my-first-awesome.md +++ b/docs/07-my-first-awesome.md @@ -25,10 +25,10 @@ have not opened any programs. On the top right you see the time/date and a symbol showing the current layout. You can also click on the symbol to change the active layout. -One of the big advantages of Awesome over other tiling window managers is its good -mouse support. Awesome can act as a full floating window manager (almost like -openbox) if you want. For this basic tutorial we will mainly focus on keyboard -control, so let's learn some key bindings now. +One of the big advantages of Awesome over other tiling window managers is its +good mouse support. Awesome can act as a full floating window manager (almost +like openbox) if you want. For this basic tutorial we will mainly focus on +keyboard control, so let's learn some key bindings now. Let's open a terminal: press *Mod4+Enter*. Mod4 is your "Windows key", the key between Ctrl and Alt. You can change the modkey if you want, but we'll get to @@ -87,7 +87,9 @@ this line in your theme file: theme.wallpaper = themes_path.."default/background.png" -The default uses a path relative to `themes_path` by using the `..` operator to join two strings together. To just set it to an absolute path for example, you could do: +The default uses a path relative to `themes_path` by using the `..` operator to +join two strings together. To just set it to an absolute path for example, +you could do: theme.wallpaper = "/usr/share/backgrounds/my-awesome-wallpaper.png"