1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2024-12-23 11:32:32 +00:00

Merge pull request #71 from plotnikovanton/master

Powerarrow generator function
This commit is contained in:
Luke Bonham 2015-01-20 10:11:01 +01:00
commit 6bce6aa092
21 changed files with 35 additions and 40 deletions

View file

@ -122,7 +122,7 @@ lain.widgets.calendar:attach(mytextclock, { font_size = 10 })
mailicon = wibox.widget.imagebox(beautiful.widget_mail) mailicon = wibox.widget.imagebox(beautiful.widget_mail)
mailicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn(mail) end))) mailicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn(mail) end)))
--[[ commented because it needs to be set before use --[[ commented because it needs to be set before use
mailwidget = wibox.widget.background(lain.widgets.imap({ mailwidget = lain.widgets.imap({
timeout = 180, timeout = 180,
server = "server", server = "server",
mail = "mail", mail = "mail",
@ -136,7 +136,7 @@ mailwidget = wibox.widget.background(lain.widgets.imap({
mailicon:set_image(beautiful.widget_mail) mailicon:set_image(beautiful.widget_mail)
end end
end end
}), "#313131") })
]] ]]
-- MPD -- MPD
@ -160,7 +160,6 @@ mpdwidget = lain.widgets.mpd({
widget:set_markup(markup("#EA6F81", artist) .. title) widget:set_markup(markup("#EA6F81", artist) .. title)
end end
}) })
mpdwidgetbg = wibox.widget.background(mpdwidget, "#313131")
-- MEM -- MEM
memicon = wibox.widget.imagebox(beautiful.widget_mem) memicon = wibox.widget.imagebox(beautiful.widget_mem)
@ -172,11 +171,11 @@ memwidget = lain.widgets.mem({
-- CPU -- CPU
cpuicon = wibox.widget.imagebox(beautiful.widget_cpu) cpuicon = wibox.widget.imagebox(beautiful.widget_cpu)
cpuwidget = wibox.widget.background(lain.widgets.cpu({ cpuwidget = lain.widgets.cpu({
settings = function() settings = function()
widget:set_text(" " .. cpu_now.usage .. "% ") widget:set_text(" " .. cpu_now.usage .. "% ")
end end
}), "#313131") })
-- Coretemp -- Coretemp
tempicon = wibox.widget.imagebox(beautiful.widget_temp) tempicon = wibox.widget.imagebox(beautiful.widget_temp)
@ -193,7 +192,6 @@ fswidget = lain.widgets.fs({
widget:set_text(" " .. fs_now.used .. "% ") widget:set_text(" " .. fs_now.used .. "% ")
end end
}) })
fswidgetbg = wibox.widget.background(fswidget, "#313131")
-- Battery -- Battery
baticon = wibox.widget.imagebox(beautiful.widget_battery) baticon = wibox.widget.imagebox(beautiful.widget_battery)
@ -235,13 +233,13 @@ volumewidget = lain.widgets.alsa({
-- Net -- Net
neticon = wibox.widget.imagebox(beautiful.widget_net) neticon = wibox.widget.imagebox(beautiful.widget_net)
neticon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(iptraf) end))) neticon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(iptraf) end)))
netwidget = wibox.widget.background(lain.widgets.net({ netwidget = lain.widgets.net({
settings = function() settings = function()
widget:set_markup(markup("#7AC82E", " " .. net_now.received) widget:set_markup(markup("#7AC82E", " " .. net_now.received)
.. " " .. .. " " ..
markup("#46A8C3", " " .. net_now.sent .. " ")) markup("#46A8C3", " " .. net_now.sent .. " "))
end end
}), "#313131") })
-- Separators -- Separators
spr = wibox.widget.textbox(' ') spr = wibox.widget.textbox(' ')
@ -332,42 +330,39 @@ for s = 1, screen.count() do
-- Widgets that are aligned to the upper right -- Widgets that are aligned to the upper right
-- If you are moving widgets from a section with light grey background to dark grey or vice versa, -- If you are moving widgets from a section with light grey background to dark grey or vice versa,
-- use a replacement icon as appropriate from themes/powerarrow-darker/alticons so your icons match the bg. -- use a replacement icon as appropriate from themes/powerarrow-darker/alticons so your icons match the bg.
local right_layout_toggle = true
local function right_layout_add (...)
local arg = {...}
if right_layout_toggle then
right_layout:add(arrl_ld)
for i, n in pairs(arg) do
right_layout:add(wibox.widget.background(n ,'#313131'))
end
else
right_layout:add(arrl_dl)
for i, n in pairs(arg) do
right_layout:add(n)
end
end
right_layout_toggle = not right_layout_toggle
end
local right_layout = wibox.layout.fixed.horizontal() local right_layout = wibox.layout.fixed.horizontal()
if s == 1 then right_layout:add(wibox.widget.systray()) end if s == 1 then right_layout:add(wibox.widget.systray()) end
right_layout:add(spr) right_layout:add(spr)
right_layout:add(arrl) right_layout:add(arrl)
right_layout:add(arrl_ld) right_layout_add(mpdicon, mpdwidget)
right_layout:add(mpdicon) right_layout_add(voliconi, olumewidget)
right_layout:add(mpdwidgetbg) --right_layout_add(mailicon, mailwidget)
right_layout:add(arrl_dl) right_layout_add(memicon, memwidget)
right_layout:add(volicon) right_layout_add(cpuicon, cpuwidget)
right_layout:add(volumewidget) right_layout_add(tempicon, tempwidget)
right_layout:add(arrl_ld) right_layout_add(fsicon, fswidget)
right_layout:add(mailicon) right_layout_add(baticon, batwidget)
--right_layout:add(mailwidget) right_layout_add(neticon,netwidget)
right_layout:add(arrl_dl) right_layout_add(mytextclock, spr)
right_layout:add(memicon) right_layout_add(mylayoutbox[s])
right_layout:add(memwidget)
right_layout:add(arrl_ld)
right_layout:add(cpuicon)
right_layout:add(cpuwidget)
right_layout:add(arrl_dl)
right_layout:add(tempicon)
right_layout:add(tempwidget)
right_layout:add(arrl_ld)
right_layout:add(fsicon)
right_layout:add(fswidgetbg)
right_layout:add(arrl_dl)
right_layout:add(baticon)
right_layout:add(batwidget)
right_layout:add(arrl_ld)
right_layout:add(neticon)
right_layout:add(netwidget)
right_layout:add(arrl_dl)
right_layout:add(mytextclock)
right_layout:add(spr)
right_layout:add(arrl_ld)
right_layout:add(mylayoutbox[s])
-- Now bring it all together (with the tasklist in the middle) -- Now bring it all together (with the tasklist in the middle)
local layout = wibox.layout.align.horizontal() local layout = wibox.layout.align.horizontal()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 B

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 B

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 B

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 B

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

After

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 B

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 199 B