Add config files for awesomewm, alacritty, picom and rofi
This commit is contained in:
244
awesome/deco/statusbar.lua
Normal file
244
awesome/deco/statusbar.lua
Normal file
@@ -0,0 +1,244 @@
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
-- This is the statusbar, every widget, module and so on is combined to all the stuff you see on the screen --
|
||||
--------------------------------------------------------------------------------------------------------------
|
||||
-- Awesome Libs
|
||||
local awful = require("awful")
|
||||
local beautiful = require("beautiful")
|
||||
local colors = require ("theme.crylia.colors")
|
||||
local dpi = beautiful.xresources.apply_dpi
|
||||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
|
||||
local tasklist = require("theme.crylia.widgets.tasklist")
|
||||
local taglist = require("theme.crylia.widgets.taglist")
|
||||
|
||||
awful.screen.connect_for_each_screen(
|
||||
function (s)
|
||||
|
||||
-- Bar for the layoutbox, taglist and newtag button
|
||||
s.top_left = awful.popup {
|
||||
widget = {
|
||||
margins = dpi(10),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
ontop = false,
|
||||
bg = colors.color["Grey900"],
|
||||
stretch = false,
|
||||
visible = true,
|
||||
placement = function (c)
|
||||
awful.placement.top_left(c, {margins = dpi(10)})
|
||||
end,
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end
|
||||
}
|
||||
|
||||
-- Bar for the tasklist
|
||||
s.top_center = awful.popup{
|
||||
widget = {
|
||||
margins = dpi(10),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
ontop = false,
|
||||
bg = colors.color["Grey900"],
|
||||
visible = true,
|
||||
stretch = false,
|
||||
maximum_width = 600,
|
||||
placement = function (c)
|
||||
awful.placement.top(c, {margins = dpi(10)})
|
||||
end,
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end,
|
||||
layout = wibox.layout.flex.horizontal
|
||||
}
|
||||
|
||||
-- Bar for all the widgets
|
||||
s.top_right = awful.popup {
|
||||
widget = {
|
||||
margins = dpi(10),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
ontop = false,
|
||||
bg = "#212121",
|
||||
visible = true,
|
||||
placement = function (c)
|
||||
awful.placement.top_right(c, {margins = dpi(10)})
|
||||
end,
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 5)
|
||||
end
|
||||
}
|
||||
|
||||
-- Calendar OSD container
|
||||
s.calendar_osd_container = awful.popup{
|
||||
widget = {},
|
||||
ontop = true,
|
||||
bg = "#00000000",
|
||||
border_width = dpi(1),
|
||||
border_color = "#454545",
|
||||
shape = function (cr, height, width)
|
||||
gears.shape.rounded_rect(cr, dpi(500), dpi(300))
|
||||
end,
|
||||
placement = function (c)
|
||||
awful.placement.top_left(c, {margins = dpi(10)})
|
||||
end,
|
||||
}
|
||||
|
||||
-- OSD Container
|
||||
s.osd_container = awful.popup{
|
||||
widget = {
|
||||
margins = dpi(10),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
ontop = true,
|
||||
bg = "#00000000",
|
||||
border_width = dpi(1),
|
||||
border_color = "#454545",
|
||||
shape = function (cr, width, height)
|
||||
gears.shape.rounded_rect(cr, width, height, 10)
|
||||
end,
|
||||
placement = function (c)
|
||||
awful.placement.bottom_right(c, {margins = dpi(10)})
|
||||
end,
|
||||
}
|
||||
|
||||
-- All the modules and widgets
|
||||
s.volume_osd = require("theme.crylia.modules.volume_osd")()
|
||||
s.brightness_osd = require("theme.crylia.modules.brightness_osd")()
|
||||
s.battery = require("theme.crylia.widgets.battery")()
|
||||
s.network = require("theme.crylia.widgets.network")()
|
||||
s.audio = require("theme.crylia.widgets.audio")()
|
||||
s.date = require("theme.crylia.widgets.date")()
|
||||
s.clock = require("theme.crylia.widgets.clock")()
|
||||
s.bluetooth = require("theme.crylia.widgets.bluetooth")()
|
||||
s.calendar_osd = require("theme.crylia.modules.calendar_osd")()
|
||||
s.addtag = require("theme.crylia.widgets.addtag")()
|
||||
s.layoutlist = require("theme.crylia.widgets.layout_list")()
|
||||
|
||||
|
||||
s.top_left:setup {
|
||||
nil,
|
||||
nil,
|
||||
{
|
||||
{
|
||||
s.layoutlist,
|
||||
margins = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
taglist(s),
|
||||
margins = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
s.addtag,
|
||||
margins = dpi(7),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
forced_height = 45,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
|
||||
-- This is the space from top down till the window starts
|
||||
s.top_left:struts{
|
||||
top = 55
|
||||
}
|
||||
|
||||
s.top_center:setup{
|
||||
{
|
||||
tasklist(s),
|
||||
margins = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
forced_height = 45,
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
|
||||
s.top_right:setup {
|
||||
nil,
|
||||
nil,
|
||||
{
|
||||
{
|
||||
s.battery,
|
||||
left = dpi(6),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
s.network,
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
s.bluetooth,
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
s.audio,
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
s.date,
|
||||
left = dpi(3),
|
||||
right = dpi(3),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
{
|
||||
s.clock,
|
||||
left = dpi(3),
|
||||
right = dpi(6),
|
||||
top = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
forced_height = 45,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
|
||||
s.osd_container:setup{
|
||||
{
|
||||
s.volume_osd,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
},
|
||||
spacing = dpi(10),
|
||||
{
|
||||
s.brightness_osd,
|
||||
layout = wibox.layout.fixed.horizontal
|
||||
|
||||
},
|
||||
layout = wibox.layout.align.vertical
|
||||
}
|
||||
--[[ s.calendar_osd_container:setup{
|
||||
s.calendar_osd,
|
||||
layout = wibox.layout.align.horizontal
|
||||
} ]]
|
||||
|
||||
-- Signals
|
||||
awesome.connect_signal(
|
||||
"hide_centerbar",
|
||||
function (hide)
|
||||
s.top_center.visible = hide
|
||||
end
|
||||
)
|
||||
end
|
||||
)
|
||||
64
awesome/deco/taglist.lua
Normal file
64
awesome/deco/taglist.lua
Normal file
@@ -0,0 +1,64 @@
|
||||
-- This function does currently nothing
|
||||
-- Awesome Libs
|
||||
local gears = require("gears")
|
||||
local awful = require("awful")
|
||||
|
||||
local _M = { }
|
||||
|
||||
function _M.get()
|
||||
local taglist_buttons = gears.table.join(
|
||||
awful.button(
|
||||
{ },
|
||||
1,
|
||||
function (t)
|
||||
t:view_only()
|
||||
end
|
||||
),
|
||||
awful.button(
|
||||
{ modkey },
|
||||
1,
|
||||
function (t)
|
||||
if client.focus then
|
||||
client.focus:move_to_tag(t)
|
||||
end
|
||||
end
|
||||
),
|
||||
awful.button(
|
||||
{ },
|
||||
3,
|
||||
function (t)
|
||||
if client.focus then
|
||||
client.focus:toggle_tag(t)
|
||||
end
|
||||
end
|
||||
),
|
||||
awful.button(
|
||||
{ modkey },
|
||||
3,
|
||||
function (t)
|
||||
if client.focus then
|
||||
client.focus:toggle_tag(t)
|
||||
end
|
||||
end
|
||||
),
|
||||
awful.button(
|
||||
{ },
|
||||
4,
|
||||
function (t)
|
||||
awful.tag.viewnext(t.screen)
|
||||
end
|
||||
),
|
||||
awful.button(
|
||||
{ },
|
||||
5,
|
||||
function (t)
|
||||
if client.focus then
|
||||
awful.tag.viewprev(t.screen)
|
||||
end
|
||||
end
|
||||
)
|
||||
)
|
||||
return taglist_buttons
|
||||
end
|
||||
|
||||
return setmetatable({ }, { __call = function(_, ...) return _M.get(...) end})
|
||||
50
awesome/deco/tasklist.lua
Normal file
50
awesome/deco/tasklist.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
-- This function does currently nothing
|
||||
-- Default awesome libraries
|
||||
local gears = require("gears")
|
||||
local awful = require("awful")
|
||||
|
||||
local _M = {}
|
||||
|
||||
function _M.get()
|
||||
local tasklist_buttons = gears.table.join(
|
||||
awful.button(
|
||||
{ },
|
||||
1,
|
||||
function (c)
|
||||
if c == client.focus then
|
||||
c.minimized = true
|
||||
else
|
||||
c:emit_signal(
|
||||
"request::activate",
|
||||
"tasklist",
|
||||
{raise = true}
|
||||
)
|
||||
end
|
||||
end
|
||||
),
|
||||
awful.button(
|
||||
{ },
|
||||
3,
|
||||
function()
|
||||
awful.menu.client_list({ theme = { width = 250 } })
|
||||
end
|
||||
),
|
||||
awful.button(
|
||||
{ },
|
||||
4,
|
||||
function ()
|
||||
awful.client.focus.byidx(1)
|
||||
end
|
||||
),
|
||||
awful.button(
|
||||
{ },
|
||||
5,
|
||||
function ()
|
||||
awful.client.focus.byidx(-1)
|
||||
end
|
||||
)
|
||||
)
|
||||
return tasklist_buttons
|
||||
end
|
||||
|
||||
return setmetatable({}, { __call = function(_, ...) return _M.get(...) end })
|
||||
18
awesome/deco/wallpaper.lua
Normal file
18
awesome/deco/wallpaper.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
---------------------------------------
|
||||
-- This function sets your wallpaper --
|
||||
---------------------------------------
|
||||
-- Awesome Libs
|
||||
local gears = require("gears")
|
||||
local beautiful = require("beautiful")
|
||||
|
||||
function Set_wallpaper(s)
|
||||
if beautiful.wallpaper then
|
||||
local wallpaper = beautiful.wallpaper
|
||||
if type(wallpaper) == "function" then
|
||||
wallpaper = wallpaper(s)
|
||||
end
|
||||
gears.wallpaper.maximized(wallpaper, s, true)
|
||||
end
|
||||
end
|
||||
|
||||
screen.connect_signal("property::geometry", Set_wallpaper)
|
||||
Reference in New Issue
Block a user