fix #10 and #13. Various other fixes and small changes

This commit is contained in:
Kievits Rene
2022-05-25 11:27:03 +02:00
parent b5f513a344
commit ff202de163
28 changed files with 1664 additions and 1280 deletions

View File

@@ -44,7 +44,7 @@ return function(screen, programs)
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
dock_element.background.bg = color["Grey800"]
end
@@ -181,13 +181,20 @@ return function(screen, programs)
}
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
dock.visible = true
return
end
if s == mouse.screen then
local visible = false
for j, c in ipairs(s.selected_tag:clients()) do
for _, c in ipairs(s.selected_tag:clients()) do
if c.maximized or c.fullscreen then
dock.visible = false
@@ -219,7 +226,7 @@ return function(screen, programs)
fakedock:connect_signal(
"mouse::enter",
function()
for index, c in ipairs(screen.clients) do
for _, c in ipairs(screen.clients) do
if not c.fullscreen then
dock_intelligent_hide:stop()
dock.visible = true

View 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 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

View 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

View File

@@ -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;

View File

@@ -1,7 +1,6 @@
-------------------------------
-- The Notification defaults --
-------------------------------
-- Awesome Libs
local awful = require("awful")
local color = require("src.theme.colors")
@@ -14,7 +13,6 @@ local wibox = require("wibox")
local icondir = awful.util.getdir("config") .. "src/assets/icons/notifications/"
-- TODO: Figure out how to use hover effects without messing up the actions
naughty.config.defaults.ontop = true
naughty.config.defaults.icon_size = dpi(80)
naughty.config.defaults.timeout = 3
@@ -31,9 +29,10 @@ naughty.config.defaults.spacing = dpi(10)
naughty.connect_signal(
'request::icon',
function(n, context, hints)
if context ~= 'app_icon' then return end
local path = menubar.utils.lookup_icon(hints.app_icon) or
menubar.utils.lookup_icon(hints.app_icon:lower())
if context ~= 'app_icon' then
return
end
local path = menubar.utils.lookup_icon(hints.app_icon) or menubar.utils.lookup_icon(hints.app_icon:lower())
if path then
n.icon = path
end
@@ -43,14 +42,15 @@ end
naughty.connect_signal(
"request::display",
function(n)
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.app_name = string.format("<span foreground='%s'>%s</span>", color["RedA400"], n.app_name) or ""
n.bg = color["Grey900"]
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.bg = color["Grey900"]
n.timeout = n.timeout or 3
@@ -59,23 +59,19 @@ naughty.connect_signal(
local use_image = false
if n.app_name == "Spotify" then
n.actions = {
naughty.action {
n.actions = { naughty.action {
program = "Spotify",
id = "skip-prev",
icon = gears.color.recolor_image(icondir .. "skip-prev.svg", color["Cyan200"]),
},
naughty.action {
icon = gears.color.recolor_image(icondir .. "skip-prev.svg", color["Cyan200"])
}, naughty.action {
program = "Spotify",
id = "play-pause",
icon = gears.color.recolor_image(icondir .. "play-pause.svg", color["Cyan200"]),
},
naughty.action {
icon = gears.color.recolor_image(icondir .. "play-pause.svg", color["Cyan200"])
}, naughty.action {
program = "Spotify",
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
end
@@ -111,7 +107,7 @@ naughty.connect_signal(
id = "mrgn",
top = dpi(10),
bottom = dpi(10),
widget = wibox.container.margin,
widget = wibox.container.margin
}
else
action_template_widget = {
@@ -140,7 +136,7 @@ naughty.connect_signal(
id = "mrgn",
top = dpi(10),
bottom = dpi(10),
widget = wibox.container.margin,
widget = wibox.container.margin
}
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',
align = "center",
valign = "center",
widget = wibox.widget.textbox
},
layout = wibox.layout.fixed.horizontal
},
fg = color["Teal200"],
widget = wibox.container.background
},
@@ -181,6 +189,16 @@ naughty.connect_signal(
widget = wibox.container.margin
},
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,
id = "arc_margin"
},
layout = wibox.layout.fixed.horizontal,
id = "arc_app_layout_2"
},
id = "arc_app_layout",
layout = wibox.layout.align.horizontal
},
@@ -233,7 +254,7 @@ naughty.connect_signal(
widget = wibox.widget.imagebox,
clip_shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 10)
end,
end
},
width = naughty.config.defaults.icon_size,
height = naughty.config.defaults.icon_size,
@@ -242,7 +263,7 @@ naughty.connect_signal(
},
halign = "center",
valign = "top",
widget = wibox.container.place,
widget = wibox.container.place
},
left = dpi(20),
bottom = dpi(15),
@@ -285,7 +306,7 @@ naughty.connect_signal(
id = "max_size",
strategy = "max",
width = Theme.notification_max_width or dpi(500),
widget = wibox.container.constraint,
widget = wibox.container.constraint
},
id = "background",
bg = color["Grey900"],
@@ -297,7 +318,7 @@ naughty.connect_signal(
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 timeout = n.timeout
@@ -305,7 +326,7 @@ naughty.connect_signal(
if timeout ~= 0 then
arc.value = 360
gears.timer {
local arc_timer = gears.timer {
timeout = 0.1,
call_now = true,
autostart = true,
@@ -314,6 +335,23 @@ naughty.connect_signal(
remove_time = remove_time - 0.1
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
Hover_signal(close, color["Grey900"], color["Teal200"])
@@ -331,6 +369,15 @@ naughty.connect_signal(
if key == 3 then
n:destroy()
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
)
@@ -358,7 +405,7 @@ end
)
-- Test notification
--[[ naughty.notification {
naughty.notification {
app_name = "System Notification",
title = "A notification 2",
message = "This is very informative and overflowing",
@@ -376,7 +423,7 @@ end
name = "Ignore",
},
}
} ]]
}
naughty.connect_signal(
"invoked",

View File

@@ -1,7 +1,9 @@
---@diagnostic disable: undefined-field
-- Awesome Libs
local awful = require("awful")
local beautiful = require("beautiful")
local gears = require("gears")
local wibox = require("wibox")
screen.connect_signal(
"added",
@@ -63,27 +65,44 @@ client.connect_signal(
end
)
-- Sloppy focus
client.connect_signal("mouse::enter", function(c)
c:emit_signal("request::activate", "mouse_enter", { raise = false })
end)
client.connect_signal(
"mouse::enter",
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
-- beautiful.border_focus
client.connect_signal("focus", function(c)
client.connect_signal(
"focus",
function(c)
c.border_color = "#616161"
end)
end
)
client.connect_signal("unfocus", function(c)
client.connect_signal(
"unfocus",
function(c)
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)
local old_wibox, old_cursor, old_bg, old_fg
widget:connect_signal(
"mouse::enter",
function()
local mouse_enter = function()
if bg then
old_bg = widget.bg
if string.len(bg) == 7 then
@@ -102,11 +121,8 @@ function Hover_signal(widget, bg, fg)
w.cursor = "hand1"
end
end
)
widget:connect_signal(
"button::press",
function()
local button_press = function()
if bg then
if bg then
if string.len(bg) == 7 then
@@ -120,11 +136,8 @@ function Hover_signal(widget, bg, fg)
widget.fg = fg
end
end
)
widget:connect_signal(
"button::release",
function()
local button_release = function()
if bg then
if bg then
if string.len(bg) == 7 then
@@ -138,11 +151,8 @@ function Hover_signal(widget, bg, fg)
widget.fg = fg
end
end
)
widget:connect_signal(
"mouse::leave",
function()
local mouse_leave = function()
if bg then
widget.bg = old_bg
end
@@ -154,5 +164,21 @@ function Hover_signal(widget, bg, fg)
old_wibox = nil
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

View File

@@ -40,31 +40,7 @@ return function(s)
-- TODO: If the user doesnt have AccountsService look into $HOME/.faces
local update_profile_picture = function()
awful.spawn.easy_async_with_shell(
[=[
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
]=],
"./.config/awesome/src/scripts/pfp.sh 'userPfp'",
function(stdout)
if stdout then
profile_picture:set_image(stdout:gsub("\n", ""))
@@ -76,25 +52,10 @@ return function(s)
end
update_profile_picture()
-- Will determin the display style
local namestyle = user_vars.namestyle
-- Get the full username(if set) and the username + hostname
local update_user_name = function()
awful.spawn.easy_async_with_shell(
[=[
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
]=],
"./.config/awesome/src/scripts/pfp.sh 'userName' '" .. user_vars.namestyle .. "'",
function(stdout)
if stdout:gsub("\n", "") == "Rick Astley" then
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
local suspend_command = function()
awful.spawn("dm-tool lock & systemctl suspend")
awful.spawn("systemctl suspend")
awesome.emit_signal("module::powermenu:hide")
end
@@ -194,11 +155,11 @@ return function(s)
local lock_button = button("Lock", icondir .. "lock.svg", color["Orange200"], lock_command)
-- Signals to change color on hover
Hover_signal(shutdown_button.background, color["Blue200"])
Hover_signal(reboot_button.background, color["Red200"])
Hover_signal(suspend_button.background, color["Yellow200"])
Hover_signal(logout_button.background, color["Green200"])
Hover_signal(lock_button.background, color["Orange200"])
Hover_signal(shutdown_button.background, color["Blue200"], color["Grey900"])
Hover_signal(reboot_button.background, color["Red200"], color["Grey900"])
Hover_signal(suspend_button.background, color["Yellow200"], color["Grey900"])
Hover_signal(logout_button.background, color["Green200"], color["Grey900"])
Hover_signal(lock_button.background, color["Orange200"], color["Grey900"])
-- The powermenu widget
local powermenu = wibox.widget {

View File

@@ -119,9 +119,9 @@ local create_titlebar = function(c, bg, size)
layout = wibox.layout.align.vertical,
id = "main"
}
Hover_signal(titlebar.main.margin.spacing.closebutton, color["Red200"])
Hover_signal(titlebar.main.margin.spacing.maximizebutton, color["Yellow200"])
Hover_signal(titlebar.main.margin.spacing.minimizebutton, color["Green200"])
Hover_signal(titlebar.main.margin.spacing.closebutton, color["Red200"], color["Grey900"])
Hover_signal(titlebar.main.margin.spacing.maximizebutton, color["Yellow200"], color["Grey900"])
Hover_signal(titlebar.main.margin.spacing.minimizebutton, color["Green200"], color["Grey900"])
end
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,
id = "main"
}
Hover_signal(titlebar.main.margin.spacing.closebutton, color["Red200"])
Hover_signal(titlebar.main.margin.spacing.minimizebutton, color["Green200"])
Hover_signal(titlebar.main.margin.spacing.closebutton, color["Red200"], color["Grey900"])
Hover_signal(titlebar.main.margin.spacing.minimizebutton, color["Green200"], color["Grey900"])
end
local draw_titlebar = function(c)

View File

@@ -7,6 +7,7 @@ local awful = require("awful")
local color = require("src.theme.colors")
local dpi = require("beautiful").xresources.apply_dpi
local gears = require("gears")
local naughty = require("naughty")
local wibox = require("wibox")
require("src.core.signals")
@@ -16,6 +17,7 @@ local icondir = awful.util.getdir("config") .. "src/assets/icons/audio/"
-- Returns the volume controller
return function(s)
-- Function to create source/sink devices
local function create_device(name, node, sink)
local device = wibox.widget {
{
@@ -312,6 +314,7 @@ return function(s)
return device
end
-- Container for the source devices
local dropdown_list_volume = wibox.widget {
{
{
@@ -330,6 +333,7 @@ return function(s)
widget = wibox.container.margin
}
-- Container for the sink devices
local dropdown_list_microphone = wibox.widget {
{
{
@@ -627,8 +631,8 @@ return function(s)
end
}
-- Get all audio devices from all sinks
local function get_devices()
-- Get all source devices
local function get_source_devices()
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}' ]],
@@ -659,9 +663,9 @@ return function(s)
)
end
get_devices()
get_source_devices()
-- Get all input devices from all sources
-- Get all input devices
local function get_input_devices()
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}' ]],
@@ -695,6 +699,17 @@ return function(s)
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
local function get_mic_volume()
awful.spawn.easy_async_with_shell(
@@ -730,12 +745,58 @@ return function(s)
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,
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(
"get::volume",
function(volume)
@@ -757,7 +818,7 @@ return function(s)
end
)
-- Global signal called from src.widgets.audio.lua
-- Check if the volume is muted
awesome.connect_signal(
"get::volume_mute",
function(mute)
@@ -767,6 +828,7 @@ return function(s)
end
)
-- Set the microphone volume
awesome.connect_signal(
"get::mic_volume",
function(volume)

48
awesome/src/scripts/pfp.sh Executable file
View 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

View File

@@ -37,14 +37,14 @@ function Get_icon(theme, client, program_string, class_string, is_steam)
end
end
for index, icon in ipairs(icon_cache) do
for _, icon in ipairs(icon_cache) do
if icon:match(clientName) then
return icon
end
end
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 ioStream = io.open(iconDir .. clientName, "r")
if ioStream ~= nil then

View File

@@ -1,7 +1,6 @@
------------------------------
-- This is the audio widget --
------------------------------
-- Awesome Libs
local awful = require("awful")
local color = require("src.theme.colors")
@@ -77,7 +76,8 @@ return function(s)
icon = icon .. "-high"
end
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)
end
)
@@ -90,7 +90,8 @@ return function(s)
if stdout:match("yes") then
audio_widget.container.audio_layout.label.visible = false
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)
else
audio_widget.container:set_right(10)
@@ -102,7 +103,7 @@ return function(s)
end
-- Signals
Hover_signal(audio_widget, color["Yellow200"])
Hover_signal(audio_widget, color["Yellow200"], color["Grey900"])
audio_widget:connect_signal(
"button::press",
@@ -110,6 +111,7 @@ return function(s)
awesome.emit_signal("module::slider:update")
awesome.emit_signal("widget::volume_osd:rerun")
awesome.emit_signal("volume_controller::toggle", s)
awesome.emit_signal("volume_controller::toggle:keygrabber")
end
)

View File

@@ -1,7 +1,6 @@
--------------------------------
-- This is the battery widget --
--------------------------------
-- Awesome Libs
local awful = require("awful")
local color = require("src.theme.colors")
@@ -123,7 +122,8 @@ return function()
if status == 'fully-charged' or status == 'charging' and battery_percentage == 100 then
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
end
@@ -134,7 +134,8 @@ return function()
notify_critical_battery = false
battery_warning()
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
end
@@ -160,13 +161,14 @@ return function()
icon = icon .. '-' .. status .. '-' .. '90'
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
Hover_signal(battery_widget, color["Purple200"])
Hover_signal(battery_widget, color["Purple200"], color["Grey900"])
battery_widget:connect_signal(
'button::press',
@@ -191,7 +193,8 @@ return function()
battery_widget.container.battery_layout.spacing = dpi(0)
battery_widget.container.battery_layout.label.visible = false
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
update_battery(status)
end

View File

@@ -82,7 +82,7 @@ return function()
)
-- Signals
Hover_signal(bluetooth_widget, color["Blue200"])
Hover_signal(bluetooth_widget, color["Blue200"], color["Grey900"])
bluetooth_widget:connect_signal(
"button::press",

View File

@@ -39,7 +39,8 @@ return function()
id = "label",
align = "center",
valign = "center",
widget = wibox.widget.textbox
format = "%H:%M",
widget = wibox.widget.textclock
},
id = "clock_layout",
layout = wibox.layout.fixed.horizontal
@@ -57,22 +58,7 @@ return function()
widget = wibox.container.background
}
local set_clock = function()
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"])
Hover_signal(clock_widget, color["Orange200"], color["Grey900"])
return clock_widget
end

View File

@@ -181,7 +181,7 @@ return function(widget, clock_mode)
temp_color = color["Red200"]
temp_icon = icon_dir .. "thermometer-high.svg"
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:set_bg(temp_color)
cpu_temp.container.cpu_layout.label.text = math.floor(temp_num) .. "°C"
@@ -212,8 +212,8 @@ return function(widget, clock_mode)
end
)
Hover_signal(cpu_usage_widget, color["Blue200"])
Hover_signal(cpu_clock, color["Purple200"])
Hover_signal(cpu_usage_widget, color["Blue200"], color["Grey900"])
Hover_signal(cpu_clock, color["Purple200"], color["Grey900"])
if widget == "usage" then
return cpu_usage_widget

View File

@@ -72,7 +72,7 @@ return function()
}
-- Signals
Hover_signal(date_widget, color["Teal200"])
Hover_signal(date_widget, color["Teal200"], color["Grey900"])
date_widget:connect_signal(
"mouse::enter",

View File

@@ -54,7 +54,7 @@ return function(widget)
end,
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 {
{
@@ -127,7 +127,7 @@ return function(widget)
temp_icon = icon_dir .. "thermometer-high.svg"
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:set_bg(temp_color)
gpu_temp_widget.container.gpu_layout.label.text = tostring(temp_num) .. "°C"

View File

@@ -72,12 +72,12 @@ return function(s)
local xkeyboard_country_code = {
{ "af", "أفغانيش(Afghanistan)", "AFG" }, -- Afghanistan
{ "al", "shqip(Albania)", "ALB" }, -- Albania
{ "am", "հայերեն(Armenia)", "ARM" }, -- Armenia
{ "al", "Shqip(Albania)", "ALB" }, -- Albania
{ "am", "Hայերեն(Armenia)", "ARM" }, -- Armenia
{ "ara", "عربي(Arab)", "ARB" }, -- Arabic
{ "at", "Österreichisch (Austria)", "AUT" }, -- Austria
{ "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
{ "be", "", "BEL" }, -- Belgium
{ "bg", "", "BGR" }, -- Bulgaria
@@ -297,10 +297,8 @@ return function(s)
mousegrabber.run(
function()
kblayout_widget.bg = color["Green200"]
if mouse.is_left_mouse_button_pressed then
awesome.emit_signal("kblayout::hide:kbmenu")
mousegrabber.stop()
end
return true
end,
"arrow"
@@ -354,7 +352,7 @@ return function(s)
)
-- Signals
Hover_signal(kblayout_widget, color["Green200"])
Hover_signal(kblayout_widget, color["Green200"], color["Grey900"])
local kblayout_keygrabber = awful.keygrabber {
autostart = false,

View File

@@ -33,7 +33,7 @@ return function()
}
-- Signals
Hover_signal(layout, color["LightBlue200"])
Hover_signal(layout, color["LightBlue200"], color["Grey900"])
layout:connect_signal(
"button::press",

View File

@@ -324,7 +324,7 @@ return function()
}
-- Signals
Hover_signal(network_widget, color["Red200"])
Hover_signal(network_widget, color["Red200"], color["Grey900"])
network_widget:connect_signal(
"button::press",

View File

@@ -50,7 +50,7 @@ return function()
}
-- Signals
Hover_signal(power_widget, color["Red200"])
Hover_signal(power_widget, color["Red200"], color["Grey900"])
power_widget:connect_signal(
"button::release",

View File

@@ -55,7 +55,7 @@ return function()
widget = wibox.container.background
}
Hover_signal(ram_widget, color["Red200"])
Hover_signal(ram_widget, color["Red200"], color["Grey900"])
watch(
[[ bash -c "cat /proc/meminfo| grep Mem | awk '{print $2}'" ]],

View File

@@ -30,7 +30,7 @@ return function(s)
bg = color["BlueGrey800"]
}
-- Signals
Hover_signal(systray.container, color["Red200"])
Hover_signal(systray.container, color["Red200"], color["Grey900"])
awesome.connect_signal("systray::update", function()
local num_entries = awesome.systray()

View File

@@ -1,3 +1,8 @@
--------------------------------
-- This is the taglist widget --
--------------------------------
-- Awesome Libs
local wibox = require("wibox")
local awful = require("awful")
local gears = require("gears")
@@ -8,52 +13,29 @@ require("src.tools.icon_handler")
local list_update = function(widget, buttons, label, data, objects)
widget:reset()
for i, object in ipairs(objects) do
for _, object in ipairs(objects) do
local tag_icon = wibox.widget {
nil,
local tag_widget = wibox.widget {
{
{
{
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 = "",
align = "center",
valign = "center",
visible = true,
font = user_vars.font.extrabold,
forced_width = dpi(25),
id = "label",
widget = wibox.widget.textbox
}
local tag_label_margin = wibox.widget {
tag_label,
},
id = "margin",
left = dpi(5),
right = dpi(5),
widget = wibox.container.margin
}
local tag_widget = wibox.widget {
id = "widget_margin",
{
},
id = "container",
tag_label_margin,
layout = wibox.layout.fixed.horizontal
},
fg = color["White"],
shape = function(cr, width, height)
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))
local text, bg_color, bg_image, icon, args = label(object, tag_label)
tag_label:set_text(object.index)
tag_widget.container.margin.label:set_text(object.index)
if object.urgent == true then
tag_widget:set_bg(color["RedA200"])
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
for _, client in ipairs(object:clients()) do
tag_label_margin:set_right(0)
tag_widget.container.margin:set_right(0)
local icon = wibox.widget {
{
id = "icon_container",
@@ -108,7 +89,6 @@ local list_update = function(widget, buttons, label, data, objects)
},
widget = wibox.container.place
},
tag_icon_margin,
forced_width = dpi(33),
margins = dpi(6),
widget = wibox.container.margin
@@ -121,6 +101,7 @@ local list_update = function(widget, buttons, label, data, objects)
})
end
--#region Hover_signal
local old_wibox, old_cursor, old_bg
tag_widget:connect_signal(
"mouse::enter",
@@ -171,13 +152,14 @@ local list_update = function(widget, buttons, label, data, objects)
end
end
)
--#endregion
widget:add(tag_widget)
widget:set_spacing(dpi(6))
end
end
local tag_list = function(s)
return function(s)
return awful.widget.taglist(
s,
awful.widget.taglist.filter.noempty,
@@ -236,5 +218,3 @@ local tag_list = function(s)
wibox.layout.fixed.horizontal()
)
end
return tag_list

View File

@@ -1,3 +1,8 @@
---------------------------------
-- This is the tasklist widget --
---------------------------------
-- Awesome Libs
local awful = require('awful')
local wibox = require('wibox')
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))
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 text == nil or text == '' then
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:set_spacing(dpi(6))
--#region Hover_signal
local old_wibox, old_cursor, old_bg
task_widget:connect_signal(
"mouse::enter",
@@ -162,11 +168,13 @@ local list_update = function(widget, buttons, label, data, objects)
end
end
)
--#endregion
end
return widget
end
local tasklist = function(s)
return function(s)
return awful.widget.tasklist(
s,
awful.widget.tasklist.filter.currenttags,
@@ -200,5 +208,3 @@ local tasklist = function(s)
wibox.layout.fixed.horizontal()
)
end
return tasklist

View File

@@ -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;
# The blur radius for shadows, in pixels. (defaults to 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
# Green color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-green = 0
# Blue color value of shadow (0.0 - 1.0, defaults to 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 = [
#"name = 'Notification'",
"name = 'Notification'",
"class_g = 'Conky'",
#"class_g ?= 'Notify-osd'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
#"class_g = 'slop'",
#"name = 'Dunst'",
#"name = 'dmenu'",
#"class_g = 'Rofi'",
"_GTK_FRAME_EXTENTS@:c",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
"_GTK_FRAME_EXTENTS@:c"
];
# shadow-exclude-reg = "x10+0+0";
# xinerama-shadow-crop = true;
# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window.
# 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;
# 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;
# 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-delta = 4;
fade-exclude = [
"name *= 'polybar'"
];
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
fade-delta = 6
no-fading-openclose = false;
no-fading-destroyed-argb = true;
# Specify a list of conditions of windows that should not be faded.
# 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;
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0
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;
active-opacity = 1.0;
inactive-dim = 0.0;
focus-exclude = [
"class_g = 'Cairo-clock'",
"class_g ?= 'rofi'",
"class_g ?= 'slop'",
"class_g ?= 'Steam'"
];
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
# active-opacity = 1.0
# inactive-dim-fixed = 1.0;
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
# inactive-dim = 0.0
opacity-rule = [
"80:class_g = 'URxvt'",
"80:class_g = 'UXTerm'",
"80:class_g = 'XTerm'"
]
# Specify a list of conditions of windows that should never be considered focused.
# focus-exclude = []
focus-exclude = [ "class_g = 'Cairo-clock'" ];
# ░█▀▄░█░░░█░█░█▀▄░█▀▄░▀█▀░█▀█░█▀▀
# ░█▀▄░█░░░█░█░█▀▄░█▀▄░░█░░█░█░█░█
# ░▀▀░░▀▀▀░▀▀▀░▀░▀░▀░▀░▀▀▀░▀░▀░▀▀▀
# Use fixed inactive dim value, instead of adjusting according to window opacity.
# inactive-dim-fixed = 1.0
blur: {
method = "dual_kawase";
strength = 5.0;
deviation = 1.0;
kernel = "11x11gaussian";
}
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
# Note we don't make any guarantee about possible conflicts with other
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
# 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'",
"window_type = 'dock'",
"_GTK_FRAME_EXTENTS@:c"
];
#################################
# Corners #
#################################
# ░█▀▀░█▀▀░█▀█░█▀▀░█▀▄░█▀█░█░░░░░█▀▀░█▀▀░▀█▀░▀█▀░▀█▀░█▀█░█▀▀░█▀▀
# ░█░█░█▀▀░█░█░█▀▀░█▀▄░█▀█░█░░░░░▀▀█░█▀▀░░█░░░█░░░█░░█░█░█░█░▀▀█
# ░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀▀░░░▀▀▀░▀▀▀░░▀░░░▀░░▀▀▀░▀░▀░▀▀▀░▀▀▀
# 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 = [
"name *= 'Awesome drawin'",
"name *= 'polybar'",
"name *= 'rofi'",
"name *= 'Dunst'",
"name *= 'dmenu'",
"window_type = 'dock'",
"window_type = 'desktop'"
];
#################################
# 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"
]
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";
# Enable/disable VSync.
# vsync = false
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 override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
# mark-ovredir-focused = false
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 '_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;
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-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;
# glx-no-rebind-pixmap = false;
# Resize damaged region by a specific number of pixels.
# 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;
# xrender-sync-fence = true;
# glx-fshader-win = "";
# force-win-blend = false;
# Use X Sync fence to sync clients' draw calls, to make sure all draw
# 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;
# max-brightness = 1.0;
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
# 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: {
tooltip = { fade = true; focus = false; };
normal = { shadow = true; blur-background = false; };
dock = { shadow = true; blur-background = false;};
desktop = { shadow = true; blur-background = false; };
# Dimming bright windows so their brightness doesn't exceed this set value.
# Brightness of a window is estimated by averaging all pixels in the window,
# so this could comes with a performance hit.
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
#
# 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; }
};