Use single quotes
[delightful.git] / awesome-3.5.6-delightful-sample-configuration.diff
1 --- /etc/xdg/awesome/rc.lua     2015-09-01 14:28:43.000000000 +0300
2 +++ rc.lua      2016-03-08 23:21:54.879044992 +0200
3 @@ -166,6 +166,58 @@
4                                                if client.focus then client.focus:raise() end
5                                            end))
6  
7 +-- Delightful widgets
8 +require('delightful.widgets.battery')
9 +require('delightful.widgets.cpu')
10 +require('delightful.widgets.datetime')
11 +require('delightful.widgets.imap')
12 +require('delightful.widgets.memory')
13 +require('delightful.widgets.network')
14 +require('delightful.widgets.pulseaudio')
15 +require('delightful.widgets.weather')
16 +
17 +-- Which widgets to install?
18 +-- This is the order the widgets appear in the wibox.
19 +delightful_widgets = {
20 +    delightful.widgets.network,
21 +    delightful.widgets.cpu,
22 +    delightful.widgets.memory,
23 +    delightful.widgets.weather,
24 +    delightful.widgets.imap,
25 +    delightful.widgets.battery,
26 +    delightful.widgets.pulseaudio,
27 +    delightful.widgets.datetime,
28 +}
29 +
30 +-- Widget configuration
31 +delightful_config = {
32 +    [delightful.widgets.cpu] = {
33 +        command = 'gnome-system-monitor',
34 +    },
35 +    [delightful.widgets.imap] = {
36 +        {
37 +            user      = 'myuser',
38 +            password  = 'mypassword',
39 +            host      = 'mail.example.com',
40 +            ssl       = true,
41 +            mailboxes = { 'INBOX', 'awesome' },
42 +            command   = 'evolution -c mail',
43 +        },
44 +    },
45 +    [delightful.widgets.memory] = {
46 +        command = 'gnome-system-monitor',
47 +    },
48 +    [delightful.widgets.weather] = {
49 +        {
50 +            city = 'Helsinki',
51 +            command = 'gnome-www-browser http://ilmatieteenlaitos.fi/saa/Helsinki',
52 +        },
53 +    },
54 +    [delightful.widgets.pulseaudio] = {
55 +        mixer_command = 'pavucontrol',
56 +    },
57 +}
58 +
59  for s = 1, screen.count() do
60      -- Create a promptbox for each screen
61      mypromptbox[s] = awful.widget.prompt()
62 @@ -194,8 +246,10 @@
63  
64      -- Widgets that are aligned to the right
65      local right_layout = wibox.layout.fixed.horizontal()
66 -    if s == 1 then right_layout:add(wibox.widget.systray()) end
67 -    right_layout:add(mytextclock)
68 +    if s == 1 then
69 +        right_layout:add(wibox.widget.systray())
70 +        delightful.utils.fill_wibox_container(delightful_widgets, delightful_config, right_layout)
71 +    end
72      right_layout:add(mylayoutbox[s])
73  
74      -- Now bring it all together (with the tasklist in the middle)