1 --- /usr/local/etc/xdg/awesome/rc.lua 2009-12-23 13:27:07.000000000 +0100
2 +++ rc.lua 2009-12-30 03:04:42.000000000 +0100
3 @@ -6,13 +6,16 @@
4 require("beautiful")
5 -- Notification library
6 require("naughty")
7 +require('obvious') -- get it from git://git.mercenariesguild.net/obvious.git
8 +
9 +
10
11 -- {{{ Variable definitions
12 -- Themes define colours, icons, and wallpapers
13 -beautiful.init("/usr/local/share/awesome/themes/default/theme.lua")
14 +beautiful.init("/home/calmar/.config/awesome/calmar-theme/theme.lua")
15
16 -- This is used later as the default terminal and editor to run.
17 -terminal = "xterm"
18 +terminal = "urxvt"
19 editor = os.getenv("EDITOR") or "nano"
20 editor_cmd = terminal .. " -e " .. editor
21
22 @@ -21,23 +24,23 @@
23 -- If you do not like this or do not have such a key,
24 -- I suggest you to remap Mod4 to another key using xmodmap or other tools.
25 -- However, you can use another modifier like Mod1, but it may interact with others.
26 -modkey = "Mod4"
27 +modkey = "Mod1"
28
29 -- Table of layouts to cover with awful.layout.inc, order matters.
30 layouts =
31 {
32 - awful.layout.suit.floating,
33 - awful.layout.suit.tile,
34 - awful.layout.suit.tile.left,
35 - awful.layout.suit.tile.bottom,
36 - awful.layout.suit.tile.top,
37 - awful.layout.suit.fair,
38 - awful.layout.suit.fair.horizontal,
39 - awful.layout.suit.spiral,
40 - awful.layout.suit.spiral.dwindle,
41 awful.layout.suit.max,
42 - awful.layout.suit.max.fullscreen,
43 - awful.layout.suit.magnifier
44 +-- awful.layout.suit.floating,
45 +-- awful.layout.suit.tile,
46 +-- awful.layout.suit.tile.left,
47 + awful.layout.suit.tile.bottom,
48 +-- awful.layout.suit.tile.top,
49 +-- awful.layout.suit.fair,
50 +-- awful.layout.suit.fair.horizontal,
51 +-- awful.layout.suit.spiral,
52 +-- awful.layout.suit.spiral.dwindle,
53 +-- awful.layout.suit.max.fullscreen,
54 +-- awful.layout.suit.magnifier
55 }
56 -- }}}
57
58 @@ -52,21 +55,58 @@
59
60 -- {{{ Menu
61 -- Create a laucher widget and a main menu
62 -myawesomemenu = {
63 - { "manual", terminal .. " -e man awesome" },
64 - { "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
65 - { "restart", awesome.restart },
66 - { "quit", awesome.quit }
67 -}
68 -
69 -mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
70 - { "open terminal", terminal }
71 - }
72 - })
73 +mymainmenu = awful.menu({ items = {
74 + {"urxvtc", "urxvtc" },
75 + {"mc", 'urxvtc -tn "xterm-256color" -e mc' },
76 + {"", nil },
77 + {"mutt", 'urxvtc -tn "xterm-256color" -e mutt' },
78 + {"firefox", "ffox" },
79 + {"weechat", 'urxvtc -tn "xterm-256color" -e weechat-curses' },
80 + {"", nil },
81 + {"fritz", "fritz" },
82 + {"gnubg", 'urxvtc -tn "xterm-256color" -e gnubg' },
83 + {"crrcsim", "crrcsim" },
84 + {"", nil },
85 + {"audacious", "audacious" },
86 + {"songbird", "songbird" },
87 + {"tvbrowser", "tvbrowser" },
88 + {"gimp", "gimp" },
89 + {"gpview", "gpview" },
90 + {"", nil },
91 + {"mkscreen", "mkscreen" },
92 + {"slrn", 'urxvtc -tn "xterm-256color" -e slrn' },
93 + {"xvkbd", "xvkbd" },
94 + {"", nil },
95 + {"fetchmail", "sudo fetchmail" },
96 + {"", nil },
97 + {"awesome-restart", awesome.restart },
98 + {"awesome-quit", awesome.quit },
99 + {"", nil },
100 + {"restart", "/sbin/shutdown -r now" },
101 + {"shutdown", "/sbin/shutdown -h now" },
102 + {"", nil },
103 + {"close menu", function () awful.menu.close("mymainmenu") end }
104 +}})
105 +
106 +--mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
107 + --{ "open terminal", terminal }
108 + --}
109 +-- )
110
111 mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
112 menu = mymainmenu })
113 -- }}}
114 +--
115 +-- {{{ Obvious Settings
116 +obvious.clock.set_shorttimer(1)
117 +obvious.clock.set_editor("gvim")
118 +obvious.clock.set_shortformat(function ()
119 + return " <b><big>%X</big></b>"
120 +end)
121 +obvious.clock.set_longformat(function ()
122 + return "%a, %e %b "
123 +end)
124 +
125
126 -- {{{ Wibox
127 -- Create a textclock widget
128 @@ -97,6 +137,13 @@
129 client.focus = c
130 c:raise()
131 end),
132 + awful.button({ }, 2, function (c)
133 + if not c:isvisible() then
134 + awful.tag.viewonly(c:tags()[1])
135 + end
136 + client.focus = c
137 + c:kill()
138 + end),
139 awful.button({ }, 3, function ()
140 if instance then
141 instance:hide()
142 @@ -139,20 +186,25 @@
143 layout = awful.widget.layout.horizontal.rightleft
144 }
145 if s == 1 then table.insert(right_aligned, mysystray) end
146 - table.insert(right_aligned, mytextclock)
147 +
148 + table.insert(right_aligned, obvious.loadavg())
149 + --table.insert(right_aligned, obvious.cpu())
150 + table.insert(right_aligned, obvious.volume_alsa())
151 + table.insert(right_aligned, obvious.clock())
152 table.insert(right_aligned, mylayoutbox[s])
153
154 -- Add widgets to the wibox - order matters
155 mywibox[s].widgets = {
156 - mylauncher,
157 mytaglist[s],
158 mypromptbox[s],
159 + mylauncher,
160 right_aligned,
161 mytasklist[s],
162 layout = awful.widget.layout.horizontal.leftright,
163 height = mywibox[s].height
164 }
165 end
166 +
167 -- }}}
168
169 -- {{{ Mouse bindings
170 @@ -166,7 +218,9 @@
171 -- {{{ Key bindings
172 globalkeys = awful.util.table.join(
173 awful.key({ modkey, }, "Left", awful.tag.viewprev ),
174 + awful.key({ modkey, }, "h", awful.tag.viewprev ),
175 awful.key({ modkey, }, "Right", awful.tag.viewnext ),
176 + awful.key({ modkey, }, "l", awful.tag.viewnext ),
177 awful.key({ modkey, }, "Escape", awful.tag.history.restore),
178
179 awful.key({ modkey, }, "j",
180 @@ -200,17 +254,18 @@
181 awful.key({ modkey, "Control" }, "r", awesome.restart),
182 awful.key({ modkey, "Shift" }, "q", awesome.quit),
183
184 - awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
185 - awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
186 + awful.key({ modkey, "Control" }, "l", function () awful.tag.incmwfact( 0.05) end),
187 + awful.key({ modkey, "Control" }, "h", function () awful.tag.incmwfact(-0.05) end),
188 awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
189 awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
190 - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
191 - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
192 + awful.key({ modkey, "Control", "Shift" }, "h", function () awful.tag.incncol( 1) end),
193 + awful.key({ modkey, "Control", "Shift" }, "l", function () awful.tag.incncol(-1) end),
194 awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
195 awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
196
197 -- Prompt
198 awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
199 + awful.key({ modkey }, "p", obvious.popup_run_prompt.run_prompt),
200
201 awful.key({ modkey }, "x",
202 function ()
203 @@ -218,7 +273,11 @@
204 mypromptbox[mouse.screen].widget,
205 awful.util.eval, nil,
206 awful.util.getdir("cache") .. "/history_eval")
207 - end)
208 + end),
209 + -- Volume control
210 + awful.key({ }, "XF86AudioRaiseVolume", function () obvious.volume_alsa.raise(0, "Master") end),
211 + awful.key({ }, "XF86AudioLowerVolume", function () obvious.volume_alsa.lower(0, "Master") end),
212 + awful.key({ }, "XF86AudioMute", function () obvious.volume_alsa.mute(0, "Master") end)
213 )
214
215 clientkeys = awful.util.table.join(
216 @@ -299,9 +358,9 @@
217 { rule = { class = "gimp" },
218 properties = { floating = true } },
219 -- Set Firefox to always map on tags number 2 of screen 1.
220 - -- { rule = { class = "Firefox" },
221 - -- properties = { tag = tags[1][2] } },
222 -}
223 + { rule = { class = "Firefox" },
224 + properties = { tag = tags[1][2] } }
225 +},
226 -- }}}
227
228 -- {{{ Signals
229 @@ -330,4 +389,6 @@
230
231 client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end)
232 client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
233 +client.add_signal("manage", function (c, startup) c.size_hints_honor = false end)
234 +
235 -- }}}