🐛 fix: Awesome config baseline

This commit is contained in:
punkfairie 2024-02-19 19:41:33 -08:00
parent 3da95d6ec2
commit e7fcada03c
65 changed files with 2191 additions and 2442 deletions

View file

@ -7,17 +7,20 @@ M.keys = {
M.apps = {
terminal = "wezterm",
launcher = "rofi -no-lazy-grab -show drun -theme ~/.config/rofi/launcher.rasi",
browser = "firefox",
file_manager = "thunar",
editor = os.getenv("EDITOR") or "nvim",
}
M.apps.start_editor = M.apps.terminal .. "-e" .. M.apps.editor
M.apps.music_player = M.apps.terminal .. "--class music -e ncmpcpp"
M.widget = {}
M.widget.weather = {
api_key = "",
coordinates = { lat = "", lon = "" },
api_key = "e894c3e6c1a9d2217eee94791e845c96",
coordinates = { lat = "47.773140", lon = "-122.303660" },
}
M.widget.github = {

View file

@ -3,7 +3,6 @@ local wibox = require("wibox")
local gshape = require("gears.shape")
local gmatrix = require("gears.matrix")
local ipairs = ipairs
local table = table
local capi = { mouse = mouse }
local _ui = {}
@ -94,8 +93,8 @@ local function _get_widget_geometry(_hierarchy, widget)
end
end
function _ui.get_widget_geometry(wibox, widget)
return _get_widget_geometry(wibox._drawable._widget_hierarchy, widget)
function _ui.get_widget_geometry(_wibox, widget)
return _get_widget_geometry(_wibox._drawable._widget_hierarchy, widget)
end
function _ui.screen_mask(s, bg)
@ -111,17 +110,17 @@ function _ui.screen_mask(s, bg)
end
function _ui.grouping_widget(w1, w2, dpi1)
local container = wibox.widget {
local container = wibox.widget({
w1,
{
nil,
w2,
expand = 'none',
expand = "none",
layout = wibox.layout.flex.vertical,
},
spacing = dpi1,
layout = wibox.layout.fixed.horizontal,
}
})
return container
end

View file

@ -6,7 +6,7 @@
local gobject = require("gears.object")
-- Kidna copying awesotre's stores on a surface level for added compatibility
local function subscribable(args)
local function subscribable()
local ret = gobject({})
local subscribed = {}

View file

@ -41,7 +41,7 @@ local tween = {
]],
}
local pow, sin, cos, pi, sqrt, abs, asin = math.pow, math.sin, math.cos, math.pi, math.sqrt, math.abs, math.asin
local sin, cos, pi, sqrt, abs, asin = math.sin, math.cos, math.pi, math.sqrt, math.abs, math.asin
-- linear
local function linear(t, b, c, d)
@ -50,7 +50,7 @@ end
-- quad
local function inQuad(t, b, c, d)
return c * pow(t / d, 2) + b
return c * ((t / d) ^ 2) + b
end
local function outQuad(t, b, c, d)
t = t / d
@ -59,7 +59,7 @@ end
local function inOutQuad(t, b, c, d)
t = t / d * 2
if t < 1 then
return c / 2 * pow(t, 2) + b
return c / 2 * (t ^ 2) + b
end
return -c / 2 * ((t - 1) * (t - 3) - 1) + b
end
@ -72,10 +72,10 @@ end
-- cubic
local function inCubic(t, b, c, d)
return c * pow(t / d, 3) + b
return c * ((t / d) ^ 3) + b
end
local function outCubic(t, b, c, d)
return c * (pow(t / d - 1, 3) + 1) + b
return c * (((t / d - 1) ^ 3) + 1) + b
end
local function inOutCubic(t, b, c, d)
t = t / d * 2
@ -94,17 +94,17 @@ end
-- quart
local function inQuart(t, b, c, d)
return c * pow(t / d, 4) + b
return c * ((t / d) ^ 4) + b
end
local function outQuart(t, b, c, d)
return -c * (pow(t / d - 1, 4) - 1) + b
return -c * (((t / d - 1) ^ 4) - 1) + b
end
local function inOutQuart(t, b, c, d)
t = t / d * 2
if t < 1 then
return c / 2 * pow(t, 4) + b
return c / 2 * (t ^ 4) + b
end
return -c / 2 * (pow(t - 2, 4) - 2) + b
return -c / 2 * (((t - 2) ^ 4) - 2) + b
end
local function outInQuart(t, b, c, d)
if t < d / 2 then
@ -115,17 +115,17 @@ end
-- quint
local function inQuint(t, b, c, d)
return c * pow(t / d, 5) + b
return c * ((t / d) ^ 5) + b
end
local function outQuint(t, b, c, d)
return c * (pow(t / d - 1, 5) + 1) + b
return c * (((t / d - 1) ^ 5) + 1) + b
end
local function inOutQuint(t, b, c, d)
t = t / d * 2
if t < 1 then
return c / 2 * pow(t, 5) + b
return c / 2 * (t ^ 5) + b
end
return c / 2 * (pow(t - 2, 5) + 2) + b
return c / 2 * (((t - 2) ^ 5) + 2) + b
end
local function outInQuint(t, b, c, d)
if t < d / 2 then
@ -156,13 +156,13 @@ local function inExpo(t, b, c, d)
if t == 0 then
return b
end
return c * pow(2, 10 * (t / d - 1)) + b - c * 0.001
return c * (2 ^ (10 * (t / d - 1))) + b - c * 0.001
end
local function outExpo(t, b, c, d)
if t == d then
return b + c
end
return c * 1.001 * (-pow(2, -10 * t / d) + 1) + b
return c * 1.001 * (-(2 ^ (-10 * t / d)) + 1) + b
end
local function inOutExpo(t, b, c, d)
if t == 0 then
@ -173,9 +173,9 @@ local function inOutExpo(t, b, c, d)
end
t = t / d * 2
if t < 1 then
return c / 2 * pow(2, 10 * (t - 1)) + b - c * 0.0005
return c / 2 * (2 ^ (10 * (t - 1))) + b - c * 0.0005
end
return c / 2 * 1.0005 * (-pow(2, -10 * (t - 1)) + 2) + b
return c / 2 * 1.0005 * (-(2 ^ (-10 * (t - 1))) + 2) + b
end
local function outInExpo(t, b, c, d)
if t < d / 2 then
@ -186,10 +186,10 @@ end
-- circ
local function inCirc(t, b, c, d)
return (-c * (sqrt(1 - pow(t / d, 2)) - 1) + b)
return (-c * (sqrt(1 - ((t / d) ^ 2)) - 1) + b)
end
local function outCirc(t, b, c, d)
return (c * sqrt(1 - pow(t / d - 1, 2)) + b)
return (c * sqrt(1 - ((t / d - 1) ^ 2)) + b)
end
local function inOutCirc(t, b, c, d)
t = t / d * 2
@ -225,7 +225,7 @@ local function inElastic(t, b, c, d, a, p)
end
p, a, s = calculatePAS(p, a, c, d)
t = t - 1
return -(a * pow(2, 10 * t) * sin((t * d - s) * (2 * pi) / p)) + b
return -(a * (2 ^ (10 * t)) * sin((t * d - s) * (2 * pi) / p)) + b
end
local function outElastic(t, b, c, d, a, p)
local s
@ -237,7 +237,7 @@ local function outElastic(t, b, c, d, a, p)
return b + c
end
p, a, s = calculatePAS(p, a, c, d)
return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p) + c + b
return a * (2 ^ (-10 * t)) * sin((t * d - s) * (2 * pi) / p) + c + b
end
local function inOutElastic(t, b, c, d, a, p)
local s
@ -251,9 +251,9 @@ local function inOutElastic(t, b, c, d, a, p)
p, a, s = calculatePAS(p, a, c, d)
t = t - 1
if t < 0 then
return -0.5 * (a * pow(2, 10 * t) * sin((t * d - s) * (2 * pi) / p)) + b
return -0.5 * (a * (2 ^ (10 * t)) * sin((t * d - s) * (2 * pi) / p)) + b
end
return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p) * 0.5 + c + b
return a * (2 ^ (-10 * t)) * sin((t * d - s) * (2 * pi) / p) * 0.5 + c + b
end
local function outInElastic(t, b, c, d, a, p)
if t < d / 2 then
@ -405,7 +405,7 @@ local function checkSubjectAndTargetRecursively(subject, target, path)
end
end
local function checkNewParams(initial, duration, subject, target, easing)
local function checkNewParams(_, _, subject, target, easing)
-- assert(type(initial) == 'number' and duration > 0, "duration must be a positive number. Was " .. tostring(duration))
-- assert(type(duration) == 'number' and duration > 0, "duration must be a positive number. Was " .. tostring(duration))
assert(type(easing) == "function", "easing must be a function. Was " .. tostring(easing))

View file

@ -12,7 +12,7 @@ local function mouse_resize_handler(m, c)
local x, y = start.x, start.y
local wa = m(c.screen.workarea)
local idx = awful.client.idx(c)
local c_above, c_below
local c_above
local idx_above, idx_below
local wfact_above, wfact_below
local jump_to = { x = x, y = y }
@ -23,17 +23,17 @@ local function mouse_resize_handler(m, c)
local v_border = 0.2 * g.height
if idx.idx > 1 and y >= g.y and y <= g.y + v_border then
if idx and idx.idx > 1 and y >= g.y and y <= g.y + v_border then
-- we are near the top edge of the window
c_above = awful.client.next(-1, c)
c_below = c
C_BELOW = c
jump_to.y = g.y
idx_above = idx.idx - 1
idx_below = idx.idx
elseif idx.idx < idx.num and y >= g.y + g.height - v_border then
elseif idx and idx.idx < idx.num and y >= g.y + g.height - v_border then
-- we are near the bottom edge of the window
c_above = c
c_below = awful.client.next(1, c)
C_BELOW = awful.client.next(1, c)
idx_above = idx.idx
idx_below = idx.idx + 1
jump_to.y = g.y + g.height
@ -49,7 +49,7 @@ local function mouse_resize_handler(m, c)
end
end
if idx_above then
if idx and idx_above then
local t = c.screen.selected_tag
local data = t.windowfact or {}
local colfact = data[idx.col] or {}
@ -58,11 +58,11 @@ local function mouse_resize_handler(m, c)
end
if idx_above and move_mwfact then
cursor = "cross"
CURSOR = "cross"
elseif idx_above then
cursor = m({ y = "sb_v_double_arrow", x = "sb_h_double_arrow" }).y
CURSOR = m({ y = "sb_v_double_arrow", x = "sb_h_double_arrow" }).y
elseif move_mwfact then
cursor = m({ y = "sb_v_double_arrow", x = "sb_h_double_arrow" }).x
CURSOR = m({ y = "sb_v_double_arrow", x = "sb_h_double_arrow" }).x
else
return false
end
@ -89,7 +89,7 @@ local function mouse_resize_handler(m, c)
c.screen.selected_tag.master_width_factor = math.min(math.max((_mouse.x - wa.x) / wa.width, 0.01), 0.99)
end
if idx_above then
if idx and idx_above then
local factor_delta = (_mouse.y - jump_to.y) / wa.height
if factor_delta < 0 then
@ -109,7 +109,7 @@ local function mouse_resize_handler(m, c)
else
return false
end
end, cursor)
end, CURSOR)
return true
end
@ -119,6 +119,7 @@ awful.layout.suit.tile.mouse_resize_handler = function(c)
return x
end, c)
end
---@diagnostic disable-next-line: duplicate-set-field
awful.layout.suit.tile.bottom.mouse_resize_handler = function(c)
return mouse_resize_handler(function(q)
return { x = q.y, y = q.x, width = q.height, height = q.width }

View file

@ -4,8 +4,6 @@ local wibox = require("wibox")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local helpers = require("helpers")
--local lock_screen = require("modules.lockscreen")
--lock_screen.init()
--- Minimalist Exit Screen
--- ~~~~~~~~~~~~~~~~~~~~~~
@ -15,7 +13,7 @@ local icon_font = beautiful.font_name.."bold 45"
local poweroff_text_icon = ""
local reboot_text_icon = ""
local suspend_text_icon = ""
local exit_text_icon = ""
local exit_text_icon = "󰗼"
local lock_text_icon = ""
local button_bg = beautiful.xcolorbase
@ -34,7 +32,6 @@ end
local suspend_command = function()
awesome.emit_signal("module::exit_screen:hide")
--lock_screen_show()
awful.spawn.with_shell("systemctl suspend")
end
@ -44,10 +41,9 @@ end
local lock_command = function()
awesome.emit_signal("module::exit_screen:hide")
--lock_screen_show()
end
local create_button = function(symbol, hover_color, text, command)
local create_button = function(symbol, hover_color, _, command)
local icon = wibox.widget({
forced_height = button_size,
forced_width = button_size,
@ -154,7 +150,7 @@ end)
local exit_screen_grabber = awful.keygrabber({
auto_start = true,
stop_event = "release",
keypressed_callback = function(self, mod, key, command)
keypressed_callback = function(_, _, key, _)
if key == "s" then
suspend_command()
elseif key == "e" then

View file

@ -1,3 +1,4 @@
require(... .. ".better-resize")
require(... .. ".savefloats")
require(... .. ".exit-screen")

View file

@ -32,7 +32,7 @@ local encode
local escape_char_map = {
["\\"] = "\\",
[ "\"" ] = "\"",
['"'] = '"',
["\b"] = "b",
["\f"] = "f",
["\n"] = "n",
@ -45,23 +45,22 @@ for k, v in pairs(escape_char_map) do
escape_char_map_inv[v] = k
end
local function escape_char(c)
return "\\" .. (escape_char_map[c] or string.format("u%04x", c:byte()))
end
local function encode_nil(val)
local function encode_nil(_)
return "null"
end
local function encode_table(val, stack)
local res = {}
stack = stack or {}
-- Circular reference?
if stack[val] then error("circular reference") end
if stack[val] then
error("circular reference")
end
stack[val] = true
@ -78,12 +77,11 @@ local function encode_table(val, stack)
error("invalid table: sparse array")
end
-- Encode
for i, v in ipairs(val) do
for _, v in ipairs(val) do
table.insert(res, encode(v, stack))
end
stack[val] = nil
return "[" .. table.concat(res, ",") .. "]"
else
-- Treat as an object
for k, v in pairs(val) do
@ -97,12 +95,10 @@ local function encode_table(val, stack)
end
end
local function encode_string(val)
return '"' .. val:gsub('[%z\1-\31\\"]', escape_char) .. '"'
end
local function encode_number(val)
-- Check for NaN, -inf and inf
if val ~= val or val <= -math.huge or val >= math.huge then
@ -111,7 +107,6 @@ local function encode_number(val)
return string.format("%.14g", val)
end
local type_func_map = {
["nil"] = encode_nil,
["table"] = encode_table,
@ -120,7 +115,6 @@ local type_func_map = {
["boolean"] = tostring,
}
encode = function(val, stack)
local t = type(val)
local f = type_func_map[t]
@ -130,12 +124,10 @@ encode = function(val, stack)
error("unexpected type '" .. t .. "'")
end
function json.encode(val)
return (encode(val))
end
-------------------------------------------------------------------------------
-- Decode
-------------------------------------------------------------------------------
@ -161,7 +153,6 @@ local literal_map = {
["null"] = nil,
}
local function next_char(str, idx, set, negate)
for i = idx, #str do
if set[str:sub(i, i)] ~= negate then
@ -171,7 +162,6 @@ local function next_char(str, idx, set, negate)
return #str + 1
end
local function decode_error(str, idx, msg)
local line_count = 1
local col_count = 1
@ -185,7 +175,6 @@ local function decode_error(str, idx, msg)
error(string.format("%s at line %d col %d", msg, line_count, col_count))
end
local function codepoint_to_utf8(n)
-- http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=iws-appendixa
local f = math.floor
@ -196,13 +185,11 @@ local function codepoint_to_utf8(n)
elseif n <= 0xffff then
return string.char(f(n / 4096) + 224, f(n % 4096 / 64) + 128, n % 64 + 128)
elseif n <= 0x10ffff then
return string.char(f(n / 262144) + 240, f(n % 262144 / 4096) + 128,
f(n % 4096 / 64) + 128, n % 64 + 128)
return string.char(f(n / 262144) + 240, f(n % 262144 / 4096) + 128, f(n % 4096 / 64) + 128, n % 64 + 128)
end
error(string.format("invalid unicode codepoint '%x'", n))
end
local function parse_unicode_escape(s)
local n1 = tonumber(s:sub(1, 4), 16)
local n2 = tonumber(s:sub(7, 10), 16)
@ -214,7 +201,6 @@ local function parse_unicode_escape(s)
end
end
local function parse_string(str, i)
local res = ""
local j = i + 1
@ -225,7 +211,6 @@ local function parse_string(str, i)
if x < 32 then
decode_error(str, j, "control character in string")
elseif x == 92 then -- `\`: Escape
res = res .. str:sub(k, j - 1)
j = j + 1
@ -243,7 +228,6 @@ local function parse_string(str, i)
res = res .. escape_char_map_inv[c]
end
k = j + 1
elseif x == 34 then -- `"`: End of string
res = res .. str:sub(k, j - 1)
return res, j + 1
@ -255,7 +239,6 @@ local function parse_string(str, i)
decode_error(str, i, "expected closing quote for string")
end
local function parse_number(str, i)
local x = next_char(str, i, delim_chars)
local s = str:sub(i, x - 1)
@ -266,7 +249,6 @@ local function parse_number(str, i)
return n, x
end
local function parse_literal(str, i)
local x = next_char(str, i, delim_chars)
local word = str:sub(i, x - 1)
@ -276,7 +258,6 @@ local function parse_literal(str, i)
return literal_map[word], x
end
local function parse_array(str, i)
local res = {}
local n = 1
@ -297,13 +278,16 @@ local function parse_array(str, i)
i = next_char(str, i, space_chars, true)
local chr = str:sub(i, i)
i = i + 1
if chr == "]" then break end
if chr ~= "," then decode_error(str, i, "expected ']' or ','") end
if chr == "]" then
break
end
if chr ~= "," then
decode_error(str, i, "expected ']' or ','")
end
end
return res, i
end
local function parse_object(str, i)
local res = {}
i = i + 1
@ -334,13 +318,16 @@ local function parse_object(str, i)
i = next_char(str, i, space_chars, true)
local chr = str:sub(i, i)
i = i + 1
if chr == "}" then break end
if chr ~= "," then decode_error(str, i, "expected '}' or ','") end
if chr == "}" then
break
end
if chr ~= "," then
decode_error(str, i, "expected '}' or ','")
end
end
return res, i
end
local char_func_map = {
['"'] = parse_string,
["0"] = parse_number,
@ -361,7 +348,6 @@ local char_func_map = {
["{"] = parse_object,
}
parse = function(str, idx)
local chr = str:sub(idx, idx)
local f = char_func_map[chr]
@ -371,7 +357,6 @@ parse = function(str, idx)
decode_error(str, idx, "unexpected character '" .. chr .. "'")
end
function json.decode(str)
if type(str) ~= "string" then
error("expected argument of type string, got " .. type(str))
@ -384,5 +369,4 @@ function json.decode(str)
return res
end
return json

View file

@ -9,13 +9,13 @@ local function rel(screen, win)
}
end
local function unrel(s, rel)
return rel
local function unrel(s, _rel)
return _rel
and {
x = s.x + s.width * rel.x,
y = s.y + s.height * rel.y,
width = s.width * rel.width,
height = rel.aspect * s.width * rel.width,
x = s.x + s.width * _rel.x,
y = s.y + s.height * _rel.y,
width = s.width * _rel.width,
height = _rel.aspect * s.width * _rel.width,
}
end
@ -27,13 +27,13 @@ end
local floating = awful.layout.suit.floating
function remember(c)
function Remember(c)
if floating == awful.layout.get(c.screen) or c.floating then
stored[c.window] = rel(c.screen.geometry, c:geometry())
end
end
function restore(c)
function Restore(c)
local s = stored[c.window]
if s then
c:geometry(unrel(c.screen.geometry, stored[c.window]))
@ -43,8 +43,8 @@ function restore(c)
end
end
client.connect_signal("manage", remember)
client.connect_signal("property::geometry", remember)
client.connect_signal("manage", Remember)
client.connect_signal("property::geometry", Remember)
client.connect_signal("unmanage", forget)
tag.connect_signal("property::layout", function(t)
@ -55,4 +55,4 @@ tag.connect_signal("property::layout", function(t)
end
end)
return restore
return Restore

View file

@ -1,57 +1,47 @@
local awful = require "awful"
local gears = require "gears"
local naughty = require "naughty"
local beautiful = require "beautiful"
local awful = require("awful")
local hotkeys_popup = require("awful.hotkeys_popup")
local menubar = require "menubar"
local machi = require "lib.layout-machi"
local menu = require "main.menu"
local menubar = require("menubar")
local machi = require("lib.layout-machi")
local menu = require("main.menu")
local apps = require "main.apps"
local promptbox = require "ui.top-panel.widgets.promptbox"
modkey = "Mod4"
local config = require("config")
local apps = config.apps
local keys = config.keys
-- General awesome keybindings
awful.keyboard.append_global_keybindings({
awful.key({ modkey, "Control" }, "r", awesome.restart,
{description = "reload awesome", group = "awesome"}),
awful.key({ modkey, "Shift" }, "q", awesome.quit,
{description = "quit awesome", group = "awesome"}),
--awful.key({ modkey }, "j",
awful.key({ }, "Nothing Set",
function ()
awful.prompt.run {
awful.key({ keys.mod, "Control" }, "r", awesome.restart, { description = "reload awesome", group = "awesome" }),
awful.key({ keys.mod, "Shift" }, "q", awesome.quit, { description = "quit awesome", group = "awesome" }),
awful.key({}, "Nothing Set", function()
awful.prompt.run({
prompt = "Run Lua code: ",
textbox = awful.screen.focused().promptbox.widget,
exe_callback = awful.util.eval,
history_path = awful.util.get_cache_dir() .. "/history_eval"
}
end,
{description = "lua execute prompt", group = "awesome"}),
awful.key({ modkey, }, "Return", function () awful.spawn(apps.terminal) end,
{description = "open a terminal", group = "launcher"}),
awful.key({ modkey, "Shift" }, "c", function() menu.mainmenu:show() end,
{description = "show main menu", group = "awesome"}),
awful.key({ modkey }, "p", function() menubar.show() end,
{description = "show the menubar", group = "launcher"}),
history_path = awful.util.get_cache_dir() .. "/history_eval",
})
end, { description = "lua execute prompt", group = "awesome" }),
awful.key({ keys.mod }, "Return", function()
awful.spawn(apps.terminal)
end, { description = "open a terminal", group = "launcher" }),
awful.key({ keys.mod, "Shift" }, "c", function()
menu.mainmenu:show()
end, { description = "show main menu", group = "awesome" }),
awful.key({ keys.mod }, "p", function()
menubar.show()
end, { description = "show the menubar", group = "launcher" }),
})
-- Tag bindings
awful.keyboard.append_global_keybindings({
awful.key({ modkey, "Control" }, "s", hotkeys_popup.show_help,
{description = "show help", group = "awesome"}),
awful.key({ modkey, }, "Left", awful.tag.viewprev,
{description = "view previous", group = "tag"}),
awful.key({ modkey, }, "Right", awful.tag.viewnext,
{description = "view next", group = "tag"}),
awful.key({ modkey, }, "Tab", awful.tag.history.restore,
{description = "go back", group = "tag"}),
awful.key({ keys.mod, "Control" }, "s", hotkeys_popup.show_help, { description = "show help", group = "awesome" }),
awful.key({ keys.mod }, "Left", awful.tag.viewprev, { description = "view previous", group = "tag" }),
awful.key({ keys.mod }, "Right", awful.tag.viewnext, { description = "view next", group = "tag" }),
awful.key({ keys.mod }, "Tab", awful.tag.history.restore, { description = "go back", group = "tag" }),
})
awful.keyboard.append_global_keybindings({
awful.key {
modifiers = { modkey },
awful.key({
modifiers = { keys.mod },
keygroup = "numrow",
description = "only view tag",
group = "tag",
@ -62,9 +52,9 @@ awful.keyboard.append_global_keybindings({
tag:view_only()
end
end,
},
awful.key {
modifiers = { modkey, "Control" },
}),
awful.key({
modifiers = { keys.mod, "Control" },
keygroup = "numrow",
description = "toggle tag",
group = "tag",
@ -75,9 +65,9 @@ awful.keyboard.append_global_keybindings({
awful.tag.viewtoggle(tag)
end
end,
},
awful.key {
modifiers = { modkey, "Shift" },
}),
awful.key({
modifiers = { keys.mod, "Shift" },
keygroup = "numrow",
description = "move focused client to tag",
group = "tag",
@ -89,9 +79,9 @@ awful.keyboard.append_global_keybindings({
end
end
end,
},
awful.key {
modifiers = { modkey, "Control", "Shift" },
}),
awful.key({
modifiers = { keys.mod, "Control", "Shift" },
keygroup = "numrow",
description = "toggle focused client on tag",
group = "tag",
@ -103,9 +93,9 @@ awful.keyboard.append_global_keybindings({
end
end
end,
},
awful.key {
modifiers = { modkey },
}),
awful.key({
modifiers = { keys.mod },
keygroup = "numpad",
description = "select layout directly",
group = "layout",
@ -115,126 +105,128 @@ awful.keyboard.append_global_keybindings({
t.layout = t.layouts[index] or t.layout
end
end,
}
}),
})
-- Focus bindings
awful.keyboard.append_global_keybindings({
awful.key({ modkey, }, "c",
function ()
awful.key({ keys.mod }, "c", function()
awful.client.focus.byidx(1)
end,
{description = "focus next by index", group = "client"}
),
awful.key({ modkey, }, "x",
function ()
end, { description = "focus next by index", group = "client" }),
awful.key({ keys.mod }, "x", function()
awful.client.focus.byidx(-1)
end,
{description = "focus previous by index", group = "client"}
),
awful.key({ modkey, }, "Escape",
function ()
end, { description = "focus previous by index", group = "client" }),
awful.key({ keys.mod }, "Escape", function()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end,
{description = "go back", group = "client"}),
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end,
{description = "focus the next screen", group = "screen"}),
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end,
{description = "focus the previous screen", group = "screen"}),
awful.key({ modkey, "Control" }, "n",
function ()
end, { description = "go back", group = "client" }),
awful.key({ keys.mod, "Control" }, "j", function()
awful.screen.focus_relative(1)
end, { description = "focus the next screen", group = "screen" }),
awful.key({ keys.mod, "Control" }, "k", function()
awful.screen.focus_relative(-1)
end, { description = "focus the previous screen", group = "screen" }),
awful.key({ keys.mod, "Control" }, "n", function()
local c = awful.client.restore()
-- Focus restored client
if c then
c:activate { raise = true, context = "key.unminimize" }
c:activate({ raise = true, context = "key.unminimize" })
end
end,
{description = "restore minimized", group = "client"}),
end, { description = "restore minimized", group = "client" }),
})
-- Layout bindings
awful.keyboard.append_global_keybindings({
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
{description = "swap with next client by index", group = "client"}),
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
{description = "swap with previous client by index", group = "client"}),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
{description = "jump to urgent client", group = "client"}),
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end,
{description = "increase master width factor", group = "layout"}),
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end,
{description = "decrease master width factor", group = "layout"}),
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end,
{description = "increase the number of master clients", group = "layout"}),
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end,
{description = "decrease the number of master clients", group = "layout"}),
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end,
{description = "increase the number of columns", group = "layout"}),
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end,
{description = "decrease the number of columns", group = "layout"}),
-- awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end,
-- {description = "select next", group = "layout"}),
-- awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
-- {description = "select previous", group = "layout"}),
awful.key({ modkey, }, "-", function () machi.default_editor.start_interactive() end,
{description = "edit the current layout if it is a machi layout", group = "layout"}),
awful.key({ modkey, }, ".", function () machi.switcher.start(client.focus) end,
{description = "switch between windows for a machi layout", group = "layout"}),
awful.key({ keys.mod, "Shift" }, "j", function()
awful.client.swap.byidx(1)
end, { description = "swap with next client by index", group = "client" }),
awful.key({ keys.mod, "Shift" }, "k", function()
awful.client.swap.byidx(-1)
end, { description = "swap with previous client by index", group = "client" }),
awful.key(
{ keys.mod },
"u",
awful.client.urgent.jumpto,
{ description = "jump to urgent client", group = "client" }
),
awful.key({ keys.mod }, "l", function()
awful.tag.incmwfact(0.05)
end, { description = "increase master width factor", group = "layout" }),
awful.key({ keys.mod }, "h", function()
awful.tag.incmwfact(-0.05)
end, { description = "decrease master width factor", group = "layout" }),
awful.key({ keys.mod, "Shift" }, "h", function()
awful.tag.incnmaster(1, nil, true)
end, { description = "increase the number of master clients", group = "layout" }),
awful.key({ keys.mod, "Shift" }, "l", function()
awful.tag.incnmaster(-1, nil, true)
end, { description = "decrease the number of master clients", group = "layout" }),
awful.key({ keys.mod, "Control" }, "h", function()
awful.tag.incncol(1, nil, true)
end, { description = "increase the number of columns", group = "layout" }),
awful.key({ keys.mod, "Control" }, "l", function()
awful.tag.incncol(-1, nil, true)
end, { description = "decrease the number of columns", group = "layout" }),
awful.key({ keys.mod }, "-", function()
machi.default_editor.start_interactive()
end, { description = "edit the current layout if it is a machi layout", group = "layout" }),
awful.key({ keys.mod }, ".", function()
machi.switcher.start(client.focus)
end, { description = "switch between windows for a machi layout", group = "layout" }),
})
-- Client bindings
client.connect_signal("request::default_keybindings", function()
awful.keyboard.append_client_keybindings({
awful.key({ modkey, }, "f",
function (c)
awful.key({ keys.mod }, "f", function(c)
c.fullscreen = not c.fullscreen
c:raise()
end,
{description = "toggle fullscreen", group = "client"}),
awful.key({ modkey }, "w", function (c) c:kill() end,
{description = "close", group = "client"}),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
{description = "toggle floating", group = "client"}),
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end,
{description = "move to master", group = "client"}),
awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
{description = "move to screen", group = "client"}),
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end,
{description = "toggle keep on top", group = "client"}),
awful.key({ modkey, }, "n",
function (c)
end, { description = "toggle fullscreen", group = "client" }),
awful.key({ keys.mod }, "w", function(c)
c:kill()
end, { description = "close", group = "client" }),
awful.key(
{ keys.mod, "Control" },
"space",
awful.client.floating.toggle,
{ description = "toggle floating", group = "client" }
),
awful.key({ keys.mod, "Control" }, "Return", function(c)
c:swap(awful.client.getmaster())
end, { description = "move to master", group = "client" }),
awful.key({ keys.mod }, "o", function(c)
c:move_to_screen()
end, { description = "move to screen", group = "client" }),
awful.key({ keys.mod }, "t", function(c)
c.ontop = not c.ontop
end, { description = "toggle keep on top", group = "client" }),
awful.key({ keys.mod }, "n", function(c)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
c.minimized = true
end ,
{description = "minimize", group = "client"}),
awful.key({ modkey, }, "m",
function (c)
end, { description = "minimize", group = "client" }),
awful.key({ keys.mod }, "m", function(c)
c.maximized = not c.maximized
c:raise()
end ,
{description = "(un)maximize", group = "client"}),
awful.key({ modkey, "Control" }, "m",
function (c)
end, { description = "(un)maximize", group = "client" }),
awful.key({ keys.mod, "Control" }, "m", function(c)
c.maximized_vertical = not c.maximized_vertical
c:raise()
end ,
{description = "(un)maximize vertically", group = "client"}),
awful.key({ modkey, "Shift" }, "m",
function (c)
end, { description = "(un)maximize vertically", group = "client" }),
awful.key({ keys.mod, "Shift" }, "m", function(c)
c.maximized_horizontal = not c.maximized_horizontal
c:raise()
end ,
{description = "(un)maximize horizontally", group = "client"}),
end, { description = "(un)maximize horizontally", group = "client" }),
})
end)
-- Mouse bindings
awful.mouse.append_global_mousebindings({
awful.button({ }, 3, function () menu.mainmenu:toggle() return end),
awful.button({}, 3, function()
menu.mainmenu:toggle()
end),
awful.button({}, 4, awful.tag.viewprev),
awful.button({}, 5, awful.tag.viewnext),
})
@ -242,15 +234,13 @@ awful.mouse.append_global_mousebindings({
client.connect_signal("request::default_mousebindings", function()
awful.mouse.append_client_mousebindings({
awful.button({}, 1, function(c)
c:activate { context = "mouse_click" }
c:activate({ context = "mouse_click" })
end),
awful.button({ modkey }, 1, function (c)
c:activate { context = "mouse_click", action = "mouse_move"}
awful.button({ keys.mod }, 1, function(c)
c:activate({ context = "mouse_click", action = "mouse_move" })
end),
awful.button({ modkey }, 3, function (c)
c:activate { context = "mouse_click", action = "mouse_resize"}
awful.button({ keys.mod }, 3, function(c)
c:activate({ context = "mouse_click", action = "mouse_resize" })
end),
})
end)

View file

@ -1,62 +1,36 @@
local awful = require "awful"
local gears = require "gears"
local naughty = require "naughty"
local beautiful = require "beautiful"
local apps = require "main.apps"
local volume = require "ui.popups.volume"
local filesystem = require "gears.filesystem"
local awful = require("awful")
local volume = require("ui.popups.volume")
local filesystem = require("gears.filesystem")
local config_dir = filesystem.get_configuration_dir()
local utils_dir = config_dir .. "utilities/"
modkey = "Mod4"
alt = "Mod1"
--local function delete_tag()
-- local t = awful.tag.find_by_name(awful.screen.focused(), "")
-- t:delete()
--end
--local function create_tag()
-- awful.tag.add("", {
-- layout = awful.layout.suit.tile,
-- selected = true,
-- })
--end
--local value = false
local keys = require("config").keys
local screenshot_area = utils_dir .. "screensht area"
local screenshot_full = utils_dir .. "screensht full"
awful.keyboard.append_global_keybindings({
awful.key({modkey}, "r", function() awful.spawn("rofi -show drun -theme ~/.config/rofi/launcher.rasi") end,
{ description = "show rofi", group = "launcher" }),
awful.key({modkey}, "Print", function()
awful.key({ keys.mod }, "r", function()
awful.spawn("rofi -show drun -theme ~/.config/rofi/launcher.rasi")
end, { description = "show rofi", group = "launcher" }),
awful.key({ keys.mod }, "Print", function()
awful.spawn.easy_async_with_shell(screenshot_area, function() end)
end, { description = "take a area screenshot", group = "Utils" }),
awful.key({}, "Print", function()
awful.spawn.easy_async_with_shell(screenshot_full, function() end)
end, { description = "take a full screenshot", group = "Utils" }),
awful.key({modkey}, "q", function() awesome.emit_signal("module::exit_screen:show") end,
{ description = "show Exit Screen", group = "Utils" }),
awful.key({modkey}, "s", function()
--if value == false then
-- create_tag()
-- value = true
--else
-- delete_tag()
-- value = false
--end
awesome.emit_signal("scratchpad::toggle") end,
{ description = "show Scratchpad", group = "Utils" }),
awful.key({modkey}, "b", function()
awful.key({ keys.mod }, "q", function()
awesome.emit_signal("module::exit_screen:show")
end, { description = "show Exit Screen", group = "Utils" }),
awful.key({ keys.mod }, "s", function()
awesome.emit_signal("scratchpad::toggle")
end, { description = "show Scratchpad", group = "Utils" }),
awful.key({ keys.mod }, "b", function()
awful.spawn.easy_async_with_shell("headsetcontrol -l 0", function() end)
end, { description = "headsetcontrol", group = "Utils" }),
-- awful.key({modkey}, "r", function() awful.spawn(apps.launcher, false) end), -- Rofi
-- awful.key({alt}, "c", function() awesome.emit_signal("sidebar::toggle") end), -- Sidebar
awful.key({modkey}, "t", function() awful.titlebar.toggle(client.focus) end,
{ description = "toggle titlebar for active client", group = "Utils" }), -- Toggle titlebar
-- awful.key({alt}, "x", function() awesome.emit_signal("lockscreen::toggle") end), -- Toggle lockscreen
awful.key({ keys.mod }, "t", function()
awful.titlebar.toggle(client.focus)
end, { description = "toggle titlebar for active client", group = "Utils" }), -- Toggle titlebar
})
-- Volume
@ -71,11 +45,9 @@ awful.keyboard.append_global_keybindings({
awesome.emit_signal("widget::update_vol")
awesome.emit_signal("module::volume_osd:show", true)
end),
awful.key({ }, "XF86AudioMute", function() volume.mute() awesome.emit_signal("widget::update_vol") awesome.emit_signal("module::volume_osd:show", true) end)
awful.key({}, "XF86AudioMute", function()
volume.mute()
awesome.emit_signal("widget::update_vol")
awesome.emit_signal("module::volume_osd:show", true)
end),
})
-- Brightness
--awful.keyboard.append_global_keybindings({
-- awful.key({ }, "XF86MonBrightnessUp", function() brightness.increase() end),
-- awful.key({ }, "XF86MonBrightnessDown", function() brightness.decrease() end)
--})

View file

@ -1,12 +1,14 @@
local naughty = require "naughty"
local naughty = require("naughty")
-- {{{ Error handling
-- Error handling
-- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config)
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
naughty.notify({
preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors })
text = awesome.startup_errors,
})
end
-- Handle runtime errors after startup
@ -14,13 +16,16 @@ do
local in_error = false
awesome.connect_signal("debug::error", function(err)
-- Make sure we don't go into an endless error loop
if in_error then return end
if in_error then
return
end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
naughty.notify({
preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = tostring(err) })
text = tostring(err),
})
in_error = false
end)
end
--- }}}

View file

@ -1,8 +1,8 @@
--require "main.error_handling"
require "main.layout"
require "main.menu"
require "main.wallpaper"
require "main.bindings"
require "main.custom_bindings"
require "main.rules"
require "main.tags"
-- require("main.error_handling")
require("main.layout")
require("main.menu")
require("main.wallpaper")
require("main.bindings")
require("main.custom_bindings")
require("main.rules")
require("main.tags")

View file

@ -1,9 +1,6 @@
local awful = require "awful"
local gears = require "gears"
local beautiful = require "beautiful"
local bling = require "lib.bling"
local machi = require "lib.layout-machi"
local awful = require("awful")
local bling = require("lib.bling")
local machi = require("lib.layout-machi")
-- Custom Layouts
local mstab = bling.layout.mstab
@ -18,7 +15,6 @@ machi.editor.nested_layouts = {
["3"] = awful.layout.suit.fair.horizontal,
}
-- Table of layouts to cover with awful.layout.inc, order matters.
awful.layout.layouts = {
awful.layout.suit.tile,
@ -29,29 +25,12 @@ awful.layout.layouts = {
mstab,
equal,
machi.default_layout,
-- awful.layout.suit.floating,
-- awful.layout.suit.tile,
--awful.layout.suit.tile.left,
-- awful.layout.suit.tile.bottom,
-- awful.layout.suit.tile.top,
-- awful.layout.suit.fair,
-- awful.layout.suit.fair.horizontal,
-- awful.layout.suit.spiral,
-- awful.layout.suit.spiral.dwindle,
-- awful.layout.suit.max,
--awful.layout.suit.max.fullscreen,
-- awful.layout.suit.magnifier,
-- awful.layout.suit.corner.nw,
-- awful.layout.suit.corner.ne,
-- awful.layout.suit.corner.sw,
-- awful.layout.suit.corner.se,
}
client.connect_signal("manage", function(c)
if awesome.startup
and not c.size_hints.user_position
and not c.size_hints.program_position then
if awesome.startup and not c.size_hints.user_position and not c.size_hints.program_position then
-- Prevent clients from being unreachable after screen count changes.
awful.placement.no_offscreen(c)
end
end)

View file

@ -1,55 +1,83 @@
---@diagnostic disable: undefined-global
local awful = require 'awful'
local beautiful = require 'beautiful'
local gears = require 'gears'
local wibox = require 'wibox'
local helpers = require 'helpers'
local hotkeys_popup = require 'awful.hotkeys_popup'
local apps = require "main.apps"
local awful = require("awful")
local beautiful = require("beautiful")
local gears = require("gears")
local wibox = require("wibox")
local helpers = require("helpers")
local hotkeys_popup = require("awful.hotkeys_popup")
editor = os.getenv("EDITOR") or "vim"
editor_cmd = apps.terminal .. " -e " .. editor
local apps = require("config").apps
local menu = {}
local rofi = {}
rofi.timer = gears.timer {
rofi.timer = gears.timer({
autostart = false,
timeout = 0.1,
single_shot = true,
callback = function()
awful.spawn("rofi -show drun -theme ~/.config/rofi/launcher.rasi")
end
}
end,
})
menu.awesome = {
{ "Hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end },
{
"Hotkeys",
function()
hotkeys_popup.show_help(nil, awful.screen.focused())
end,
},
{ "Manual", apps.terminal .. " -e man awesome" },
{ "Edit Config", editor_cmd .. " " .. awesome.conffile },
{ "Edit Config", apps.start_editor .. " " .. awesome.conffile },
{ "Restart", awesome.restart },
{ "Quit", function() awesome.quit() end },
{
"Quit",
function()
awesome.quit()
end,
},
}
menu.mainmenu = awful.menu {
menu.mainmenu = awful.menu({
items = {
{ "Applications", function() menu.mainmenu:hide() rofi.timer:start() end },
{
"Applications",
function()
menu.mainmenu:hide()
rofi.timer:start()
end,
},
{ "Terminal", apps.terminal },
{ "Web Browser", apps.browser },
{ "File Manager", apps.file_manager },
{ "Text Editor", apps.code_editor },
{ "Music Player", apps.music_player },
{ "Info Panel", function() awesome.emit_signal("sidebar::toggle") end },
{ "Notifications", function() awesome.emit_signal("action::toggle") end },
{ "Exit", function() awesome.emit_signal("module::exit_screen:show") end },
{
"Info Panel",
function()
awesome.emit_signal("sidebar::toggle")
end,
},
{
"Notifications",
function()
awesome.emit_signal("action::toggle")
end,
},
{
"Exit",
function()
awesome.emit_signal("module::exit_screen:show")
end,
},
{ "AwesomeWM", menu.awesome },
}
}
},
})
-- apply rounded corners to menus when picom isn't available, thanks to u/signalsourcesexy
-- also applies antialiasing! - By me.
menu.mainmenu.wibox.shape = helpers.ui.rrect(10)
menu.mainmenu.wibox.bg = beautiful.bg_normal .. '00'
menu.mainmenu.wibox.bg = beautiful.bg_normal .. "00"
menu.mainmenu.wibox:set_widget(wibox.widget({
menu.mainmenu.wibox.widget,
bg = beautiful.bg_normal,
@ -61,17 +89,18 @@ menu.mainmenu.wibox:set_widget(wibox.widget({
-- also applies antialiasing! - By me.
awful.menu.original_new = awful.menu.new
---@diagnostic disable-next-line: duplicate-set-field
function awful.menu.new(...)
local ret = awful.menu.original_new(...)
ret.wibox.shape = helpers.ui.rrect(10)
ret.wibox.bg = beautiful.bg_normal .. '00'
ret.wibox:set_widget(wibox.widget {
ret.wibox.bg = beautiful.bg_normal .. "00"
ret.wibox:set_widget(wibox.widget({
ret.wibox.widget,
widget = wibox.container.background,
bg = beautiful.xcolorbase,
shape = helpers.ui.rrect(0),
})
}))
return ret
end

View file

@ -1,54 +1,56 @@
local awful = require "awful"
local gears = require "gears"
local ruled = require "ruled"
local awful = require("awful")
local ruled = require("ruled")
local dpi = require("beautiful.xresources").apply_dpi
local helpers = require "helpers"
local apps = require "main.apps"
local screen_width = awful.screen.focused().geometry.width
local screen_height = awful.screen.focused().geometry.height
local helpers = require("helpers")
local apps = require("main.apps")
ruled.client.connect_signal("request::rules", function()
ruled.client.append_rule {
ruled.client.append_rule({
id = "global",
rule = {},
properties = {
-- shape = helpers.ui.rrect(15), -- Shape is in Titlebar --
focus = awful.client.focus.filter,
raise = true,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap + awful.placement.no_offscreen,
},
}
})
ruled.client.append_rule {
ruled.client.append_rule({
id = "titlebars",
rule_any = {
type = { "normal", "dialog" },
},
properties = {
titlebars_enabled = true
}
}
titlebars_enabled = true,
},
})
ruled.client.append_rule {
ruled.client.append_rule({
rule = { class = apps["launcher"] },
properties = {
titlebars_enabled = false
titlebars_enabled = false,
},
rule = { instance = "origin.exe", },
properties = { floating = true, titlebars_enabled = false, border_width = dpi(0), shape = helpers.ui.rrect(0), border_width = dpi(0), },
}
})
ruled.client.append_rule({
rule = { instance = "origin.exe" },
properties = {
floating = true,
titlebars_enabled = false,
shape = helpers.ui.rrect(0),
border_width = dpi(0),
},
})
ruled.client.append_rule {
ruled.client.append_rule({
rule = { instance = "bf1.exe" },
properties = { shape = helpers.ui.rrect(0), fullscreen = true, tag = "", switchtotag = true, }, --ontop = true, sticky = true, },
}
ruled.client.append_rule {
properties = { shape = helpers.ui.rrect(0), fullscreen = true, tag = "", switchtotag = true },
})
ruled.client.append_rule({
rule = { instance = "wine" },
properties = { shape = helpers.ui.rrect(0), titlebars_enabled = false, }, --ontop = true, sticky = true, },
}
properties = { shape = helpers.ui.rrect(0), titlebars_enabled = false },
})
ruled.client.append_rule({
rule_any = {
@ -73,5 +75,4 @@ ruled.client.connect_signal("request::rules", function()
floating = true,
},
})
end)

View file

@ -1,5 +1,5 @@
local awful = require "awful"
local awful = require("awful")
screen.connect_signal("request::desktop_decoration", function(s)
awful.tag({"", "", "", "", "", ""}, s, awful.layout.layouts[1])
awful.tag({ "", "", "", "", "", "󰍹 " }, s, awful.layout.layouts[1])
end)

View file

@ -1,9 +1,9 @@
local awful = require "awful"
local wibox = require "wibox"
local beautiful = require "beautiful"
local awful = require("awful")
local wibox = require("wibox")
local beautiful = require("beautiful")
local function set_wall(s)
awful.wallpaper {
awful.wallpaper({
screen = s,
widget = {
{
@ -16,8 +16,8 @@ local function set_wall(s)
halign = "center",
tiled = true,
widget = wibox.container.tile,
}
}
},
})
end
screen.connect_signal("request::wallpaper", function(s)

View file

@ -1,6 +1,5 @@
local awful = require "awful"
local gears = require "gears"
local awful = require("awful")
local gears = require("gears")
local function get_cpu()
local script = [[
@ -13,11 +12,12 @@ local function get_cpu()
end)
end
gears.timer {
gears.timer({
timeout = 1,
call_now = true,
autostart = true,
callback = function()
get_cpu()
end
}
end,
})

View file

@ -1,7 +1,7 @@
local awful = require "awful"
local gears = require "gears"
local awful = require("awful")
local gears = require("gears")
local user_vars = require "user_variables"
local user_vars = require("user_variables")
local which_disk = user_vars.widget.disk.name
local function get_disk()
@ -15,11 +15,11 @@ local function get_disk()
end)
end
gears.timer {
gears.timer({
timeout = 2000,
call_now = true,
autostart = true,
callback = function()
get_disk()
end
}
end,
})

View file

@ -1,4 +1,4 @@
req = {
local req = {
"volume",
"mic",
"cpu",

View file

@ -1,6 +1,5 @@
local awful = require "awful"
local gears = require "gears"
local awful = require("awful")
local gears = require("gears")
local function get_mem()
local script = [[
@ -13,11 +12,12 @@ local function get_mem()
end)
end
gears.timer {
gears.timer({
timeout = 4,
call_now = true,
autostart = true,
callback = function()
get_mem()
end
}
end,
})

View file

@ -1,17 +1,16 @@
local awful = require "awful"
local gears = require "gears"
local wibox = require "wibox"
local beautiful = require "beautiful"
local awful = require("awful")
local user_vars = require "user_variables"
local user_vars = require("user_variables")
local microphone = user_vars.widget.mic.name
local vol_sc = 'pamixer --source ' ..microphone.. ' --get-volume'
local mute_sc = 'pamixer --source ' ..microphone.. ' --get-mute'
local vol_sc = "pamixer --source " .. microphone .. " --get-volume"
local mute_sc = "pamixer --source " .. microphone .. " --get-mute"
local function get_vol()
awful.spawn.easy_async_with_shell(vol_sc, function(vol)
awful.spawn.easy_async_with_shell(mute_sc, function(mute)
local muted
if mute:match("false") then
muted = false
else
@ -25,14 +24,4 @@ end
awesome.connect_signal("widget::update_mic", function() -- Needs to be Updated if muted! For Mute in Sidebar Widget
get_vol()
end)
--gears.timer {
-- timeout = 10,
-- call_now = true,
-- autostart = true,
-- callback = function()
-- get_vol()
-- end
--}
get_vol()

View file

@ -1,9 +1,8 @@
local awful = require "awful"
local gears = require "gears"
local awful = require("awful")
-- Script
local title_sc = 'mpc -f %title% | head -1'
local artist_sc = 'mpc -f %artist% | head -1'
local title_sc = "mpc -f %title% | head -1"
local artist_sc = "mpc -f %artist% | head -1"
local length_sc = "mpc | awk '{print $3}' | awk 'NR==2'"
local status_sc = "mpc | awk '{print $1}' | awk 'NR==2' | sed 's/[[]*//g' | sed 's/[]]*//g'"
@ -27,4 +26,3 @@ awesome.connect_signal("widget::update_player", function()
get_player()
end)
get_player()

View file

@ -1,12 +1,11 @@
local bling = require("lib.bling")
local playerctl = {}
local instance = nil
local function new()
return bling.signal.playerctl.lib({
update_on_activity = true,
player = { "mpd", "spotify", "%any", },
player = { "mopidy", "spotify", "%any" },
debounce_delay = 1,
})
end

View file

@ -1,6 +1,4 @@
local awful = require "awful"
local gears = require "gears"
local awful = require("awful")
local function get_uptime()
local script = [[
@ -9,7 +7,6 @@ local function get_uptime()
awful.spawn.easy_async_with_shell(script, function(uptime)
uptime = string.gsub(uptime, "\n", "")
--uptime = uptime:match("%d+")
awesome.emit_signal("signal::uptime", uptime)
end)
end
@ -17,3 +14,4 @@ awesome.connect_signal("widget::update_uptime", function()
get_uptime()
end)
get_uptime()

View file

@ -1,13 +1,13 @@
local awful = require "awful"
local gears = require "gears"
local wibox = require "wibox"
local awful = require("awful")
local vol_sc = 'pamixer --get-volume'
local mute_sc = 'pamixer --get-mute'
local vol_sc = "pamixer --get-volume"
local mute_sc = "pamixer --get-mute"
local function get_vol()
awful.spawn.easy_async_with_shell(vol_sc, function(vol)
awful.spawn.easy_async_with_shell(mute_sc, function(mute)
local muted
if mute:match("false") then
muted = false
else
@ -18,17 +18,9 @@ local function get_vol()
end)
end)
end
awesome.connect_signal("widget::update_vol", function() -- Needs to be Updated if muted! For Pulseaudio Widget
get_vol()
end)
--gears.timer {
-- timeout = 10,
-- call_now = true,
-- autostart = true,
-- callback = function()
-- get_vol()
-- end
--}
get_vol()

View file

@ -22,7 +22,6 @@ theme.xcolorcrust = "#11111b"
theme.xcolormantle = "#181825"
theme.xcolorbase = "#1E1E2E"
-- Surface --
theme.xcolorS0 = "#313244"
theme.xcolorS1 = "#45475a"
@ -71,9 +70,9 @@ theme.music = themes_path.."catppuccin/assets/music.png"
theme.volume_on = themes_path .. "catppuccin/assets/volume-on.png"
theme.volume_off = themes_path .. "catppuccin/assets/volume-off.png"
theme.pfp = themes_path .. "catppuccin/assets/pfp.jpg"
theme.font = "FiraCode Nerd Font 10"
theme.font = "FiraCode Nerd Font Propo 10"
theme.font_name = "FiraCode Nerd Font "
theme.font_name = "FiraCode Nerd Font Propo "
theme.titlebar_bg_focus = theme.xcolorbase
theme.titlebar_bg = theme.xcolorbase
@ -105,7 +104,6 @@ theme.submenu = "» "
theme.menu_height = dpi(37)
theme.menu_width = dpi(194)
theme.tasklist_bg_focus = theme.xcolorbase
theme.tasklist_fg_focus = theme.xcolor1
theme.tasklist_disable_icon = true
@ -121,12 +119,8 @@ theme.taglist_fg_occupied = "#526c96"
-- Generate taglist squares:
local taglist_square_size = dpi(0)
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
taglist_square_size, theme.xcolor2
)
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
taglist_square_size, theme.taglist_fg_occupied
)
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(taglist_square_size, theme.xcolor2)
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(taglist_square_size, theme.taglist_fg_occupied)
-- Edge Snap
theme.snap_bg = theme.xcolor5
@ -240,9 +234,7 @@ theme.layout_equalarea = themes_path.."catppuccin/layouts/equalarea.png"
theme.layout_machi = themes_path .. "catppuccin/layouts/machi.png"
-- Generate Awesome icon:
theme.awesome_icon = theme_assets.awesome_icon(
theme.menu_height, theme.bg_focus, theme.fg_focus
)
theme.awesome_icon = theme_assets.awesome_icon(theme.menu_height, theme.bg_focus, theme.fg_focus)
-- Define the icon theme for application icons. If not set then the icons
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.

View file

@ -1,7 +1,5 @@
local awful = require "awful"
local gears = require "gears"
local wibox = require "wibox"
local beautiful = require "beautiful"
local wibox = require("wibox")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
-- Creating Calendar
@ -19,19 +17,25 @@ styles.normal = {
styles.focus = {
fg_color = beautiful.xcolor7,
padding = dpi(6),
markup = function(t) return '<b>' .. t .. '</b>' end,
markup = function(t)
return "<b>" .. t .. "</b>"
end,
}
styles.header = {
fg_color = beautiful.xcolor2,
markup = function(t) return '<b>' .. t .. '</b>' end,
markup = function(t)
return "<b>" .. t .. "</b>"
end,
}
styles.weekday = {
fg_color = beautiful.xcolorT2,
markup = function(t) return '<span font_desc="FiraCode Nerd Font Medium 16">' .. t .. '</span>' end,
markup = function(t)
return '<span font_desc="FiraCode Nerd Font Medium 16">' .. t .. "</span>"
end,
}
-- The Function
local function decorate_cell(widget, flag, date)
local function decorate_cell(widget, flag)
if flag == "monthheader" and not styles.monthheader then
flag = "header"
end
@ -42,38 +46,35 @@ local function decorate_cell(widget, flag, date)
widget:set_markup(props.markup(widget:get_text()))
end
-- Change bg color for weekends
local d = {year=date.year, month=(date.month or 1), day=(date.day or 1)}
local weekday = tonumber(os.date("%w", os.time(d)))
local ret = wibox.widget {
local ret = wibox.widget({
{
widget,
margins = props.padding,
widget = wibox.container.margin
widget = wibox.container.margin,
},
fg = props.fg_color,
bg = props.bg_color,
widget = wibox.container.background
}
widget = wibox.container.background,
})
return ret
end
local calendar = wibox.widget {
local calendar = wibox.widget({
date = os.date("*t"),
font = beautiful.font_name .. "14",
fn_embed = decorate_cell,
widget = wibox.widget.calendar.month,
}
})
return wibox.widget {
return wibox.widget({
nil,
{
nil,
calendar,
expand = 'none',
expand = "none",
layout = wibox.layout.align.horizontal,
},
expand = 'none',
expand = "none",
layout = wibox.layout.align.vertical,
}
})

View file

@ -1,11 +1,10 @@
local awful = require "awful"
local gears = require "gears"
local wibox = require "wibox"
local beautiful = require "beautiful"
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local rubato = require "lib.rubato"
local helpers = require "helpers"
local rubato = require("lib.rubato")
-- Var
local width = dpi(410)
@ -21,66 +20,63 @@ local function round_widget(radius)
end
local function center_widget(widgets)
return wibox.widget {
return wibox.widget({
nil,
{
nil,
widgets,
expand = 'none',
expand = "none",
layout = wibox.layout.align.horizontal,
},
expand = 'none',
expand = "none",
layout = wibox.layout.align.vertical,
}
})
end
local function box_widget(widgets, width, height)
local function box_widget(widgets, _width, _height)
--local centered_widget = center_widget(widgets)
return wibox.widget {
return wibox.widget({
{
{
widgets,
margins = dpi(16),
widget = wibox.container.margin,
},
forced_width = dpi(width),
forced_height = dpi(height),
forced_width = dpi(_width),
forced_height = dpi(_height),
shape = round_widget(8),
bg = beautiful.bg_focus, --for widget Rounded and Border
widget = wibox.container.background,
},
margins = { left = dpi(20), right = dpi(20) },
widget = wibox.container.margin,
}
})
end
local aa = wibox.widget.textbox()
-- Get widgets
local weather_widget = require "ui.info-panel.weather"
local profile_widget = require "ui.info-panel.profile"
local weather_widget = require("ui.info-panel.weather")
local profile_widget = require("ui.info-panel.profile")
--local player_widget = require "ui.info-panel.player" -- Old MPD widget
local calendar_widget = require "ui.info-panel.calendar"
local music_widget = require "ui.info-panel.music-player"
local calendar_widget = require("ui.info-panel.calendar")
local music_widget = require("ui.info-panel.music-player")
-- Combine some widgets
local weather = box_widget(weather_widget, 380, 180)
local profile = box_widget(profile_widget, 380, 210)
--local player = box_widget(player_widget, 380, 150) -- Box MPD widget
local calendar = box_widget(calendar_widget, 380, 340)
local music = box_widget(music_widget, 380, 150)
-- Spacing
local space = function(height)
return wibox.widget {
forced_height = dpi(height),
layout = wibox.layout.align.horizontal
}
local space = function(_height)
return wibox.widget({
forced_height = dpi(_height),
layout = wibox.layout.align.horizontal,
})
end
-- Sidebar
local sidebar = wibox {
local sidebar = wibox({
visible = false,
ontop = true,
width = width,
@ -89,10 +85,10 @@ local sidebar = wibox {
bg = beautiful.bg_normal,
border_width = dpi(3),
border_color = beautiful.xcolorS0,
}
})
-- Sidebar widget setup
sidebar : setup {
sidebar:setup({
{
profile,
--player,
@ -105,27 +101,27 @@ sidebar : setup {
},
margins = { top = dpi(20), bottom = dpi(20) },
widget = wibox.container.margin,
}
})
-- Slide animation
local slide = rubato.timed {
local slide = rubato.timed({
pos = awful.screen.focused().geometry.x - sidebar.width,
rate = 60,
intro = 0.2,
duration = 0.4,
subscribed = function(pos)
sidebar.x = awful.screen.focused().geometry.x + pos
end
}
end,
})
-- Timer of sidebar's death
sidebar.timer = gears.timer {
sidebar.timer = gears.timer({
timeout = 0.5,
single_shot = true,
callback = function()
sidebar.visible = not sidebar.visible
end
}
end,
})
--aa.timer = gears.timer { -- Updates the Player every second
-- timeout = 1,
-- autostart = false,

View file

@ -75,7 +75,7 @@ local function volume_control()
})
-- Update bar
local function set_slider_value(self, volume)
local function set_slider_value(_, volume)
volume_bar.value = volume * 100
end
@ -111,25 +111,25 @@ end
local toggle = wibox.widget.textbox()
toggle.font = beautiful.font_name .. "26"
toggle:buttons(gears.table.join(
awful.button({}, 1, function() playerctl_daemon:play_pause() end)
))
toggle:buttons(gears.table.join(awful.button({}, 1, function()
playerctl_daemon:play_pause()
end)))
local next = wibox.widget.textbox()
next.font = beautiful.font_name .. "26"
next.markup = ""
next:buttons(gears.table.join(
awful.button({}, 1, function() playerctl_daemon:next() end)
))
next:buttons(gears.table.join(awful.button({}, 1, function()
playerctl_daemon:next()
end)))
local back = wibox.widget.textbox()
back.font = beautiful.font_name .. "26"
back.markup = ""
back:buttons(gears.table.join(
awful.button({}, 1, function() playerctl_daemon:previous() end)
))
back:buttons(gears.table.join(awful.button({}, 1, function()
playerctl_daemon:previous()
end)))
local function music()
return wibox.widget({
@ -223,7 +223,7 @@ local music_widget = wibox.widget({
--- playerctl
--- -------------
playerctl_daemon:connect_signal("metadata", function(_, title, artist, album_path, __, ___, ____)
playerctl_daemon:connect_signal("metadata", function(_, title, artist, album_path, _, _, _)
if title == "" then
title = "Nothing Playing"
end
@ -239,13 +239,13 @@ playerctl_daemon:connect_signal("metadata", function(_, title, artist, album_pat
music_artist:set_markup_silently(helpers.ui.colorize_text(artist, beautiful.xcolor2))
end)
playerctl_daemon:connect_signal("playback_status", function(_, playing, __)
playerctl_daemon:connect_signal("playback_status", function(_, playing, _)
if playing then
music_text:set_markup_silently(helpers.ui.colorize_text("Now Playing", beautiful.xcolorO0)) --"#666c79"
toggle.markup = helpers.ui.colorize_text("", beautiful.xcolor2 )
toggle.markup = helpers.ui.colorize_text("󰏤", beautiful.xcolor2)
else
music_text:set_markup_silently(helpers.ui.colorize_text("Music", beautiful.xcolorO0))
toggle.markup = helpers.ui.colorize_text("", beautiful.xcolor2 )
toggle.markup = helpers.ui.colorize_text("󰐊", beautiful.xcolor2)
end
end)

View file

@ -1,7 +1,7 @@
local awful = require "awful"
local gears = require "gears"
local wibox = require "wibox"
local beautiful = require "beautiful"
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
-- Make Widgets
@ -29,39 +29,37 @@ length.valign = "center"
local toggle = wibox.widget.textbox()
toggle.font = beautiful.font_name .. "26"
toggle:buttons(gears.table.join(
awful.button({}, 1, function()
toggle:buttons(gears.table.join(awful.button({}, 1, function()
awful.spawn("mpc toggle", false)
if toggle.markup:match("") then
toggle.markup = ""
if toggle.markup:match("󰏤") then
toggle.markup = "󰐊"
else
toggle.markup = ""
toggle.markup = "󰏤"
end
end)
))
end)))
local next = wibox.widget.textbox()
next.font = beautiful.font_name .. "26"
next.markup = ""
next.markup = "󰒭"
next:buttons(gears.table.join(
awful.button({}, 1, function() awful.spawn("mpc next", false) end)
))
next:buttons(gears.table.join(awful.button({}, 1, function()
awful.spawn("mpc next", false)
end)))
local back = wibox.widget.textbox()
back.font = beautiful.font_name .. "26"
back.markup = ""
back.markup = "󰒮"
back:buttons(gears.table.join(
awful.button({}, 1, function() awful.spawn("mpc prev", false) end)
))
back:buttons(gears.table.join(awful.button({}, 1, function()
awful.spawn("mpc prev", false)
end)))
-- Get data
awesome.connect_signal("signal::player", function(t, a, l, s)
if not s:match("playing") then
toggle.markup = ""
toggle.markup = "󰐊"
else
toggle.markup = ""
toggle.markup = "󰏤"
end
title.markup = t
@ -72,15 +70,15 @@ end)
-- Grouping Widgets
---------------------
local buttons = wibox.widget {
local buttons = wibox.widget({
back,
toggle,
next,
spacing = dpi(11),
layout = wibox.layout.fixed.horizontal,
}
})
return wibox.widget {
return wibox.widget({
{
nil,
{
@ -89,7 +87,7 @@ return wibox.widget {
spacing = dpi(12),
layout = wibox.layout.fixed.vertical,
},
expand = 'none',
expand = "none",
layout = wibox.layout.align.vertical,
},
{
@ -100,7 +98,7 @@ return wibox.widget {
{
nil,
buttons,
expand = 'none',
expand = "none",
layout = wibox.layout.align.horizontal,
},
spacing = dpi(6),
@ -109,7 +107,6 @@ return wibox.widget {
top = 30,
bottom = 0,
layout = wibox.container.margin,
--layout = wibox.layout.align.vertical,
},
layout = wibox.layout.flex.horizontal,
}
})

View file

@ -1,12 +1,11 @@
local awful = require "awful"
local wibox = require "wibox"
local gears = require "gears"
local beautiful = require "beautiful"
local helpers = require "helpers"
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local beautiful = require("beautiful")
local helpers = require("helpers")
local dpi = beautiful.xresources.apply_dpi
local user1 = os.getenv('USER')
local user1 = os.getenv("USER")
-- Create Widgets
-------------------
@ -21,13 +20,13 @@ pfp.forced_height = dpi(130)
-- User
local user = wibox.widget.textbox()
user.font = beautiful.font_name .. "SemiBold 18"
user.align = 'left'
user.align = "left"
user.markup = "<span foreground='" .. beautiful.fg_normal .. "'>" .. user1 .. "</span>"
-- Hostname
local hostname = wibox.widget.textbox()
hostname.font = beautiful.font_name .. "Regular 14"
hostname.align = 'left'
hostname.align = "left"
awful.spawn.easy_async_with_shell("echo $HOST", function(stdout)
hostname.markup = "<span foreground='" .. beautiful.xcolor1 .. "'>" .. "@" .. tostring(stdout) .. "</span>"
@ -38,25 +37,23 @@ local uptimeosd = wibox.widget.textbox()
uptimeosd.font = beautiful.font_name .. "12"
uptimeosd.align = "center"
-- Get data 4 widgets!
awesome.connect_signal("signal::uptime", function(uptime)
uptimeosd.markup = "<span foreground='" .. beautiful.fg_normal .. "'>" .. "up " .. uptime .. "</span>"
end)
-- Spacing horizontally
local space = wibox.widget {
local space = wibox.widget({
forced_height = dpi(6),
layout = wibox.layout.align.horizontal
}
local shutdown = wibox.widget {
layout = wibox.layout.align.horizontal,
})
local shutdown = wibox.widget({
{
{
font = beautiful.font_name .. "30",
markup = "<span foreground='" .. beautiful.xcolor10 .. "'>" .. "" .. "</span>",
align = center,
valign = center,
align = "center",
valign = "center",
widget = wibox.widget.textbox,
},
top = dpi(9),
@ -68,15 +65,15 @@ local shutdown = wibox.widget {
bg = beautiful.xcolorS1,
shape = helpers.ui.rrect(8),
widget = wibox.container.background,
}
})
local reboot = wibox.widget {
local reboot = wibox.widget({
{
{
font = beautiful.font_name .. "30",
markup = "<span foreground='" .. beautiful.xcolor2 .. "'>" .. "" .. "</span>",
align = center,
valign = center,
align = "center",
valign = "center",
widget = wibox.widget.textbox,
},
top = dpi(9),
@ -88,7 +85,7 @@ local reboot = wibox.widget {
bg = beautiful.xcolorS1,
shape = helpers.ui.rrect(8),
widget = wibox.container.background,
}
})
shutdown:connect_signal("mouse::enter", function()
shutdown.bg = beautiful.xcolorS2
end)
@ -105,21 +102,17 @@ reboot:connect_signal("mouse::leave", function()
reboot.bg = beautiful.xcolorS1
end)
shutdown:buttons(gears.table.join(
awful.button({ }, 1, function()
shutdown:buttons(gears.table.join(awful.button({}, 1, function()
awesome.emit_signal("module::exit_screen:show")
end)
))
end)))
reboot:buttons(gears.table.join(
awful.button({ }, 1, function()
reboot:buttons(gears.table.join(awful.button({}, 1, function()
awful.spawn.with_shell("loginctl reboot")
end)
))
end)))
-- Grouping widgets
---------------------
local buttons = wibox.widget {
local buttons = wibox.widget({
{
reboot,
shutdown,
@ -129,9 +122,9 @@ local buttons = wibox.widget {
top = 10,
left = 57,
widget = wibox.container.margin,
}
})
local name = wibox.widget {
local name = wibox.widget({
{
user,
hostname,
@ -140,8 +133,8 @@ local name = wibox.widget {
},
left = 0,
widget = wibox.container.margin,
}
local uptimebox = wibox.widget {
})
local uptimebox = wibox.widget({
{
{
uptimeosd,
@ -152,21 +145,17 @@ local uptimebox = wibox.widget {
bottom = 3,
widget = wibox.container.margin,
},
-- bg = beautiful.xcolorS1,
bg = beautiful.xcolorS0,
shape = helpers.ui.rrect(7),
widget = wibox.container.background,
}
})
-- The Profile Widget
return wibox.widget {
return wibox.widget({
{
{
pfp,
uptimebox,
--battery,
spacing = dpi(20),
layout = wibox.layout.fixed.vertical,
},
@ -183,4 +172,4 @@ return wibox.widget {
},
spacing = dpi(30),
layout = wibox.layout.fixed.horizontal,
}
})

View file

@ -170,7 +170,7 @@ local coordinates = user_vars.widget.weather.coordinates
local show_hourly_forecast = true
local show_daily_forecast = true
local units = "metric"
local units = "imperial"
local url = (
"https://api.openweathermap.org/data/2.5/onecall"

View file

@ -1,5 +1,5 @@
require "ui.popups"
require "ui.notif-panel"
require "ui.info-panel"
require "ui.top-panel"
require "ui.titlebar"
require("ui.popups")
require("ui.notif-panel")
require("ui.info-panel")
require("ui.top-panel")
require("ui.titlebar")

View file

@ -7,27 +7,27 @@ local naughty = require("naughty")
local rubato = require("lib.rubato")
local dpi = beautiful.xresources.apply_dpi
local notifs_text = wibox.widget {
local notifs_text = wibox.widget({
font = beautiful.font .. " Bold 20",
markup = "Notifications",
halign = "center",
widget = wibox.widget.textbox,
}
})
local notifs_clear = wibox.widget {
local notifs_clear = wibox.widget({
markup = "<span foreground='" .. beautiful.xcolor10 .. "'> </span>",
font = beautiful.font_name .. " Bold 21",
align = "center",
valign = "center",
widget = wibox.widget.textbox,
}
})
notifs_clear:buttons(gears.table.join(awful.button({}, 1, function()
_G.notif_center_reset_notifs_container()
_G.Notif_center_reset_notifs_container()
end)))
helpers.ui.add_hover_cursor(notifs_clear, "hand2")
local notifs_empty = wibox.widget {
local notifs_empty = wibox.widget({
{
nil,
{
@ -47,9 +47,9 @@ local notifs_empty = wibox.widget {
widget = wibox.container.background,
bg = beautiful.xcolorS0,
shape = helpers.ui.rrect(8),
}
})
local notifs_container = wibox.widget {
local notifs_container = wibox.widget({
spacing = 10,
spacing_widget = {
{
@ -63,19 +63,19 @@ local notifs_container = wibox.widget {
widget = wibox.container.margin,
},
forced_width = 320,
forced_height = 730, --430, --Use it like in notifs_empty else it will look weird
forced_height = 730, --Use it like in notifs_empty else it will look weird
layout = wibox.layout.fixed.vertical,
}
})
local remove_notifs_empty = true
notif_center_reset_notifs_container = function()
Notif_center_reset_notifs_container = function()
notifs_container:reset(notifs_container)
notifs_container:insert(1, notifs_empty)
remove_notifs_empty = true
end
notif_center_remove_notif = function(box)
Notif_center_remove_notif = function(box)
notifs_container:remove_widgets(box)
if #notifs_container.children == 0 then
@ -84,11 +84,11 @@ notif_center_remove_notif = function(box)
end
end
local create_notif = function(icon, n, width)
local time = os.date "%H:%M"
local create_notif = function(icon, n)
local time = os.date("%H:%M")
local box = {}
box = wibox.widget {
box = wibox.widget({
{
{
{
@ -162,10 +162,10 @@ local create_notif = function(icon, n, width)
widget = wibox.container.background,
bg = beautiful.xcolorS0,
shape = helpers.ui.rrect(8),
}
})
box:buttons(gears.table.join(awful.button({}, 1, function()
_G.notif_center_remove_notif(box)
_G.Notif_center_remove_notif(box)
end)))
return box
@ -202,10 +202,10 @@ naughty.connect_signal("request::display", function(n)
appicon = beautiful.pfp --notification_icon
end
notifs_container:insert(1, create_notif(appicon, n, width))
notifs_container:insert(1, create_notif(appicon, n))
end)
local notifs = wibox.widget {
local notifs = wibox.widget({
{
{
{
@ -228,28 +228,19 @@ local notifs = wibox.widget {
notifs_container,
spacing = 20,
layout = wibox.layout.fixed.vertical,
}
})
local actions = wibox.widget {
local actions = wibox.widget({
{
{
-- {
{
widget = require "ui.notif-panel.widgets.vol_slider",
widget = require("ui.notif-panel.widgets.vol_slider"),
},
{
widget = require "ui.notif-panel.widgets.mic_slider",
widget = require("ui.notif-panel.widgets.mic_slider"),
},
layout = wibox.layout.flex.vertical,
spacing = 1,
-- },
-- {
-- { widget = require "ui.widgets.wifi" },
-- layout = wibox.layout.flex.horizontal,
-- spacing = 15,
-- },
-- layout = wibox.layout.flex.vertical,
-- spacing = 30,
},
widget = wibox.container.margin,
top = 20,
@ -261,29 +252,10 @@ local actions = wibox.widget {
widget = wibox.container.background,
bg = beautiful.xcolorS0,
shape = helpers.ui.rrect(8),
}
--local action = awful.popup { -- Replacing it with A wibar
-- widget = {
-- widget = wibox.container.margin,
-- margins = 30,
-- forced_width = 355,
-- forced_height = 690,
-- {
-- layout = wibox.layout.fixed.vertical,
-- notifs,
-- actions,
-- },
-- },
-- placement = function(c)
-- (awful.placement.left)(c, { margins = { bottom = 250, right = 60 } })
-- end,
-- ontop = true,
-- visible = false,
-- bg = beautiful.bg_normal,
--}
})
--
-- Sidebar
local action = wibox {
local action = wibox({
visible = false,
ontop = true,
width = dpi(410),
@ -292,10 +264,10 @@ local action = wibox {
bg = beautiful.bg_normal,
border_width = dpi(3),
border_color = beautiful.xcolorS0,
}
})
-- Sidebar widget setup
action : setup {
action:setup({
{
notifs,
actions,
@ -304,41 +276,42 @@ action : setup {
},
margins = { top = dpi(20), bottom = dpi(20), left = dpi(20), right = dpi(20) },
widget = wibox.container.margin,
}
})
-- Slide animation
local slide = rubato.timed {
pos = awful.screen.focused().geometry.x - awful.screen.focused().geometry.width, --dpi (1900),
local slide = rubato.timed({
pos = awful.screen.focused().geometry.x - awful.screen.focused().geometry.width,
rate = 60,
intro = 0.2,
duration = 0.4,
subscribed = function(pos)
action.x = awful.screen.focused().geometry.x - pos
end
}
end,
})
-- Timer of action's death
action.timer = gears.timer {
action.timer = gears.timer({
timeout = 0.5,
single_shot = true,
callback = function()
action.visible = not action.visible
end
}
end,
})
action.shape = function(cr, w, h) --Rounded Corners
gears.shape.rounded_rect(cr, w, h, 14)
end
-- Toggle function
action.toggle = function()
if action.visible then
--awesome.emit_signal("widget::update_vol")
slide.target = awful.screen.focused().geometry.x - awful.screen.focused().geometry.width
action.timer:start()
else
awesome.emit_signal("widget::update_vol")
awesome.emit_signal("widget::update_mic")
slide.target = awful.screen.focused().geometry.x - awful.screen.focused().geometry.width + action.width + dpi(25) --dpi(1465)
slide.target = awful.screen.focused().geometry.x
- awful.screen.focused().geometry.width
+ action.width
+ dpi(25)
action.visible = not action.visible
end
end
@ -349,5 +322,3 @@ awesome.connect_signal("action::toggle", function()
end)
return action

View file

@ -4,7 +4,7 @@ local wibox = require("wibox")
local beautiful = require("beautiful")
local helpers = require("helpers")
local slider = wibox.widget {
local slider = wibox.widget({
bar_shape = helpers.ui.rrect(9),
bar_height = 6,
bar_color = beautiful.bg_focus,
@ -14,11 +14,11 @@ local slider = wibox.widget {
handle_width = 12,
value = 25,
widget = wibox.widget.slider,
}
})
helpers.ui.add_hover_cursor(slider, "hand1")
local bri_slider = wibox.widget {
local bri_slider = wibox.widget({
{
markup = helpers.ui.colorize_text("", beautiful.xcolor7),
font = beautiful.font .. " 14",
@ -29,7 +29,7 @@ local bri_slider = wibox.widget {
slider,
layout = wibox.layout.fixed.horizontal,
spacing = 0,
}
})
awful.spawn.easy_async_with_shell(
"brightnessctl | grep -i 'current' | awk '{ print $4}' | tr -d \"(%)\"",

View file

@ -5,10 +5,10 @@ local beautiful = require("beautiful")
local helpers = require("helpers")
local dpi = beautiful.xresources.apply_dpi
local user_vars = require "user_variables"
local user_vars = require("user_variables")
local microphone = user_vars.widget.mic.name
local slider = wibox.widget {
local slider = wibox.widget({
bar_shape = helpers.ui.rrect(9),
bar_height = 6,
bar_color = beautiful.xcolorbase,
@ -19,43 +19,43 @@ local slider = wibox.widget {
value = 75,
forced_width = dpi(239),
widget = wibox.widget.slider,
}
})
local osd_value = wibox.widget {
local osd_value = wibox.widget({
text = "0%",
font = beautiful.font_name .. "10",
widget = wibox.widget.textbox(),
}
local icon = wibox.widget {
markup = helpers.ui.colorize_text("", beautiful.xcolor2),
})
local icon = wibox.widget({
markup = helpers.ui.colorize_text("󰍬", beautiful.xcolor2),
font = beautiful.font_name .. "14",
align = "center",
valign = "center",
widget = wibox.widget.textbox(),
}
})
local function get_val()
awesome.connect_signal("signal::mic", function(vol, muted)
if muted then icon.markup = "<span foreground='"..beautiful.xcolor2.."'></span>" icon.font = beautiful.font_name.."14" else
--v_slider.color = beautiful.xcolor2
icon.markup = "<span foreground='"..beautiful.xcolor2.."'></span>" icon.font = beautiful.font_name.."17"
awesome.connect_signal("signal::mic", function(_, muted)
if muted then
icon.markup = "<span foreground='" .. beautiful.xcolor2 .. "'>󰍭</span>"
icon.font = beautiful.font_name .. "14"
else
icon.markup = "<span foreground='" .. beautiful.xcolor2 .. "'>󰍬</span>"
icon.font = beautiful.font_name .. "17"
end
end)
end
get_val()
icon:buttons(gears.table.join(
awful.button({ }, 1, function()
icon:buttons(gears.table.join(awful.button({}, 1, function()
local script = [[
pamixer --source ]] .. microphone .. [[ -t
]]
awful.spawn(script, false)
awesome.emit_signal("widget::update_mic")
end)
))
end)))
slider:buttons(gears.table.join(
awful.button({}, 4, nil, function()
@ -77,7 +77,7 @@ slider:buttons(gears.table.join(
helpers.ui.add_hover_cursor(slider, "hand1")
helpers.ui.add_hover_cursor(icon, "hand2")
local mic_slider = wibox.widget {
local mic_slider = wibox.widget({
{
{
layout = wibox.layout.fixed.horizontal,
@ -87,7 +87,7 @@ local mic_slider = wibox.widget {
right = dpi(14),
top = 5,
bottom = 5,
layout = wibox.container.margin
layout = wibox.container.margin,
},
slider,
layout = wibox.layout.fixed.horizontal,
@ -100,11 +100,9 @@ local mic_slider = wibox.widget {
right = 0,
top = 0,
bottom = 0,
layout = wibox.container.margin
layout = wibox.container.margin,
},
-- layout = wibox.layout.fixed.horizontal,
-- spacing = 0,
}
})
local update_microphone = function() -- Sets the Volume Correct
awful.spawn.easy_async_with_shell("pamixer --source " .. microphone .. " --get-volume", function(stdout)
@ -116,17 +114,7 @@ awesome.connect_signal("widget::update_mic", function()
update_microphone()
end)
--slider:connect_signal("property::value", function(_, vol)
-- awful.spawn("pamixer --set-volume ".. vol, false)
--end)
--awful.spawn.easy_async_with_shell("pamixer --get-volume", function(stdout)
-- local value = string.gsub(stdout, "^%s*(.-)%s*$", "%1")
-- vol_slider.value = tonumber(value)
--end)
slider:connect_signal("property::value", function(_, new_value)
-- vol_slider.value = new_value
awful.spawn("pamixer --source " .. microphone .. " --set-volume " .. new_value, false)
local volume_level = slider:get_value()
osd_value.text = volume_level .. "%"

View file

@ -5,7 +5,7 @@ local beautiful = require("beautiful")
local helpers = require("helpers")
local dpi = beautiful.xresources.apply_dpi
local slider = wibox.widget {
local slider = wibox.widget({
bar_shape = helpers.ui.rrect(9),
bar_height = 6,
bar_color = beautiful.xcolorbase,
@ -16,43 +16,41 @@ local slider = wibox.widget {
value = 75,
forced_width = dpi(239),
widget = wibox.widget.slider,
}
})
local osd_value = wibox.widget {
local osd_value = wibox.widget({
text = "0%",
font = beautiful.font_name .. "10",
widget = wibox.widget.textbox(),
}
local icon = wibox.widget {
markup = helpers.ui.colorize_text(" ", beautiful.xcolor2),
})
local icon = wibox.widget({
markup = helpers.ui.colorize_text("󰕾 ", beautiful.xcolor2),
font = beautiful.font_name .. "14",
align = "center",
valign = "center",
widget = wibox.widget.textbox(),
}
})
local function get_val()
awesome.connect_signal("signal::volume", function(vol, muted)
if muted then icon.markup = "<span foreground='"..beautiful.xcolor2.."'>婢</span>" else
--v_slider.color = beautiful.xcolor2
icon.markup = "<span foreground='"..beautiful.xcolor2.."'>墳</span>"
awesome.connect_signal("signal::volume", function(_, muted)
if muted then
icon.markup = "<span foreground='" .. beautiful.xcolor2 .. "'>󰖁</span>"
else
icon.markup = "<span foreground='" .. beautiful.xcolor2 .. "'>󰕾</span>"
end
end)
end
get_val()
icon:buttons(gears.table.join(
awful.button({ }, 1, function()
icon:buttons(gears.table.join(awful.button({}, 1, function()
local script = [[
pamixer -t
]]
awful.spawn(script, false)
awesome.emit_signal("widget::update_vol")
end)
))
end)))
slider:buttons(gears.table.join(
awful.button({}, 4, nil, function()
@ -74,7 +72,7 @@ slider:buttons(gears.table.join(
helpers.ui.add_hover_cursor(slider, "hand1")
helpers.ui.add_hover_cursor(icon, "hand2")
local vol_slider = wibox.widget {
local vol_slider = wibox.widget({
{
{
layout = wibox.layout.fixed.horizontal,
@ -84,7 +82,7 @@ local vol_slider = wibox.widget {
right = dpi(14),
top = 5,
bottom = 5,
layout = wibox.container.margin
layout = wibox.container.margin,
},
slider,
layout = wibox.layout.fixed.horizontal,
@ -97,11 +95,9 @@ local vol_slider = wibox.widget {
right = 0,
top = 0,
bottom = 0,
layout = wibox.container.margin
layout = wibox.container.margin,
},
-- layout = wibox.layout.fixed.horizontal,
-- spacing = 0,
}
})
local update_volume = function() -- Sets the Volume Correct
awful.spawn.easy_async_with_shell("pamixer --get-volume", function(stdout)
@ -113,22 +109,11 @@ awesome.connect_signal("widget::update_vol", function()
update_volume()
end)
awesome.connect_signal("widget::update_vol_slider", function(volume_level)
slider:set_value(volume_level)
end)
--slider:connect_signal("property::value", function(_, vol)
-- awful.spawn("pamixer --set-volume ".. vol, false)
--end)
--awful.spawn.easy_async_with_shell("pamixer --get-volume", function(stdout)
-- local value = string.gsub(stdout, "^%s*(.-)%s*$", "%1")
-- vol_slider.value = tonumber(value)
--end)
slider:connect_signal("property::value", function(_, new_value)
-- vol_slider.value = new_value
awful.spawn("pamixer --set-volume " .. new_value, false)
awesome.emit_signal("widget::update_vol_pulse") -- update_vol_pulse doesn't Update Volume Signal
local volume_level = slider:get_value()

View file

@ -1,19 +1,20 @@
local awful = require "awful"
local gears = require "gears"
local beautiful = require "beautiful"
local wibox = require "wibox"
local hotkeys_popup = require "awful.hotkeys_popup"
local awful = require("awful")
local gears = require("gears")
local beautiful = require("beautiful")
local wibox = require("wibox")
local ll = awful.widget.layoutlist {
base_layout = wibox.widget {
local keys = require("config").keys
local ll = awful.widget.layoutlist({
base_layout = wibox.widget({
spacing = 5,
forced_num_cols = 4,
layout = wibox.layout.grid.vertical,
},
}),
widget_template = {
{
{
id = 'icon_role',
id = "icon_role",
forced_height = 1,
forced_width = 1,
widget = wibox.widget.imagebox,
@ -21,30 +22,30 @@ local ll = awful.widget.layoutlist {
margins = 15,
widget = wibox.container.margin,
},
id = 'background_role',
id = "background_role",
forced_width = 70,
forced_height = 70,
shape = gears.shape.rounded_rect,
widget = wibox.container.background,
},
}
})
local layout_popup = awful.popup {
widget = wibox.widget {
local layout_popup = awful.popup({
widget = wibox.widget({
ll,
margins = 4, --border margins (padding)
widget = wibox.container.margin,
},
}),
border_color = beautiful.border_normal,
bg = beautiful.bg_normal,
border_width = beautiful.border_width,
placement = awful.placement.centered,
ontop = true,
visible = false,
shape = gears.shape.rounded_rect
}
function gears.table.iterate_value(t, value, step_size, filter, start_at)
local k = gears.table.hasitem(t, value, true, start_at)
shape = gears.shape.rounded_rect,
})
function gears.table.iterate_value(t, value, step_size, filter, _)
local k = gears.table.hasitem(t, value)
if not k then
return
end
@ -66,54 +67,68 @@ function gears.table.iterate_value(t, value, step_size, filter, start_at)
end
-- Timer for Death of PopUp
layout_popup.timer = gears.timer {
layout_popup.timer = gears.timer({
timeout = 0.8,
--autostart = true,
single_shot = true,
callback = function()
layout_popup.visible = false
end
}
end,
})
function layout_popup.changed()
layout_popup.visible = true
if not layout_popup.visible then layout_popup.timer:start() else
if not layout_popup.visible then
layout_popup.timer:start()
else
layout_popup.timer:again()
end
end
-- Mouse Support -- Disable if not Wanted --
layout_popup:connect_signal("mouse::enter", function() layout_popup.timer:stop() end)
layout_popup:connect_signal("mouse::leave", function() layout_popup.timer:start() end)
layout_popup:connect_signal("mouse::enter", function()
layout_popup.timer:stop()
end)
layout_popup:connect_signal("mouse::leave", function()
layout_popup.timer:start()
end)
-- Make sure you remove the default Mod4+Space and Mod4+Shift+Space
-- keybindings before adding this.
awful.keygrabber {
start_callback = function() layout_popup.visible = true end,
stop_callback = function() layout_popup.visible = false end,
awful.keygrabber({
start_callback = function()
layout_popup.visible = true
end,
stop_callback = function()
layout_popup.visible = false
end,
export_keybindings = true,
release_event = 'release',
stop_key = {'Escape', 'Super_L', 'Super_R'},
release_event = "release",
stop_key = { "Escape", "Super_L", "Super_R" },
keybindings = {
{{ modkey } , ' ' , function()
{
{ keys.mod },
" ",
function()
--layout_popup.timer:again()
awful.layout.set(
gears.table.iterate_value(ll.layouts, ll.current_layout, 1),
--layout_popup.timer:start()
layout_popup.changed()
)
end,
},
end},
{{ modkey, 'Shift' } , ' ' , function()
{
{ keys.mod, "Shift" },
" ",
function()
--layout_popup.timer:again()
awful.layout.set(
gears.table.iterate_value(ll.layouts, ll.current_layout, -1),
--layout_popup.timer:start()
layout_popup.changed()
)
end},
}
}
end,
},
},
})

View file

@ -55,9 +55,9 @@ naughty.connect_signal("request::display", function(n)
--- table of icons
local app_icons = {
["firefox"] = { icon = "" },
["discord"] = { icon = "" },
["music"] = { icon = "" },
["screenshot tool"] = { icon = "" },
["discord"] = { icon = "󰙯" },
["music"] = { icon = "󰝚" },
["screenshot tool"] = { icon = "󰊓" },
}
local app_icon = nil
@ -66,7 +66,7 @@ naughty.connect_signal("request::display", function(n)
if app_icons[tolow(n.app_name)] then
app_icon = app_icons[tolow(n.app_name)].icon
else
app_icon = ""
app_icon = "󰂚"
end
local app_icon_n = wibox.widget({
@ -121,30 +121,27 @@ naughty.connect_signal("request::display", function(n)
layout = wibox.layout.stack,
})
local app_name = wibox.widget {
local app_name = wibox.widget({
font = beautiful.font_name .. "Bold 12",
text = n.app_name:gsub("^%l", string.upper),
widget = wibox.widget.textbox,
}
})
local dismiss = wibox.widget {
local dismiss = wibox.widget({
{
font = beautiful.font_name .. "Bold 10",
markup = helpers.ui.colorize_text("", beautiful.xcolor2),
widget = wibox.widget.textbox,
valign = center,
align = center,
valign = "center",
align = "center",
},
margins = dpi(4),
widget = wibox.container.margin,
}
})
dismiss:buttons(gears.table.join(
awful.button({ }, 1, function()
dismiss:buttons(gears.table.join(awful.button({}, 1, function()
n:destroy(naughty.notification_closed_reason.dismissed_by_user)
end)
))
end)))
local timeout_arc = wibox.widget({
widget = wibox.container.arcchart,
@ -207,7 +204,7 @@ naughty.connect_signal("request::display", function(n)
{
{
id = "text_role",
font = "FiraCode Nerd Font 10",
font = beautiful.font_name .. "10",
widget = wibox.widget.textbox,
},
left = dpi(6),
@ -232,8 +229,6 @@ naughty.connect_signal("request::display", function(n)
notification = n,
type = "notification",
cursor = "hand2",
--- For antialiasing: The real shape is set in widget_template
--shape = gears.shape.rectangle,
shape = helpers.ui.rrect(12),
border_color = beautiful.xcolorS0,
border_width = dpi(3),
@ -307,13 +302,12 @@ naughty.connect_signal("request::display", function(n)
--- Adds Close Cursor on Close Sign ---
helpers.ui.add_hover_cursor(dismiss, "hand2")
local anim = animation:new({
duration = n.timeout,
target = 100,
easing = animation.easing.linear,
reset_on_stop = false,
update = function(self, pos)
update = function(_, pos)
timeout_arc.value = pos
end,
})
@ -342,10 +336,10 @@ naughty.connect_signal("request::display", function(n)
anim:start()
--- Destroy popups notifs if dont_disturb mode is on
---@diagnostic disable-next-line: undefined-field
if _G.dnd_state then
naughty.destroy_all_notifications(nil, 1)
end
end)
require(... .. ".error")
--require(... .. ".playerctl")

View file

@ -1,7 +1,8 @@
local naughty = require("naughty")
local playerctl_daemon = require("signals.playerctl")
local beautiful = require("beautiful")
playerctl_daemon:connect_signal("metadata", function(_, title, artist, album_path, album, new, player_name)
playerctl_daemon:connect_signal("metadata", function(_, title, artist, album_path, _, new, _)
if album_path == "" then -- Sets Image for Notification --
album_path = beautiful.music
end

View file

@ -3,25 +3,25 @@ local rubato = require("lib.rubato") -- Totally optional, only required if you a
-- These are example rubato tables. You can use one for just y, just x, or both.
-- The duration and easing is up to you. Please check out the rubato docs to learn more.
local anim_y = rubato.timed {
local anim_y = rubato.timed({
pos = -1000,
rate = 60,
--easing = rubato.quadratic,
intro = 0.2,
duration = 0.4,
awestore_compat = true -- This option must be set to true.
}
awestore_compat = true, -- This option must be set to true.
})
local anim_x = rubato.timed {
local anim_x = rubato.timed({
pos = 1720,
rate = 60,
easing = rubato.quadratic,
intro = 0.1,
duration = 0.3,
awestore_compat = true -- This option must be set to true.
}
awestore_compat = true, -- This option must be set to true.
})
local term_scratch = bling.module.scratchpad {
local term_scratch = bling.module.scratchpad({
command = "alacritty --class spad", -- How to spawn the scratchpad
rule = { instance = "spad" }, -- The rule that the scratchpad will be searched by
sticky = true, -- Whether the scratchpad should be sticky
@ -30,8 +30,8 @@ local term_scratch = bling.module.scratchpad {
geometry = { x = 456, y = 33, height = 600, width = 1000 }, -- The geometry in a floating state
reapply = true, -- Whether all those properties should be reapplied on every new opening of the scratchpad (MUST BE TRUE FOR ANIMATIONS)
dont_focus_before_close = false, -- When set to true, the scratchpad will be closed by the toggle function regardless of whether its focused or not. When set to false, the toggle function will first bring the scratchpad into focus and only close it on a second call
rubato = {y = anim_y} -- Optional. This is how you can pass in the rubato tables for animations. If you don't want animations, you can ignore this option.
}
rubato = { y = anim_y }, -- Optional. This is how you can pass in the rubato tables for animations. If you don't want animations, you can ignore this option.
})
awesome.connect_signal("scratchpad::toggle", function()
term_scratch:toggle()
end)

View file

@ -10,7 +10,7 @@ local helpers = require ("helpers")
--- ~~~~~~~~~~
local icon = wibox.widget({
{
id = 'icon2',
id = "icon2",
image = beautiful.volume_on,
resize = true,
widget = wibox.widget.imagebox,
@ -121,7 +121,7 @@ local volume_osd_height = dpi(250)
local volume_osd_width = dpi(250)
screen.connect_signal("request::desktop_decoration", function(s)
local s = s or {}
s = s or {}
s.show_vol_osd = false
s.volume_osd_overlay = awful.popup({
@ -209,17 +209,27 @@ local placement_placer = function()
end
-- Get Vol
function get_vol()
script = 'pamixer --get-volume'
script2 = 'pamixer --get-mute'
awful.spawn.easy_async_with_shell(script, function(vol)
local function get_vol()
local script = "pamixer --get-volume"
local script2 = "pamixer --get-mute"
awful.spawn.easy_async_with_shell(script, function()
awful.spawn.easy_async_with_shell(script2, function(is_mute)
if is_mute:match("true") then muted = true else
local muted
if is_mute:match("true") then
muted = true
else
muted = false
end
if muted then vol_osd_slider.bar_active_color = beautiful.xcolor10 vol_osd_slider.handle_color = beautiful.xcolor10 icon3.image = beautiful.volume_off else
vol_osd_slider.bar_active_color = beautiful.xcolor2 vol_osd_slider.handle_color = beautiful.xcolor2 icon3.image = beautiful.volume_on
if muted then
vol_osd_slider.bar_active_color = beautiful.xcolor10
vol_osd_slider.handle_color = beautiful.xcolor10
icon3.image = beautiful.volume_off
else
vol_osd_slider.bar_active_color = beautiful.xcolor2
vol_osd_slider.handle_color = beautiful.xcolor2
icon3.image = beautiful.volume_on
end
end)
end)
@ -266,4 +276,3 @@ volume.mute = function()
end
return volume

View file

@ -1,7 +1,6 @@
local awful = require "awful"
local gears = require "gears"
local beautiful = require "beautiful"
local wibox = require "wibox"
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
--- Rounded Corners Client Side ---
-- Use Picom If you Can --
@ -15,32 +14,19 @@ local function shapemanager(c)
end
end
--- Places every Floating Client in Middle ---
-- if enabled lib.savefloats won't work --
--local function floatmanager(c)
-- if c.floating then
-- awful.placement.centered(c)
-- end
--end
client.connect_signal("property::fullscreen", function(c) shapemanager(c) end)
--client.connect_signal("property::floating", function(c) floatmanager(c) end)
--client.connect_signal("request::geometry", function(c) shapemanager(c) end)
--client.connect_signal("request::activate", function(c) shapemanager(c) end)
client.connect_signal("property::fullscreen", function(c)
shapemanager(c)
end)
-- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c)
-- buttons for the titlebar
local buttons = gears.table.join(
awful.button({}, 1, function()
c:activate {context = "titlebar", action = "mouse_move"}
-- c:emit_signal("request::activate", "titlebar", {raise = true})
-- awful.mouse.client.move(c)
c:activate({ context = "titlebar", action = "mouse_move" })
end),
awful.button({}, 3, function()
c:activate {context = "titlebar", action = "mouse_resize"}
-- c:emit_signal("request::activate", "titlebar", {raise = true})
--awful.mouse.client.resize(c)
c:activate({ context = "titlebar", action = "mouse_resize" })
end)
)
@ -50,33 +36,31 @@ client.connect_signal("request::titlebars", function(c)
})
local left = {
buttons = buttons,
--awful.titlebar.widget.ontopbutton(c),
layout = wibox.layout.fixed.horizontal()
layout = wibox.layout.fixed.horizontal(),
}
local middle = {
buttons = buttons,
layout = wibox.layout.fixed.horizontal()
layout = wibox.layout.fixed.horizontal(),
}
local right = {
awful.titlebar.widget.maximizedbutton(c),
awful.titlebar.widget.minimizebutton(c),
awful.titlebar.widget.closebutton(c),
spacing = 11.5,
layout = wibox.layout.fixed.horizontal()
layout = wibox.layout.fixed.horizontal(),
}
titlebar_top : setup {
titlebar_top:setup({
{
left,
middle,
right,
layout = wibox.layout.align.horizontal()
layout = wibox.layout.align.horizontal(),
},
left = 13.5,
right = 13.5,
top = 7.4,
bottom = 7.4,
-- layout = wibox.layout.align.horizontal
layout = wibox.container.margin
}
layout = wibox.container.margin,
})
end)

View file

@ -1,20 +1,11 @@
-- Standard awesome library --
local gears = require("gears")
local awful = require("awful")
local wibox = require("wibox")
local widgets = require("ui.top-panel.widgets")
local bling = require ("lib.bling")
local helpers = require "helpers"
local beautiful = require("beautiful")
local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup")
local dpi = beautiful.xresources.apply_dpi
local clock = widgets.clock
local date = widgets.date
local cpu = widgets.cpu
@ -23,60 +14,49 @@ local keyboard = widgets.keyboard
local mem = widgets.mem
local menu = widgets.menu
local systray = widgets.systray
local promptbox = widgets.promptbox
local audio = widgets.audio
local seperator = widgets.seperator
local taglist = widgets.taglist
local tasklist = widgets.tasklist
local layoutbox = widgets.layoutbox
local power = widgets.power
local function create_icon(i, c) --Icon Creation
local widget = {
{
font = beautiful.font_name .. "12.5",
text = ' ' .. i,
widget = wibox.widget.textbox
text = " " .. i,
widget = wibox.widget.textbox,
},
fg = c,
widget = wibox.container.background
widget = wibox.container.background,
}
return widget
end
-- Create Icons with Color --
local calendar_icon = create_icon('', beautiful.xcolor5)
local clock_icon = create_icon('', beautiful.xcolor12)
local keyboard_icon = create_icon('', beautiful.xcolor4)
local calendar_icon = create_icon("", beautiful.xcolor5)
local clock_icon = create_icon("", beautiful.xcolor12)
local keyboard_icon = create_icon("", beautiful.xcolor4)
screen.connect_signal("request::desktop_decoration", function(s)
-- Create Clock with Colerfull Widget --
local clockdate = wibox.widget {
local clockdate = wibox.widget({
layout = wibox.layout.fixed.horizontal,
calendar_icon,
date,
clock_icon,
clock, -- Middle widget
})
}
local tasklist = wibox.widget {
local tasklist = wibox.widget({
{
layout = wibox.layout.fixed.horizontal,
s.tasklist, -- needs to be here (under the screen.connect_signal) bc of the s
},
forced_width = 300,
layout = wibox.layout.fixed.horizontal,
}
})
-- Create the wibox
s.mywibox = awful.wibar {
s.mywibox = awful.wibar({
position = "top",
screen = s,
@ -87,11 +67,9 @@ screen.connect_signal("request::desktop_decoration", function(s)
{ -- Left widgets
layout = wibox.layout.fixed.horizontal,
menu,
--launcher,
seperator,
s.taglist,
seperator,
-- s.tasklist,
tasklist,
},
left = 5, --Padding
@ -114,7 +92,6 @@ screen.connect_signal("request::desktop_decoration", function(s)
{ -- Right widgets
{
layout = wibox.layout.fixed.horizontal,
--temp.text,
systray,
seperator,
audio,
@ -123,26 +100,21 @@ screen.connect_signal("request::desktop_decoration", function(s)
disk,
keyboard_icon,
keyboard,
--awful.widget.systray(),
--power,
layoutbox,
--pacing = 2,
},
left = 0,
right = 2,
top = 1,
bottom = 1,
layout = wibox.container.margin
layout = wibox.container.margin,
},
}
}
s.border2 = awful.wibar {
},
})
s.border2 = awful.wibar({
position = "top",
screen = s,
bg = "#313244",
bg = beautiful.xcolorS0,
height = dpi(2),
}
})
end)

View file

@ -1,31 +1,19 @@
local awful = require "awful"
local gears = require "gears"
local wibox = require "wibox"
local beautiful = require "beautiful"
local naughty = require "naughty"
local menubar = require "menubar"
local hotkeys_popup = require "awful.hotkeys_popup"
require "awful.hotkeys_popup.keys"
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
require("awful.hotkeys_popup.keys")
-- Clock
local clock = wibox.widget.textbox()
clock.font = beautiful.font_name .. "11"
gears.timer {
gears.timer({
timeout = 60,
autostart = true,
call_now = true,
callback = function()
clock.markup = os.date(" %H:%M")
end
}
--local month_calendar = awful.widget.calendar_popup.month()
--month_calendar.position =
--month_calendar:attach( clock, "tm" )
--clock:connect_signal("button::release",
--function()
-- month_calendar.position = 'tm',
-- month_calendar:toggle()
--end)
clock.markup = os.date(" %I:%M %p")
end,
})
return clock

View file

@ -1,20 +1,17 @@
local awful = require "awful"
local wibox = require "wibox"
local gears = require "gears"
local beautiful = require "beautiful"
local wibox = require("wibox")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local helpers = require "helpers"
-- Icon
local icon = wibox.widget.textbox()
icon.font = beautiful.font_name .. "12.5"
icon.align = 'center'
icon.align = "center"
icon.markup = "<span foreground='" .. beautiful.xcolor9 .. "'></span>"
-- Uptime
local cpu = wibox.widget.textbox()
cpu.font = beautiful.font_name .. "10"
cpu.align = 'center'
cpu.align = "center"
local function get_val()
awesome.connect_signal("signal::cpu", function(cpu_perc)
@ -24,8 +21,7 @@ local function get_val()
get_val()
local full = wibox.widget {
local full = wibox.widget({
{
{
icon,
@ -39,8 +35,6 @@ local full = wibox.widget {
},
forced_width = 73, -- Makes it fixed and not Moves Whole Bar
layout = wibox.layout.fixed.horizontal,
}
})
return full

View file

@ -1,23 +1,19 @@
local awful = require "awful"
local gears = require "gears"
local wibox = require "wibox"
local beautiful = require "beautiful"
local naughty = require "naughty"
local menubar = require "menubar"
local hotkeys_popup = require "awful.hotkeys_popup"
require "awful.hotkeys_popup.keys"
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
require("awful.hotkeys_popup.keys")
-- Clock
local date = wibox.widget.textbox()
date.font = beautiful.font_name .. "11"
gears.timer {
gears.timer({
timeout = 60,
autostart = true,
call_now = true,
callback = function()
date.markup = os.date(" %a %b %d")
end
}
end,
})
return date

View file

@ -1,20 +1,17 @@
local awful = require "awful"
local wibox = require "wibox"
local gears = require "gears"
local beautiful = require "beautiful"
local wibox = require("wibox")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local helpers = require "helpers"
-- Icon
local icon = wibox.widget.textbox()
icon.font = beautiful.font_name .. "12.5"
icon.align = 'center'
icon.align = "center"
icon.markup = "<span foreground='" .. beautiful.xcolor7 .. "'></span>"
-- Uptime
local disk = wibox.widget.textbox()
disk.font = beautiful.font_name .. "10"
disk.align = 'center'
disk.align = "center"
local function get_val()
awesome.connect_signal("signal::disk", function(disk_perc)
@ -22,11 +19,9 @@ local function get_val()
end)
end
get_val()
local full = wibox.widget {
local full = wibox.widget({
{
icon,
disk,
@ -35,9 +30,7 @@ local full = wibox.widget {
},
left = 1,
right = 8,
layout = wibox.container.margin
}
layout = wibox.container.margin,
})
return full

View file

@ -1,9 +1,7 @@
local awful = require "awful"
local gears = require "gears"
local wibox = require "wibox"
local beautiful = require "beautiful"
local awful = require("awful")
-- Keyboard map indicator and switcher
local keyboardlayout = awful.widget.keyboardlayout()
return keyboardlayout

View file

@ -1,7 +1,8 @@
local awful = require "awful"
local beautiful = require "beautiful"
local awful = require("awful")
local beautiful = require("beautiful")
local menu = require("main.menu")
local launcher = awful.widget.launcher({ image = beautiful.awesome_icon,
menu = mymainmenu })
local launcher = awful.widget.launcher({ image = beautiful.awesome_icon, menu = menu })
return launcher

View file

@ -1,13 +1,20 @@
local awful = require "awful"
local gears = require "gears"
local beautiful = require "beautiful"
local awful = require("awful")
local layoutbox = awful.widget.layoutbox({
buttons = {
awful.button({ }, 1, function () awful.layout.inc( 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),
}
awful.button({}, 1, function()
awful.layout.inc(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),
},
})
return layoutbox

View file

@ -1,20 +1,17 @@
local awful = require "awful"
local wibox = require "wibox"
local gears = require "gears"
local beautiful = require "beautiful"
local wibox = require("wibox")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local helpers = require "helpers"
-- Icon
local icon = wibox.widget.textbox()
icon.font = beautiful.font_name .. "12.5"
icon.align = 'center'
icon.markup = "<span foreground='"..beautiful.xcolor6.."'></span>"
icon.align = "center"
icon.markup = "<span foreground='" .. beautiful.xcolor6 .. "'>󰍛</span>"
-- Uptime
local mem = wibox.widget.textbox()
mem.font = beautiful.font_name .. "10"
mem.align = 'center'
mem.align = "center"
local function get_val()
awesome.connect_signal("signal::mem", function(mem_perc)
@ -23,16 +20,8 @@ local function get_val()
end
get_val()
--gears.timer {
-- timeout = 2,
-- autostart = true,
-- call_now = true,
-- callback = function()
-- get_val()
-- end
--}
local full = wibox.widget {
local full = wibox.widget({
{
{
icon,
@ -46,8 +35,6 @@ local full = wibox.widget {
},
forced_width = 73,
layout = wibox.layout.fixed.horizontal,
}
})
return full

View file

@ -1,31 +1,24 @@
local awful = require "awful"
local wibox = require "wibox"
local gears = require "gears"
local beautiful = require "beautiful"
local helpers = require "helpers"
local dpi = beautiful.xresources.apply_dpi
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local beautiful = require("beautiful")
local helpers = require("helpers")
-- Menu
--local menu = wibox.widget.textbox()
--menu.font = "FiraCode Nerd Font 16"
--menu.markup = "ﰪ"
local menu = wibox.widget {
local menu = wibox.widget({
{
font = beautiful.font_name .. "16",
markup = "",
markup = "󰜬",
widget = wibox.widget.textbox(),
},
bottom = 2,
widget = wibox.container.margin,
}
})
helpers.ui.add_hover_cursor(menu, "hand2")
menu:buttons(gears.table.join(
awful.button({ }, 1, function()
menu:buttons(gears.table.join(awful.button({}, 1, function()
awesome.emit_signal("sidebar::toggle")
end)
))
end)))
return menu

View file

@ -1,20 +1,15 @@
local awful = require "awful"
local wibox = require "wibox"
local gears = require "gears"
local beautiful = require "beautiful"
local helpers = require "helpers"
local dpi = beautiful.xresources.apply_dpi
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local beautiful = require("beautiful")
-- Menu
local menu = wibox.widget.textbox()
menu.font = beautiful.font_name .. "16"
menu.markup = "<span foreground='" .. beautiful.xcolor10 .. "'></span>"
menu:buttons(gears.table.join(
awful.button({ }, 1, function()
menu:buttons(gears.table.join(awful.button({}, 1, function()
awesome.emit_signal("module::exit_screen:show")
end)
))
end)))
return menu

View file

@ -1,4 +1,5 @@
local awful = require "awful"
local awful = require("awful")
local promptbox = awful.widget.prompt()
return promptbox

View file

@ -1,34 +1,36 @@
local awful = require "awful"
local wibox = require "wibox"
local gears = require "gears"
local beautiful = require "beautiful"
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local beautiful = require("beautiful")
local dpi = beautiful.xresources.apply_dpi
local helpers = require "helpers"
local helpers = require("helpers")
-- Icon
local icon = wibox.widget.textbox()
icon.font = beautiful.font_name .. "12.5"
icon.align = 'center'
icon.markup = "<span foreground='"..beautiful.xcolor2.."'>墳</span>"
icon.align = "center"
icon.markup = "<span foreground='" .. beautiful.xcolor2 .. "'>󰕾</span>"
-- Uptime
local pulseaudio = wibox.widget.textbox()
pulseaudio.font = beautiful.font_name .. "10"
pulseaudio.align = 'center'
pulseaudio.align = "center"
local function get_val()
awesome.connect_signal("signal::volume", function(vol, muted)
if muted then pulseaudio.markup = "muted" icon.markup = "<span foreground='"..beautiful.xcolor2.."'>婢</span>" else
if muted then
pulseaudio.markup = "muted"
icon.markup = "<span foreground='" .. beautiful.xcolor2 .. "'>󰖁</span>"
else
pulseaudio.markup = tonumber(vol) .. "%"
icon.markup = "<span foreground='"..beautiful.xcolor2.."'>墳</span>"
icon.markup = "<span foreground='" .. beautiful.xcolor2 .. "'>󰕾</span>"
end
end)
end
get_val()
local full = wibox.widget {
local full = wibox.widget({
{
{
icon,
@ -40,31 +42,26 @@ local full = wibox.widget {
right = 8,
layout = wibox.container.margin,
},
forced_width = 73, --66,
forced_width = 73,
layout = wibox.layout.fixed.horizontal,
}
})
full:buttons(gears.table.join(
awful.button({ }, 1, function()
full:buttons(gears.table.join(awful.button({}, 1, function()
awesome.emit_signal("action::toggle")
end)
))
end)))
-- Update Function
local update_volume = function() -- Sets the Volume Correct
awful.spawn.easy_async_with_shell("pamixer --get-volume", function(stdout)
pulseaudio.markup = tonumber(stdout:match("%d+")) .. "%"
-- Uncomment this if you wan't dynamic Icons --
-- if tonumber(stdout:match("%d+")) < 10 then
-- icon.markup = "<span foreground='"..beautiful.xcolor2.."'>奄</span>"
-- elseif tonumber(stdout:match("%d+")) < 50 then
-- icon.markup = "<span foreground='"..beautiful.xcolor2.."'>奔</span>"
-- elseif tonumber(stdout:match("%d+")) < 100 then
-- icon.markup = "<span foreground='"..beautiful.xcolor2.."'>墳</span>"
-- else
-- end
if tonumber(stdout:match("%d+")) < 10 then
icon.markup = "<span foreground='" .. beautiful.xcolor2 .. "'>󰕿</span>"
elseif tonumber(stdout:match("%d+")) < 50 then
icon.markup = "<span foreground='" .. beautiful.xcolor2 .. "'>󰖀</span>"
elseif tonumber(stdout:match("%d+")) < 100 then
icon.markup = "<span foreground='" .. beautiful.xcolor2 .. "'>󰕾</span>"
else
end
end)
end
@ -78,4 +75,3 @@ end)
helpers.ui.add_hover_cursor(full, "hand2")
return full

View file

@ -1,11 +1,9 @@
local gears = require "gears"
local awful = require "awful"
local beautiful = require "beautiful"
local wibox = require "wibox"
local beautiful = require("beautiful")
local wibox = require("wibox")
local seperator = wibox.widget.textbox()
seperator.font = beautiful.font_name .. "14"
--seperator.text = "|"
seperator.markup = "<span foreground='" .. beautiful.xcolorT2 .. "'>|</span>"
return seperator

View file

@ -1,11 +1,10 @@
local awful = require "awful"
local wibox = require "wibox"
local gears = require "gears"
local beautiful = require "beautiful"
local rubato = require "lib.rubato"
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local beautiful = require("beautiful")
local rubato = require("lib.rubato")
local dpi = beautiful.xresources.apply_dpi
local arrow = wibox.widget.textbox()
arrow.font = beautiful.font_name .. "13"
arrow.markup = "»"
@ -13,8 +12,6 @@ local dpi = beautiful.xresources.apply_dpi
local mysystray = wibox.widget.systray()
mysystray.visible = true
beautiful.systray_icon_spacing = dpi(4)
--mysystray.base_size = beautiful.systray_icon_size
local widget = wibox.widget({
widget = wibox.container.constraint,
@ -28,25 +25,16 @@ local dpi = beautiful.xresources.apply_dpi
})
widget.visible = true
local slide = rubato.timed {
-- rate = 60,
local slide = rubato.timed({
duration = 0.9,
--easing = rubato.easing.linear,
awestore_compat = true,
subscribed = function(pos)
widget.width = pos
end,
}
})
local value = true
--slide.ended:subscribe(function()
-- if value then
-- -- widget.visible = false
-- end
-- end)
arrow.toggle = function()
if value == false then
arrow.markup = "»"
@ -55,29 +43,23 @@ local value = true
else
arrow.markup = "«"
slide:set(500)
--widget.visible = true
value = false
end
end
--end)
awesome.connect_signal("arrow::toggle", function()
arrow.toggle()
end)
arrow:buttons(gears.table.join(
awful.button({ }, 1, function()
arrow:buttons(gears.table.join(awful.button({}, 1, function()
awesome.emit_signal("arrow::toggle")
end)
))
end)))
local sys = wibox.widget({
layout = wibox.layout.fixed.horizontal,
arrow,
widget,
spacing = dpi(2)
spacing = dpi(2),
})
return sys

View file

@ -1,37 +1,35 @@
local awful = require "awful"
local gears = require "gears"
local wibox = require "wibox"
local beautiful = require "beautiful"
local awful = require("awful")
local gears = require("gears")
local wibox = require("wibox")
local beautiful = require("beautiful")
beautiful.init(gears.filesystem.get_configuration_dir() .. "themes/catppuccin/theme.lua")
local bling = require "lib.bling"
local dpi = beautiful.xresources.apply_dpi
local bling = require("lib.bling")
local keys = require("config").keys
awful.screen.connect_for_each_screen(function(s)
s.taglist = awful.widget.taglist {
s.taglist = awful.widget.taglist({
screen = s,
filter = awful.widget.taglist.filter.all,
widget_template = {
{
{
{
id = 'text_role',
id = "text_role",
widget = wibox.widget.textbox,
},
layout = wibox.layout.fixed.horizontal,
},
left = 4,
right = 4,
widget = wibox.container.margin
widget = wibox.container.margin,
},
id = 'background_role',
id = "background_role",
widget = wibox.container.background,
-- Add support for hover colors and an index label
create_callback = function(self, c3, index, objects) --luacheck: no unused args
self:get_children_by_id('text_role')[1].markup = '<b> '..index..' </b>'
self:connect_signal('mouse::enter', function()
create_callback = function(self, c3, index, _) --luacheck: no unused args
self:get_children_by_id("text_role")[1].markup = "<b> " .. index .. " </b>"
self:connect_signal("mouse::enter", function()
-- BLING: Only show widget when there are clients in the tag
if #c3:clients() > 0 then
-- BLING: Update the widget with the new tag
@ -40,39 +38,44 @@ awful.screen.connect_for_each_screen(function(s)
awesome.emit_signal("bling::tag_preview::visibility", s, true)
end
end)
self:connect_signal('mouse::leave', function()
self:connect_signal("mouse::leave", function()
-- BLING: Turn the widget off
awesome.emit_signal("bling::tag_preview::visibility", s, false)
if self.has_backup then self.bg = self.backup end
if self.has_backup then
self.bg = self.backup
end
end)
end,
update_callback = function(self, c3, index, objects) --luacheck: no unused args
self:get_children_by_id('text_role')[1].markup = '<b> '..index..' </b>'
update_callback = function(self, _, index, _)
self:get_children_by_id("text_role")[1].markup = "<b> " .. index .. " </b>"
end,
},
buttons = {
awful.button({ }, 1, function(t) t:view_only() end),
awful.button({ modkey }, 1, function(t)
awful.button({}, 1, function(t)
t:view_only()
end),
awful.button({ keys.mod }, 1, function(t)
if client.focus then
client.focus:move_to_tag(t)
end
end),
awful.button({}, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, function(t)
awful.button({ keys.mod }, 3, function(t)
if client.focus then
client.focus:toggle_tag(t)
end
end),
awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end),
awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end),
awful.button({}, 4, function(t)
awful.tag.viewprev(t.screen)
end),
awful.button({}, 5, function(t)
awful.tag.viewnext(t.screen)
end),
},
})
}
bling.widget.tag_preview.enable {
bling.widget.tag_preview.enable({
show_client_content = true, -- Whether or not to show the client content
x = 0, -- The x-coord of the popup
y = 0, -- The y-coord of the popup
@ -84,19 +87,14 @@ awful.screen.connect_for_each_screen(function(s)
margins = {
top = 31,
left = 0,
}
},
})
end,
background_widget = wibox.widget { -- Set a background image (like a wallpaper) for the widget
background_widget = wibox.widget({ -- Set a background image (like a wallpaper) for the widget
image = beautiful.wallpaper,
horizontal_fit_policy = "fit",
vertical_fit_policy = "fit",
widget = wibox.widget.imagebox
}
}
widget = wibox.widget.imagebox,
}),
})
end)

View file

@ -1,18 +1,8 @@
local awful = require "awful"
local beautiful = require "beautiful"
local gears = require "gears"
local awful = require("awful")
awful.screen.connect_for_each_screen(function(s)
s.tasklist = awful.widget.tasklist {
s.tasklist = awful.widget.tasklist({
screen = s,
filter = awful.widget.tasklist.filter.focused,
-- buttons = {
-- awful.button({ }, 1, function (c)
-- c:activate { context = "tasklist", action = "toggle_minimization" }
-- 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),
}
})
end)

View file

@ -26,9 +26,11 @@
order: 0;
width: calc(100% - 146px);
}
#PersonalToolbar {
order: 2;
}
/* Shove bookmarks bar over for macOS titlebar buttons */
/* #PersonalToolbar { */
/* order: 2; */
/* } */
/* Update - Hides the new Firefox home + tab dropdown. If you want to
* keep/customize those buttons. remove the CSS below and adjust the widths above