awesome: win9x titlebar/borders
This commit is contained in:
parent
e065a8d86f
commit
46906bd0fb
|
@ -1,3 +1,5 @@
|
||||||
|
-- luacheck: globals awesome root globalkeys client screen debug_print
|
||||||
|
|
||||||
-- If LuaRocks is installed, make sure that packages installed through it are
|
-- If LuaRocks is installed, make sure that packages installed through it are
|
||||||
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
|
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
|
||||||
pcall(require, "luarocks.loader")
|
pcall(require, "luarocks.loader")
|
||||||
|
@ -70,13 +72,12 @@ local terminal = config.terminal or "xterm"
|
||||||
local terminal_separator = config.terminal_separator or "-e"
|
local terminal_separator = config.terminal_separator or "-e"
|
||||||
local editor = config.editor or os.getenv("EDITOR") or "nano"
|
local editor = config.editor or os.getenv("EDITOR") or "nano"
|
||||||
local editor_cmd = terminal .. " " .. terminal_separator .. " " .. editor
|
local editor_cmd = terminal .. " " .. terminal_separator .. " " .. editor
|
||||||
local screenshot = config.screenshot
|
|
||||||
local modkey = config.modkey or "Mod4"
|
local modkey = config.modkey or "Mod4"
|
||||||
local altkey = config.altkey or "Mod1"
|
local altkey = config.altkey or "Mod1"
|
||||||
|
|
||||||
cyclefocus.move_mouse_pointer = false
|
cyclefocus.move_mouse_pointer = false
|
||||||
cyclefocus.cycle_filters = {
|
cyclefocus.cycle_filters = {
|
||||||
function(c, source_c) return true end,
|
function() return true end,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Themes define colours, icons, font and wallpapers.
|
-- Themes define colours, icons, font and wallpapers.
|
||||||
|
@ -105,7 +106,7 @@ do
|
||||||
|
|
||||||
theme.wibar_height = 20
|
theme.wibar_height = 20
|
||||||
|
|
||||||
theme = beautiful.theme_assets.recolor_titlebar(theme, theme.fg_normal, "normal")
|
theme = beautiful.theme_assets.recolor_titlebar(theme, theme.__colors.color8, "normal")
|
||||||
theme = beautiful.theme_assets.recolor_titlebar(theme, theme.fg_focus, "focus")
|
theme = beautiful.theme_assets.recolor_titlebar(theme, theme.fg_focus, "focus")
|
||||||
theme = beautiful.theme_assets.recolor_layout(theme, theme.layout_fg)
|
theme = beautiful.theme_assets.recolor_layout(theme, theme.layout_fg)
|
||||||
|
|
||||||
|
@ -336,7 +337,7 @@ end
|
||||||
local clock_icon = makeBarIcon("clock")
|
local clock_icon = makeBarIcon("clock")
|
||||||
local uclock = wibox.widget.textclock(markup(beautiful.widget_clock or beautiful.wibar_fg, "(UTC: %H) "), 1, "UTC")
|
local uclock = wibox.widget.textclock(markup(beautiful.widget_clock or beautiful.wibar_fg, "(UTC: %H) "), 1, "UTC")
|
||||||
local clock = wibox.widget.textclock(markup(beautiful.widget_clock or beautiful.wibar_fg, "%H:%M:%S"), 1)
|
local clock = wibox.widget.textclock(markup(beautiful.widget_clock or beautiful.wibar_fg, "%H:%M:%S"), 1)
|
||||||
local calendar = lain.widget.cal({
|
lain.widget.cal({
|
||||||
attach_to = {clock},
|
attach_to = {clock},
|
||||||
week_start = 1,
|
week_start = 1,
|
||||||
week_number = "left",
|
week_number = "left",
|
||||||
|
@ -462,7 +463,7 @@ awful.widget.watch(
|
||||||
packages
|
packages
|
||||||
)
|
)
|
||||||
|
|
||||||
local function gm_round(num, idp)
|
--[[local function gm_round(num, idp)
|
||||||
local mult = 10 ^ (idp or 0)
|
local mult = 10 ^ (idp or 0)
|
||||||
return math.floor(num * mult + 0.5) / mult
|
return math.floor(num * mult + 0.5) / mult
|
||||||
end
|
end
|
||||||
|
@ -477,7 +478,7 @@ local function format_size(size)
|
||||||
return gm_round(size / (1024 * 1024 * 1024), 2) .. " GB"
|
return gm_round(size / (1024 * 1024 * 1024), 2) .. " GB"
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[local net_up_icon = makeBarIcon("net_up")
|
local net_up_icon = makeBarIcon("net_up")
|
||||||
local net_down_icon = makeBarIcon("net_down")
|
local net_down_icon = makeBarIcon("net_down")
|
||||||
local net_down = wibox.widget.textbox()
|
local net_down = wibox.widget.textbox()
|
||||||
local net_up = lain.widget.net({
|
local net_up = lain.widget.net({
|
||||||
|
@ -518,7 +519,7 @@ local music_wrapper = wibox.widget({
|
||||||
awful.widget.watch(
|
awful.widget.watch(
|
||||||
'bash -c "~/.config/awesome/scripts/cmus-wrapper.sh"',
|
'bash -c "~/.config/awesome/scripts/cmus-wrapper.sh"',
|
||||||
1,
|
1,
|
||||||
function(widget, stdout, stderr, reason, code)
|
function(widget, stdout, _, _, code)
|
||||||
if code ~= 0 then
|
if code ~= 0 then
|
||||||
music_wrapper.visible = false
|
music_wrapper.visible = false
|
||||||
|
|
||||||
|
@ -526,7 +527,7 @@ awful.widget.watch(
|
||||||
else
|
else
|
||||||
music_wrapper.visible = true
|
music_wrapper.visible = true
|
||||||
|
|
||||||
local nowplaying = ""
|
local nowplaying
|
||||||
|
|
||||||
local status = stdout:match("status (.-)\n")
|
local status = stdout:match("status (.-)\n")
|
||||||
local duration = tonumber(stdout:match("duration (.-)\n"))
|
local duration = tonumber(stdout:match("duration (.-)\n"))
|
||||||
|
@ -856,20 +857,20 @@ globalkeys = gears.table.join(
|
||||||
function()
|
function()
|
||||||
awful.spawn.with_line_callback("screenie-min", {
|
awful.spawn.with_line_callback("screenie-min", {
|
||||||
stdout = function(path)
|
stdout = function(path)
|
||||||
awful.menu({
|
awful.menu({
|
||||||
{
|
{
|
||||||
"Upload Image",
|
"Upload Image",
|
||||||
function()
|
function()
|
||||||
awful.spawn('elixiremanager.sh "' .. path .. '"')
|
awful.spawn('elixiremanager.sh "' .. path .. '"')
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Copy Image",
|
"Copy Image",
|
||||||
function()
|
function()
|
||||||
awful.spawn('xclip -selection clipboard -target image/png "' .. path .. '"')
|
awful.spawn('xclip -selection clipboard -target image/png "' .. path .. '"')
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
}):show()
|
}):show()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
@ -942,10 +943,10 @@ globalkeys = gears.table.join(
|
||||||
}
|
}
|
||||||
),--]]
|
),--]]
|
||||||
cyclefocus.key(
|
cyclefocus.key(
|
||||||
{altkey}, Tab
|
{altkey}, "Tab"
|
||||||
),
|
),
|
||||||
cyclefocus.key(
|
cyclefocus.key(
|
||||||
{altkey, "Shift"}, Tab
|
{altkey, "Shift"}, "Tab"
|
||||||
),
|
),
|
||||||
|
|
||||||
-- layout
|
-- layout
|
||||||
|
@ -1063,7 +1064,7 @@ globalkeys = gears.table.join(
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
clientkeys = gears.table.join(
|
local clientkeys = gears.table.join(
|
||||||
awful.key(
|
awful.key(
|
||||||
{modkey, "Shift"}, "f",
|
{modkey, "Shift"}, "f",
|
||||||
function(c)
|
function(c)
|
||||||
|
@ -1167,6 +1168,19 @@ clientkeys = gears.table.join(
|
||||||
description = "resize to 1600x900",
|
description = "resize to 1600x900",
|
||||||
group = "client",
|
group = "client",
|
||||||
}
|
}
|
||||||
|
),
|
||||||
|
awful.key(
|
||||||
|
{modkey}, "i",
|
||||||
|
function(c)
|
||||||
|
naughty.notify({
|
||||||
|
title = c.name,
|
||||||
|
text = "class: " .. c.class .. "\ninstance: " .. c.instance .. "\nrole: " .. (c.role or "<none>") .. "\ntype: " .. c.type,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
{
|
||||||
|
description = "dump client info",
|
||||||
|
group = "client",
|
||||||
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1214,7 +1228,7 @@ for i = 1, 9 do
|
||||||
if tag then
|
if tag then
|
||||||
client.focus:move_to_tag(tag)
|
client.focus:move_to_tag(tag)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
{
|
{
|
||||||
description = "move focused client to tag #"..i,
|
description = "move focused client to tag #"..i,
|
||||||
|
@ -1240,7 +1254,8 @@ for i = 1, 9 do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
clientbuttons = gears.table.join(
|
local titlebar_positions = {"top", "bottom", "left", "right"}
|
||||||
|
local clientbuttons = gears.table.join(
|
||||||
awful.button({}, 1, function(c)
|
awful.button({}, 1, function(c)
|
||||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
||||||
end),
|
end),
|
||||||
|
@ -1251,6 +1266,16 @@ clientbuttons = gears.table.join(
|
||||||
awful.button({modkey}, 3, function(c)
|
awful.button({modkey}, 3, function(c)
|
||||||
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
c:emit_signal("request::activate", "mouse_click", {raise = true})
|
||||||
awful.mouse.client.resize(c)
|
awful.mouse.client.resize(c)
|
||||||
|
end),
|
||||||
|
awful.button({modkey, "Shift"}, 1, function(c)
|
||||||
|
for _, pos in ipairs(titlebar_positions) do
|
||||||
|
awful.titlebar.hide(c, pos)
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
awful.button({modkey, "Shift"}, 3, function(c)
|
||||||
|
for _, pos in ipairs(titlebar_positions) do
|
||||||
|
awful.titlebar.show(c, pos)
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1265,7 +1290,7 @@ awful.rules.rules = {
|
||||||
{
|
{
|
||||||
rule = {},
|
rule = {},
|
||||||
properties = {
|
properties = {
|
||||||
border_width = beautiful.border_width,
|
border_width = 0, --beautiful.border_width,
|
||||||
border_color = beautiful.border_normal,
|
border_color = beautiful.border_normal,
|
||||||
focus = awful.client.focus.filter,
|
focus = awful.client.focus.filter,
|
||||||
raise = true,
|
raise = true,
|
||||||
|
@ -1306,6 +1331,8 @@ awful.rules.rules = {
|
||||||
"AlarmWindow", -- Thunderbird's calendar.
|
"AlarmWindow", -- Thunderbird's calendar.
|
||||||
"ConfigManager", -- Thunderbird's about:config.
|
"ConfigManager", -- Thunderbird's about:config.
|
||||||
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
|
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
|
||||||
|
"devtools",
|
||||||
|
"toolbox",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
properties = {
|
properties = {
|
||||||
|
@ -1325,6 +1352,30 @@ awful.rules.rules = {
|
||||||
titlebars_enabled = true
|
titlebars_enabled = true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- steam windows float + no titlebar
|
||||||
|
{
|
||||||
|
rule = {
|
||||||
|
instance = "Steam",
|
||||||
|
},
|
||||||
|
properties = {
|
||||||
|
floating = true,
|
||||||
|
titlebars_enabled = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- tg media preview fullscreen
|
||||||
|
{
|
||||||
|
rule = {
|
||||||
|
name = "Media viewer",
|
||||||
|
instance = "telegram-desktop",
|
||||||
|
},
|
||||||
|
properties = {
|
||||||
|
titlebars_enabled = false,
|
||||||
|
floating = true,
|
||||||
|
fullscreen = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
@ -1345,6 +1396,487 @@ client.connect_signal("manage", function (c)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
local win9x_l = {
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.secondary,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 1,
|
||||||
|
forced_width = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.color8,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 1,
|
||||||
|
forced_width = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.background,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 2,
|
||||||
|
forced_width = 2,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_width = 4,
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
}
|
||||||
|
local win9x_r = {
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.background,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 2,
|
||||||
|
forced_width = 2,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.color0,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 1,
|
||||||
|
forced_width = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.tertiary,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 1,
|
||||||
|
forced_width = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_width = 4,
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
}
|
||||||
|
local win9x_bl = {
|
||||||
|
{
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.secondary,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 1,
|
||||||
|
forced_width = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
{
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.color8,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 1,
|
||||||
|
forced_width = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.background,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 2,
|
||||||
|
forced_width = 2,
|
||||||
|
forced_height = 2,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 2,
|
||||||
|
forced_width = 3,
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
},
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.color0,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 1,
|
||||||
|
forced_height = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 3,
|
||||||
|
forced_width = 3,
|
||||||
|
layout = wibox.layout.fixed.vertical,
|
||||||
|
},
|
||||||
|
forced_height = 3,
|
||||||
|
forced_width = 4,
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
},
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.tertiary,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 1,
|
||||||
|
forced_height = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 4,
|
||||||
|
forced_width = 4,
|
||||||
|
layout = wibox.layout.fixed.vertical,
|
||||||
|
}
|
||||||
|
local win9x_b = {
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.background,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 2,
|
||||||
|
forced_height = 2,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.color0,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 1,
|
||||||
|
forced_height = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.tertiary,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 1,
|
||||||
|
forced_height = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 4,
|
||||||
|
layout = wibox.layout.fixed.vertical,
|
||||||
|
}
|
||||||
|
local win9x_br = {
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.background,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 2,
|
||||||
|
forced_width = 2,
|
||||||
|
forced_height = 2,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.color0,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 1,
|
||||||
|
forced_width = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 2,
|
||||||
|
forced_width = 3,
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
},
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.color0,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 1,
|
||||||
|
forced_height = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 3,
|
||||||
|
forced_width = 3,
|
||||||
|
layout = wibox.layout.fixed.vertical,
|
||||||
|
},
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.tertiary,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 1,
|
||||||
|
forced_width = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 3,
|
||||||
|
forced_width = 4,
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
},
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.tertiary,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 1,
|
||||||
|
forced_height = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 4,
|
||||||
|
forced_width = 4,
|
||||||
|
layout = wibox.layout.fixed.vertical,
|
||||||
|
}
|
||||||
|
local win9x_tl = {
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.secondary,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 1,
|
||||||
|
forced_height = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.secondary,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 1,
|
||||||
|
forced_width = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.color8,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 1,
|
||||||
|
forced_height = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.color8,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 1,
|
||||||
|
forced_width = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.background,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 2,
|
||||||
|
forced_width = 2,
|
||||||
|
forced_height = 2,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 2,
|
||||||
|
forced_width = 3,
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
},
|
||||||
|
forced_height = 3,
|
||||||
|
forced_width = 3,
|
||||||
|
layout = wibox.layout.fixed.vertical,
|
||||||
|
},
|
||||||
|
forced_height = 3,
|
||||||
|
forced_width = 4,
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
},
|
||||||
|
forced_height = 4,
|
||||||
|
forced_width = 4,
|
||||||
|
layout = wibox.layout.fixed.vertical,
|
||||||
|
}
|
||||||
|
local win9x_t = {
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.secondary,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 1,
|
||||||
|
forced_height = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.color8,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 1,
|
||||||
|
forced_height = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.background,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 2,
|
||||||
|
forced_height = 2,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 4,
|
||||||
|
layout = wibox.layout.fixed.vertical,
|
||||||
|
}
|
||||||
|
local win9x_tr = {
|
||||||
|
{
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.secondary,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 1,
|
||||||
|
forced_height = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
{
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.color8,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 1,
|
||||||
|
forced_height = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.background,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 2,
|
||||||
|
forced_width = 2,
|
||||||
|
forced_height = 2,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 3,
|
||||||
|
forced_width = 2,
|
||||||
|
layout = wibox.layout.fixed.vertical,
|
||||||
|
},
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.color0,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 1,
|
||||||
|
forced_width = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 3,
|
||||||
|
forced_width = 3,
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
},
|
||||||
|
forced_height = 4,
|
||||||
|
forced_width = 3,
|
||||||
|
layout = wibox.layout.fixed.vertical,
|
||||||
|
},
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.tertiary,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 1,
|
||||||
|
forced_width = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 4,
|
||||||
|
forced_width = 4,
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
}
|
||||||
|
local win9x_div = {
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.background,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 2,
|
||||||
|
forced_height = 2,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 2,
|
||||||
|
layout = wibox.layout.fixed.vertical,
|
||||||
|
}
|
||||||
|
local win9x_btn = {
|
||||||
|
{
|
||||||
|
{
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.color8,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 1,
|
||||||
|
forced_width = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.color8,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 1,
|
||||||
|
forced_height = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.secondary,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 1,
|
||||||
|
forced_width = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.secondary,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 1,
|
||||||
|
forced_height = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.background,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 10,
|
||||||
|
forced_height = 10,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 11,
|
||||||
|
forced_width = 12,
|
||||||
|
layout = wibox.layout.fixed.vertical,
|
||||||
|
},
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.color0,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 1,
|
||||||
|
forced_width = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 11,
|
||||||
|
forced_width = 14,
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
},
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.color0,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 1,
|
||||||
|
forced_height = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 13,
|
||||||
|
forced_width = 14,
|
||||||
|
layout = wibox.layout.fixed.vertical,
|
||||||
|
},
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.tertiary,
|
||||||
|
orientation = "vertical",
|
||||||
|
thickness = 1,
|
||||||
|
forced_width = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 13,
|
||||||
|
forced_width = 16,
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
},
|
||||||
|
wibox.widget({
|
||||||
|
widget = wibox.widget.separator,
|
||||||
|
color = beautiful.__colors.tertiary,
|
||||||
|
orientation = "horizontal",
|
||||||
|
thickness = 1,
|
||||||
|
forced_height = 1,
|
||||||
|
border_width = 0,
|
||||||
|
}),
|
||||||
|
forced_height = 14,
|
||||||
|
forced_width = 16,
|
||||||
|
layout = wibox.layout.fixed.vertical,
|
||||||
|
},
|
||||||
|
forced_height = 16,
|
||||||
|
forced_width = 16,
|
||||||
|
top = 1,
|
||||||
|
bottom = 1,
|
||||||
|
layout = wibox.container.margin,
|
||||||
|
}
|
||||||
|
|
||||||
|
local function win9xButton(child)
|
||||||
|
return {
|
||||||
|
win9x_btn,
|
||||||
|
child,
|
||||||
|
layout = wibox.layout.stack,
|
||||||
|
}
|
||||||
|
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)
|
||||||
-- buttons for the titlebar
|
-- buttons for the titlebar
|
||||||
|
@ -1359,40 +1891,104 @@ client.connect_signal("request::titlebars", function(c)
|
||||||
end)
|
end)
|
||||||
)
|
)
|
||||||
|
|
||||||
awful.titlebar(c):setup({
|
awful.titlebar(c, {
|
||||||
{ -- Left
|
position = "left",
|
||||||
{
|
size = 4,
|
||||||
awful.titlebar.widget.iconwidget(c),
|
bg_normal = "#00000000",
|
||||||
margins = 2,
|
bg_focus = "#00000000",
|
||||||
layout = wibox.container.margin,
|
}):setup(win9x_l)
|
||||||
},
|
awful.titlebar(c, {
|
||||||
{
|
position = "right",
|
||||||
awful.titlebar.widget.titlewidget(c),
|
size = 4,
|
||||||
left = 2,
|
bg_normal = "#00000000",
|
||||||
layout = wibox.container.margin,
|
bg_focus = "#00000000",
|
||||||
},
|
}):setup(win9x_r)
|
||||||
buttons = buttons,
|
|
||||||
layout = wibox.layout.fixed.horizontal
|
awful.titlebar(c, {
|
||||||
},
|
position = "bottom",
|
||||||
{ -- Middle
|
size = 4,
|
||||||
buttons = buttons,
|
bg_normal = "#00000000",
|
||||||
layout = wibox.layout.flex.horizontal
|
bg_focus = "#00000000",
|
||||||
},
|
}):setup({
|
||||||
{ -- Right
|
win9x_bl,
|
||||||
{
|
win9x_b,
|
||||||
awful.titlebar.widget.ontopbutton(c),
|
win9x_br,
|
||||||
awful.titlebar.widget.stickybutton(c),
|
|
||||||
awful.titlebar.widget.floatingbutton(c),
|
|
||||||
awful.titlebar.widget.minimizebutton(c),
|
|
||||||
awful.titlebar.widget.maximizedbutton(c),
|
|
||||||
awful.titlebar.widget.closebutton(c),
|
|
||||||
layout = wibox.layout.fixed.horizontal
|
|
||||||
},
|
|
||||||
margins = 2,
|
|
||||||
layout = wibox.container.margin,
|
|
||||||
},
|
|
||||||
layout = wibox.layout.align.horizontal,
|
layout = wibox.layout.align.horizontal,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local titlebar = awful.titlebar(c, {
|
||||||
|
size = 24,
|
||||||
|
fg_normal = beautiful.__colors.color8,
|
||||||
|
bg_focus = beautiful.__colors.accent,
|
||||||
|
})
|
||||||
|
|
||||||
|
titlebar:setup({
|
||||||
|
{
|
||||||
|
win9x_tl,
|
||||||
|
win9x_t,
|
||||||
|
win9x_tr,
|
||||||
|
forced_height = 4,
|
||||||
|
layout = wibox.layout.align.horizontal,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
win9x_l,
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{ -- Left
|
||||||
|
{
|
||||||
|
awful.titlebar.widget.iconwidget(c),
|
||||||
|
left = 2,
|
||||||
|
right = 2,
|
||||||
|
top = 1,
|
||||||
|
bottom = 1,
|
||||||
|
layout = wibox.container.margin,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
awful.titlebar.widget.titlewidget(c),
|
||||||
|
left = 2,
|
||||||
|
layout = wibox.container.margin,
|
||||||
|
},
|
||||||
|
buttons = buttons,
|
||||||
|
layout = wibox.layout.fixed.horizontal
|
||||||
|
},
|
||||||
|
{ -- Middle
|
||||||
|
buttons = buttons,
|
||||||
|
layout = wibox.layout.flex.horizontal
|
||||||
|
},
|
||||||
|
{ -- Right
|
||||||
|
{
|
||||||
|
{
|
||||||
|
win9xButton(awful.titlebar.widget.ontopbutton(c)),
|
||||||
|
win9xButton(awful.titlebar.widget.stickybutton(c)),
|
||||||
|
win9xButton(awful.titlebar.widget.floatingbutton(c)),
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
win9xButton(awful.titlebar.widget.minimizebutton(c)),
|
||||||
|
win9xButton(awful.titlebar.widget.maximizedbutton(c)),
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
},
|
||||||
|
win9xButton(awful.titlebar.widget.closebutton(c)),
|
||||||
|
spacing = 2,
|
||||||
|
layout = wibox.layout.fixed.horizontal
|
||||||
|
},
|
||||||
|
left = 2,
|
||||||
|
right = 2,
|
||||||
|
top = 1,
|
||||||
|
bottom = 1,
|
||||||
|
layout = wibox.container.margin,
|
||||||
|
},
|
||||||
|
forced_height = 18,
|
||||||
|
layout = wibox.layout.align.horizontal,
|
||||||
|
},
|
||||||
|
win9x_div,
|
||||||
|
layout = wibox.layout.align.vertical,
|
||||||
|
},
|
||||||
|
win9x_r,
|
||||||
|
layout = wibox.layout.align.horizontal,
|
||||||
|
},
|
||||||
|
layout = wibox.layout.align.vertical,
|
||||||
|
})
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- Enable sloppy focus, so that focus follows mouse.
|
-- Enable sloppy focus, so that focus follows mouse.
|
||||||
|
@ -1400,14 +1996,18 @@ end)
|
||||||
c:emit_signal("request::activate", "mouse_enter", {raise = false})
|
c:emit_signal("request::activate", "mouse_enter", {raise = false})
|
||||||
end)--]]
|
end)--]]
|
||||||
|
|
||||||
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
|
client.connect_signal("focus", function(c)
|
||||||
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
|
c.border_color = beautiful.border_focus
|
||||||
|
end)
|
||||||
|
client.connect_signal("unfocus", function(c)
|
||||||
|
c.border_color = beautiful.border_normal
|
||||||
|
end)
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
--{{{ Autostart
|
--{{{ Autostart
|
||||||
-- taken from: https://gitlab.com/luna/til/-/blob/main/awesome/rc.lua
|
-- taken from: https://gitlab.com/luna/til/-/blob/main/awesome/rc.lua
|
||||||
awful.spawn.with_line_callback(HOME .. "/.local/bin/autostart.sh", {
|
awful.spawn.with_line_callback(HOME .. "/.local/bin/autostart.sh", {
|
||||||
stdout = function(line)
|
stdout = function()
|
||||||
--[[naughty.notify({
|
--[[naughty.notify({
|
||||||
title = "autostart",
|
title = "autostart",
|
||||||
text = "pid: "..line.." already started",
|
text = "pid: "..line.." already started",
|
||||||
|
|
Loading…
Reference in New Issue