Skip to content
This repository was archived by the owner on Dec 31, 2019. It is now read-only.

Commit 904f7f1

Browse files
author
luke bonham
committed
first commit
1 parent a833431 commit 904f7f1

39 files changed

+447
-168
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,9 @@ windows are opened! Thus, I suggest you use
448448
-- ...
449449
)
450450

451+
--> If you do this, you might want to change Standard program section (modkey
452+
-> altkey)
453+
451454
Useless gaps
452455
------------
453456

vain/init.lua init.lua

File renamed without changes.

vain/layout/browse.lua layout/browse.lua

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
-- Grab environment.
2-
local ipairs = ipairs
3-
local tonumber = tonumber
4-
local beautiful = beautiful
5-
local awful = awful
6-
local math = math
2+
local awful = require("awful")
3+
local beautiful = require("beautiful")
4+
local ipairs = ipairs
5+
local tonumber = tonumber
6+
local math = math
77

88
module("vain.layout.browse")
99

1010
extra_padding = 0
1111

1212
name = "browse"
13+
1314
function arrange(p)
1415

1516
-- Layout with one fixed column meant for the browser window. Its
@@ -26,7 +27,7 @@ function arrange(p)
2627
-- +-----+---+ +-----+---+ +-----+---+ +-----+---+
2728

2829
-- A useless gap (like the dwm patch) can be defined with
29-
-- beautiful.useless_gap_width .
30+
-- beautiful.useless_gap_width.
3031
local useless_gap = tonumber(beautiful.useless_gap_width)
3132
if useless_gap == nil
3233
then

vain/layout/cascade.lua layout/cascade.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
-- Grab environment.
2-
local awful = awful
2+
local awful = require("awful")
33

44
module("vain.layout.cascade")
55

66
cascade_offset_x = 32
77
cascade_offset_y = 8
88

99
name = "cascade"
10+
1011
function arrange(p)
1112

1213
-- Cascade windows, just like the cascade layout for gimp.

vain/layout/cascadebrowse.lua layout/cascadebrowse.lua

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
-- Grab environment.
2-
local ipairs = ipairs
3-
local tonumber = tonumber
4-
local beautiful = beautiful
5-
local awful = awful
6-
local print = print
2+
local awful = require("awful")
3+
local beautiful = require("beautiful")
4+
local ipairs = ipairs
5+
local tonumber = tonumber
6+
local print = print
77

88
module("vain.layout.cascadebrowse")
99

@@ -12,6 +12,7 @@ cascade_offset_y = 32
1212
extra_padding = 0
1313

1414
name = "cascadebrowse"
15+
1516
function arrange(p)
1617

1718
-- Layout with one fixed column meant for the browser window. Its
@@ -32,7 +33,7 @@ function arrange(p)
3233
-- +-----+---+ +-----+---+ +-----+---+ +-----+---+
3334

3435
-- A useless gap (like the dwm patch) can be defined with
35-
-- beautiful.useless_gap_width .
36+
-- beautiful.useless_gap_width.
3637
local useless_gap = tonumber(beautiful.useless_gap_width)
3738
if useless_gap == nil
3839
then

vain/layout/centerwork.lua layout/centerwork.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
-- Grab environment.
2-
local tonumber = tonumber
3-
local beautiful = beautiful
4-
local awful = awful
5-
local math = math
2+
local awful = require("awful")
3+
local beautiful = require("beautiful")
4+
local tonumber = tonumber
5+
local math = math
66

77
module("vain.layout.centerwork")
88

vain/layout/gimp.lua layout/gimp.lua

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55

66
-- Grab environment.
7-
local ipairs = ipairs
8-
local table = table
9-
local tonumber = tonumber
10-
local beautiful = beautiful
11-
local awful = awful
7+
local awful = require("awful")
8+
local beautiful = require("beautiful")
9+
local ipairs = ipairs
10+
local table = table
11+
local tonumber = tonumber
1212

1313
module("vain.layout.gimp")
1414

File renamed without changes.

vain/layout/termfair.lua layout/termfair.lua

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
-- 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
66

77
module("vain.layout.termfair")
88

99
name = "termfair"
10+
1011
function arrange(p)
1112

1213
-- Layout with fixed number of vertical columns (read from nmaster).
@@ -28,7 +29,7 @@ function arrange(p)
2829
-- +---+---+---+ +---+---+---+ +---+---+---+
2930

3031
-- A useless gap (like the dwm patch) can be defined with
31-
-- beautiful.useless_gap_width .
32+
-- beautiful.useless_gap_width.
3233
local useless_gap = tonumber(beautiful.useless_gap_width)
3334
if useless_gap == nil
3435
then
@@ -40,14 +41,14 @@ function arrange(p)
4041
local cls = p.clients
4142

4243
-- 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)
4546

4647
-- Do at least "desired_y" rows. Read this from ncol. (Yes, I use a
4748
-- *column* setting to set the number of *rows*. That's because
4849
-- num_x is the *master* setting -- it's the setting that's most
4950
-- important to me.)
50-
local desired_y = awful.tag.getncol(t)
51+
local desired_y = tag.getncol(t)
5152

5253
if #cls > 0
5354
then

vain/layout/uselessfair.lua layout/uselessfair.lua

+4-5
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
---------------------------------------------------------------------------
77

88
-- Grab environment we need
9-
local ipairs = ipairs
10-
local math = math
11-
local beautiful = beautiful
12-
local tonumber = tonumber
9+
local beautiful = require("beautiful")
10+
local ipairs = ipairs
11+
local math = math
12+
local tonumber = tonumber
1313

14-
--- Fair layouts module for awful / vain
1514
module("vain.layout.uselessfair")
1615

1716
local function fair(p, orientation)

0 commit comments

Comments
 (0)