1
1
-- Grab environment.
2
- local math = math
3
- local tonumber = tonumber
4
- local beautiful = beautiful
5
- local awful = awful
2
+ local tag = require ( " awful.tag " )
3
+ local beautiful = require ( " beautiful " )
4
+ local math = math
5
+ local tonumber = tonumber
6
6
7
7
module (" vain.layout.termfair" )
8
8
9
9
name = " termfair"
10
+
10
11
function arrange (p )
11
12
12
13
-- Layout with fixed number of vertical columns (read from nmaster).
@@ -28,7 +29,7 @@ function arrange(p)
28
29
-- +---+---+---+ +---+---+---+ +---+---+---+
29
30
30
31
-- A useless gap (like the dwm patch) can be defined with
31
- -- beautiful.useless_gap_width .
32
+ -- beautiful.useless_gap_width.
32
33
local useless_gap = tonumber (beautiful .useless_gap_width )
33
34
if useless_gap == nil
34
35
then
@@ -40,14 +41,14 @@ function arrange(p)
40
41
local cls = p .clients
41
42
42
43
-- How many vertical columns? Read from nmaster on the tag.
43
- local t = awful . tag .selected (p .screen )
44
- local num_x = awful . tag .getnmaster (t )
44
+ local t = tag .selected (p .screen )
45
+ local num_x = tag .getnmaster (t )
45
46
46
47
-- Do at least "desired_y" rows. Read this from ncol. (Yes, I use a
47
48
-- *column* setting to set the number of *rows*. That's because
48
49
-- num_x is the *master* setting -- it's the setting that's most
49
50
-- important to me.)
50
- local desired_y = awful . tag .getncol (t )
51
+ local desired_y = tag .getncol (t )
51
52
52
53
if # cls > 0
53
54
then
0 commit comments