mirror of
https://github.com/lcpz/awesome-copycats.git
synced 2024-12-22 11:12:31 +00:00
vertex: fixed wibar, added mpd widget
This commit is contained in:
parent
31af9bf538
commit
d8ad21fba4
2
lain
2
lain
|
@ -1 +1 @@
|
||||||
Subproject commit 1555e239eb42953d6d16b04f09d4d19083fa5119
|
Subproject commit a1ba90261b31ccce1ac2ecb7ca7aedbc20eca441
|
|
@ -11,7 +11,7 @@ local lain = require("lain")
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
local wibox = require("wibox")
|
local wibox = require("wibox")
|
||||||
local theme_assets = require("beautiful.theme_assets")
|
local theme_assets = require("beautiful.theme_assets")
|
||||||
local math, string, tonumber, os = math, string, tonumber, os
|
local math, string, tonumber, type, os = math, string, tonumber, type, os
|
||||||
|
|
||||||
local theme = {}
|
local theme = {}
|
||||||
theme.default_dir = require("awful.util").get_themes_dir() .. "default"
|
theme.default_dir = require("awful.util").get_themes_dir() .. "default"
|
||||||
|
@ -155,6 +155,25 @@ local bat = lain.widgets.bat({
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- MPD
|
||||||
|
theme.mpd = lain.widgets.mpd({
|
||||||
|
music_dir = "/mnt/storage/Downloads/Music",
|
||||||
|
settings = function()
|
||||||
|
if mpd_now.state == "play" then
|
||||||
|
title = mpd_now.title
|
||||||
|
artist = " " .. mpd_now.artist .. " "
|
||||||
|
elseif mpd_now.state == "pause" then
|
||||||
|
title = "mpd "
|
||||||
|
artist = "paused "
|
||||||
|
else
|
||||||
|
title = ""
|
||||||
|
artist = ""
|
||||||
|
end
|
||||||
|
|
||||||
|
widget:set_markup(markup.font(theme.font, title .. markup(theme.fg_focus, artist)))
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
-- ALSA volume
|
-- ALSA volume
|
||||||
local volicon = wibox.widget.imagebox()
|
local volicon = wibox.widget.imagebox()
|
||||||
theme.volume = lain.widgets.alsabar({
|
theme.volume = lain.widgets.alsabar({
|
||||||
|
@ -246,13 +265,13 @@ mylauncher:connect_signal("button::press", function() awful.util.mymainmenu:togg
|
||||||
-- Separators
|
-- Separators
|
||||||
local space = wibox.widget.textbox(" ")
|
local space = wibox.widget.textbox(" ")
|
||||||
local rspace1 = wibox.widget.textbox()
|
local rspace1 = wibox.widget.textbox()
|
||||||
local rspace11 = wibox.widget.textbox()
|
local rspace0 = wibox.widget.textbox()
|
||||||
local rspace2 = wibox.widget.textbox()
|
local rspace2 = wibox.widget.textbox()
|
||||||
local rspace3 = wibox.widget.textbox()
|
local rspace3 = wibox.widget.textbox()
|
||||||
local tspace1 = wibox.widget.textbox()
|
local tspace1 = wibox.widget.textbox()
|
||||||
tspace1.forced_width = 18
|
tspace1.forced_width = 18
|
||||||
rspace1.forced_width = 16
|
rspace1.forced_width = 16
|
||||||
rspace11.forced_width = 18
|
rspace0.forced_width = 18
|
||||||
rspace2.forced_width = 19
|
rspace2.forced_width = 19
|
||||||
rspace3.forced_width = 21
|
rspace3.forced_width = 21
|
||||||
|
|
||||||
|
@ -326,7 +345,7 @@ function theme.at_screen_connect(s)
|
||||||
layout = wibox.layout.fixed.horizontal,
|
layout = wibox.layout.fixed.horizontal,
|
||||||
s.mypromptbox,
|
s.mypromptbox,
|
||||||
tspace1,
|
tspace1,
|
||||||
wibox.container.constraint(wibox.container.constraint(s.mytasklist, "min", s.workarea.width/4), "max", s.workarea.width/4),
|
wibox.container.constraint(s.mytasklist, "exact", s.workarea.width/2.6),
|
||||||
},
|
},
|
||||||
{ -- Middle widgets
|
{ -- Middle widgets
|
||||||
layout = wibox.layout.flex.horizontal,
|
layout = wibox.layout.flex.horizontal,
|
||||||
|
@ -335,12 +354,13 @@ function theme.at_screen_connect(s)
|
||||||
},
|
},
|
||||||
{ -- Right widgets
|
{ -- Right widgets
|
||||||
layout = wibox.layout.fixed.horizontal,
|
layout = wibox.layout.fixed.horizontal,
|
||||||
wibox.container.constraint(space, "min", s.workarea.width/4),
|
wibox.container.constraint(wibox.widget { nil, nil, theme.mpd.widget, layout = wibox.layout.align.horizontal }, "exact", s.workarea.width/3),
|
||||||
|
rspace0,
|
||||||
theme.weather.icon,
|
theme.weather.icon,
|
||||||
theme.weather.widget,
|
theme.weather.widget,
|
||||||
rspace1,
|
rspace1,
|
||||||
wificon,
|
wificon,
|
||||||
rspace11,
|
rspace0,
|
||||||
volicon,
|
volicon,
|
||||||
rspace2,
|
rspace2,
|
||||||
baticon,
|
baticon,
|
||||||
|
|
Loading…
Reference in a new issue