various fixes to currently ported themes

This commit is contained in:
copycat-killer 2017-01-29 13:40:34 +01:00
parent fe5585f180
commit 8f8897b157
5 changed files with 58 additions and 44 deletions

View File

@ -67,7 +67,7 @@ local gui_editor = "gvim"
local browser = "firefox" local browser = "firefox"
awful.util.terminal = terminal awful.util.terminal = terminal
awful.util.tagnames = { 1, 2, 3, 4, 5 } awful.util.tagnames = { "1", "2", "3", "4", "5" }
awful.layout.layouts = { awful.layout.layouts = {
awful.layout.suit.floating, awful.layout.suit.floating,
awful.layout.suit.tile, awful.layout.suit.tile,
@ -144,10 +144,15 @@ awful.util.tasklist_buttons = awful.util.table.join(
awful.client.focus.byidx(-1) awful.client.focus.byidx(-1)
end)) end))
lain.layout.termfair.nmaster = 3 lain.layout.termfair.nmaster = 3
lain.layout.termfair.ncol = 1 lain.layout.termfair.ncol = 1
lain.layout.termfair.center.nmaster = 3 lain.layout.termfair.center.nmaster = 3
lain.layout.termfair.center.ncol = 1 lain.layout.termfair.center.ncol = 1
lain.layout.cascade.tile.offset_x = 2
lain.layout.cascade.tile.offset_y = 32
lain.layout.cascade.tile.extra_padding = 5
lain.layout.cascade.tile.nmaster = 5
lain.layout.cascade.tile.ncol = 2
local theme_path = string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), chosen_theme) local theme_path = string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), chosen_theme)
beautiful.init(theme_path) beautiful.init(theme_path)
@ -342,8 +347,8 @@ globalkeys = awful.util.table.join(
-- Widgets popups -- Widgets popups
awful.key({ altkey, }, "c", function () lain.widgets.calendar.show(7) end), awful.key({ altkey, }, "c", function () lain.widgets.calendar.show(7) end),
awful.key({ altkey, }, "h", function () beautiful.fs.show(7) end), awful.key({ altkey, }, "h", function () if beautiful.fs then beautiful.fs.show(7) end end),
awful.key({ altkey, }, "w", function () beautiful.weather.show(7) end), awful.key({ altkey, }, "w", function () if beautiful.weather then beautiful.weather.show(7) end end),
-- ALSA volume control -- ALSA volume control
awful.key({ altkey }, "Up", awful.key({ altkey }, "Up",
@ -439,7 +444,7 @@ globalkeys = awful.util.table.join(
--[[ dmenu --[[ dmenu
awful.key({ modkey }, "x", function () awful.key({ modkey }, "x", function ()
awful.spawn(string.format("dmenu_run -i -fn 'Tamsyn' -nb '%s' -nf '%s' -sb '%s' -sf '%s'", awful.spawn(string.format("dmenu_run -i -fn 'Monospace' -nb '%s' -nf '%s' -sb '%s' -sf '%s'",
beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)) beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus))
end) end)
--]] --]]
@ -584,6 +589,13 @@ end)
-- Add a titlebar if titlebars_enabled is set to true in the rules. -- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c) client.connect_signal("request::titlebars", function(c)
-- Custom
if beautiful.titlebar_fun then
beautiful.titlebar_fun(c)
return
end
-- Default
-- buttons for the titlebar -- buttons for the titlebar
local buttons = awful.util.table.join( local buttons = awful.util.table.join(
awful.button({ }, 1, function() awful.button({ }, 1, function()

View File

@ -143,7 +143,7 @@ theme.mpd = lain.widgets.mpd({
else else
title = "" title = ""
artist = "" artist = ""
mpdicon.image = nil mpdicon._private.image = nil
mpdicon:emit_signal("widget::redraw_needed") mpdicon:emit_signal("widget::redraw_needed")
mpdicon:emit_signal("widget::layout_changed") mpdicon:emit_signal("widget::layout_changed")
end end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

After

Width:  |  Height:  |  Size: 191 B

View File

@ -16,7 +16,7 @@ local os = { getenv = os.getenv, setlocale = os.setlocale }
local theme = {} local theme = {}
theme.confdir = os.getenv("HOME") .. "/.config/awesome/themes/multicolor" theme.confdir = os.getenv("HOME") .. "/.config/awesome/themes/multicolor"
theme.wallpaper = theme.confdir .. "/wall.png" theme.wallpaper = theme.confdir .. "/wall.png"
theme.font = "Terminus 8" theme.font = "xos4 Terminus 8"
theme.menu_bg_normal = "#000000" theme.menu_bg_normal = "#000000"
theme.menu_bg_focus = "#000000" theme.menu_bg_focus = "#000000"
theme.bg_normal = "#000000" theme.bg_normal = "#000000"
@ -103,7 +103,7 @@ mytextclock.font = theme.font
theme.cal = lain.widgets.calendar({ theme.cal = lain.widgets.calendar({
attach_to = { mytextclock }, attach_to = { mytextclock },
notification_preset = { notification_preset = {
font = "Terminus 10", font = "xos4 Terminus 10",
fg = theme.fg_normal, fg = theme.fg_normal,
bg = theme.bg_normal bg = theme.bg_normal
} }
@ -113,11 +113,12 @@ theme.cal = lain.widgets.calendar({
local weathericon = wibox.widget.imagebox(theme.widget_weather) local weathericon = wibox.widget.imagebox(theme.widget_weather)
theme.weather = lain.widgets.weather({ theme.weather = lain.widgets.weather({
city_id = 2643743, -- placeholder (London) city_id = 2643743, -- placeholder (London)
weather_na_markup = markup("#eca4c4", "N/A "), notification_preset = { font = "xos4 Terminus 10", fg = theme.fg_normal },
weather_na_markup = markup.fontfg(theme.font, "#eca4c4", "N/A "),
settings = function() settings = function()
descr = weather_now["weather"][1]["description"]:lower() descr = weather_now["weather"][1]["description"]:lower()
units = math.floor(weather_now["main"]["temp"]) units = math.floor(weather_now["main"]["temp"])
widget:set_markup(markup("#eca4c4", descr .. " @ " .. units .. "°C ")) widget:set_markup(markup.fontfg(theme.font, "#eca4c4", descr .. " @ " .. units .. "°C "))
end end
}) })
@ -125,9 +126,9 @@ theme.weather = lain.widgets.weather({
local fsicon = wibox.widget.imagebox(theme.widget_fs) local fsicon = wibox.widget.imagebox(theme.widget_fs)
theme.fs = lain.widgets.fs({ theme.fs = lain.widgets.fs({
options = "--exclude-type=tmpfs", options = "--exclude-type=tmpfs",
notification_preset = { font = "Terminus 10", fg = theme.fg_normal }, notification_preset = { font = "xos4 Terminus 10", fg = theme.fg_normal },
settings = function() settings = function()
widget:set_markup(markup("#80d9d8", fs_now.used .. "% ")) widget:set_markup(markup.fontfg(theme.font, "#80d9d8", fs_now.used .. "% "))
end end
}) })
@ -142,7 +143,7 @@ local mail = lain.widgets.imap({
settings = function() settings = function()
if mailcount > 0 then if mailcount > 0 then
mailicon:set_image(theme.widget_mail) mailicon:set_image(theme.widget_mail)
widget:set_markup(markup("#cccccc", mailcount .. " ")) widget:set_markup(markup.fontfg(theme.font, "#cccccc", mailcount .. " "))
else else
widget:set_text("") widget:set_text("")
--mailicon:set_image() -- not working in 4.0 --mailicon:set_image() -- not working in 4.0
@ -158,7 +159,7 @@ local mail = lain.widgets.imap({
local cpuicon = wibox.widget.imagebox(theme.widget_cpu) local cpuicon = wibox.widget.imagebox(theme.widget_cpu)
local cpu = lain.widgets.cpu({ local cpu = lain.widgets.cpu({
settings = function() settings = function()
widget:set_markup(markup("#e33a6e", cpu_now.usage .. "% ")) widget:set_markup(markup.fontfg(theme.font, "#e33a6e", cpu_now.usage .. "% "))
end end
}) })
@ -166,7 +167,7 @@ local cpu = lain.widgets.cpu({
local tempicon = wibox.widget.imagebox(theme.widget_temp) local tempicon = wibox.widget.imagebox(theme.widget_temp)
local temp = lain.widgets.temp({ local temp = lain.widgets.temp({
settings = function() settings = function()
widget:set_markup(markup("#f1af5f", coretemp_now .. "°C ")) widget:set_markup(markup.fontfg(theme.font, "#f1af5f", coretemp_now .. "°C "))
end end
}) })
@ -181,7 +182,7 @@ local bat = lain.widgets.bat({
bat_now.perc = bat_now.perc .. " plug" bat_now.perc = bat_now.perc .. " plug"
end end
widget:set_markup(markup(theme.fg_normal, bat_now.perc .. " ")) widget:set_markup(markup.fontfg(theme.font, theme.fg_normal, bat_now.perc .. " "))
end end
}) })
@ -193,7 +194,7 @@ theme.volume = lain.widgets.alsa({
volume_now.level = volume_now.level .. "M" volume_now.level = volume_now.level .. "M"
end end
widget:set_markup(markup("#7493d2", volume_now.level .. "% ")) widget:set_markup(markup.fontfg(theme.font, "#7493d2", volume_now.level .. "% "))
end end
}) })
@ -209,8 +210,8 @@ local netupinfo = lain.widgets.net({
theme.weather.update() theme.weather.update()
end end
widget:set_markup(markup("#e54c62", net_now.sent .. " ")) widget:set_markup(markup.fontfg(theme.font, "#e54c62", net_now.sent .. " "))
netdowninfo:set_markup(markup("#87af5f", net_now.received .. " ")) netdowninfo:set_markup(markup.fontfg(theme.font, "#87af5f", net_now.received .. " "))
end end
}) })
@ -218,7 +219,7 @@ local netupinfo = lain.widgets.net({
local memicon = wibox.widget.imagebox(theme.widget_mem) local memicon = wibox.widget.imagebox(theme.widget_mem)
local memory = lain.widgets.mem({ local memory = lain.widgets.mem({
settings = function() settings = function()
widget:set_markup(markup("#e0da37", mem_now.used .. "M ")) widget:set_markup(markup.fontfg(theme.font, "#e0da37", mem_now.used .. "M "))
end end
}) })
@ -246,7 +247,7 @@ theme.mpd = lain.widgets.mpd({
mpdicon:emit_signal("widget::redraw_needed") mpdicon:emit_signal("widget::redraw_needed")
mpdicon:emit_signal("widget::layout_changed") mpdicon:emit_signal("widget::layout_changed")
end end
widget:set_markup(markup("#e54c62", artist) .. markup("#b2b2b2", title)) widget:set_markup(markup.fontfg(theme.font, "#e54c62", artist) .. markup.fontfg(theme.font, "#b2b2b2", title))
end end
}) })

View File

@ -15,7 +15,7 @@ local os = { getenv = os.getenv }
local theme = {} local theme = {}
theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/powerarrow-darker" theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/powerarrow-darker"
theme.wallpaper = theme.dir .. "/wall.png" theme.wallpaper = theme.dir .. "/wall.png"
theme.font = "Terminus 9" theme.font = "xos4 Terminus 9"
theme.fg_normal = "#DDDDFF" theme.fg_normal = "#DDDDFF"
theme.fg_focus = "#EA6F81" theme.fg_focus = "#EA6F81"
theme.fg_urgent = "#CC9393" theme.fg_urgent = "#CC9393"
@ -104,7 +104,7 @@ local clock = lain.widgets.abase({
theme.cal = lain.widgets.calendar({ theme.cal = lain.widgets.calendar({
attach_to = { clock.widget }, attach_to = { clock.widget },
notification_preset = { notification_preset = {
font = "Terminus 10", font = "xos4 Terminus 10",
fg = theme.fg_normal, fg = theme.fg_normal,
bg = theme.bg_normal bg = theme.bg_normal
} }
@ -134,7 +134,7 @@ local mail = lain.widgets.imap({
-- MPD -- MPD
local mpdicon = wibox.widget.imagebox(theme.widget_music) local mpdicon = wibox.widget.imagebox(theme.widget_music)
mpdicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(musicplr) end))) mpdicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(musicplr) end)))
local mpd = lain.widgets.mpd({ theme.mpd = lain.widgets.mpd({
settings = function() settings = function()
if mpd_now.state == "play" then if mpd_now.state == "play" then
artist = " " .. mpd_now.artist .. " " artist = " " .. mpd_now.artist .. " "
@ -149,7 +149,7 @@ local mpd = lain.widgets.mpd({
mpdicon:set_image(theme.widget_music) mpdicon:set_image(theme.widget_music)
end end
widget:set_markup(markup("#EA6F81", artist) .. title) widget:set_markup(markup.font(theme.font, markup("#EA6F81", artist) .. title))
end end
}) })
@ -157,7 +157,7 @@ local mpd = lain.widgets.mpd({
local memicon = wibox.widget.imagebox(theme.widget_mem) local memicon = wibox.widget.imagebox(theme.widget_mem)
local mem = lain.widgets.mem({ local mem = lain.widgets.mem({
settings = function() settings = function()
widget:set_text(" " .. mem_now.used .. "MB ") widget:set_markup(markup.font(theme.font, " " .. mem_now.used .. "MB "))
end end
}) })
@ -165,7 +165,7 @@ local mem = lain.widgets.mem({
local cpuicon = wibox.widget.imagebox(theme.widget_cpu) local cpuicon = wibox.widget.imagebox(theme.widget_cpu)
local cpu = lain.widgets.cpu({ local cpu = lain.widgets.cpu({
settings = function() settings = function()
widget:set_text(" " .. cpu_now.usage .. "% ") widget:set_markup(markup.font(theme.font, " " .. cpu_now.usage .. "% "))
end end
}) })
@ -173,17 +173,17 @@ local cpu = lain.widgets.cpu({
local tempicon = wibox.widget.imagebox(theme.widget_temp) local tempicon = wibox.widget.imagebox(theme.widget_temp)
local temp = lain.widgets.temp({ local temp = lain.widgets.temp({
settings = function() settings = function()
widget:set_text(" " .. coretemp_now .. "°C ") widget:set_markup(markup.font(theme.font, " " .. coretemp_now .. "°C "))
end end
}) })
-- / fs -- / fs
local fsicon = wibox.widget.imagebox(theme.widget_hdd) local fsicon = wibox.widget.imagebox(theme.widget_hdd)
local fsroot = lain.widgets.fs({ theme.fs = lain.widgets.fs({
options = "--exclude-type=tmpfs", options = "--exclude-type=tmpfs",
notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "Terminus 10" }, notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "xos4 Terminus 10" },
settings = function() settings = function()
widget:set_text(" " .. fs_now.used .. "% ") widget:set_markup(markup.font(theme.font, " " .. fs_now.used .. "% "))
end end
}) })
@ -193,7 +193,7 @@ local bat = lain.widgets.bat({
settings = function() settings = function()
if bat_now.status ~= "N/A" then if bat_now.status ~= "N/A" then
if bat_now.ac_status == 1 then if bat_now.ac_status == 1 then
widget:set_markup(" AC ") widget:set_markup(markup.font(theme.font, " AC "))
baticon:set_image(theme.widget_ac) baticon:set_image(theme.widget_ac)
return return
elseif not bat_now.perc and tonumber(bat_now.perc) <= 5 then elseif not bat_now.perc and tonumber(bat_now.perc) <= 5 then
@ -203,8 +203,9 @@ local bat = lain.widgets.bat({
else else
baticon:set_image(theme.widget_battery) baticon:set_image(theme.widget_battery)
end end
widget:set_markup(" " .. bat_now.perc .. "% ") widget:set_markup(markup.font(theme.font, " " .. bat_now.perc .. "% "))
else else
widget:set_markup(markup.font(theme.font, " AC "))
baticon:set_image(theme.widget_ac) baticon:set_image(theme.widget_ac)
end end
end end
@ -212,7 +213,7 @@ local bat = lain.widgets.bat({
-- ALSA volume -- ALSA volume
local volicon = wibox.widget.imagebox(theme.widget_vol) local volicon = wibox.widget.imagebox(theme.widget_vol)
local volume = lain.widgets.alsa({ theme.volume = lain.widgets.alsa({
settings = function() settings = function()
if volume_now.status == "off" then if volume_now.status == "off" then
volicon:set_image(theme.widget_vol_mute) volicon:set_image(theme.widget_vol_mute)
@ -224,18 +225,18 @@ local volume = lain.widgets.alsa({
volicon:set_image(theme.widget_vol) volicon:set_image(theme.widget_vol)
end end
widget:set_text(" " .. volume_now.level .. "% ") widget:set_markup(markup.font(theme.font, " " .. volume_now.level .. "% "))
end end
}) })
-- Net -- Net
local neticon = wibox.widget.imagebox(theme.widget_net) local neticon = wibox.widget.imagebox(theme.widget_net)
neticon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn_with_shell(iptraf) end)))
local net = lain.widgets.net({ local net = lain.widgets.net({
settings = function() settings = function()
widget:set_markup(markup("#7AC82E", " " .. net_now.received) widget:set_markup(markup.font(theme.font,
markup("#7AC82E", " " .. net_now.received)
.. " " .. .. " " ..
markup("#46A8C3", " " .. net_now.sent .. " ")) markup("#46A8C3", " " .. net_now.sent .. " ")))
end end
}) })
@ -293,10 +294,10 @@ function theme.at_screen_connect(s)
spr, spr,
arrl_ld, arrl_ld,
wibox.container.background(mpdicon, theme.bg_focus), wibox.container.background(mpdicon, theme.bg_focus),
wibox.container.background(mpd.widget, theme.bg_focus), wibox.container.background(theme.mpd.widget, theme.bg_focus),
arrl_dl, arrl_dl,
volicon, volicon,
volume.widget, theme.volume.widget,
arrl_ld, arrl_ld,
wibox.container.background(mailicon, theme.bg_focus), wibox.container.background(mailicon, theme.bg_focus),
--wibox.container.background(mail.widget, theme.bg_focus), --wibox.container.background(mail.widget, theme.bg_focus),
@ -311,7 +312,7 @@ function theme.at_screen_connect(s)
temp.widget, temp.widget,
arrl_ld, arrl_ld,
wibox.container.background(fsicon, theme.bg_focus), wibox.container.background(fsicon, theme.bg_focus),
wibox.container.background(fsroot.widget, theme.bg_focus), wibox.container.background(theme.fs.widget, theme.bg_focus),
arrl_dl, arrl_dl,
baticon, baticon,
bat.widget, bat.widget,