-
Notifications
You must be signed in to change notification settings - Fork 15
/
rc.lua.patch
104 lines (96 loc) · 3.74 KB
/
rc.lua.patch
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
104
This patch adds the necessary changes to create and manage tags shareable on
all screens when using the awesome window manager version 4.0.
The library and all relevant documentation can be found at
https://github.com/Drauthius/awesome-sharedtags
--- orig/rc.lua 2016-01-01 13:45:26.000000000 +0100
+++ sharedtags/rc.lua 2016-01-05 20:09:21.428836239 +0100
@@ -38,6 +38,10 @@
end
-- }}}
+-- {{{ Local extensions
+local sharedtags = require("sharedtags")
+-- }}}
+
-- {{{ Variable definitions
-- Themes define colours, icons, font and wallpapers.
beautiful.init(awful.util.get_themes_dir() .. "default/theme.lua")
@@ -90,6 +94,18 @@
end
-- }}}
+-- {{{ Tags
+local tags = sharedtags({
+ { name = "main", layout = awful.layout.layouts[2] },
+ { name = "www", layout = awful.layout.layouts[10] },
+ { name = "game", layout = awful.layout.layouts[1] },
+ { name = "misc", layout = awful.layout.layouts[2] },
+ { name = "chat", screen = 2, layout = awful.layout.layouts[2] },
+ { layout = awful.layout.layouts[2] },
+ { screen = 2, layout = awful.layout.layouts[2] }
+})
+-- }}}
+
-- {{{ Menu
-- Create a launcher widget and a main menu
myawesomemenu = {
@@ -181,8 +197,9 @@
-- Wallpaper
set_wallpaper(s)
- -- Each screen has its own tag table.
- awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1])
+ -- Assign tags to the newly connected screen here,
+ -- if desired:
+ --sharedtags.viewonly(tags[4], s)
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
@@ -386,9 +403,9 @@
awful.key({ modkey }, "#" .. i + 9,
function ()
local screen = awful.screen.focused()
- local tag = screen.tags[i]
+ local tag = tags[i]
if tag then
- tag:view_only()
+ sharedtags.viewonly(tag, screen)
end
end,
{description = "view tag #"..i, group = "tag"}),
@@ -396,9 +413,9 @@
awful.key({ modkey, "Control" }, "#" .. i + 9,
function ()
local screen = awful.screen.focused()
- local tag = screen.tags[i]
+ local tag = tags[i]
if tag then
- awful.tag.viewtoggle(tag)
+ sharedtags.viewtoggle(tag, screen)
end
end,
{description = "toggle tag #" .. i, group = "tag"}),
@@ -406,7 +423,7 @@
awful.key({ modkey, "Shift" }, "#" .. i + 9,
function ()
if client.focus then
- local tag = client.focus.screen.tags[i]
+ local tag = tags[i]
if tag then
client.focus:move_to_tag(tag)
end
@@ -417,7 +434,7 @@
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
function ()
if client.focus then
- local tag = client.focus.screen.tags[i]
+ local tag = tags[i]
if tag then
client.focus:toggle_tag(tag)
end
@@ -483,9 +500,9 @@
}, properties = { titlebars_enabled = true }
},
- -- Set Firefox to always map on the tag named "2" on screen 1.
+ -- Set Firefox to always map on the tag named "2".
-- { rule = { class = "Firefox" },
- -- properties = { screen = 1, tag = "2" } },
+ -- properties = { tag = tags[2] } }, -- tag = tags["www"] works as well
}
-- }}}