@@ -44,7 +44,7 @@ return function(screen, programs)
|
|||||||
widget = wibox.container.margin
|
widget = wibox.container.margin
|
||||||
}
|
}
|
||||||
|
|
||||||
for k, c in ipairs(client.get()) do
|
for _, c in ipairs(client.get()) do
|
||||||
if string.lower(c.class):match(program) and c == client.focus then
|
if string.lower(c.class):match(program) and c == client.focus then
|
||||||
dock_element.background.bg = color["Grey800"]
|
dock_element.background.bg = color["Grey800"]
|
||||||
end
|
end
|
||||||
@@ -181,13 +181,20 @@ return function(screen, programs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function check_for_dock_hide(s)
|
local function check_for_dock_hide(s)
|
||||||
|
for _, client in ipairs(s.selected_tag:clients()) do
|
||||||
|
if client.fullscreen then
|
||||||
|
dock.visible = false
|
||||||
|
fakedock.visible = false
|
||||||
|
else
|
||||||
|
fakedock.visible = true
|
||||||
|
end
|
||||||
|
end
|
||||||
if #s.selected_tag:clients() < 1 then
|
if #s.selected_tag:clients() < 1 then
|
||||||
dock.visible = true
|
dock.visible = true
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if s == mouse.screen then
|
if s == mouse.screen then
|
||||||
local visible = false
|
for _, c in ipairs(s.selected_tag:clients()) do
|
||||||
for j, c in ipairs(s.selected_tag:clients()) do
|
|
||||||
|
|
||||||
if c.maximized or c.fullscreen then
|
if c.maximized or c.fullscreen then
|
||||||
dock.visible = false
|
dock.visible = false
|
||||||
@@ -219,7 +226,7 @@ return function(screen, programs)
|
|||||||
fakedock:connect_signal(
|
fakedock:connect_signal(
|
||||||
"mouse::enter",
|
"mouse::enter",
|
||||||
function()
|
function()
|
||||||
for index, c in ipairs(screen.clients) do
|
for _, c in ipairs(screen.clients) do
|
||||||
if not c.fullscreen then
|
if not c.fullscreen then
|
||||||
dock_intelligent_hide:stop()
|
dock_intelligent_hide:stop()
|
||||||
dock.visible = true
|
dock.visible = true
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M20 2H4C2.9 2 2 2.9 2 4V22L6 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2M20 16H5.2L4 17.2V4H20V16Z" /></svg>
|
||||||
|
After Width: | Height: | Size: 398 B |
1
awesome/src/assets/icons/notifications/notification.svg
Normal file
1
awesome/src/assets/icons/notifications/notification.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M20,2H4A2,2 0 0,0 2,4V22L6,18H20A2,2 0 0,0 22,16V4C22,2.89 21.1,2 20,2Z" /></svg>
|
||||||
|
After Width: | Height: | Size: 366 B |
@@ -1 +1 @@
|
|||||||
Lutris;Steam;Io.elementary.appcenter;Repoman;Com.github.donadigo.eddy;Sysmontask;join?action=join&confno=9992624875&confid=dXRpZD1VVElEXzM0ODYxOTgyYzg0YzQ1Y2NiYmM0YWNiMzczODNiYjgxJnVzcz1TaU1YUnNEWG5BQWNBYnRpYklBNWE0MjRDNkpBMzMyVXRUc2pCX1YxVm5JY0hWeVRybGN5WjZZS2VBa1pvNkszOXdNWEVkVE9hTU54Z3BROFZFckhPR3Y4eGo0MlB0emNCZjNRLnNlM28yNy13YWpGYy1ReXEmdGlkPTcyNjEzNGRjYWJkZTQyYTNhNzJmZjVjYjVkNTU2YTYw&browser=join?action=join&confno=9992624875&confid=dXRpZD1VVElEXzM0ODYxOTgyYzg0YzQ1Y2NiYmM0YWNiMzczODNiYjgxJnVzcz1TaU1YUnNEWG5BQWNBYnRpYklBNWE0MjRDNkpBMzMyVXRUc2pCX1YxVm5JY0hWeVRybGN5WjZZS2VBa1pvNkszOXdNWEVkVE9hTU54Z3BROFZFckhPR3Y4eGo0MlB0emNCZjNRLnNlM28yNy13YWpGYy1ReXEmdGlkPTcyNjEzNGRjYWJkZTQyYTNhNzJmZjVjYjVkNTU2YTYw&browser=Gnome-calculator;Virt-manager;Gwe;whatsdesk;Totem;
|
Lutris;Steam;Io.elementary.appcenter;Repoman;Com.github.donadigo.eddy;Sysmontask;join?action=join&confno=9992624875&confid=dXRpZD1VVElEXzM0ODYxOTgyYzg0YzQ1Y2NiYmM0YWNiMzczODNiYjgxJnVzcz1TaU1YUnNEWG5BQWNBYnRpYklBNWE0MjRDNkpBMzMyVXRUc2pCX1YxVm5JY0hWeVRybGN5WjZZS2VBa1pvNkszOXdNWEVkVE9hTU54Z3BROFZFckhPR3Y4eGo0MlB0emNCZjNRLnNlM28yNy13YWpGYy1ReXEmdGlkPTcyNjEzNGRjYWJkZTQyYTNhNzJmZjVjYjVkNTU2YTYw&browser=join?action=join&confno=9992624875&confid=dXRpZD1VVElEXzM0ODYxOTgyYzg0YzQ1Y2NiYmM0YWNiMzczODNiYjgxJnVzcz1TaU1YUnNEWG5BQWNBYnRpYklBNWE0MjRDNkpBMzMyVXRUc2pCX1YxVm5JY0hWeVRybGN5WjZZS2VBa1pvNkszOXdNWEVkVE9hTU54Z3BROFZFckhPR3Y4eGo0MlB0emNCZjNRLnNlM28yNy13YWpGYy1ReXEmdGlkPTcyNjEzNGRjYWJkZTQyYTNhNzJmZjVjYjVkNTU2YTYw&browser=Gnome-calculator;Virt-manager;Gwe;whatsdesk;Totem;steam_app_431960;
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
-------------------------------
|
-------------------------------
|
||||||
-- The Notification defaults --
|
-- The Notification defaults --
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
-- Awesome Libs
|
-- Awesome Libs
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
local color = require("src.theme.colors")
|
local color = require("src.theme.colors")
|
||||||
@@ -14,7 +13,6 @@ local wibox = require("wibox")
|
|||||||
local icondir = awful.util.getdir("config") .. "src/assets/icons/notifications/"
|
local icondir = awful.util.getdir("config") .. "src/assets/icons/notifications/"
|
||||||
|
|
||||||
-- TODO: Figure out how to use hover effects without messing up the actions
|
-- TODO: Figure out how to use hover effects without messing up the actions
|
||||||
|
|
||||||
naughty.config.defaults.ontop = true
|
naughty.config.defaults.ontop = true
|
||||||
naughty.config.defaults.icon_size = dpi(80)
|
naughty.config.defaults.icon_size = dpi(80)
|
||||||
naughty.config.defaults.timeout = 3
|
naughty.config.defaults.timeout = 3
|
||||||
@@ -31,26 +29,28 @@ naughty.config.defaults.spacing = dpi(10)
|
|||||||
naughty.connect_signal(
|
naughty.connect_signal(
|
||||||
'request::icon',
|
'request::icon',
|
||||||
function(n, context, hints)
|
function(n, context, hints)
|
||||||
if context ~= 'app_icon' then return end
|
if context ~= 'app_icon' then
|
||||||
local path = menubar.utils.lookup_icon(hints.app_icon) or
|
return
|
||||||
menubar.utils.lookup_icon(hints.app_icon:lower())
|
end
|
||||||
|
local path = menubar.utils.lookup_icon(hints.app_icon) or menubar.utils.lookup_icon(hints.app_icon:lower())
|
||||||
if path then
|
if path then
|
||||||
n.icon = path
|
n.icon = path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
naughty.connect_signal(
|
naughty.connect_signal(
|
||||||
"request::display",
|
"request::display",
|
||||||
function(n)
|
function(n)
|
||||||
|
|
||||||
if n.urgency == "critical" then
|
if n.urgency == "critical" then
|
||||||
n.title = string.format("<span foreground='%s' font='JetBrainsMono Nerd Font, ExtraBold 16'>%s</span>", color["RedA200"], n.title) or ""
|
n.title = string.format("<span foreground='%s' font='JetBrainsMono Nerd Font, ExtraBold 16'>%s</span>",
|
||||||
|
color["RedA200"], n.title) or ""
|
||||||
n.message = string.format("<span foreground='%s'>%s</span>", color["Red200"], n.message) or ""
|
n.message = string.format("<span foreground='%s'>%s</span>", color["Red200"], n.message) or ""
|
||||||
n.app_name = string.format("<span foreground='%s'>%s</span>", color["RedA400"], n.app_name) or ""
|
n.app_name = string.format("<span foreground='%s'>%s</span>", color["RedA400"], n.app_name) or ""
|
||||||
n.bg = color["Grey900"]
|
n.bg = color["Grey900"]
|
||||||
else
|
else
|
||||||
n.title = string.format("<span foreground='%s' font='JetBrainsMono Nerd Font, ExtraBold 16'>%s</span>", color["Pink200"], n.title) or ""
|
n.title = string.format("<span foreground='%s' font='JetBrainsMono Nerd Font, ExtraBold 16'>%s</span>",
|
||||||
|
color["Pink200"], n.title) or ""
|
||||||
n.message = string.format("<span foreground='%s'>%s</span>", "#ffffffaa", n.message) or ""
|
n.message = string.format("<span foreground='%s'>%s</span>", "#ffffffaa", n.message) or ""
|
||||||
n.bg = color["Grey900"]
|
n.bg = color["Grey900"]
|
||||||
n.timeout = n.timeout or 3
|
n.timeout = n.timeout or 3
|
||||||
@@ -59,23 +59,19 @@ naughty.connect_signal(
|
|||||||
local use_image = false
|
local use_image = false
|
||||||
|
|
||||||
if n.app_name == "Spotify" then
|
if n.app_name == "Spotify" then
|
||||||
n.actions = {
|
n.actions = { naughty.action {
|
||||||
naughty.action {
|
|
||||||
program = "Spotify",
|
program = "Spotify",
|
||||||
id = "skip-prev",
|
id = "skip-prev",
|
||||||
icon = gears.color.recolor_image(icondir .. "skip-prev.svg", color["Cyan200"]),
|
icon = gears.color.recolor_image(icondir .. "skip-prev.svg", color["Cyan200"])
|
||||||
},
|
}, naughty.action {
|
||||||
naughty.action {
|
|
||||||
program = "Spotify",
|
program = "Spotify",
|
||||||
id = "play-pause",
|
id = "play-pause",
|
||||||
icon = gears.color.recolor_image(icondir .. "play-pause.svg", color["Cyan200"]),
|
icon = gears.color.recolor_image(icondir .. "play-pause.svg", color["Cyan200"])
|
||||||
},
|
}, naughty.action {
|
||||||
naughty.action {
|
|
||||||
program = "Spotify",
|
program = "Spotify",
|
||||||
id = "skip-next",
|
id = "skip-next",
|
||||||
icon = gears.color.recolor_image(icondir .. "skip-next.svg", color["Cyan200"]),
|
icon = gears.color.recolor_image(icondir .. "skip-next.svg", color["Cyan200"])
|
||||||
},
|
} }
|
||||||
}
|
|
||||||
use_image = true
|
use_image = true
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -111,7 +107,7 @@ naughty.connect_signal(
|
|||||||
id = "mrgn",
|
id = "mrgn",
|
||||||
top = dpi(10),
|
top = dpi(10),
|
||||||
bottom = dpi(10),
|
bottom = dpi(10),
|
||||||
widget = wibox.container.margin,
|
widget = wibox.container.margin
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
action_template_widget = {
|
action_template_widget = {
|
||||||
@@ -140,7 +136,7 @@ naughty.connect_signal(
|
|||||||
id = "mrgn",
|
id = "mrgn",
|
||||||
top = dpi(10),
|
top = dpi(10),
|
||||||
bottom = dpi(10),
|
bottom = dpi(10),
|
||||||
widget = wibox.container.margin,
|
widget = wibox.container.margin
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -168,12 +164,24 @@ naughty.connect_signal(
|
|||||||
{
|
{
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{
|
||||||
|
image = gears.color.recolor_image(icondir .. "notification-outline.svg", color["Teal200"]),
|
||||||
|
resize = false,
|
||||||
|
widget = wibox.widget.imagebox
|
||||||
|
},
|
||||||
|
right = dpi(5),
|
||||||
|
widget = wibox.container.margin
|
||||||
|
},
|
||||||
{
|
{
|
||||||
markup = n.app_name or 'System Notification',
|
markup = n.app_name or 'System Notification',
|
||||||
align = "center",
|
align = "center",
|
||||||
valign = "center",
|
valign = "center",
|
||||||
widget = wibox.widget.textbox
|
widget = wibox.widget.textbox
|
||||||
},
|
},
|
||||||
|
layout = wibox.layout.fixed.horizontal
|
||||||
|
},
|
||||||
fg = color["Teal200"],
|
fg = color["Teal200"],
|
||||||
widget = wibox.container.background
|
widget = wibox.container.background
|
||||||
},
|
},
|
||||||
@@ -181,6 +189,16 @@ naughty.connect_signal(
|
|||||||
widget = wibox.container.margin
|
widget = wibox.container.margin
|
||||||
},
|
},
|
||||||
nil,
|
nil,
|
||||||
|
{
|
||||||
|
{
|
||||||
|
{
|
||||||
|
text = os.date("%H:%M"),
|
||||||
|
widget = wibox.widget.textbox
|
||||||
|
},
|
||||||
|
id = "background",
|
||||||
|
fg = color["Teal200"],
|
||||||
|
widget = wibox.container.background
|
||||||
|
},
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -215,6 +233,9 @@ naughty.connect_signal(
|
|||||||
widget = wibox.container.margin,
|
widget = wibox.container.margin,
|
||||||
id = "arc_margin"
|
id = "arc_margin"
|
||||||
},
|
},
|
||||||
|
layout = wibox.layout.fixed.horizontal,
|
||||||
|
id = "arc_app_layout_2"
|
||||||
|
},
|
||||||
id = "arc_app_layout",
|
id = "arc_app_layout",
|
||||||
layout = wibox.layout.align.horizontal
|
layout = wibox.layout.align.horizontal
|
||||||
},
|
},
|
||||||
@@ -233,7 +254,7 @@ naughty.connect_signal(
|
|||||||
widget = wibox.widget.imagebox,
|
widget = wibox.widget.imagebox,
|
||||||
clip_shape = function(cr, width, height)
|
clip_shape = function(cr, width, height)
|
||||||
gears.shape.rounded_rect(cr, width, height, 10)
|
gears.shape.rounded_rect(cr, width, height, 10)
|
||||||
end,
|
end
|
||||||
},
|
},
|
||||||
width = naughty.config.defaults.icon_size,
|
width = naughty.config.defaults.icon_size,
|
||||||
height = naughty.config.defaults.icon_size,
|
height = naughty.config.defaults.icon_size,
|
||||||
@@ -242,7 +263,7 @@ naughty.connect_signal(
|
|||||||
},
|
},
|
||||||
halign = "center",
|
halign = "center",
|
||||||
valign = "top",
|
valign = "top",
|
||||||
widget = wibox.container.place,
|
widget = wibox.container.place
|
||||||
},
|
},
|
||||||
left = dpi(20),
|
left = dpi(20),
|
||||||
bottom = dpi(15),
|
bottom = dpi(15),
|
||||||
@@ -285,7 +306,7 @@ naughty.connect_signal(
|
|||||||
id = "max_size",
|
id = "max_size",
|
||||||
strategy = "max",
|
strategy = "max",
|
||||||
width = Theme.notification_max_width or dpi(500),
|
width = Theme.notification_max_width or dpi(500),
|
||||||
widget = wibox.container.constraint,
|
widget = wibox.container.constraint
|
||||||
},
|
},
|
||||||
id = "background",
|
id = "background",
|
||||||
bg = color["Grey900"],
|
bg = color["Grey900"],
|
||||||
@@ -297,7 +318,7 @@ naughty.connect_signal(
|
|||||||
widget = wibox.container.background
|
widget = wibox.container.background
|
||||||
}
|
}
|
||||||
|
|
||||||
local close = w_template.max_size.min_size.widget_layout.arc_app_bg.arc_app_layout.arc_margin.const.background
|
local close = w_template.max_size.min_size.widget_layout.arc_app_bg.arc_app_layout.arc_app_layout_2.arc_margin.const.background
|
||||||
local arc = close.arc_chart
|
local arc = close.arc_chart
|
||||||
|
|
||||||
local timeout = n.timeout
|
local timeout = n.timeout
|
||||||
@@ -305,7 +326,7 @@ naughty.connect_signal(
|
|||||||
|
|
||||||
if timeout ~= 0 then
|
if timeout ~= 0 then
|
||||||
arc.value = 360
|
arc.value = 360
|
||||||
gears.timer {
|
local arc_timer = gears.timer {
|
||||||
timeout = 0.1,
|
timeout = 0.1,
|
||||||
call_now = true,
|
call_now = true,
|
||||||
autostart = true,
|
autostart = true,
|
||||||
@@ -314,6 +335,23 @@ naughty.connect_signal(
|
|||||||
remove_time = remove_time - 0.1
|
remove_time = remove_time - 0.1
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
w_template:connect_signal(
|
||||||
|
"mouse::enter",
|
||||||
|
function()
|
||||||
|
-- Setting to 0 doesn't work
|
||||||
|
arc_timer:stop()
|
||||||
|
n.timeout = 99999
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
w_template:connect_signal(
|
||||||
|
"mouse::leave",
|
||||||
|
function()
|
||||||
|
arc_timer:start()
|
||||||
|
n.timeout = remove_time
|
||||||
|
end
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
Hover_signal(close, color["Grey900"], color["Teal200"])
|
Hover_signal(close, color["Grey900"], color["Teal200"])
|
||||||
@@ -331,6 +369,15 @@ naughty.connect_signal(
|
|||||||
if key == 3 then
|
if key == 3 then
|
||||||
n:destroy()
|
n:destroy()
|
||||||
end
|
end
|
||||||
|
-- TODO: Find out how to get the associated client
|
||||||
|
--[[ if key == 1 then
|
||||||
|
if n.clients then
|
||||||
|
n.clients[1]:activate {
|
||||||
|
switch_to_tag = true,
|
||||||
|
raise = true
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end ]]
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -347,18 +394,18 @@ naughty.connect_signal(
|
|||||||
|
|
||||||
box.buttons = {}
|
box.buttons = {}
|
||||||
n.buttons = {}
|
n.buttons = {}
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
naughty.connect_signal(
|
naughty.connect_signal(
|
||||||
"destroyed",
|
"destroyed",
|
||||||
function()
|
function()
|
||||||
|
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
-- Test notification
|
-- Test notification
|
||||||
--[[ naughty.notification {
|
naughty.notification {
|
||||||
app_name = "System Notification",
|
app_name = "System Notification",
|
||||||
title = "A notification 2",
|
title = "A notification 2",
|
||||||
message = "This is very informative and overflowing",
|
message = "This is very informative and overflowing",
|
||||||
@@ -376,7 +423,7 @@ end
|
|||||||
name = "Ignore",
|
name = "Ignore",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
} ]]
|
}
|
||||||
|
|
||||||
naughty.connect_signal(
|
naughty.connect_signal(
|
||||||
"invoked",
|
"invoked",
|
||||||
@@ -392,5 +439,5 @@ naughty.connect_signal(
|
|||||||
awful.spawn("playerctl next")
|
awful.spawn("playerctl next")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,20 +1,22 @@
|
|||||||
|
---@diagnostic disable: undefined-field
|
||||||
-- Awesome Libs
|
-- Awesome Libs
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
local beautiful = require("beautiful")
|
local beautiful = require("beautiful")
|
||||||
local gears = require("gears")
|
local gears = require("gears")
|
||||||
|
local wibox = require("wibox")
|
||||||
|
|
||||||
screen.connect_signal(
|
screen.connect_signal(
|
||||||
"added",
|
"added",
|
||||||
function()
|
function()
|
||||||
awesome.restart()
|
awesome.restart()
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
screen.connect_signal(
|
screen.connect_signal(
|
||||||
"removed",
|
"removed",
|
||||||
function()
|
function()
|
||||||
awesome.restart()
|
awesome.restart()
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
client.connect_signal(
|
client.connect_signal(
|
||||||
@@ -30,7 +32,7 @@ client.connect_signal(
|
|||||||
gears.shape.rounded_rect(cr, width, height, 10)
|
gears.shape.rounded_rect(cr, width, height, 10)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
client.connect_signal(
|
client.connect_signal(
|
||||||
@@ -45,7 +47,7 @@ client.connect_signal(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
client.connect_signal(
|
client.connect_signal(
|
||||||
@@ -60,30 +62,47 @@ client.connect_signal(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
-- Sloppy focus
|
-- Sloppy focus
|
||||||
client.connect_signal("mouse::enter", function(c)
|
client.connect_signal(
|
||||||
c:emit_signal("request::activate", "mouse_enter", { raise = false })
|
"mouse::enter",
|
||||||
end)
|
function(c)
|
||||||
|
c:emit_signal(
|
||||||
|
"request::activate",
|
||||||
|
"mouse_enter",
|
||||||
|
{
|
||||||
|
raise = false
|
||||||
|
}
|
||||||
|
)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
-- Workaround for focused border color, why in the love of god doesnt it work with
|
-- Workaround for focused border color, why in the love of god doesnt it work with
|
||||||
-- beautiful.border_focus
|
-- beautiful.border_focus
|
||||||
client.connect_signal("focus", function(c)
|
client.connect_signal(
|
||||||
|
"focus",
|
||||||
|
function(c)
|
||||||
c.border_color = "#616161"
|
c.border_color = "#616161"
|
||||||
end)
|
end
|
||||||
|
)
|
||||||
|
|
||||||
client.connect_signal("unfocus", function(c)
|
client.connect_signal(
|
||||||
|
"unfocus",
|
||||||
|
function(c)
|
||||||
c.border_color = beautiful.border_normal
|
c.border_color = beautiful.border_normal
|
||||||
end)
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
--- Takes a wibox.container.background and connects four signals to it
|
||||||
|
---@param widget widget.container.background
|
||||||
|
---@param bg string
|
||||||
|
---@param fg string
|
||||||
function Hover_signal(widget, bg, fg)
|
function Hover_signal(widget, bg, fg)
|
||||||
local old_wibox, old_cursor, old_bg, old_fg
|
local old_wibox, old_cursor, old_bg, old_fg
|
||||||
widget:connect_signal(
|
|
||||||
"mouse::enter",
|
local mouse_enter = function()
|
||||||
function()
|
|
||||||
if bg then
|
if bg then
|
||||||
old_bg = widget.bg
|
old_bg = widget.bg
|
||||||
if string.len(bg) == 7 then
|
if string.len(bg) == 7 then
|
||||||
@@ -102,11 +121,8 @@ function Hover_signal(widget, bg, fg)
|
|||||||
w.cursor = "hand1"
|
w.cursor = "hand1"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
|
||||||
|
|
||||||
widget:connect_signal(
|
local button_press = function()
|
||||||
"button::press",
|
|
||||||
function()
|
|
||||||
if bg then
|
if bg then
|
||||||
if bg then
|
if bg then
|
||||||
if string.len(bg) == 7 then
|
if string.len(bg) == 7 then
|
||||||
@@ -120,11 +136,8 @@ function Hover_signal(widget, bg, fg)
|
|||||||
widget.fg = fg
|
widget.fg = fg
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
|
||||||
|
|
||||||
widget:connect_signal(
|
local button_release = function()
|
||||||
"button::release",
|
|
||||||
function()
|
|
||||||
if bg then
|
if bg then
|
||||||
if bg then
|
if bg then
|
||||||
if string.len(bg) == 7 then
|
if string.len(bg) == 7 then
|
||||||
@@ -138,11 +151,8 @@ function Hover_signal(widget, bg, fg)
|
|||||||
widget.fg = fg
|
widget.fg = fg
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
|
||||||
|
|
||||||
widget:connect_signal(
|
local mouse_leave = function()
|
||||||
"mouse::leave",
|
|
||||||
function()
|
|
||||||
if bg then
|
if bg then
|
||||||
widget.bg = old_bg
|
widget.bg = old_bg
|
||||||
end
|
end
|
||||||
@@ -154,5 +164,21 @@ function Hover_signal(widget, bg, fg)
|
|||||||
old_wibox = nil
|
old_wibox = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
|
||||||
|
widget:disconnect_signal("mouse::enter", mouse_enter)
|
||||||
|
|
||||||
|
widget:disconnect_signal("button::press", button_press)
|
||||||
|
|
||||||
|
widget:disconnect_signal("button::release", button_release)
|
||||||
|
|
||||||
|
widget:disconnect_signal("mouse::leave", mouse_leave)
|
||||||
|
|
||||||
|
widget:connect_signal("mouse::enter", mouse_enter)
|
||||||
|
|
||||||
|
widget:connect_signal("button::press", button_press)
|
||||||
|
|
||||||
|
widget:connect_signal("button::release", button_release)
|
||||||
|
|
||||||
|
widget:connect_signal("mouse::leave", mouse_leave)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
0
awesome/src/modules/notification-center/init.lua
Normal file
0
awesome/src/modules/notification-center/init.lua
Normal file
@@ -40,31 +40,7 @@ return function(s)
|
|||||||
-- TODO: If the user doesnt have AccountsService look into $HOME/.faces
|
-- TODO: If the user doesnt have AccountsService look into $HOME/.faces
|
||||||
local update_profile_picture = function()
|
local update_profile_picture = function()
|
||||||
awful.spawn.easy_async_with_shell(
|
awful.spawn.easy_async_with_shell(
|
||||||
[=[
|
"./.config/awesome/src/scripts/pfp.sh 'userPfp'",
|
||||||
iconPath="/var/lib/AccountsService/icons/${USER}"
|
|
||||||
userIconPath="${HOME}/.config/awesome/src/assets/userpfp/"
|
|
||||||
if [[ -f "${userIconPath}" ]];
|
|
||||||
then
|
|
||||||
if [[ -f "${iconPath}" ]];
|
|
||||||
then
|
|
||||||
if ! cmp --silent "${userIconPath}.png" "${iconPath}";
|
|
||||||
then
|
|
||||||
cp "${iconPath}" "${userIconPath}${USER}.png"
|
|
||||||
fi
|
|
||||||
printf "${userIconPath}.png"
|
|
||||||
else
|
|
||||||
printf "${userIconPath}.png"
|
|
||||||
fi
|
|
||||||
exit;
|
|
||||||
else
|
|
||||||
if [[ -f "${iconPath}" ]];
|
|
||||||
then
|
|
||||||
cp "${iconPath}" "${userIconPath}${USER}.png"
|
|
||||||
printf "${userIconPath}${USER}.png"
|
|
||||||
exit;
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
]=],
|
|
||||||
function(stdout)
|
function(stdout)
|
||||||
if stdout then
|
if stdout then
|
||||||
profile_picture:set_image(stdout:gsub("\n", ""))
|
profile_picture:set_image(stdout:gsub("\n", ""))
|
||||||
@@ -76,25 +52,10 @@ return function(s)
|
|||||||
end
|
end
|
||||||
update_profile_picture()
|
update_profile_picture()
|
||||||
|
|
||||||
-- Will determin the display style
|
|
||||||
local namestyle = user_vars.namestyle
|
|
||||||
-- Get the full username(if set) and the username + hostname
|
-- Get the full username(if set) and the username + hostname
|
||||||
local update_user_name = function()
|
local update_user_name = function()
|
||||||
awful.spawn.easy_async_with_shell(
|
awful.spawn.easy_async_with_shell(
|
||||||
[=[
|
"./.config/awesome/src/scripts/pfp.sh 'userName' '" .. user_vars.namestyle .. "'",
|
||||||
fullname="$(getent passwd `whoami` | cut -d ':' -f 5)"
|
|
||||||
user="$(whoami)"
|
|
||||||
host="$(hostname)"
|
|
||||||
if [[ "]=] .. namestyle .. [=[" == "userhost" ]];
|
|
||||||
then
|
|
||||||
printf "$user@$host"
|
|
||||||
elif [[ "]=] .. namestyle .. [=[" == "fullname" ]];
|
|
||||||
then
|
|
||||||
printf "$fullname"
|
|
||||||
else
|
|
||||||
printf "Rick Astley"
|
|
||||||
fi
|
|
||||||
]=],
|
|
||||||
function(stdout)
|
function(stdout)
|
||||||
if stdout:gsub("\n", "") == "Rick Astley" then
|
if stdout:gsub("\n", "") == "Rick Astley" then
|
||||||
profile_picture:set_image(awful.util.getdir("config") .. "src/assets/userpfp/" .. "rickastley.jpg")
|
profile_picture:set_image(awful.util.getdir("config") .. "src/assets/userpfp/" .. "rickastley.jpg")
|
||||||
@@ -163,7 +124,7 @@ return function(s)
|
|||||||
|
|
||||||
-- Create the power menu actions
|
-- Create the power menu actions
|
||||||
local suspend_command = function()
|
local suspend_command = function()
|
||||||
awful.spawn("dm-tool lock & systemctl suspend")
|
awful.spawn("systemctl suspend")
|
||||||
awesome.emit_signal("module::powermenu:hide")
|
awesome.emit_signal("module::powermenu:hide")
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -194,11 +155,11 @@ return function(s)
|
|||||||
local lock_button = button("Lock", icondir .. "lock.svg", color["Orange200"], lock_command)
|
local lock_button = button("Lock", icondir .. "lock.svg", color["Orange200"], lock_command)
|
||||||
|
|
||||||
-- Signals to change color on hover
|
-- Signals to change color on hover
|
||||||
Hover_signal(shutdown_button.background, color["Blue200"])
|
Hover_signal(shutdown_button.background, color["Blue200"], color["Grey900"])
|
||||||
Hover_signal(reboot_button.background, color["Red200"])
|
Hover_signal(reboot_button.background, color["Red200"], color["Grey900"])
|
||||||
Hover_signal(suspend_button.background, color["Yellow200"])
|
Hover_signal(suspend_button.background, color["Yellow200"], color["Grey900"])
|
||||||
Hover_signal(logout_button.background, color["Green200"])
|
Hover_signal(logout_button.background, color["Green200"], color["Grey900"])
|
||||||
Hover_signal(lock_button.background, color["Orange200"])
|
Hover_signal(lock_button.background, color["Orange200"], color["Grey900"])
|
||||||
|
|
||||||
-- The powermenu widget
|
-- The powermenu widget
|
||||||
local powermenu = wibox.widget {
|
local powermenu = wibox.widget {
|
||||||
|
|||||||
@@ -119,9 +119,9 @@ local create_titlebar = function(c, bg, size)
|
|||||||
layout = wibox.layout.align.vertical,
|
layout = wibox.layout.align.vertical,
|
||||||
id = "main"
|
id = "main"
|
||||||
}
|
}
|
||||||
Hover_signal(titlebar.main.margin.spacing.closebutton, color["Red200"])
|
Hover_signal(titlebar.main.margin.spacing.closebutton, color["Red200"], color["Grey900"])
|
||||||
Hover_signal(titlebar.main.margin.spacing.maximizebutton, color["Yellow200"])
|
Hover_signal(titlebar.main.margin.spacing.maximizebutton, color["Yellow200"], color["Grey900"])
|
||||||
Hover_signal(titlebar.main.margin.spacing.minimizebutton, color["Green200"])
|
Hover_signal(titlebar.main.margin.spacing.minimizebutton, color["Green200"], color["Grey900"])
|
||||||
end
|
end
|
||||||
|
|
||||||
local create_titlebar_dialog = function(c, bg, size)
|
local create_titlebar_dialog = function(c, bg, size)
|
||||||
@@ -174,8 +174,8 @@ local create_titlebar_dialog = function(c, bg, size)
|
|||||||
layout = wibox.layout.align.vertical,
|
layout = wibox.layout.align.vertical,
|
||||||
id = "main"
|
id = "main"
|
||||||
}
|
}
|
||||||
Hover_signal(titlebar.main.margin.spacing.closebutton, color["Red200"])
|
Hover_signal(titlebar.main.margin.spacing.closebutton, color["Red200"], color["Grey900"])
|
||||||
Hover_signal(titlebar.main.margin.spacing.minimizebutton, color["Green200"])
|
Hover_signal(titlebar.main.margin.spacing.minimizebutton, color["Green200"], color["Grey900"])
|
||||||
end
|
end
|
||||||
|
|
||||||
local draw_titlebar = function(c)
|
local draw_titlebar = function(c)
|
||||||
@@ -208,7 +208,7 @@ client.connect_signal(
|
|||||||
Theme.titlebar_maximized_button_active = icondir .. "maximize.svg"
|
Theme.titlebar_maximized_button_active = icondir .. "maximize.svg"
|
||||||
Theme.titlebar_maximized_button_inactive = icondir .. "maximize.svg"
|
Theme.titlebar_maximized_button_inactive = icondir .. "maximize.svg"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
client.connect_signal(
|
client.connect_signal(
|
||||||
@@ -231,7 +231,7 @@ client.connect_signal(
|
|||||||
awful.titlebar.hide(c, 'top')
|
awful.titlebar.hide(c, 'top')
|
||||||
awful.titlebar.hide(c, 'bottom')
|
awful.titlebar.hide(c, 'bottom')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
client.connect_signal(
|
client.connect_signal(
|
||||||
@@ -248,5 +248,5 @@ client.connect_signal(
|
|||||||
awful.titlebar.hide(c, 'top')
|
awful.titlebar.hide(c, 'top')
|
||||||
awful.titlebar.hide(c, 'bottom')
|
awful.titlebar.hide(c, 'bottom')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ local awful = require("awful")
|
|||||||
local color = require("src.theme.colors")
|
local color = require("src.theme.colors")
|
||||||
local dpi = require("beautiful").xresources.apply_dpi
|
local dpi = require("beautiful").xresources.apply_dpi
|
||||||
local gears = require("gears")
|
local gears = require("gears")
|
||||||
|
local naughty = require("naughty")
|
||||||
local wibox = require("wibox")
|
local wibox = require("wibox")
|
||||||
require("src.core.signals")
|
require("src.core.signals")
|
||||||
|
|
||||||
@@ -16,6 +17,7 @@ local icondir = awful.util.getdir("config") .. "src/assets/icons/audio/"
|
|||||||
-- Returns the volume controller
|
-- Returns the volume controller
|
||||||
return function(s)
|
return function(s)
|
||||||
|
|
||||||
|
-- Function to create source/sink devices
|
||||||
local function create_device(name, node, sink)
|
local function create_device(name, node, sink)
|
||||||
local device = wibox.widget {
|
local device = wibox.widget {
|
||||||
{
|
{
|
||||||
@@ -312,6 +314,7 @@ return function(s)
|
|||||||
return device
|
return device
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Container for the source devices
|
||||||
local dropdown_list_volume = wibox.widget {
|
local dropdown_list_volume = wibox.widget {
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -330,6 +333,7 @@ return function(s)
|
|||||||
widget = wibox.container.margin
|
widget = wibox.container.margin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Container for the sink devices
|
||||||
local dropdown_list_microphone = wibox.widget {
|
local dropdown_list_microphone = wibox.widget {
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
@@ -627,8 +631,8 @@ return function(s)
|
|||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Get all audio devices from all sinks
|
-- Get all source devices
|
||||||
local function get_devices()
|
local function get_source_devices()
|
||||||
awful.spawn.easy_async_with_shell(
|
awful.spawn.easy_async_with_shell(
|
||||||
[[ pactl list sinks | grep -E 'node.name|alsa.card_name' | awk '{gsub(/"/, ""); for(i = 3;i < NF;i++) printf $i " "; print $NF}' ]],
|
[[ pactl list sinks | grep -E 'node.name|alsa.card_name' | awk '{gsub(/"/, ""); for(i = 3;i < NF;i++) printf $i " "; print $NF}' ]],
|
||||||
|
|
||||||
@@ -659,9 +663,9 @@ return function(s)
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
get_devices()
|
get_source_devices()
|
||||||
|
|
||||||
-- Get all input devices from all sources
|
-- Get all input devices
|
||||||
local function get_input_devices()
|
local function get_input_devices()
|
||||||
awful.spawn.easy_async_with_shell(
|
awful.spawn.easy_async_with_shell(
|
||||||
[[ pactl list sources | grep -E "node.name|alsa.card_name" | awk '{gsub(/"/, ""); for(i = 3;i < NF;i++) printf $i " "; print $NF}' ]],
|
[[ pactl list sources | grep -E "node.name|alsa.card_name" | awk '{gsub(/"/, ""); for(i = 3;i < NF;i++) printf $i " "; print $NF}' ]],
|
||||||
@@ -695,6 +699,17 @@ return function(s)
|
|||||||
|
|
||||||
get_input_devices()
|
get_input_devices()
|
||||||
|
|
||||||
|
-- Event watcher, detects when device is addes/removed
|
||||||
|
awful.spawn.with_line_callback(
|
||||||
|
[[bash -c "LC_ALL=C pactl subscribe | grep --line-buffered 'on server'"]],
|
||||||
|
{
|
||||||
|
stdout = function(line)
|
||||||
|
get_input_devices()
|
||||||
|
get_source_devices()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
-- Get microphone volume
|
-- Get microphone volume
|
||||||
local function get_mic_volume()
|
local function get_mic_volume()
|
||||||
awful.spawn.easy_async_with_shell(
|
awful.spawn.easy_async_with_shell(
|
||||||
@@ -730,12 +745,58 @@ return function(s)
|
|||||||
|
|
||||||
get_mic_mute()
|
get_mic_mute()
|
||||||
|
|
||||||
|
-- When the mouse leaves the popup it stops the mousegrabber and hides the popup.
|
||||||
|
volume_controller_container:connect_signal(
|
||||||
|
"mouse::leave",
|
||||||
|
function()
|
||||||
|
mousegrabber.run(
|
||||||
|
function()
|
||||||
|
awesome.emit_signal("volume_controller::toggle", s)
|
||||||
|
mousegrabber.stop()
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
"arrow"
|
||||||
|
)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
volume_controller_container:connect_signal(
|
||||||
|
"mouse::enter",
|
||||||
|
function()
|
||||||
|
mousegrabber.stop()
|
||||||
|
end
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Grabs all keys and hides popup when anything is pressed
|
||||||
|
-- TODO: Make it possible to navigate and select using the kb
|
||||||
|
local volume_controller_keygrabber = awful.keygrabber {
|
||||||
|
autostart = false,
|
||||||
|
stop_event = 'release',
|
||||||
|
keypressed_callback = function(self, mod, key, command)
|
||||||
|
awesome.emit_signal("volume_controller::toggle", s)
|
||||||
|
mousegrabber.stop()
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Draw the popup
|
||||||
volume_controller_container:setup {
|
volume_controller_container:setup {
|
||||||
volume_controller,
|
volume_controller,
|
||||||
layout = wibox.layout.fixed.horizontal
|
layout = wibox.layout.fixed.horizontal
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Global signal called from src.widgets.audio.lua
|
--[[ awesome.connect_signal(
|
||||||
|
"volume_controller::toggle:keygrabber",
|
||||||
|
function()
|
||||||
|
if awful.keygrabber.is_running then
|
||||||
|
volume_controller_keygrabber:stop()
|
||||||
|
else
|
||||||
|
volume_controller_keygrabber:start()
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
) ]]
|
||||||
|
|
||||||
|
-- Set the volume and icon
|
||||||
awesome.connect_signal(
|
awesome.connect_signal(
|
||||||
"get::volume",
|
"get::volume",
|
||||||
function(volume)
|
function(volume)
|
||||||
@@ -757,7 +818,7 @@ return function(s)
|
|||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
-- Global signal called from src.widgets.audio.lua
|
-- Check if the volume is muted
|
||||||
awesome.connect_signal(
|
awesome.connect_signal(
|
||||||
"get::volume_mute",
|
"get::volume_mute",
|
||||||
function(mute)
|
function(mute)
|
||||||
@@ -767,6 +828,7 @@ return function(s)
|
|||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
-- Set the microphone volume
|
||||||
awesome.connect_signal(
|
awesome.connect_signal(
|
||||||
"get::mic_volume",
|
"get::mic_volume",
|
||||||
function(volume)
|
function(volume)
|
||||||
|
|||||||
48
awesome/src/scripts/pfp.sh
Executable file
48
awesome/src/scripts/pfp.sh
Executable file
@@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
|
||||||
|
"userPfp")
|
||||||
|
iconPath="/var/lib/AccountsService/icons/$USER"
|
||||||
|
|
||||||
|
userIconPath="$HOME/.config/awesome/src/assets/userpfp/"
|
||||||
|
|
||||||
|
if [[ -f "$userIconPath" ]];
|
||||||
|
then
|
||||||
|
if [[ -f "$iconPath" ]];
|
||||||
|
then
|
||||||
|
if ! cmp --silent "$userIconPath.png" "$iconPath";
|
||||||
|
then
|
||||||
|
cp "$iconPath" "$userIconPath$USER.png"
|
||||||
|
fi
|
||||||
|
printf "$userIconPath.png"
|
||||||
|
else
|
||||||
|
printf "$userIconPath.png"
|
||||||
|
fi
|
||||||
|
exit;
|
||||||
|
else
|
||||||
|
if [[ -f "$iconPath" ]];
|
||||||
|
then
|
||||||
|
cp "$iconPath" "$userIconPath$USER.png"
|
||||||
|
printf "$userIconPath$USER.png"
|
||||||
|
exit;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
"userName")
|
||||||
|
fullname="$(getent passwd `whoami` | cut -d ':' -f 5)"
|
||||||
|
user="$(whoami)"
|
||||||
|
host="$(hostname)"
|
||||||
|
if [[ "$2" == "userhost" ]];
|
||||||
|
then
|
||||||
|
printf "$user@$host"
|
||||||
|
elif [[ "$2" == "fullname" ]];
|
||||||
|
then
|
||||||
|
printf "$fullname"
|
||||||
|
else
|
||||||
|
printf "Rick Astley"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
@@ -37,14 +37,14 @@ function Get_icon(theme, client, program_string, class_string, is_steam)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for index, icon in ipairs(icon_cache) do
|
for _, icon in ipairs(icon_cache) do
|
||||||
if icon:match(clientName) then
|
if icon:match(clientName) then
|
||||||
return icon
|
return icon
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local resolutions = { "128x128", "96x96", "64x64", "48x48", "42x42", "32x32", "24x24", "16x16" }
|
local resolutions = { "128x128", "96x96", "64x64", "48x48", "42x42", "32x32", "24x24", "16x16" }
|
||||||
for i, res in ipairs(resolutions) do
|
for _, res in ipairs(resolutions) do
|
||||||
local iconDir = "/usr/share/icons/" .. theme .. "/" .. res .. "/apps/"
|
local iconDir = "/usr/share/icons/" .. theme .. "/" .. res .. "/apps/"
|
||||||
local ioStream = io.open(iconDir .. clientName, "r")
|
local ioStream = io.open(iconDir .. clientName, "r")
|
||||||
if ioStream ~= nil then
|
if ioStream ~= nil then
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
------------------------------
|
------------------------------
|
||||||
-- This is the audio widget --
|
-- This is the audio widget --
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
-- Awesome Libs
|
-- Awesome Libs
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
local color = require("src.theme.colors")
|
local color = require("src.theme.colors")
|
||||||
@@ -77,7 +76,8 @@ return function(s)
|
|||||||
icon = icon .. "-high"
|
icon = icon .. "-high"
|
||||||
end
|
end
|
||||||
audio_widget.container.audio_layout.label:set_text(volume .. "%")
|
audio_widget.container.audio_layout.label:set_text(volume .. "%")
|
||||||
audio_widget.container.audio_layout.icon_margin.icon_layout.icon:set_image(gears.color.recolor_image(icon .. ".svg", color["Grey900"]))
|
audio_widget.container.audio_layout.icon_margin.icon_layout.icon:set_image(
|
||||||
|
gears.color.recolor_image(icon .. ".svg", color["Grey900"]))
|
||||||
awesome.emit_signal("get::volume", volume)
|
awesome.emit_signal("get::volume", volume)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
@@ -90,7 +90,8 @@ return function(s)
|
|||||||
if stdout:match("yes") then
|
if stdout:match("yes") then
|
||||||
audio_widget.container.audio_layout.label.visible = false
|
audio_widget.container.audio_layout.label.visible = false
|
||||||
audio_widget.container:set_right(0)
|
audio_widget.container:set_right(0)
|
||||||
audio_widget.container.audio_layout.icon_margin.icon_layout.icon:set_image(gears.color.recolor_image(icondir .. "volume-mute" .. ".svg", color["Grey900"]))
|
audio_widget.container.audio_layout.icon_margin.icon_layout.icon:set_image(
|
||||||
|
gears.color.recolor_image(icondir .. "volume-mute" .. ".svg", color["Grey900"]))
|
||||||
awesome.emit_signal("get::volume_mute", true)
|
awesome.emit_signal("get::volume_mute", true)
|
||||||
else
|
else
|
||||||
audio_widget.container:set_right(10)
|
audio_widget.container:set_right(10)
|
||||||
@@ -102,7 +103,7 @@ return function(s)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Signals
|
-- Signals
|
||||||
Hover_signal(audio_widget, color["Yellow200"])
|
Hover_signal(audio_widget, color["Yellow200"], color["Grey900"])
|
||||||
|
|
||||||
audio_widget:connect_signal(
|
audio_widget:connect_signal(
|
||||||
"button::press",
|
"button::press",
|
||||||
@@ -110,6 +111,7 @@ return function(s)
|
|||||||
awesome.emit_signal("module::slider:update")
|
awesome.emit_signal("module::slider:update")
|
||||||
awesome.emit_signal("widget::volume_osd:rerun")
|
awesome.emit_signal("widget::volume_osd:rerun")
|
||||||
awesome.emit_signal("volume_controller::toggle", s)
|
awesome.emit_signal("volume_controller::toggle", s)
|
||||||
|
awesome.emit_signal("volume_controller::toggle:keygrabber")
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
--------------------------------
|
--------------------------------
|
||||||
-- This is the battery widget --
|
-- This is the battery widget --
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
-- Awesome Libs
|
-- Awesome Libs
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
local color = require("src.theme.colors")
|
local color = require("src.theme.colors")
|
||||||
@@ -123,7 +122,8 @@ return function()
|
|||||||
|
|
||||||
if status == 'fully-charged' or status == 'charging' and battery_percentage == 100 then
|
if status == 'fully-charged' or status == 'charging' and battery_percentage == 100 then
|
||||||
icon = icon .. '-' .. 'charging'
|
icon = icon .. '-' .. 'charging'
|
||||||
battery_widget.container.battery_layout.icon_margin.icon_layout.icon:set_image(gears.surface.load_uncached(gears.color.recolor_image(icondir .. icon .. '.svg', "#212121")))
|
battery_widget.container.battery_layout.icon_margin.icon_layout.icon:set_image(gears.surface.load_uncached(
|
||||||
|
gears.color.recolor_image(icondir .. icon .. '.svg', "#212121")))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -134,7 +134,8 @@ return function()
|
|||||||
notify_critical_battery = false
|
notify_critical_battery = false
|
||||||
battery_warning()
|
battery_warning()
|
||||||
end
|
end
|
||||||
battery_widget.container.battery_layout.icon_margin.icon_layout.icon:set_image(gears.surface.load_uncached(gears.color.recolor_image(icondir .. icon .. '.svg', "#212121")))
|
battery_widget.container.battery_layout.icon_margin.icon_layout.icon:set_image(gears.surface.load_uncached(
|
||||||
|
gears.color.recolor_image(icondir .. icon .. '.svg', "#212121")))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -160,13 +161,14 @@ return function()
|
|||||||
icon = icon .. '-' .. status .. '-' .. '90'
|
icon = icon .. '-' .. status .. '-' .. '90'
|
||||||
end
|
end
|
||||||
|
|
||||||
battery_widget.container.battery_layout.icon_margin.icon_layout.icon:set_image(gears.surface.load_uncached(gears.color.recolor_image(icondir .. icon .. '.svg', "#212121")))
|
battery_widget.container.battery_layout.icon_margin.icon_layout.icon:set_image(gears.surface.load_uncached(
|
||||||
|
gears.color.recolor_image(icondir .. icon .. '.svg', "#212121")))
|
||||||
|
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
Hover_signal(battery_widget, color["Purple200"])
|
Hover_signal(battery_widget, color["Purple200"], color["Grey900"])
|
||||||
|
|
||||||
battery_widget:connect_signal(
|
battery_widget:connect_signal(
|
||||||
'button::press',
|
'button::press',
|
||||||
@@ -191,7 +193,8 @@ return function()
|
|||||||
battery_widget.container.battery_layout.spacing = dpi(0)
|
battery_widget.container.battery_layout.spacing = dpi(0)
|
||||||
battery_widget.container.battery_layout.label.visible = false
|
battery_widget.container.battery_layout.label.visible = false
|
||||||
battery_tooltip:set_text('No battery found')
|
battery_tooltip:set_text('No battery found')
|
||||||
battery_widget.container.battery_layout.icon_margin.icon_layout.icon:set_image(gears.surface.load_uncached(gears.color.recolor_image(icondir .. 'battery-off' .. '.svg', "#212121")))
|
battery_widget.container.battery_layout.icon_margin.icon_layout.icon:set_image(gears.surface.load_uncached(
|
||||||
|
gears.color.recolor_image(icondir .. 'battery-off' .. '.svg', "#212121")))
|
||||||
end
|
end
|
||||||
update_battery(status)
|
update_battery(status)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ return function()
|
|||||||
)
|
)
|
||||||
|
|
||||||
-- Signals
|
-- Signals
|
||||||
Hover_signal(bluetooth_widget, color["Blue200"])
|
Hover_signal(bluetooth_widget, color["Blue200"], color["Grey900"])
|
||||||
|
|
||||||
bluetooth_widget:connect_signal(
|
bluetooth_widget:connect_signal(
|
||||||
"button::press",
|
"button::press",
|
||||||
@@ -97,7 +97,7 @@ return function()
|
|||||||
rfkill unblock bluetooth
|
rfkill unblock bluetooth
|
||||||
sleep 1
|
sleep 1
|
||||||
bluetoothctl power on
|
bluetoothctl power on
|
||||||
]],
|
]] ,
|
||||||
function()
|
function()
|
||||||
naughty.notification {
|
naughty.notification {
|
||||||
title = "System Notification",
|
title = "System Notification",
|
||||||
@@ -111,7 +111,7 @@ return function()
|
|||||||
[[
|
[[
|
||||||
bluetoothctl power off
|
bluetoothctl power off
|
||||||
rfkill block bluetooth
|
rfkill block bluetooth
|
||||||
]],
|
]] ,
|
||||||
function()
|
function()
|
||||||
naughty.notification {
|
naughty.notification {
|
||||||
title = "System Notification",
|
title = "System Notification",
|
||||||
|
|||||||
@@ -39,7 +39,8 @@ return function()
|
|||||||
id = "label",
|
id = "label",
|
||||||
align = "center",
|
align = "center",
|
||||||
valign = "center",
|
valign = "center",
|
||||||
widget = wibox.widget.textbox
|
format = "%H:%M",
|
||||||
|
widget = wibox.widget.textclock
|
||||||
},
|
},
|
||||||
id = "clock_layout",
|
id = "clock_layout",
|
||||||
layout = wibox.layout.fixed.horizontal
|
layout = wibox.layout.fixed.horizontal
|
||||||
@@ -57,22 +58,7 @@ return function()
|
|||||||
widget = wibox.container.background
|
widget = wibox.container.background
|
||||||
}
|
}
|
||||||
|
|
||||||
local set_clock = function()
|
Hover_signal(clock_widget, color["Orange200"], color["Grey900"])
|
||||||
clock_widget.container.clock_layout.label:set_text(os.date("%H:%M"))
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Updates the clock every 5 seconds, worst case you are 5 seconds behind
|
|
||||||
-- ¯\_(ツ)_/¯
|
|
||||||
gears.timer {
|
|
||||||
timeout = 5,
|
|
||||||
autostart = true,
|
|
||||||
call_now = true,
|
|
||||||
callback = function()
|
|
||||||
set_clock()
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
Hover_signal(clock_widget, color["Orange200"])
|
|
||||||
|
|
||||||
return clock_widget
|
return clock_widget
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ return function(widget, clock_mode)
|
|||||||
temp_color = color["Red200"]
|
temp_color = color["Red200"]
|
||||||
temp_icon = icon_dir .. "thermometer-high.svg"
|
temp_icon = icon_dir .. "thermometer-high.svg"
|
||||||
end
|
end
|
||||||
Hover_signal(cpu_temp, temp_color)
|
Hover_signal(cpu_temp, temp_color, color["Grey900"])
|
||||||
cpu_temp.container.cpu_layout.icon_margin.icon_layout.icon:set_image(temp_icon)
|
cpu_temp.container.cpu_layout.icon_margin.icon_layout.icon:set_image(temp_icon)
|
||||||
cpu_temp:set_bg(temp_color)
|
cpu_temp:set_bg(temp_color)
|
||||||
cpu_temp.container.cpu_layout.label.text = math.floor(temp_num) .. "°C"
|
cpu_temp.container.cpu_layout.label.text = math.floor(temp_num) .. "°C"
|
||||||
@@ -212,8 +212,8 @@ return function(widget, clock_mode)
|
|||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
Hover_signal(cpu_usage_widget, color["Blue200"])
|
Hover_signal(cpu_usage_widget, color["Blue200"], color["Grey900"])
|
||||||
Hover_signal(cpu_clock, color["Purple200"])
|
Hover_signal(cpu_clock, color["Purple200"], color["Grey900"])
|
||||||
|
|
||||||
if widget == "usage" then
|
if widget == "usage" then
|
||||||
return cpu_usage_widget
|
return cpu_usage_widget
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ return function()
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Signals
|
-- Signals
|
||||||
Hover_signal(date_widget, color["Teal200"])
|
Hover_signal(date_widget, color["Teal200"], color["Grey900"])
|
||||||
|
|
||||||
date_widget:connect_signal(
|
date_widget:connect_signal(
|
||||||
"mouse::enter",
|
"mouse::enter",
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ return function(widget)
|
|||||||
end,
|
end,
|
||||||
widget = wibox.container.background
|
widget = wibox.container.background
|
||||||
}
|
}
|
||||||
Hover_signal(gpu_usage_widget, color["Green200"])
|
Hover_signal(gpu_usage_widget, color["Green200"], color["Grey900"])
|
||||||
|
|
||||||
local gpu_temp_widget = wibox.widget {
|
local gpu_temp_widget = wibox.widget {
|
||||||
{
|
{
|
||||||
@@ -127,7 +127,7 @@ return function(widget)
|
|||||||
temp_icon = icon_dir .. "thermometer-high.svg"
|
temp_icon = icon_dir .. "thermometer-high.svg"
|
||||||
end
|
end
|
||||||
|
|
||||||
Hover_signal(gpu_temp_widget, temp_color)
|
Hover_signal(gpu_temp_widget, temp_color, color["Grey900"])
|
||||||
gpu_temp_widget.container.gpu_layout.icon_margin.icon_layout.icon:set_image(temp_icon)
|
gpu_temp_widget.container.gpu_layout.icon_margin.icon_layout.icon:set_image(temp_icon)
|
||||||
gpu_temp_widget:set_bg(temp_color)
|
gpu_temp_widget:set_bg(temp_color)
|
||||||
gpu_temp_widget.container.gpu_layout.label.text = tostring(temp_num) .. "°C"
|
gpu_temp_widget.container.gpu_layout.label.text = tostring(temp_num) .. "°C"
|
||||||
|
|||||||
@@ -72,12 +72,12 @@ return function(s)
|
|||||||
|
|
||||||
local xkeyboard_country_code = {
|
local xkeyboard_country_code = {
|
||||||
{ "af", "أفغانيش(Afghanistan)", "AFG" }, -- Afghanistan
|
{ "af", "أفغانيش(Afghanistan)", "AFG" }, -- Afghanistan
|
||||||
{ "al", "shqip(Albania)", "ALB" }, -- Albania
|
{ "al", "Shqip(Albania)", "ALB" }, -- Albania
|
||||||
{ "am", "հայերեն(Armenia)", "ARM" }, -- Armenia
|
{ "am", "Hայերեն(Armenia)", "ARM" }, -- Armenia
|
||||||
{ "ara", "عربي(Arab)", "ARB" }, -- Arabic
|
{ "ara", "عربي(Arab)", "ARB" }, -- Arabic
|
||||||
{ "at", "Österreichisch (Austria)", "AUT" }, -- Austria
|
{ "at", "Österreichisch (Austria)", "AUT" }, -- Austria
|
||||||
{ "az", "Azərbaycan(Azerbaijan)", "AZE" }, -- Azerbaijan
|
{ "az", "Azərbaycan(Azerbaijan)", "AZE" }, -- Azerbaijan
|
||||||
{ "ba", "bosanski(Bosnia and Herzegovina)", "BIH" }, -- Bosnia and Herzegovina
|
{ "ba", "Bosanski(Bosnia and Herzegovina)", "BIH" }, -- Bosnia and Herzegovina
|
||||||
{ "bd", "", "BGD" }, -- Bangladesh
|
{ "bd", "", "BGD" }, -- Bangladesh
|
||||||
{ "be", "", "BEL" }, -- Belgium
|
{ "be", "", "BEL" }, -- Belgium
|
||||||
{ "bg", "", "BGR" }, -- Bulgaria
|
{ "bg", "", "BGR" }, -- Bulgaria
|
||||||
@@ -297,10 +297,8 @@ return function(s)
|
|||||||
mousegrabber.run(
|
mousegrabber.run(
|
||||||
function()
|
function()
|
||||||
kblayout_widget.bg = color["Green200"]
|
kblayout_widget.bg = color["Green200"]
|
||||||
if mouse.is_left_mouse_button_pressed then
|
|
||||||
awesome.emit_signal("kblayout::hide:kbmenu")
|
awesome.emit_signal("kblayout::hide:kbmenu")
|
||||||
mousegrabber.stop()
|
mousegrabber.stop()
|
||||||
end
|
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
"arrow"
|
"arrow"
|
||||||
@@ -354,7 +352,7 @@ return function(s)
|
|||||||
)
|
)
|
||||||
|
|
||||||
-- Signals
|
-- Signals
|
||||||
Hover_signal(kblayout_widget, color["Green200"])
|
Hover_signal(kblayout_widget, color["Green200"], color["Grey900"])
|
||||||
|
|
||||||
local kblayout_keygrabber = awful.keygrabber {
|
local kblayout_keygrabber = awful.keygrabber {
|
||||||
autostart = false,
|
autostart = false,
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ return function()
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Signals
|
-- Signals
|
||||||
Hover_signal(layout, color["LightBlue200"])
|
Hover_signal(layout, color["LightBlue200"], color["Grey900"])
|
||||||
|
|
||||||
layout:connect_signal(
|
layout:connect_signal(
|
||||||
"button::press",
|
"button::press",
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ return function()
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Signals
|
-- Signals
|
||||||
Hover_signal(network_widget, color["Red200"])
|
Hover_signal(network_widget, color["Red200"], color["Grey900"])
|
||||||
|
|
||||||
network_widget:connect_signal(
|
network_widget:connect_signal(
|
||||||
"button::press",
|
"button::press",
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ return function()
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Signals
|
-- Signals
|
||||||
Hover_signal(power_widget, color["Red200"])
|
Hover_signal(power_widget, color["Red200"], color["Grey900"])
|
||||||
|
|
||||||
power_widget:connect_signal(
|
power_widget:connect_signal(
|
||||||
"button::release",
|
"button::release",
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ return function()
|
|||||||
widget = wibox.container.background
|
widget = wibox.container.background
|
||||||
}
|
}
|
||||||
|
|
||||||
Hover_signal(ram_widget, color["Red200"])
|
Hover_signal(ram_widget, color["Red200"], color["Grey900"])
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
[[ bash -c "cat /proc/meminfo| grep Mem | awk '{print $2}'" ]],
|
[[ bash -c "cat /proc/meminfo| grep Mem | awk '{print $2}'" ]],
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ return function(s)
|
|||||||
bg = color["BlueGrey800"]
|
bg = color["BlueGrey800"]
|
||||||
}
|
}
|
||||||
-- Signals
|
-- Signals
|
||||||
Hover_signal(systray.container, color["Red200"])
|
Hover_signal(systray.container, color["Red200"], color["Grey900"])
|
||||||
|
|
||||||
awesome.connect_signal("systray::update", function()
|
awesome.connect_signal("systray::update", function()
|
||||||
local num_entries = awesome.systray()
|
local num_entries = awesome.systray()
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
--------------------------------
|
||||||
|
-- This is the taglist widget --
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
-- Awesome Libs
|
||||||
local wibox = require("wibox")
|
local wibox = require("wibox")
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
local gears = require("gears")
|
local gears = require("gears")
|
||||||
@@ -8,52 +13,29 @@ require("src.tools.icon_handler")
|
|||||||
local list_update = function(widget, buttons, label, data, objects)
|
local list_update = function(widget, buttons, label, data, objects)
|
||||||
widget:reset()
|
widget:reset()
|
||||||
|
|
||||||
for i, object in ipairs(objects) do
|
for _, object in ipairs(objects) do
|
||||||
|
|
||||||
local tag_icon = wibox.widget {
|
local tag_widget = wibox.widget {
|
||||||
nil,
|
{
|
||||||
|
{
|
||||||
{
|
{
|
||||||
id = "icon",
|
|
||||||
resize = true,
|
|
||||||
widget = wibox.widget.imagebox
|
|
||||||
},
|
|
||||||
nil,
|
|
||||||
layout = wibox.layout.align.horizontal
|
|
||||||
}
|
|
||||||
|
|
||||||
local tag_icon_margin = wibox.widget {
|
|
||||||
tag_icon,
|
|
||||||
forced_width = dpi(33),
|
|
||||||
margins = dpi(3),
|
|
||||||
widget = wibox.container.margin
|
|
||||||
}
|
|
||||||
|
|
||||||
local tag_label = wibox.widget {
|
|
||||||
text = "",
|
text = "",
|
||||||
align = "center",
|
align = "center",
|
||||||
valign = "center",
|
valign = "center",
|
||||||
visible = true,
|
visible = true,
|
||||||
font = user_vars.font.extrabold,
|
font = user_vars.font.extrabold,
|
||||||
forced_width = dpi(25),
|
forced_width = dpi(25),
|
||||||
|
id = "label",
|
||||||
widget = wibox.widget.textbox
|
widget = wibox.widget.textbox
|
||||||
}
|
},
|
||||||
|
id = "margin",
|
||||||
local tag_label_margin = wibox.widget {
|
|
||||||
tag_label,
|
|
||||||
left = dpi(5),
|
left = dpi(5),
|
||||||
right = dpi(5),
|
right = dpi(5),
|
||||||
widget = wibox.container.margin
|
widget = wibox.container.margin
|
||||||
}
|
},
|
||||||
|
|
||||||
local tag_widget = wibox.widget {
|
|
||||||
|
|
||||||
id = "widget_margin",
|
|
||||||
{
|
|
||||||
id = "container",
|
id = "container",
|
||||||
tag_label_margin,
|
|
||||||
layout = wibox.layout.fixed.horizontal
|
layout = wibox.layout.fixed.horizontal
|
||||||
},
|
},
|
||||||
|
|
||||||
fg = color["White"],
|
fg = color["White"],
|
||||||
shape = function(cr, width, height)
|
shape = function(cr, width, height)
|
||||||
gears.shape.rounded_rect(cr, width, height, 5)
|
gears.shape.rounded_rect(cr, width, height, 5)
|
||||||
@@ -83,8 +65,7 @@ local list_update = function(widget, buttons, label, data, objects)
|
|||||||
|
|
||||||
tag_widget:buttons(create_buttons(buttons, object))
|
tag_widget:buttons(create_buttons(buttons, object))
|
||||||
|
|
||||||
local text, bg_color, bg_image, icon, args = label(object, tag_label)
|
tag_widget.container.margin.label:set_text(object.index)
|
||||||
tag_label:set_text(object.index)
|
|
||||||
if object.urgent == true then
|
if object.urgent == true then
|
||||||
tag_widget:set_bg(color["RedA200"])
|
tag_widget:set_bg(color["RedA200"])
|
||||||
tag_widget:set_fg(color["Grey900"])
|
tag_widget:set_fg(color["Grey900"])
|
||||||
@@ -97,7 +78,7 @@ local list_update = function(widget, buttons, label, data, objects)
|
|||||||
|
|
||||||
-- Set the icon for each client
|
-- Set the icon for each client
|
||||||
for _, client in ipairs(object:clients()) do
|
for _, client in ipairs(object:clients()) do
|
||||||
tag_label_margin:set_right(0)
|
tag_widget.container.margin:set_right(0)
|
||||||
local icon = wibox.widget {
|
local icon = wibox.widget {
|
||||||
{
|
{
|
||||||
id = "icon_container",
|
id = "icon_container",
|
||||||
@@ -108,7 +89,6 @@ local list_update = function(widget, buttons, label, data, objects)
|
|||||||
},
|
},
|
||||||
widget = wibox.container.place
|
widget = wibox.container.place
|
||||||
},
|
},
|
||||||
tag_icon_margin,
|
|
||||||
forced_width = dpi(33),
|
forced_width = dpi(33),
|
||||||
margins = dpi(6),
|
margins = dpi(6),
|
||||||
widget = wibox.container.margin
|
widget = wibox.container.margin
|
||||||
@@ -121,6 +101,7 @@ local list_update = function(widget, buttons, label, data, objects)
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--#region Hover_signal
|
||||||
local old_wibox, old_cursor, old_bg
|
local old_wibox, old_cursor, old_bg
|
||||||
tag_widget:connect_signal(
|
tag_widget:connect_signal(
|
||||||
"mouse::enter",
|
"mouse::enter",
|
||||||
@@ -171,13 +152,14 @@ local list_update = function(widget, buttons, label, data, objects)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
--#endregion
|
||||||
|
|
||||||
widget:add(tag_widget)
|
widget:add(tag_widget)
|
||||||
widget:set_spacing(dpi(6))
|
widget:set_spacing(dpi(6))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local tag_list = function(s)
|
return function(s)
|
||||||
return awful.widget.taglist(
|
return awful.widget.taglist(
|
||||||
s,
|
s,
|
||||||
awful.widget.taglist.filter.noempty,
|
awful.widget.taglist.filter.noempty,
|
||||||
@@ -236,5 +218,3 @@ local tag_list = function(s)
|
|||||||
wibox.layout.fixed.horizontal()
|
wibox.layout.fixed.horizontal()
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
return tag_list
|
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
---------------------------------
|
||||||
|
-- This is the tasklist widget --
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
-- Awesome Libs
|
||||||
local awful = require('awful')
|
local awful = require('awful')
|
||||||
local wibox = require('wibox')
|
local wibox = require('wibox')
|
||||||
local dpi = require('beautiful').xresources.apply_dpi
|
local dpi = require('beautiful').xresources.apply_dpi
|
||||||
@@ -83,7 +88,7 @@ local list_update = function(widget, buttons, label, data, objects)
|
|||||||
|
|
||||||
task_widget:buttons(create_buttons(buttons, object))
|
task_widget:buttons(create_buttons(buttons, object))
|
||||||
|
|
||||||
local text, bg, bg_image, icon, args = label(object, task_widget.container.layout_it.title)
|
local text, _ = label(object, task_widget.container.layout_it.title)
|
||||||
if object == client.focus then
|
if object == client.focus then
|
||||||
if text == nil or text == '' then
|
if text == nil or text == '' then
|
||||||
task_widget.container.layout_it.title:set_margins(0)
|
task_widget.container.layout_it.title:set_margins(0)
|
||||||
@@ -112,6 +117,7 @@ local list_update = function(widget, buttons, label, data, objects)
|
|||||||
widget:add(task_widget)
|
widget:add(task_widget)
|
||||||
widget:set_spacing(dpi(6))
|
widget:set_spacing(dpi(6))
|
||||||
|
|
||||||
|
--#region Hover_signal
|
||||||
local old_wibox, old_cursor, old_bg
|
local old_wibox, old_cursor, old_bg
|
||||||
task_widget:connect_signal(
|
task_widget:connect_signal(
|
||||||
"mouse::enter",
|
"mouse::enter",
|
||||||
@@ -162,11 +168,13 @@ local list_update = function(widget, buttons, label, data, objects)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
--#endregion
|
||||||
|
|
||||||
end
|
end
|
||||||
return widget
|
return widget
|
||||||
end
|
end
|
||||||
|
|
||||||
local tasklist = function(s)
|
return function(s)
|
||||||
return awful.widget.tasklist(
|
return awful.widget.tasklist(
|
||||||
s,
|
s,
|
||||||
awful.widget.tasklist.filter.currenttags,
|
awful.widget.tasklist.filter.currenttags,
|
||||||
@@ -200,5 +208,3 @@ local tasklist = function(s)
|
|||||||
wibox.layout.fixed.horizontal()
|
wibox.layout.fixed.horizontal()
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
return tasklist
|
|
||||||
|
|||||||
460
picom.conf
460
picom.conf
@@ -1,156 +1,412 @@
|
|||||||
# ░█▀█░▀█▀░█▀▀░█▀█░█▄█░░░░█▀▀░█▀█░█▀█░█▀▀
|
#################################
|
||||||
# ░█▀▀░░█░░█░░░█░█░█░█░░░░█░░░█░█░█░█░█▀▀
|
# Shadows #
|
||||||
# ░▀░░░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀░░▀▀▀░▀▀▀░▀░▀░▀░░
|
#################################
|
||||||
|
|
||||||
|
|
||||||
|
# Enabled client-side shadows on windows. Note desktop windows
|
||||||
|
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
|
||||||
|
# unless explicitly requested using the wintypes option.
|
||||||
#
|
#
|
||||||
# X compositor configuration
|
# shadow = false
|
||||||
|
|
||||||
# ░█▀▀░█░█░█▀█░█▀▄░█▀█░█░█
|
|
||||||
# ░▀▀█░█▀█░█▀█░█░█░█░█░█▄█
|
|
||||||
# ░▀▀▀░▀░▀░▀░▀░▀▀░░▀▀▀░▀░▀
|
|
||||||
|
|
||||||
shadow = true;
|
shadow = true;
|
||||||
|
|
||||||
|
# The blur radius for shadows, in pixels. (defaults to 12)
|
||||||
|
# shadow-radius = 12
|
||||||
shadow-radius = 12;
|
shadow-radius = 12;
|
||||||
shadow-opacity = 0.65;
|
|
||||||
shadow-offset-x = -5;
|
|
||||||
shadow-offset-y = -6;
|
|
||||||
|
|
||||||
|
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
|
||||||
|
# shadow-opacity = .75
|
||||||
|
|
||||||
|
# The left offset for shadows, in pixels. (defaults to -15)
|
||||||
|
# shadow-offset-x = -15
|
||||||
|
shadow-offset-x = -7;
|
||||||
|
|
||||||
|
# The top offset for shadows, in pixels. (defaults to -15)
|
||||||
|
# shadow-offset-y = -15
|
||||||
|
shadow-offset-y = -7;
|
||||||
|
|
||||||
|
# Red color value of shadow (0.0 - 1.0, defaults to 0).
|
||||||
# shadow-red = 0
|
# shadow-red = 0
|
||||||
|
|
||||||
|
# Green color value of shadow (0.0 - 1.0, defaults to 0).
|
||||||
# shadow-green = 0
|
# shadow-green = 0
|
||||||
|
|
||||||
|
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
|
||||||
# shadow-blue = 0
|
# shadow-blue = 0
|
||||||
shadow-color = "#000000";
|
|
||||||
|
|
||||||
|
# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue)
|
||||||
|
shadow-color = "#000000"
|
||||||
|
|
||||||
|
# Specify a list of conditions of windows that should have no shadow.
|
||||||
|
#
|
||||||
|
# examples:
|
||||||
|
# shadow-exclude = "n:e:Notification";
|
||||||
|
#
|
||||||
|
# shadow-exclude = []
|
||||||
shadow-exclude = [
|
shadow-exclude = [
|
||||||
#"name = 'Notification'",
|
"name = 'Notification'",
|
||||||
"class_g = 'Conky'",
|
"class_g = 'Conky'",
|
||||||
#"class_g ?= 'Notify-osd'",
|
"class_g ?= 'Notify-osd'",
|
||||||
"class_g = 'Cairo-clock'",
|
"class_g = 'Cairo-clock'",
|
||||||
#"class_g = 'slop'",
|
"_GTK_FRAME_EXTENTS@:c"
|
||||||
#"name = 'Dunst'",
|
|
||||||
#"name = 'dmenu'",
|
|
||||||
#"class_g = 'Rofi'",
|
|
||||||
"_GTK_FRAME_EXTENTS@:c",
|
|
||||||
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# shadow-exclude-reg = "x10+0+0";
|
# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window.
|
||||||
# xinerama-shadow-crop = true;
|
# clip-shadow-above = []
|
||||||
|
|
||||||
# ░█▀▀░█▀█░█▀▄░▀█▀░█▀█░█▀▀
|
# Specify a X geometry that describes the region in which shadow should not
|
||||||
# ░█▀▀░█▀█░█░█░░█░░█░█░█░█
|
# be painted in, such as a dock window region. Use
|
||||||
# ░▀░░░▀░▀░▀▀░░▀▀▀░▀░▀░▀▀▀
|
# shadow-exclude-reg = "x10+0+0"
|
||||||
|
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
|
||||||
|
#
|
||||||
|
# shadow-exclude-reg = ""
|
||||||
|
|
||||||
|
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
|
||||||
|
# xinerama-shadow-crop = false
|
||||||
|
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# Fading #
|
||||||
|
#################################
|
||||||
|
|
||||||
|
|
||||||
|
# Fade windows in/out when opening/closing and when opacity changes,
|
||||||
|
# unless no-fading-openclose is used.
|
||||||
|
# fading = false
|
||||||
fading = true;
|
fading = true;
|
||||||
|
|
||||||
|
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
|
||||||
|
# fade-in-step = 0.028
|
||||||
fade-in-step = 0.03;
|
fade-in-step = 0.03;
|
||||||
|
|
||||||
|
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
|
||||||
|
# fade-out-step = 0.03
|
||||||
fade-out-step = 0.03;
|
fade-out-step = 0.03;
|
||||||
fade-delta = 4;
|
|
||||||
|
|
||||||
fade-exclude = [
|
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
|
||||||
"name *= 'polybar'"
|
fade-delta = 6
|
||||||
];
|
|
||||||
|
|
||||||
no-fading-openclose = false;
|
# Specify a list of conditions of windows that should not be faded.
|
||||||
no-fading-destroyed-argb = true;
|
# fade-exclude = []
|
||||||
|
|
||||||
# ░█▀█░█▀█░█▀█░█▀▀░▀█▀░▀█▀░█░█
|
# Do not fade on window open/close.
|
||||||
# ░█░█░█▀▀░█▀█░█░░░░█░░░█░░░█░
|
# no-fading-openclose = false
|
||||||
# ░▀▀▀░▀░░░▀░▀░▀▀▀░▀▀▀░░▀░░░▀░
|
|
||||||
|
|
||||||
|
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
|
||||||
|
# no-fading-destroyed-argb = false
|
||||||
|
|
||||||
|
|
||||||
|
#################################
|
||||||
|
# Transparency / Opacity #
|
||||||
|
#################################
|
||||||
|
|
||||||
|
|
||||||
|
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
|
||||||
|
# inactive-opacity = 1
|
||||||
inactive-opacity = 1;
|
inactive-opacity = 1;
|
||||||
|
|
||||||
|
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
|
||||||
|
# frame-opacity = 1.0
|
||||||
frame-opacity = 1;
|
frame-opacity = 1;
|
||||||
|
|
||||||
|
# Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows.
|
||||||
|
# inactive-opacity-override = true
|
||||||
inactive-opacity-override = false;
|
inactive-opacity-override = false;
|
||||||
active-opacity = 1.0;
|
|
||||||
inactive-dim = 0.0;
|
|
||||||
|
|
||||||
focus-exclude = [
|
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
|
||||||
"class_g = 'Cairo-clock'",
|
# active-opacity = 1.0
|
||||||
"class_g ?= 'rofi'",
|
|
||||||
"class_g ?= 'slop'",
|
|
||||||
"class_g ?= 'Steam'"
|
|
||||||
];
|
|
||||||
|
|
||||||
# inactive-dim-fixed = 1.0;
|
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
|
||||||
|
# inactive-dim = 0.0
|
||||||
|
|
||||||
opacity-rule = [
|
# Specify a list of conditions of windows that should never be considered focused.
|
||||||
"80:class_g = 'URxvt'",
|
# focus-exclude = []
|
||||||
"80:class_g = 'UXTerm'",
|
focus-exclude = [ "class_g = 'Cairo-clock'" ];
|
||||||
"80:class_g = 'XTerm'"
|
|
||||||
]
|
|
||||||
|
|
||||||
# ░█▀▄░█░░░█░█░█▀▄░█▀▄░▀█▀░█▀█░█▀▀
|
# Use fixed inactive dim value, instead of adjusting according to window opacity.
|
||||||
# ░█▀▄░█░░░█░█░█▀▄░█▀▄░░█░░█░█░█░█
|
# inactive-dim-fixed = 1.0
|
||||||
# ░▀▀░░▀▀▀░▀▀▀░▀░▀░▀░▀░▀▀▀░▀░▀░▀▀▀
|
|
||||||
|
|
||||||
blur: {
|
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
|
||||||
method = "dual_kawase";
|
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
|
||||||
strength = 5.0;
|
# Note we don't make any guarantee about possible conflicts with other
|
||||||
deviation = 1.0;
|
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
|
||||||
kernel = "11x11gaussian";
|
# example:
|
||||||
}
|
# opacity-rule = [ "80:class_g = 'URxvt'" ];
|
||||||
|
#
|
||||||
|
# opacity-rule = []
|
||||||
|
|
||||||
blur-background = false;
|
|
||||||
blur-background-frame = true;
|
|
||||||
blur-background-fixed = true;
|
|
||||||
# blur-kern = "3x3box";
|
|
||||||
|
|
||||||
blur-background-exclude = [
|
#################################
|
||||||
#"name *= 'polybar'",
|
# Corners #
|
||||||
"window_type = 'dock'",
|
#################################
|
||||||
"_GTK_FRAME_EXTENTS@:c"
|
|
||||||
];
|
|
||||||
|
|
||||||
# ░█▀▀░█▀▀░█▀█░█▀▀░█▀▄░█▀█░█░░░░░█▀▀░█▀▀░▀█▀░▀█▀░▀█▀░█▀█░█▀▀░█▀▀
|
# Sets the radius of rounded window corners. When > 0, the compositor will
|
||||||
# ░█░█░█▀▀░█░█░█▀▀░█▀▄░█▀█░█░░░░░▀▀█░█▀▀░░█░░░█░░░█░░█░█░█░█░▀▀█
|
# round the corners of windows. Does not interact well with
|
||||||
# ░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀▀░░░▀▀▀░▀▀▀░░▀░░░▀░░▀▀▀░▀░▀░▀▀▀░▀▀▀
|
# `transparent-clipping`.
|
||||||
|
#corner-radius = 10
|
||||||
|
|
||||||
#corner-radius = 10.0
|
# Exclude conditions for rounded corners.
|
||||||
rounded-corners-exclude = [
|
rounded-corners-exclude = [
|
||||||
"name *= 'Awesome drawin'",
|
"window_type = 'dock'",
|
||||||
"name *= 'polybar'",
|
"window_type = 'desktop'"
|
||||||
"name *= 'rofi'",
|
];
|
||||||
"name *= 'Dunst'",
|
|
||||||
"name *= 'dmenu'",
|
|
||||||
|
#################################
|
||||||
|
# Background-Blurring #
|
||||||
|
#################################
|
||||||
|
|
||||||
|
|
||||||
|
# Parameters for background blurring, see the *BLUR* section for more information.
|
||||||
|
blur-method = "dual_kawase"
|
||||||
|
blur-size = 12
|
||||||
|
#
|
||||||
|
# blur-deviation = false
|
||||||
|
#
|
||||||
|
blur-strength = 5
|
||||||
|
|
||||||
|
# Blur background of semi-transparent / ARGB windows.
|
||||||
|
# Bad in performance, with driver-dependent behavior.
|
||||||
|
# The name of the switch may change without prior notifications.
|
||||||
|
#
|
||||||
|
blur-background = false
|
||||||
|
|
||||||
|
# Blur background of windows when the window frame is not opaque.
|
||||||
|
# Implies:
|
||||||
|
# blur-background
|
||||||
|
# Bad in performance, with driver-dependent behavior. The name may change.
|
||||||
|
#
|
||||||
|
blur-background-frame = true
|
||||||
|
|
||||||
|
# Use fixed blur strength rather than adjusting according to window opacity.
|
||||||
|
blur-background-fixed = true
|
||||||
|
|
||||||
|
|
||||||
|
# Specify the blur convolution kernel, with the following format:
|
||||||
|
# example:
|
||||||
|
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
|
||||||
|
#
|
||||||
|
# blur-kern = ""
|
||||||
|
blur-kern = "11x11gaussian";
|
||||||
|
|
||||||
|
|
||||||
|
# Exclude conditions for background blur.
|
||||||
|
# blur-background-exclude = []
|
||||||
|
blur-background-exclude = [
|
||||||
|
"window_type = 'dock'",
|
||||||
|
"window_type = 'desktop'",
|
||||||
"_GTK_FRAME_EXTENTS@:c"
|
"_GTK_FRAME_EXTENTS@:c"
|
||||||
]
|
];
|
||||||
round-borders = 1
|
|
||||||
daemon = false;
|
#################################
|
||||||
|
# General Settings #
|
||||||
|
#################################
|
||||||
|
|
||||||
|
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
|
||||||
|
# daemon = false
|
||||||
|
|
||||||
|
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
|
||||||
|
# `xrender` is the default one.
|
||||||
|
#
|
||||||
|
# backend = "glx"
|
||||||
backend = "glx";
|
backend = "glx";
|
||||||
|
|
||||||
|
# Enable/disable VSync.
|
||||||
|
# vsync = false
|
||||||
vsync = true;
|
vsync = true;
|
||||||
dbus = false;
|
|
||||||
|
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
|
||||||
|
# dbus = false
|
||||||
|
|
||||||
|
# Try to detect WM windows (a non-override-redirect window with no
|
||||||
|
# child that has 'WM_STATE') and mark them as active.
|
||||||
|
#
|
||||||
|
# mark-wmwin-focused = false
|
||||||
mark-wmwin-focused = true;
|
mark-wmwin-focused = true;
|
||||||
|
|
||||||
|
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
|
||||||
|
# mark-ovredir-focused = false
|
||||||
mark-ovredir-focused = true;
|
mark-ovredir-focused = true;
|
||||||
|
|
||||||
|
# Try to detect windows with rounded corners and don't consider them
|
||||||
|
# shaped windows. The accuracy is not very high, unfortunately.
|
||||||
|
#
|
||||||
|
# detect-rounded-corners = false
|
||||||
detect-rounded-corners = true;
|
detect-rounded-corners = true;
|
||||||
|
|
||||||
|
# Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers
|
||||||
|
# not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows.
|
||||||
|
#
|
||||||
|
# detect-client-opacity = false
|
||||||
detect-client-opacity = true;
|
detect-client-opacity = true;
|
||||||
refresh-rate = 0;
|
|
||||||
# use-ewmh-active-win = true;
|
|
||||||
# unredir-if-possible = false;
|
|
||||||
# unredir-if-possible-delay = 0;
|
|
||||||
|
|
||||||
unredir-if-possible-exclude = [];
|
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
|
||||||
|
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
|
||||||
|
# provided that the WM supports it.
|
||||||
|
#
|
||||||
|
# use-ewmh-active-win = false
|
||||||
|
|
||||||
|
# Unredirect all windows if a full-screen opaque window is detected,
|
||||||
|
# to maximize performance for full-screen windows. Known to cause flickering
|
||||||
|
# when redirecting/unredirecting windows.
|
||||||
|
#
|
||||||
|
# unredir-if-possible = false
|
||||||
|
|
||||||
|
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
|
||||||
|
# unredir-if-possible-delay = 0
|
||||||
|
|
||||||
|
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
|
||||||
|
# unredir-if-possible-exclude = []
|
||||||
|
|
||||||
|
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
|
||||||
|
# in the same group focused at the same time.
|
||||||
|
#
|
||||||
|
# detect-transient = false
|
||||||
detect-transient = true;
|
detect-transient = true;
|
||||||
detect-client-leader = true;
|
|
||||||
resize-damage = 1;
|
|
||||||
|
|
||||||
invert-color-include = [];
|
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
|
||||||
|
# group focused at the same time. This usually means windows from the same application
|
||||||
|
# will be considered focused or unfocused at the same time.
|
||||||
|
# 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too.
|
||||||
|
#
|
||||||
|
# detect-client-leader = false
|
||||||
|
|
||||||
glx-no-stencil = true;
|
# Resize damaged region by a specific number of pixels.
|
||||||
# glx-no-rebind-pixmap = false;
|
# A positive value enlarges it while a negative one shrinks it.
|
||||||
|
# If the value is positive, those additional pixels will not be actually painted
|
||||||
|
# to screen, only used in blur calculation, and such. (Due to technical limitations,
|
||||||
|
# with use-damage, those pixels will still be incorrectly painted to screen.)
|
||||||
|
# Primarily used to fix the line corruption issues of blur,
|
||||||
|
# in which case you should use the blur radius value here
|
||||||
|
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
|
||||||
|
# with a 5x5 one you use `--resize-damage 2`, and so on).
|
||||||
|
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
|
||||||
|
#
|
||||||
|
# resize-damage = 1
|
||||||
|
|
||||||
|
# Specify a list of conditions of windows that should be painted with inverted color.
|
||||||
|
# Resource-hogging, and is not well tested.
|
||||||
|
#
|
||||||
|
# invert-color-include = []
|
||||||
|
|
||||||
|
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
|
||||||
|
# Might cause incorrect opacity when rendering transparent content (but never
|
||||||
|
# practically happened) and may not work with blur-background.
|
||||||
|
# My tests show a 15% performance boost. Recommended.
|
||||||
|
#
|
||||||
|
glx-no-stencil = true
|
||||||
|
|
||||||
|
# GLX backend: Avoid rebinding pixmap on window damage.
|
||||||
|
# Probably could improve performance on rapid window content changes,
|
||||||
|
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
|
||||||
|
# Recommended if it works.
|
||||||
|
#
|
||||||
|
# glx-no-rebind-pixmap = false
|
||||||
|
|
||||||
|
# Disable the use of damage information.
|
||||||
|
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
|
||||||
|
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
|
||||||
|
# The opposing option is use-damage
|
||||||
|
#
|
||||||
|
# no-use-damage = false
|
||||||
use-damage = true;
|
use-damage = true;
|
||||||
# xrender-sync-fence = true;
|
|
||||||
|
|
||||||
# glx-fshader-win = "";
|
# Use X Sync fence to sync clients' draw calls, to make sure all draw
|
||||||
# force-win-blend = false;
|
# calls are finished before picom starts drawing. Needed on nvidia-drivers
|
||||||
|
# with GLX backend for some users.
|
||||||
|
#
|
||||||
|
# xrender-sync-fence = false
|
||||||
|
|
||||||
# no-ewmh-fullscreen = false;
|
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
|
||||||
# max-brightness = 1.0;
|
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
|
||||||
|
# in the source tree for examples.
|
||||||
|
#
|
||||||
|
# glx-fshader-win = ""
|
||||||
|
|
||||||
transparent-clipping = false;
|
# Force all windows to be painted with blending. Useful if you
|
||||||
|
# have a glx-fshader-win that could turn opaque pixels transparent.
|
||||||
|
#
|
||||||
|
# force-win-blend = false
|
||||||
|
|
||||||
show-all-xerrors = true;
|
# Do not use EWMH to detect fullscreen windows.
|
||||||
|
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
|
||||||
|
#
|
||||||
|
# no-ewmh-fullscreen = false
|
||||||
|
|
||||||
wintypes: {
|
# Dimming bright windows so their brightness doesn't exceed this set value.
|
||||||
tooltip = { fade = true; focus = false; };
|
# Brightness of a window is estimated by averaging all pixels in the window,
|
||||||
normal = { shadow = true; blur-background = false; };
|
# so this could comes with a performance hit.
|
||||||
dock = { shadow = true; blur-background = false;};
|
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
|
||||||
desktop = { shadow = true; blur-background = false; };
|
#
|
||||||
|
# max-brightness = 1.0
|
||||||
|
|
||||||
|
# Make transparent windows clip other windows like non-transparent windows do,
|
||||||
|
# instead of blending on top of them.
|
||||||
|
#
|
||||||
|
# transparent-clipping = false
|
||||||
|
|
||||||
|
# Set the log level. Possible values are:
|
||||||
|
# "trace", "debug", "info", "warn", "error"
|
||||||
|
# in increasing level of importance. Case doesn't matter.
|
||||||
|
# If using the "TRACE" log level, it's better to log into a file
|
||||||
|
# using *--log-file*, since it can generate a huge stream of logs.
|
||||||
|
#
|
||||||
|
# log-level = "debug"
|
||||||
|
log-level = "warn";
|
||||||
|
|
||||||
|
# Set the log file.
|
||||||
|
# If *--log-file* is never specified, logs will be written to stderr.
|
||||||
|
# Otherwise, logs will to written to the given file, though some of the early
|
||||||
|
# logs might still be written to the stderr.
|
||||||
|
# When setting this option from the config file, it is recommended to use an absolute path.
|
||||||
|
#
|
||||||
|
# log-file = "/path/to/your/log/file"
|
||||||
|
|
||||||
|
# Show all X errors (for debugging)
|
||||||
|
# show-all-xerrors = false
|
||||||
|
|
||||||
|
# Write process ID to a file.
|
||||||
|
# write-pid-path = "/path/to/your/log/file"
|
||||||
|
|
||||||
|
# Window type settings
|
||||||
|
#
|
||||||
|
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
|
||||||
|
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
|
||||||
|
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
|
||||||
|
# "tooltip", "notification", "combo", and "dnd".
|
||||||
|
#
|
||||||
|
# Following per window-type options are available: ::
|
||||||
|
#
|
||||||
|
# fade, shadow:::
|
||||||
|
# Controls window-type-specific shadow and fade settings.
|
||||||
|
#
|
||||||
|
# opacity:::
|
||||||
|
# Controls default opacity of the window type.
|
||||||
|
#
|
||||||
|
# focus:::
|
||||||
|
# Controls whether the window of this type is to be always considered focused.
|
||||||
|
# (By default, all window types except "normal" and "dialog" has this on.)
|
||||||
|
#
|
||||||
|
# full-shadow:::
|
||||||
|
# Controls whether shadow is drawn under the parts of the window that you
|
||||||
|
# normally won't be able to see. Useful when the window has parts of it
|
||||||
|
# transparent, and you want shadows in those areas.
|
||||||
|
#
|
||||||
|
# clip-shadow-above:::
|
||||||
|
# Controls wether shadows that would have been drawn above the window should
|
||||||
|
# be clipped. Useful for dock windows that should have no shadow painted on top.
|
||||||
|
#
|
||||||
|
# redir-ignore:::
|
||||||
|
# Controls whether this type of windows should cause screen to become
|
||||||
|
# redirected again after been unredirected. If you have unredir-if-possible
|
||||||
|
# set, and doesn't want certain window to cause unnecessary screen redirection,
|
||||||
|
# you can set this to `true`.
|
||||||
|
#
|
||||||
|
wintypes:
|
||||||
|
{
|
||||||
|
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
|
||||||
|
dock = { shadow = true; clip-shadow-above = false; }
|
||||||
|
dnd = { shadow = false; }
|
||||||
|
popup_menu = { opacity = 0.8; }
|
||||||
|
dropdown_menu = { opacity = 0.8; }
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user