2013-09-13 21:20:22 +02:00
|
|
|
|
--[[
|
2017-09-13 12:34:28 +02:00
|
|
|
|
|
|
|
|
|
Blackburn Awesome WM theme 3.0
|
2017-10-07 13:10:43 +02:00
|
|
|
|
github.com/lcpz
|
2017-09-13 12:34:28 +02:00
|
|
|
|
|
2013-09-13 21:20:22 +02:00
|
|
|
|
--]]
|
|
|
|
|
|
2018-02-02 12:17:33 +01:00
|
|
|
|
local gears = require("gears")
|
|
|
|
|
local lain = require("lain")
|
|
|
|
|
local awful = require("awful")
|
|
|
|
|
local wibox = require("wibox")
|
2019-03-02 19:05:33 +01:00
|
|
|
|
local dpi = require("beautiful.xresources").apply_dpi
|
2018-02-02 12:17:33 +01:00
|
|
|
|
|
2018-10-16 17:28:46 +02:00
|
|
|
|
local os = os
|
2018-02-02 12:17:33 +01:00
|
|
|
|
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
|
2017-01-15 13:05:49 +01:00
|
|
|
|
|
2017-01-29 16:47:07 +01:00
|
|
|
|
local theme = {}
|
2017-01-15 13:05:49 +01:00
|
|
|
|
theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/blackburn"
|
|
|
|
|
theme.wallpaper = theme.dir .. "/wall.png"
|
2019-08-20 15:54:41 +02:00
|
|
|
|
theme.font = "Terminus 10.5"
|
2017-01-15 13:05:49 +01:00
|
|
|
|
theme.taglist_font = "Icons 10"
|
|
|
|
|
theme.fg_normal = "#D7D7D7"
|
|
|
|
|
theme.fg_focus = "#F6784F"
|
|
|
|
|
theme.bg_normal = "#060606"
|
|
|
|
|
theme.bg_focus = "#060606"
|
|
|
|
|
theme.fg_urgent = "#CC9393"
|
|
|
|
|
theme.bg_urgent = "#2A1F1E"
|
2019-03-02 19:05:33 +01:00
|
|
|
|
theme.border_width = dpi(1)
|
2017-01-15 13:05:49 +01:00
|
|
|
|
theme.border_normal = "#0E0E0E"
|
|
|
|
|
theme.border_focus = "#F79372"
|
|
|
|
|
theme.taglist_fg_focus = "#F6784F"
|
|
|
|
|
theme.taglist_bg_focus = "#060606"
|
|
|
|
|
theme.tasklist_fg_focus = "#F6784F"
|
|
|
|
|
theme.tasklist_bg_focus = "#060606"
|
2019-03-02 19:05:33 +01:00
|
|
|
|
theme.menu_height = dpi(16)
|
|
|
|
|
theme.menu_width = dpi(130)
|
2017-01-15 13:05:49 +01:00
|
|
|
|
theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png"
|
2017-01-16 14:11:02 +01:00
|
|
|
|
theme.awesome_icon = theme.dir .."/icons/awesome.png"
|
2017-01-15 13:05:49 +01:00
|
|
|
|
theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png"
|
|
|
|
|
theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png"
|
|
|
|
|
theme.layout_tile = theme.dir .. "/icons/tile.png"
|
|
|
|
|
theme.layout_tileleft = theme.dir .. "/icons/tileleft.png"
|
|
|
|
|
theme.layout_tilebottom = theme.dir .. "/icons/tilebottom.png"
|
|
|
|
|
theme.layout_tiletop = theme.dir .. "/icons/tiletop.png"
|
|
|
|
|
theme.layout_fairv = theme.dir .. "/icons/fairv.png"
|
|
|
|
|
theme.layout_fairh = theme.dir .. "/icons/fairh.png"
|
|
|
|
|
theme.layout_spiral = theme.dir .. "/icons/spiral.png"
|
|
|
|
|
theme.layout_dwindle = theme.dir .. "/icons/dwindle.png"
|
|
|
|
|
theme.layout_max = theme.dir .. "/icons/max.png"
|
|
|
|
|
theme.layout_fullscreen = theme.dir .. "/icons/fullscreen.png"
|
|
|
|
|
theme.layout_magnifier = theme.dir .. "/icons/magnifier.png"
|
|
|
|
|
theme.layout_floating = theme.dir .. "/icons/floating.png"
|
|
|
|
|
theme.tasklist_plain_task_name = true
|
|
|
|
|
theme.tasklist_disable_icon = true
|
|
|
|
|
theme.useless_gap = 0
|
|
|
|
|
theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close_focus.png"
|
|
|
|
|
theme.titlebar_close_button_normal = theme.dir .. "/icons/titlebar/close_normal.png"
|
|
|
|
|
theme.titlebar_ontop_button_focus_active = theme.dir .. "/icons/titlebar/ontop_focus_active.png"
|
|
|
|
|
theme.titlebar_ontop_button_normal_active = theme.dir .. "/icons/titlebar/ontop_normal_active.png"
|
|
|
|
|
theme.titlebar_ontop_button_focus_inactive = theme.dir .. "/icons/titlebar/ontop_focus_inactive.png"
|
|
|
|
|
theme.titlebar_ontop_button_normal_inactive = theme.dir .. "/icons/titlebar/ontop_normal_inactive.png"
|
|
|
|
|
theme.titlebar_sticky_button_focus_active = theme.dir .. "/icons/titlebar/sticky_focus_active.png"
|
|
|
|
|
theme.titlebar_sticky_button_normal_active = theme.dir .. "/icons/titlebar/sticky_normal_active.png"
|
|
|
|
|
theme.titlebar_sticky_button_focus_inactive = theme.dir .. "/icons/titlebar/sticky_focus_inactive.png"
|
|
|
|
|
theme.titlebar_sticky_button_normal_inactive = theme.dir .. "/icons/titlebar/sticky_normal_inactive.png"
|
|
|
|
|
theme.titlebar_floating_button_focus_active = theme.dir .. "/icons/titlebar/floating_focus_active.png"
|
|
|
|
|
theme.titlebar_floating_button_normal_active = theme.dir .. "/icons/titlebar/floating_normal_active.png"
|
|
|
|
|
theme.titlebar_floating_button_focus_inactive = theme.dir .. "/icons/titlebar/floating_focus_inactive.png"
|
|
|
|
|
theme.titlebar_floating_button_normal_inactive = theme.dir .. "/icons/titlebar/floating_normal_inactive.png"
|
|
|
|
|
theme.titlebar_maximized_button_focus_active = theme.dir .. "/icons/titlebar/maximized_focus_active.png"
|
|
|
|
|
theme.titlebar_maximized_button_normal_active = theme.dir .. "/icons/titlebar/maximized_normal_active.png"
|
|
|
|
|
theme.titlebar_maximized_button_focus_inactive = theme.dir .. "/icons/titlebar/maximized_focus_inactive.png"
|
|
|
|
|
theme.titlebar_maximized_button_normal_inactive = theme.dir .. "/icons/titlebar/maximized_normal_inactive.png"
|
2022-07-26 23:47:22 +02:00
|
|
|
|
theme.titlebar_minimize_button_focus = theme.dir .. "/icons/titlebar/minimize_focus.png"
|
|
|
|
|
theme.titlebar_minimize_button_normal = theme.dir .. "/icons/titlebar/minimize_normal.png"
|
2013-03-30 22:34:54 +01:00
|
|
|
|
|
2017-01-29 16:47:07 +01:00
|
|
|
|
awful.util.tagnames = { "ƀ", "Ƅ", "Ɗ", "ƈ", "ƙ" }
|
|
|
|
|
|
|
|
|
|
local markup = lain.util.markup
|
|
|
|
|
local separators = lain.util.separators
|
|
|
|
|
local gray = "#9E9C9A"
|
|
|
|
|
|
|
|
|
|
-- Textclock
|
|
|
|
|
local mytextclock = wibox.widget.textclock(" %H:%M ")
|
|
|
|
|
mytextclock.font = theme.font
|
|
|
|
|
|
|
|
|
|
-- Calendar
|
2018-09-14 21:24:48 +02:00
|
|
|
|
theme.cal = lain.widget.cal({
|
2017-01-29 16:47:07 +01:00
|
|
|
|
attach_to = { mytextclock },
|
|
|
|
|
notification_preset = {
|
2019-08-20 15:54:41 +02:00
|
|
|
|
font = "Terminus 11",
|
2017-01-29 16:47:07 +01:00
|
|
|
|
fg = theme.fg_normal,
|
|
|
|
|
bg = theme.bg_normal
|
2018-09-17 21:35:27 +02:00
|
|
|
|
}
|
|
|
|
|
})
|
2017-01-29 16:47:07 +01:00
|
|
|
|
|
2018-09-17 21:01:56 +02:00
|
|
|
|
-- Mail IMAP check
|
2021-03-15 19:12:15 +01:00
|
|
|
|
--[[ to be set before use
|
2018-09-17 21:35:27 +02:00
|
|
|
|
theme.mail = lain.widget.imap({
|
2017-01-29 16:47:07 +01:00
|
|
|
|
timeout = 180,
|
|
|
|
|
server = "server",
|
|
|
|
|
mail = "mail",
|
|
|
|
|
password = "keyring get mail",
|
|
|
|
|
notification_preset = { fg = white }
|
|
|
|
|
settings = function()
|
|
|
|
|
mail = ""
|
|
|
|
|
count = ""
|
|
|
|
|
|
|
|
|
|
if mailcount > 0 then
|
|
|
|
|
mail = "Mail "
|
|
|
|
|
count = mailcount .. " "
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
widget:set_markup(markup.font(theme.font, markup(gray, mail) .. count))
|
|
|
|
|
end
|
|
|
|
|
})
|
|
|
|
|
--]]
|
|
|
|
|
|
|
|
|
|
-- MPD
|
2017-02-08 14:16:12 +01:00
|
|
|
|
theme.mpd = lain.widget.mpd({
|
2017-01-29 16:47:07 +01:00
|
|
|
|
settings = function()
|
|
|
|
|
mpd_notification_preset.fg = white
|
|
|
|
|
artist = mpd_now.artist .. " "
|
|
|
|
|
title = mpd_now.title .. " "
|
|
|
|
|
|
|
|
|
|
if mpd_now.state == "pause" then
|
|
|
|
|
artist = "mpd "
|
|
|
|
|
title = "paused "
|
|
|
|
|
elseif mpd_now.state == "stop" then
|
|
|
|
|
artist = ""
|
|
|
|
|
title = ""
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
widget:set_markup(markup.font(theme.font, markup(gray, artist) .. title .. " "))
|
|
|
|
|
end
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
-- /home fs
|
2018-09-17 21:35:27 +02:00
|
|
|
|
--[[ commented because it needs Gio/Glib >= 2.54
|
2017-02-08 14:16:12 +01:00
|
|
|
|
theme.fs = lain.widget.fs({
|
2019-08-20 15:54:41 +02:00
|
|
|
|
notification_preset = { fg = white, bg = theme.bg_normal, font = "Terminus 10.5" },
|
2017-01-29 16:47:07 +01:00
|
|
|
|
settings = function()
|
|
|
|
|
fs_header = ""
|
|
|
|
|
fs_p = ""
|
|
|
|
|
|
2018-02-16 17:56:03 +01:00
|
|
|
|
if fs_now["/home"].percentage >= 90 then
|
2017-01-29 16:47:07 +01:00
|
|
|
|
fs_header = " Hdd "
|
2018-02-16 17:56:03 +01:00
|
|
|
|
fs_p = fs_now["/home"].percentage
|
2017-01-29 16:47:07 +01:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
widget:set_markup(markup.font(theme.font, markup(gray, fs_header) .. fs_p))
|
|
|
|
|
end
|
|
|
|
|
})
|
2018-09-17 21:01:56 +02:00
|
|
|
|
--]]
|
2017-01-29 16:47:07 +01:00
|
|
|
|
|
|
|
|
|
-- Battery
|
2017-02-08 14:16:12 +01:00
|
|
|
|
local bat = lain.widget.bat({
|
2017-01-29 16:47:07 +01:00
|
|
|
|
settings = function()
|
|
|
|
|
bat_header = " Bat "
|
|
|
|
|
bat_p = bat_now.perc .. " "
|
|
|
|
|
widget:set_markup(markup.font(theme.font, markup(gray, bat_header) .. bat_p))
|
|
|
|
|
end
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
-- ALSA volume
|
2017-02-08 14:16:12 +01:00
|
|
|
|
theme.volume = lain.widget.alsa({
|
2017-01-29 16:47:07 +01:00
|
|
|
|
--togglechannel = "IEC958,3",
|
|
|
|
|
settings = function()
|
|
|
|
|
header = " Vol "
|
|
|
|
|
vlevel = volume_now.level
|
|
|
|
|
|
|
|
|
|
if volume_now.status == "off" then
|
|
|
|
|
vlevel = vlevel .. "M "
|
|
|
|
|
else
|
|
|
|
|
vlevel = vlevel .. " "
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
widget:set_markup(markup.font(theme.font, markup(gray, header) .. vlevel))
|
|
|
|
|
end
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
-- Weather
|
2021-03-15 19:12:15 +01:00
|
|
|
|
--[[ to be set before use
|
2017-02-08 14:16:12 +01:00
|
|
|
|
theme.weather = lain.widget.weather({
|
2021-04-13 14:42:40 +02:00
|
|
|
|
--APPID =
|
2017-01-29 16:47:07 +01:00
|
|
|
|
city_id = 2643743, -- placeholder (London)
|
|
|
|
|
settings = function()
|
|
|
|
|
units = math.floor(weather_now["main"]["temp"])
|
|
|
|
|
widget:set_markup(" " .. units .. " ")
|
|
|
|
|
end
|
|
|
|
|
})
|
2021-03-15 19:12:15 +01:00
|
|
|
|
--]]
|
2017-01-29 16:47:07 +01:00
|
|
|
|
|
|
|
|
|
-- Separators
|
2019-08-20 15:54:41 +02:00
|
|
|
|
local first = wibox.widget.textbox('<span font="Terminus 4"> </span>')
|
2017-01-29 16:47:07 +01:00
|
|
|
|
local arrl_pre = separators.arrow_right("alpha", "#1A1A1A")
|
|
|
|
|
local arrl_post = separators.arrow_right("#1A1A1A", "alpha")
|
|
|
|
|
|
2019-03-02 19:05:33 +01:00
|
|
|
|
local barheight = dpi(18)
|
2017-01-29 16:47:07 +01:00
|
|
|
|
local barcolor = gears.color({
|
|
|
|
|
type = "linear",
|
|
|
|
|
from = { barheight, 0 },
|
|
|
|
|
to = { barheight, barheight },
|
|
|
|
|
stops = { {0, theme.bg_focus }, {0.8, theme.border_normal}, {1, "#1A1A1A"} }
|
|
|
|
|
})
|
|
|
|
|
theme.titlebar_bg = barcolor
|
|
|
|
|
|
|
|
|
|
theme.titlebar_bg_focus = gears.color({
|
|
|
|
|
type = "linear",
|
|
|
|
|
from = { barheight, 0 },
|
|
|
|
|
to = { barheight, barheight },
|
|
|
|
|
stops = { {0, theme.bg_normal}, {0.5, theme.border_normal}, {1, "#492417"} }
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
function theme.at_screen_connect(s)
|
|
|
|
|
-- Quake application
|
|
|
|
|
s.quake = lain.util.quake({ app = awful.util.terminal })
|
|
|
|
|
|
|
|
|
|
-- If wallpaper is a function, call it with the screen
|
2017-03-17 17:23:34 +01:00
|
|
|
|
local wallpaper = theme.wallpaper
|
|
|
|
|
if type(wallpaper) == "function" then
|
|
|
|
|
wallpaper = wallpaper(s)
|
2017-01-29 16:47:07 +01:00
|
|
|
|
end
|
2017-03-17 17:23:34 +01:00
|
|
|
|
gears.wallpaper.maximized(wallpaper, s, true)
|
2017-01-29 16:47:07 +01:00
|
|
|
|
|
|
|
|
|
-- Tags
|
2022-05-11 19:38:54 +02:00
|
|
|
|
awful.tag(awful.util.tagnames, s, awful.layout.layouts[1])
|
2017-01-29 16:47:07 +01:00
|
|
|
|
|
|
|
|
|
-- Create a promptbox for each screen
|
|
|
|
|
s.mypromptbox = awful.widget.prompt()
|
|
|
|
|
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
|
|
|
|
|
-- We need one layoutbox per screen.
|
|
|
|
|
s.mylayoutbox = awful.widget.layoutbox(s)
|
2018-02-02 12:17:33 +01:00
|
|
|
|
s.mylayoutbox:buttons(my_table.join(
|
2018-11-04 07:10:18 +01:00
|
|
|
|
awful.button({}, 1, function () awful.layout.inc( 1) end),
|
|
|
|
|
awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[1] ) end),
|
|
|
|
|
awful.button({}, 3, function () awful.layout.inc(-1) end),
|
|
|
|
|
awful.button({}, 4, function () awful.layout.inc( 1) end),
|
|
|
|
|
awful.button({}, 5, function () awful.layout.inc(-1) end)))
|
|
|
|
|
|
2017-01-29 16:47:07 +01:00
|
|
|
|
-- Create a taglist widget
|
|
|
|
|
s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons)
|
|
|
|
|
|
|
|
|
|
-- Create a tasklist widget
|
|
|
|
|
s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons, { bg_normal = barcolor, bg_focus = barcolor })
|
|
|
|
|
|
|
|
|
|
-- Create the wibox
|
2019-03-02 19:05:33 +01:00
|
|
|
|
s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(18), bg = barcolor })
|
2017-01-29 16:47:07 +01:00
|
|
|
|
|
|
|
|
|
-- Add widgets to the wibox
|
|
|
|
|
s.mywibox:setup {
|
|
|
|
|
layout = wibox.layout.align.horizontal,
|
|
|
|
|
{ -- Left widgets
|
|
|
|
|
layout = wibox.layout.fixed.horizontal,
|
|
|
|
|
first,
|
|
|
|
|
s.mytaglist,
|
|
|
|
|
arrl_pre,
|
|
|
|
|
s.mylayoutbox,
|
|
|
|
|
arrl_post,
|
|
|
|
|
s.mypromptbox,
|
|
|
|
|
first,
|
|
|
|
|
},
|
|
|
|
|
s.mytasklist, -- Middle widget
|
|
|
|
|
{ -- Right widgets
|
|
|
|
|
layout = wibox.layout.fixed.horizontal,
|
|
|
|
|
wibox.widget.systray(),
|
|
|
|
|
first,
|
|
|
|
|
theme.mpd.widget,
|
2018-09-17 21:35:27 +02:00
|
|
|
|
--theme.mail.widget,
|
2021-03-15 19:12:15 +01:00
|
|
|
|
--theme.weather.icon,
|
|
|
|
|
--theme.weather.widget,
|
2018-09-17 21:35:27 +02:00
|
|
|
|
--theme.fs.widget,
|
2017-01-29 16:47:07 +01:00
|
|
|
|
bat,
|
|
|
|
|
theme.volume.widget,
|
|
|
|
|
mytextclock,
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
end
|
|
|
|
|
|
2013-03-29 00:06:26 +01:00
|
|
|
|
return theme
|