Made bar more beautiful, replaced some icons

This commit is contained in:
Mutzi 2023-01-30 14:35:06 +01:00
parent 8c7f5f50cc
commit e665b502e3
42 changed files with 194 additions and 134 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

BIN
awesome/icons/info/cpu.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

BIN
awesome/icons/info/mem.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><defs></defs><path d="M27 11h-1v-1a2 2 0 0 0-2-2h-4v2h4v3h3v6h-3v3h-5v2h5a2 2 0 0 0 2-2v-1h1a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2z" fill="currentColor"></path><path d="M11 22H6V10h6V8H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5z" fill="currentColor"></path><path d="M14.81 23.58l-1.62-1.16L17.06 17H9.37l6.85-8.62l1.56 1.24L13.51 15h7.43l-6.13 8.58z" fill="currentColor"></path></svg>

After

Width:  |  Height:  |  Size: 473 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><path d="M24 24H6a2.002 2.002 0 0 1-2-2V10a2.002 2.002 0 0 1 2-2h18a2.002 2.002 0 0 1 2 2v1h1a2.002 2.002 0 0 1 2 2v6a2.003 2.003 0 0 1-2 2h-1v1a2.003 2.003 0 0 1-2 2zM6 10v12h18v-3h3v-6h-3v-3z" fill="currentColor"></path></svg>

After

Width:  |  Height:  |  Size: 332 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><defs></defs><path d="M24 24H6a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v1h1a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2h-1v1a2 2 0 0 1-2 2zM6 10v12h18v-3h3v-6h-3v-3z" fill="currentColor"></path><path transform="rotate(90 15 16)" d="M11 9h8v14h-8z" fill="currentColor"></path></svg>

After

Width:  |  Height:  |  Size: 378 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><defs></defs><path d="M24 24H6a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v1h1a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2h-1v1a2 2 0 0 1-2 2zM6 10v12h18v-3h3v-6h-3v-3z" fill="currentColor"></path><path transform="rotate(90 12 16)" d="M8 12h8v8H8z" fill="currentColor"></path></svg>

After

Width:  |  Height:  |  Size: 376 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><defs></defs><path d="M24 24H6a2.002 2.002 0 0 1-2-2V10a2.002 2.002 0 0 1 2-2h18a2.002 2.002 0 0 1 2 2v1h1a2.002 2.002 0 0 1 2 2v6a2.003 2.003 0 0 1-2 2h-1v1a2.003 2.003 0 0 1-2 2zM6 10v12h18v-3h3v-6h-3v-3z" fill="currentColor"></path><path transform="rotate(90 9 16)" d="M5 15h8v2H5z" fill="currentColor"></path></svg>

After

Width:  |  Height:  |  Size: 423 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><defs></defs><path d="M24 24H6a2.002 2.002 0 0 1-2-2V10a2.002 2.002 0 0 1 2-2h18a2.002 2.002 0 0 1 2 2v1h1a2.002 2.002 0 0 1 2 2v6a2.003 2.003 0 0 1-2 2h-1v1a2.003 2.003 0 0 1-2 2zM6 10v12h18v-3h3v-6h-3v-3z" fill="currentColor"></path><path transform="rotate(90 10 16)" d="M6 14h8v4H6z" fill="currentColor"></path></svg>

After

Width:  |  Height:  |  Size: 424 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><path d="M12 29a1 1 0 0 1-.92-.62L6.33 17H2v-2h5a1 1 0 0 1 .92.62L12 25.28l8.06-21.63A1 1 0 0 1 21 3a1 1 0 0 1 .93.68L25.72 15H30v2h-5a1 1 0 0 1-.95-.68L21 7l-8.06 21.35A1 1 0 0 1 12 29z" fill="currentColor"></path></svg>

After

Width:  |  Height:  |  Size: 325 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><path d="M26 24v4H6v-4H4v4a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-4z" fill="currentColor"></path><path d="M26 14l-1.41-1.41L17 20.17V2h-2v18.17l-7.59-7.58L6 14l10 10l10-10z" fill="currentColor"></path></svg>

After

Width:  |  Height:  |  Size: 304 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><path d="M11 11v10h10V11zm8 8h-6v-6h6z" fill="currentColor"></path><path d="M30 13v-2h-4V8a2 2 0 0 0-2-2h-3V2h-2v4h-6V2h-2v4H8a2 2 0 0 0-2 2v3H2v2h4v6H2v2h4v3a2 2 0 0 0 2 2h3v4h2v-4h6v4h2v-4h3a2 2 0 0 0 2-2v-3h4v-2h-4v-6zm-6 11H8V8h16z" fill="currentColor"></path></svg>

After

Width:  |  Height:  |  Size: 374 B

View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
import pathlib
from cairosvg import svg2png
from PIL import Image, ImageOps
for svg in pathlib.Path('.').glob('*.svg'):
print(f'Converting {svg.name}...', end='')
png = svg.with_suffix('.png')
svg2png(url=str(svg), write_to=str(png), output_width=12, output_height=12)
with Image.open(png) as img:
img.load()
border_img = ImageOps.expand(img, 4, (0, 0, 0, 0))
border_img.save(png)
print(' Done')

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><path d="M6 18l1.41 1.41L15 11.83V30h2V11.83l7.59 7.58L26 18L16 8L6 18z" fill="currentColor"></path><path d="M6 8V4h20v4h2V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v4z" fill="currentColor"></path></svg>

After

Width:  |  Height:  |  Size: 296 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><path d="M27.16 8.08l-1.53 1.29a10 10 0 0 1-.29 13.23l1.47 1.4a12 12 0 0 0 .35-15.88z" fill="currentColor"></path><path d="M21.58 12a6 6 0 0 1-.18 7.94l1.47 1.36a8 8 0 0 0 .23-10.59z" fill="currentColor"></path><path d="M18 30a1 1 0 0 1-.71-.3L9.67 22H3a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h6.67l7.62-7.7a1 1 0 0 1 1.41 0a1 1 0 0 1 .3.7v26a1 1 0 0 1-1 1zM4 20h6.08a1 1 0 0 1 .71.3L17 26.57V5.43l-6.21 6.27a1 1 0 0 1-.71.3H4z" fill="currentColor"></path></svg>

After

Width:  |  Height:  |  Size: 557 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><path d="M25.1 10.66L23.58 12a6 6 0 0 1-.18 7.94l1.47 1.36a8 8 0 0 0 .23-10.59z" fill="currentColor"></path><path d="M20 30a1 1 0 0 1-.71-.3L11.67 22H5a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h6.67l7.62-7.7a1 1 0 0 1 1.41 0a1 1 0 0 1 .3.7v26a1 1 0 0 1-1 1zM6 20h6a1.17 1.17 0 0 1 .79.3L19 26.57V5.43l-6.21 6.27a1.17 1.17 0 0 1-.79.3H6z" fill="currentColor"></path></svg>

After

Width:  |  Height:  |  Size: 464 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><path d="M31 12.41L29.59 11L26 14.59L22.41 11L21 12.41L24.59 16L21 19.59L22.41 21L26 17.41L29.59 21L31 19.59L27.41 16L31 12.41z" fill="currentColor"></path><path d="M18 30a1 1 0 0 1-.71-.3L9.67 22H3a1 1 0 0 1-1-1V11a1 1 0 0 1 1-1h6.67l7.62-7.7a1 1 0 0 1 1.41 0a1 1 0 0 1 .3.7v26a1 1 0 0 1-1 1zM4 20h6a1.17 1.17 0 0 1 .79.3L17 26.57V5.43l-6.21 6.27a1.17 1.17 0 0 1-.79.3H4z" fill="currentColor"></path></svg>

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 B

View File

@ -54,20 +54,19 @@ theme.menu_fg_normal = '#aaaaaa'
theme.menu_fg_focus = '#ff8c00' theme.menu_fg_focus = '#ff8c00'
theme.menu_bg_normal = '#050505dd' theme.menu_bg_normal = '#050505dd'
theme.menu_bg_focus = '#050505dd' theme.menu_bg_focus = '#050505dd'
theme.widget_temp = theme.confdir .. '/icons/temp.png' theme.widget_cpu = theme.confdir .. '/icons/info/cpu.png'
theme.widget_uptime = theme.confdir .. '/icons/ac.png' theme.widget_mem = theme.confdir .. '/icons/info/mem.png'
theme.widget_cpu = theme.confdir .. '/icons/cpu.png' theme.widget_netdown = theme.confdir .. '/icons/info/download.png'
theme.widget_weather = theme.confdir .. '/icons/dish.png' theme.widget_netup = theme.confdir .. '/icons/info/upload.png'
theme.widget_fs = theme.confdir .. '/icons/fs.png' theme.widget_bat_charge = theme.confdir .. '/icons/info/batcharge.png'
theme.widget_mem = theme.confdir .. '/icons/mem.png' theme.widget_bat_empty = theme.confdir .. '/icons/info/batempty.png'
theme.widget_note = theme.confdir .. '/icons/note.png' theme.widget_bat_low = theme.confdir .. '/icons/info/batlow.png'
theme.widget_note_on = theme.confdir .. '/icons/note_on.png' theme.widget_bat_mid = theme.confdir .. '/icons/info/batmid.png'
theme.widget_netdown = theme.confdir .. '/icons/net_down.png' theme.widget_bat_high = theme.confdir .. '/icons/info/bathigh.png'
theme.widget_netup = theme.confdir .. '/icons/net_up.png' theme.widget_bat_full = theme.confdir .. '/icons/info/batfull.png'
theme.widget_mail = theme.confdir .. '/icons/mail.png' theme.widget_vol_mute = theme.confdir .. '/icons/info/volmute.png'
theme.widget_batt = theme.confdir .. '/icons/bat.png' theme.widget_vol_low = theme.confdir .. '/icons/info/vollow.png'
theme.widget_clock = theme.confdir .. '/icons/clock.png' theme.widget_vol_high = theme.confdir .. '/icons/info/volhigh.png'
theme.widget_vol = theme.confdir .. '/icons/spkr.png'
theme.taglist_squares_sel = theme.confdir .. '/icons/square_a.png' theme.taglist_squares_sel = theme.confdir .. '/icons/square_a.png'
theme.taglist_squares_unsel = theme.confdir .. '/icons/square_b.png' theme.taglist_squares_unsel = theme.confdir .. '/icons/square_b.png'
theme.tasklist_plain_task_name = true theme.tasklist_plain_task_name = true
@ -112,77 +111,65 @@ theme.tasklist_bg_minimize = '#4d4d4d'
local markup = lain.util.markup local markup = lain.util.markup
-- Textclock local function build_widget_list(widgets)
os.setlocale(os.getenv('LANG')) -- to localize the clock local out = {}
local clockicon = wibox.widget.imagebox(theme.widget_clock) local last_bg = 'alpha'
local mytextclock =
wibox.widget.textclock(markup('#7788af', '%A %d %B ') .. markup('#ab7367', '>') .. markup('#de5e1e', ' %H:%M '))
mytextclock.font = theme.font
-- Calendar for _, widget in pairs(widgets) do
theme.cal = lain.widget.cal({ table.insert(out, lain.util.separators.arrow_left(last_bg, widget.bg))
attach_to = { mytextclock },
notification_preset = {
font = 'Monospace 10',
fg = theme.fg_normal,
bg = theme.bg_normal,
},
})
-- / fs local bg_widget = wibox.widget.background(wibox.container.margin(widget.widget, 5, 5), widget.bg)
local fsicon = wibox.widget.imagebox(theme.widget_fs) bg_widget.fg = '#111111'
theme.fs = lain.widget.fs({ table.insert(out, bg_widget)
notification_preset = { font = 'Monospace 10', fg = theme.fg_normal },
settings = function()
-- luacheck: max line length 150, globals widget fs_now
widget:set_markup(
markup.fontfg(
theme.font,
'#80d9d8',
fs_now['/'].percentage
.. '% ('
.. string.format('%.3f', fs_now['/'].free)
.. ' '
.. fs_now['/'].units
.. ' left)'
)
)
end,
})
theme.fs.widget:buttons(gears.table.join(awful.button({}, 1, function()
awful.spawn('Thunar')
end)))
-- CPU last_bg = widget.bg
local cpuicon = wibox.widget.imagebox(theme.widget_cpu) end
local cpu = lain.widget.cpu({
settings = function()
-- luacheck: globals widget cpu_now
widget:set_markup(markup.fontfg(theme.font, '#e33a6e', cpu_now.usage .. '% '))
end,
})
local optional = {} return out
-- Coretemp
if settings['show_temp'] == true then
local tempicon = wibox.widget.imagebox(theme.widget_temp)
local temp = lain.widget.temp({
settings = function()
-- luacheck: globals widget coretemp_now
widget:set_markup(markup.fontfg(theme.font, '#f1af5f', coretemp_now .. '°C '))
end,
})
table.insert(optional, tempicon)
table.insert(optional, temp)
end end
-- Battery local info_widgets = {}
-- > Net
local netdowninfo = wibox.widget.textbox()
local netupinfo = lain.widget.net({
settings = function()
-- luacheck: globals widget net_now
widget:set_text(net_now.sent)
netdowninfo:set_text(net_now.received)
end,
})
table.insert(info_widgets, {
widget = wibox.layout.fixed.horizontal(wibox.widget.imagebox(theme.widget_netdown), netdowninfo),
bg = '#87af5f'
})
table.insert(info_widgets, {
widget = wibox.layout.fixed.horizontal(wibox.widget.imagebox(theme.widget_netup), netupinfo.widget),
bg = '#e54c62'
})
-- < Net
-- > Battery
if settings['show_battery'] == true then if settings['show_battery'] == true then
local baticon = wibox.widget.imagebox(theme.widget_batt) local baticon = wibox.widget.imagebox(nil)
local bat = lain.widget.bat({ local bat = lain.widget.bat({
settings = function() settings = function()
-- luacheck: globals widget bat_now -- luacheck: globals widget bat_now
if bat_now.ac_status == 1 or bat_now.perc == 'N/A' then
baticon:set_image(theme.widget_bat_charge)
elseif bat_now.perc < 5 then
baticon:set_image(theme.widget_bat_empty)
elseif bat_now.perc < 15 then
baticon:set_image(theme.widget_bat_low)
elseif bat_now.perc < 50 then
baticon:set_image(theme.widget_bat_mid)
elseif bat_now.perc < 95 then
baticon:set_image(theme.widget_bat_high)
else
baticon:set_image(theme.widget_bat_full)
end
local perc = bat_now.perc ~= 'N/A' and bat_now.perc .. '%' or bat_now.perc local perc = bat_now.perc ~= 'N/A' and bat_now.perc .. '%' or bat_now.perc
if bat_now.ac_status == 1 then if bat_now.ac_status == 1 then
@ -192,53 +179,126 @@ if settings['show_battery'] == true then
widget:set_markup(markup.fontfg(theme.font, theme.fg_normal, perc .. ' ')) widget:set_markup(markup.fontfg(theme.font, theme.fg_normal, perc .. ' '))
end, end,
}) })
table.insert(optional, baticon) table.insert(info_widgets, {
table.insert(optional, bat) widget = wibox.layout.fixed.horizontal(baticon, bat.widget),
bg = '#e54c62'
})
end end
-- < Battery
-- ALSA volume -- > ALSA volume
local volicon = wibox.widget.imagebox(theme.widget_vol) local volumeicon = wibox.widget.imagebox(nil)
theme.volume = lain.widget.alsa({ local volume = lain.widget.alsa({
settings = function() settings = function()
-- luacheck: globals widget volume_now -- luacheck: globals widget volume_now
if volume_now.status == 'off' then if volume_now.status == 'off' then
volume_now.level = volume_now.level .. 'M' volumeicon:set_image(theme.widget_vol_mute)
volume_now.level = 'M ' .. volume_now.level
elseif volume_now.level == 0 then
volumeicon:set_image(theme.widget_vol_mute)
elseif volume_now.level <= 50 then
volumeicon:set_image(theme.widget_vol_low)
else
volumeicon:set_image(theme.widget_vol_high)
end end
widget:set_markup(markup.fontfg(theme.font, '#7493d2', volume_now.level .. '% ')) widget:set_text(' ' .. volume_now.level .. '%')
end, end,
}) })
theme.volume.widget:buttons(awful.util.table.join(
local volumebuttons = awful.util.table.join(
awful.button({}, 1, function() -- left click
os.execute(string.format('%s set %s toggle', volume.cmd, volume.togglechannel or volume.channel))
volume.update()
end),
awful.button({}, 4, function() awful.button({}, 4, function()
os.execute(string.format('%s set %s 1%%+', theme.volume.cmd, theme.volume.channel)) os.execute(string.format('%s set %s 1%%+', volume.cmd, volume.channel))
theme.volume.update() volume.update()
end), end),
awful.button({}, 5, function() awful.button({}, 5, function()
os.execute(string.format('%s set %s 1%%-', theme.volume.cmd, theme.volume.channel)) os.execute(string.format('%s set %s 1%%-', volume.cmd, volume.channel))
theme.volume.update() volume.update()
end) end)
)) )
-- Net volume.widget:buttons(volumebuttons)
local netdownicon = wibox.widget.imagebox(theme.widget_netdown) volumeicon:buttons(volumebuttons)
local netdowninfo = wibox.widget.textbox()
local netupicon = wibox.widget.imagebox(theme.widget_netup) table.insert(info_widgets, {
local netupinfo = lain.widget.net({ widget = wibox.layout.fixed.horizontal(volumeicon, volume.widget),
settings = function() bg = '#7493d2'
-- luacheck: globals widget net_now
widget:set_markup(markup.fontfg(theme.font, '#e54c62', net_now.sent .. ' '))
netdowninfo:set_markup(markup.fontfg(theme.font, '#87af5f', net_now.received .. ' '))
end,
}) })
-- < ALSA volume
-- MEM -- > MEM
local memicon = wibox.widget.imagebox(theme.widget_mem)
local memory = lain.widget.mem({ local memory = lain.widget.mem({
settings = function() settings = function()
-- luacheck: globals widget mem_now -- luacheck: globals widget mem_now
widget:set_markup(markup.fontfg(theme.font, '#e0da37', mem_now.used .. 'M ')) widget:set_text(mem_now.used .. 'M')
end, end,
}) })
table.insert(info_widgets, {
widget = wibox.layout.fixed.horizontal(wibox.widget.imagebox(theme.widget_mem), memory.widget),
bg = '#e0da37'
})
-- < MEM
-- > CPU
local cpu = lain.widget.cpu({
settings = function()
-- luacheck: globals widget cpu_now
widget:set_markup(cpu_now.usage .. '%')
end,
})
table.insert(info_widgets, {
widget = wibox.layout.fixed.horizontal(wibox.widget.imagebox(theme.widget_cpu), cpu.widget),
bg = '#e33a6e'
})
-- < CPU
-- > fs
local fs = lain.widget.fs({
notification_preset = { font = 'Monospace 10', fg = theme.fg_normal },
settings = function()
-- luacheck: max line length 150, globals widget fs_now
widget:set_text(
fs_now['/'].percentage
.. '% ('
.. string.format('%.3f', fs_now['/'].free)
.. ' '
.. fs_now['/'].units
.. ' left)'
)
end,
})
fs.widget:buttons(gears.table.join(awful.button({}, 1, function()
awful.spawn('Thunar')
end)))
table.insert(info_widgets, {
widget = fs.widget,
bg = '#80d9d8'
})
-- < fs
-- > Textclock
os.setlocale(os.getenv('LANG')) -- to localize the clock
--local clockicon = wibox.widget.imagebox(theme.widget_clock)
local mytextclock = wibox.widget.textclock('%I:%M %a %d.%m')
mytextclock.font = theme.font
lain.widget.cal({
attach_to = { mytextclock },
notification_preset = {
font = 'Monospace 10',
fg = theme.fg_normal,
bg = theme.bg_normal,
},
})
table.insert(info_widgets, {
widget = mytextclock,
bg = '#7788af'
})
-- < Textclock
-- MPD -- MPD
--[[ --[[
@ -271,6 +331,8 @@ theme.mpd = lain.widget.mpd({
]] ]]
-- --
local final_info_widgets = build_widget_list(info_widgets)
function theme.at_screen_connect(s) function theme.at_screen_connect(s)
-- Quake application -- Quake application
s.quake = lain.util.quake({ app = awful.util.terminal }) s.quake = lain.util.quake({ app = awful.util.terminal })
@ -338,7 +400,7 @@ function theme.at_screen_connect(s)
widget = wibox.container.background, widget = wibox.container.background,
}, },
}) })
s.mytasklist = wibox.container.margin(s.mytasklist, 20, 20, 1, 1) s.mytasklist = wibox.container.margin(s.mytasklist, 10, 10, 0, 0)
-- Create the wibox -- Create the wibox
s.mywibox = s.mywibox =
@ -360,39 +422,9 @@ function theme.at_screen_connect(s)
gears.table.join( gears.table.join(
{ -- Right widgets { -- Right widgets
layout = wibox.layout.fixed.horizontal, layout = wibox.layout.fixed.horizontal,
wibox.widget.systray(), wibox.container.margin(wibox.widget.systray(), 0, 5)
--mailicon,
--theme.mail.widget,
{
{
{
layout = wibox.layout.fixed.horizontal,
netdownicon,
netdowninfo,
netupicon,
netupinfo.widget,
}, },
halign = 'right', final_info_widgets
widget = wibox.container.place,
},
width = 120,
strategy = 'exact',
layout = wibox.layout.constraint,
},
volicon,
theme.volume.widget,
memicon,
memory.widget,
cpuicon,
cpu.widget,
fsicon,
theme.fs.widget,
},
optional,
{
clockicon,
mytextclock,
}
), ),
}) })
end end