yes, I'm very commit lazy

This commit is contained in:
2023-03-19 19:22:02 +01:00
parent 4f3fb75687
commit f399235db0
107 changed files with 11120 additions and 10906 deletions

View File

@@ -2,10 +2,10 @@
-- 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 dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
local aplacement = require('awful.placement')
local apopup = require('awful.popup')
local dpi = require('beautiful').xresources.apply_dpi
local wibox = require('wibox')
local capi = {
awesome = awesome,
@@ -17,7 +17,7 @@ return function(s, widgets)
local function prepare_widgets(w)
local layout = {
forced_height = dpi(50),
layout = wibox.layout.fixed.horizontal
layout = wibox.layout.fixed.horizontal,
}
for i, widget in pairs(w) do
if i == 1 then
@@ -28,7 +28,7 @@ return function(s, widgets)
right = dpi(6),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
widget = wibox.container.margin,
})
elseif i == #w then
table.insert(layout,
@@ -38,7 +38,7 @@ return function(s, widgets)
right = dpi(6),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
widget = wibox.container.margin,
})
else
table.insert(layout,
@@ -48,28 +48,28 @@ return function(s, widgets)
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
widget = wibox.container.margin,
})
end
end
return layout
end
local top_center = awful.popup {
local top_center = apopup {
screen = s,
widget = prepare_widgets(widgets),
ontop = false,
bg = Theme_config.center_bar.bg,
visible = true,
maximum_width = dpi(500),
placement = function(c) awful.placement.top(c, { margins = dpi(10) }) end
placement = function(c) aplacement.top(c, { margins = dpi(10) }) end,
}
top_center:struts {
top = dpi(55)
top = dpi(55),
}
capi.client.connect_signal("manage", function(c)
capi.client.connect_signal('manage', function(c)
if #s.selected_tag:clients() < 1 then
top_center.visible = false
else
@@ -77,7 +77,7 @@ return function(s, widgets)
end
end)
capi.client.connect_signal("unmanage", function(c)
capi.client.connect_signal('unmanage', function(c)
if #s.selected_tag:clients() < 1 then
top_center.visible = false
else
@@ -85,7 +85,7 @@ return function(s, widgets)
end
end)
capi.client.connect_signal("property::selected", function(c)
capi.client.connect_signal('property::selected', function(c)
if #s.selected_tag:clients() < 1 then
top_center.visible = false
else
@@ -93,7 +93,7 @@ return function(s, widgets)
end
end)
capi.awesome.connect_signal("refresh", function(c)
capi.awesome.connect_signal('refresh', function(c)
if #s.selected_tag:clients() < 1 then
top_center.visible = false
else

File diff suppressed because it is too large Load Diff

View File

@@ -10,42 +10,42 @@ return function(s)
local widget_table = {}
if widgets then
for _, widget in ipairs(widgets) do
if widget == "Audio" then
table.insert(widget_table, require("src.widgets.audio")(s))
elseif widget == "Battery" then
table.insert(widget_table, require("src.widgets.battery")(User_config.battery_kind))
elseif widget == "Bluetooth" then
table.insert(widget_table, require("src.widgets.bluetooth")(s))
elseif widget == "Clock" then
table.insert(widget_table, require("src.widgets.clock")())
elseif widget == "Cpu Frequency" then
table.insert(widget_table, require("src.widgets.cpu_info")("freq"))
elseif widget == "Cpu Temperature" then
table.insert(widget_table, require("src.widgets.cpu_info")("temp"))
elseif widget == "Cpu Usage" then
table.insert(widget_table, require("src.widgets.cpu_info")("usage"))
elseif widget == "Date" then
table.insert(widget_table, require("src.widgets.date")(s))
elseif widget == "Gpu Temperature" then
table.insert(widget_table, require("src.widgets.gpu_info")("temp"))
elseif widget == "Gpu Usage" then
table.insert(widget_table, require("src.widgets.gpu_info")("usage"))
elseif widget == "Keyboard Layout" then
table.insert(widget_table, require("src.widgets.kblayout")(s))
elseif widget == "Tiling Layout" then
table.insert(widget_table, require("src.widgets.layout_list")())
elseif widget == "Network" then
table.insert(widget_table, require("src.widgets.network") { screen = s })
elseif widget == "Power Button" then
table.insert(widget_table, require("src.widgets.power")())
elseif widget == "Ram Usage" then
table.insert(widget_table, require("src.widgets.ram_info")())
elseif widget == "Systray" then
table.insert(widget_table, require("src.widgets.systray")(s))
elseif widget == "Taglist" then
table.insert(widget_table, require("src.widgets.taglist")(s))
elseif widget == "Tasklist" then
table.insert(widget_table, require("src.widgets.tasklist")(s))
if widget == 'Audio' then
table.insert(widget_table, require('src.widgets.audio')(s))
elseif widget == 'Battery' then
table.insert(widget_table, require('src.widgets.battery')(User_config.battery_kind))
elseif widget == 'Bluetooth' then
table.insert(widget_table, require('src.widgets.bluetooth')(s))
elseif widget == 'Clock' then
table.insert(widget_table, require('src.widgets.clock')())
elseif widget == 'Cpu Frequency' then
table.insert(widget_table, require('src.widgets.cpu_info')('freq'))
elseif widget == 'Cpu Temperature' then
table.insert(widget_table, require('src.widgets.cpu_info')('temp'))
elseif widget == 'Cpu Usage' then
table.insert(widget_table, require('src.widgets.cpu_info')('usage'))
elseif widget == 'Date' then
table.insert(widget_table, require('src.widgets.date')(s))
elseif widget == 'Gpu Temperature' then
table.insert(widget_table, require('src.widgets.gpu_info')('temp'))
elseif widget == 'Gpu Usage' then
table.insert(widget_table, require('src.widgets.gpu_info')('usage'))
elseif widget == 'Keyboard Layout' then
table.insert(widget_table, require('src.widgets.kblayout')(s))
elseif widget == 'Tiling Layout' then
table.insert(widget_table, require('src.widgets.layout_list')())
elseif widget == 'Network' then
table.insert(widget_table, require('src.widgets.network') { screen = s })
elseif widget == 'Power Button' then
table.insert(widget_table, require('src.widgets.power')())
elseif widget == 'Ram Usage' then
table.insert(widget_table, require('src.widgets.ram_info')())
elseif widget == 'Systray' then
table.insert(widget_table, require('src.widgets.systray')())
elseif widget == 'Taglist' then
table.insert(widget_table, require('src.widgets.taglist')(s))
elseif widget == 'Tasklist' then
table.insert(widget_table, require('src.widgets.tasklist')(s))
end
end
end
@@ -56,16 +56,16 @@ return function(s)
for index, screen in ipairs(User_config.crylia_bar) do
if index == s.index then
if screen.left_bar then
require("src.modules.crylia_bar.left_bar")(s, get_widgets(screen.left_bar))
require('src.modules.crylia_bar.left_bar')(s, get_widgets(screen.left_bar))
end
if screen.center_bar then
require("src.modules.crylia_bar.center_bar")(s, get_widgets(screen.center_bar))
require('src.modules.crylia_bar.center_bar')(s, get_widgets(screen.center_bar))
end
if screen.right_bar then
require("src.modules.crylia_bar.right_bar")(s, get_widgets(screen.right_bar))
require('src.modules.crylia_bar.right_bar')(s, get_widgets(screen.right_bar))
end
end
end
end
require("src.modules.crylia_bar.dock")(s)
require('src.modules.crylia_bar.dock') { screen = s }
end

View File

@@ -2,16 +2,15 @@
-- 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 dpi = require("beautiful").xresources.apply_dpi
local wibox = require("wibox")
local awful = require('awful')
local dpi = require('beautiful').xresources.apply_dpi
local wibox = require('wibox')
return function(s, w)
local function prepare_widgets(widgets)
local layout = {
forced_height = dpi(50),
layout = wibox.layout.fixed.horizontal
layout = wibox.layout.fixed.horizontal,
}
for i, widget in pairs(widgets) do
if i == 1 then
@@ -22,7 +21,7 @@ return function(s, w)
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
widget = wibox.container.margin,
})
elseif i == #widgets then
table.insert(layout,
@@ -32,7 +31,7 @@ return function(s, w)
right = dpi(6),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
widget = wibox.container.margin,
})
else
table.insert(layout,
@@ -42,7 +41,7 @@ return function(s, w)
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
widget = wibox.container.margin,
})
end
end
@@ -50,17 +49,17 @@ return function(s, w)
end
local top_left = awful.popup {
screen = s,
widget = prepare_widgets(w),
ontop = false,
bg = Theme_config.left_bar.bg,
visible = true,
maximum_width = dpi(650),
placement = function(c) awful.placement.top_left(c, { margins = dpi(10) }) end
}
screen = s,
widget = prepare_widgets(w),
ontop = false,
bg = Theme_config.left_bar.bg,
visible = true,
maximum_width = dpi(650),
placement = function(c) awful.placement.top_left(c, { margins = dpi(10) }) end,
}
top_left:struts {
top = dpi(55)
top = dpi(55),
}
Global_config.top_struts = dpi(55)

View File

@@ -2,16 +2,15 @@
-- 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 dpi = require("beautiful").xresources.apply_dpi
local wibox = require("wibox")
local awful = require('awful')
local dpi = require('beautiful').xresources.apply_dpi
local wibox = require('wibox')
return function(s, w)
local function prepare_widgets(widgets)
local layout = {
forced_height = dpi(50),
layout = wibox.layout.fixed.horizontal
layout = wibox.layout.fixed.horizontal,
}
for i, widget in pairs(widgets) do
if i == 1 then
@@ -22,7 +21,7 @@ return function(s, w)
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
widget = wibox.container.margin,
})
elseif i == #widgets then
table.insert(layout,
@@ -32,7 +31,7 @@ return function(s, w)
right = dpi(6),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
widget = wibox.container.margin,
})
else
table.insert(layout,
@@ -42,7 +41,7 @@ return function(s, w)
right = dpi(3),
top = dpi(6),
bottom = dpi(6),
widget = wibox.container.margin
widget = wibox.container.margin,
})
end
end
@@ -55,11 +54,11 @@ return function(s, w)
bg = Theme_config.right_bar.bg,
visible = true,
screen = s,
placement = function(c) awful.placement.top_right(c, { margins = dpi(10) }) end
placement = function(c) awful.placement.top_right(c, { margins = dpi(10) }) end,
}
top_right:struts {
top = dpi(55)
top = dpi(55),
}
Global_config.top_struts = top_right