-
Notifications
You must be signed in to change notification settings - Fork 0
/
put_into_rc.lua
104 lines (87 loc) · 2.86 KB
/
put_into_rc.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
----------------------------------------------------------------------
--
-- put lines below into /etc/xdg/awesome/rc.lua
--
----------------------------------------------------------------------
local arnan_tagbox = require("arnan_tagbox")
----------------------------------------------------------------------
do
mywibox[s].widgets = {
{
mylauncher,
arnan_tagbox(),
mytaglist[s],
--mypromptbox[s],
layout = awful.widget.layout.horizontal.leftright
},
mylayoutbox[s],
--mytextclock,
--s == 1 and mysystray or nil,
mytasklist[s],
layout = awful.widget.layout.horizontal.rightleft
}
end
----------------------------------------------------------------------
tags = {}
for s = 1, screen.count() do
local tag_names = {} ; for i = 1, 27 do tag_names[i] = i end
tags[s] = awful.tag(tag_names, s, layouts[2])
end
----------------------------------------------------------------------
local function view_up()
local idx = awful.tag.getidx( awful.tag.selected() )
idx = (idx-1)%9+1
if idx > 3 then
awful.tag.viewidx(-3)
end
end
local function view_down()
local idx = awful.tag.getidx( awful.tag.selected() )
idx = (idx-1)%9+1
if idx < 7 then
awful.tag.viewidx(3)
end
end
local function view_left()
local idx = awful.tag.getidx( awful.tag.selected() )
idx = (idx-1)%9+1
if idx~=1 and idx~=4 and idx~=7 then
awful.tag.viewidx(-1)
end
end
local function view_right()
local idx = awful.tag.getidx( awful.tag.selected() )
idx = (idx-1)%9+1
if idx~=3 and idx~=6 and idx~=9 then
awful.tag.viewidx(1)
end
end
local function view_q()
local idx = awful.tag.getidx( awful.tag.selected() )
if idx > 9 then
awful.tag.viewidx(-9)
end
end
local function view_e()
local idx = awful.tag.getidx( awful.tag.selected() )
if idx < 19 then
awful.tag.viewidx(9)
end
end
do
awful.key({ "Control", "Mod1" }, "a", view_left ),
awful.key({ "Control", "Mod1" }, "d", view_right ),
awful.key({ "Control", "Mod1" }, "w", view_up ),
awful.key({ "Control", "Mod1" }, "s", view_down ),
awful.key({ "Control", "Mod1" }, "q", view_q ),
awful.key({ "Control", "Mod1" }, "e", view_e ),
awful.key({ "Control", "Shift" }, "a", view_left ),
awful.key({ "Control", "Shift" }, "d", view_right ),
awful.key({ "Control", "Shift" }, "w", view_up ),
awful.key({ "Control", "Shift" }, "s", view_down ),
awful.key({ "Control", "Shift" }, "q", view_q ),
awful.key({ "Control", "Shift" }, "e", view_e ),
end
----------------------------------------------------------------------
awful.tag.viewidx(13)
----------------------------------------------------------------------