Fix tag preview closing + Update autorun, default layouts, tag-preview theme

This commit is contained in:
Hydroxycarbamide 2023-03-20 13:43:31 +01:00
parent 2401cfcee2
commit 8d0abe603d
6 changed files with 55 additions and 47 deletions

View file

@ -36,6 +36,9 @@ $HOME/.fehbg
# pidof -s "$program" || setsid -f "$program"
#done >/dev/null 2>&1
setxkbmap -option compose:ralt
setxkbmap -option caps:escape
# Updates :
#notify-send -t 8000 "You have $(checkupdates | wc -l) update 📦" &
killall -9 kdeconnect-indicator

View file

@ -31,9 +31,9 @@ tag.connect_signal("request::default_layouts", function()
--awful.layout.suit.fair.horizontal,
--awful.layout.suit.spiral,
awful.layout.suit.spiral.dwindle,
--awful.layout.suit.max,
awful.layout.suit.max,
awful.layout.suit.max.fullscreen,
--awful.layout.suit.magnifier,
awful.layout.suit.magnifier,
--awful.layout.suit.corner.nw,
centered,
equal,

View file

@ -55,7 +55,7 @@ ruled.client.connect_signal("request::rules", function()
"Blueman-manager",
"Gpick",
"Kruler",
"MessageWin", -- kalarm.
"MessageWin", -- kalarm.
"Sxiv",
"Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size.
"Wpa_gui",
@ -72,9 +72,9 @@ ruled.client.connect_signal("request::rules", function()
"Event Tester", -- xev.
},
role = {
"AlarmWindow", -- Thunderbird's calendar.
"AlarmWindow", -- Thunderbird's calendar.
"ConfigManager", -- Thunderbird's about:config.
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
}
},
properties = { floating = true }

View file

@ -51,7 +51,7 @@ theme = {}
--theme.font = "JetBrainsMono Nerd Font Bold 10"
--theme.font = "RobotoMono Nerd Font Bold 11"
theme.font = "Google Sans Bold 11"
theme.switcher_font = "Google Sans Bold 12"
theme.switcher_font = "Google Sans Bold 12"
theme.taglist_font = "Font Awesome 6 Free Solid 16"
theme.icon_font = "Font Awesome 6 Free Solid 11"
theme.sidebar_font = "Font Awesome 6 Free Solid 16"
@ -234,26 +234,28 @@ theme.window_switcher_name_margins = 10 -- The margin of one
theme.window_switcher_name_valign = "center" -- How to vertically align one clients title
theme.window_switcher_name_forced_width = 200 -- The width of one title
theme.window_switcher_name_font = theme.switcher_font -- The font of all titles
theme.window_switcher_name_normal_color = colors.white -- The color of one title if the client is unfocused
theme.window_switcher_name_focus_color = colors.main_scheme -- The color of one title if the client is focused
theme.window_switcher_name_normal_color = colors
.white -- The color of one title if the client is unfocused
theme.window_switcher_name_focus_color = colors
.main_scheme -- The color of one title if the client is focused
theme.window_switcher_icon_valign = "center" -- How to vertically align the one icon
theme.window_switcher_icon_width = 0 --
theme.task_preview_widget_border_radius = 5 -- Border radius of the widget (With AA)
theme.task_preview_widget_bg = colors.container -- The bg color of the widget
theme.task_preview_widget_border_color = colors.container -- The border color of the widget
theme.task_preview_widget_border_width = 3 -- The border width of the widget
theme.task_preview_widget_margin = 10
theme.task_preview_widget_border_radius = 5 -- Border radius of the widget (With AA)
theme.task_preview_widget_bg = colors.container -- The bg color of the widget
theme.task_preview_widget_border_color = colors.container -- The border color of the widget
theme.task_preview_widget_border_width = 3 -- The border width of the widget
theme.task_preview_widget_margin = 10
theme.tag_preview_widget_border_radius = 5 -- Border radius of the widget (With AA)
theme.tag_preview_client_border_radius = 5 -- Border radius of each client in the widget (With AA)
theme.tag_preview_client_opacity = 0.5 -- Opacity of each client
theme.tag_preview_client_bg = colors.container -- The bg color of each client
theme.tag_preview_client_border_color = colors.main_scheme -- The border color of each client
theme.tag_preview_client_border_width = 3 -- The border width of each client
theme.tag_preview_widget_bg = colors.container -- The bg color of the widget
theme.tag_preview_widget_border_color = "#ffffff" -- The border color of the widget
theme.tag_preview_widget_border_width = 0 -- The border width of the widget
theme.tag_preview_widget_margin = 10 -- The margin of the widget
theme.tag_preview_widget_border_radius = 5 -- Border radius of the widget (With AA)
theme.tag_preview_client_border_radius = 5 -- Border radius of each client in the widget (With AA)
theme.tag_preview_client_opacity = 0.5 -- Opacity of each client
theme.tag_preview_client_bg = colors.container -- The bg color of each client
theme.tag_preview_client_border_color = colors.main_scheme -- The border color of each client
theme.tag_preview_client_border_width = 3 -- The border width of each client
theme.tag_preview_widget_bg = colors.container -- The bg color of the widget
theme.tag_preview_widget_border_color = "#ffffff" -- The border color of the widget
theme.tag_preview_widget_border_width = 2 -- The border width of the widget
theme.tag_preview_widget_margin = 10 -- The margin of the widget
return theme

View file

@ -53,17 +53,17 @@ return function(s)
if client.focus then
client.focus:toggle_tag(t)
end
end)
end),
--awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end),
--awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end),
awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end),
awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end)
)
-- Create a taglist widget
local taglist = awful.widget.taglist {
screen = s,
--filter = awful.widget.taglist.filter.all,
filter = function(t) return t.selected or #t:clients() > 0 end, -- Show only used Tags
filter = awful.widget.taglist.filter.all,
--filter = function(t) return t.selected or #t:clients() > 0 end, -- Show only used Tags
buttons = taglist_buttons,
layout = {
spacing = dpi(8),
@ -80,13 +80,10 @@ return function(s)
update_tag(self, c3, index)
self:connect_signal('mouse::enter', function()
-- BLING: Only show widget when there are clients in the tag
if #c3:clients() > 0 then
-- BLING: Update the widget with the new tag
awesome.emit_signal("bling::tag_preview::update", c3)
-- BLING: Show the widget
awesome.emit_signal("bling::tag_preview::visibility", s, true)
end
-- BLING: Update the widget with the new tag
awesome.emit_signal("bling::tag_preview::update", c3)
-- BLING: Show the widget
awesome.emit_signal("bling::tag_preview::visibility", s, true)
if self.bg ~= '#ff0000' then
self.backup = self.bg
@ -96,7 +93,7 @@ return function(s)
end)
self:connect_signal('mouse::leave', function()
-- BLING: Turn the widget off
awesome.emit_signal("bling::tag_preview::visibility", s, false)
--awesome.emit_signal("bling::tag_preview::visibility", s, false)
if self.has_backup then self.bg = self.backup end
end)
@ -128,6 +125,11 @@ return function(s)
widget = wibox.container.margin
}
tags:connect_signal('mouse::leave', function()
-- BLING: Turn the widget off
awesome.emit_signal("bling::tag_preview::visibility", s, false)
end)
--return taglist
return tags
end

View file

@ -4,13 +4,13 @@ local beautiful = require "beautiful"
local bling = require "libs.bling"
bling.widget.tag_preview.enable {
show_client_content = true, -- Whether or not to show the client content
x = 10, -- The x-coord of the popup
y = 10, -- The y-coord of the popup
scale = 0.25, -- The scale of the previews compared to the screen
honor_padding = true, -- Honor padding when creating widget size
honor_workarea = true, -- Honor work area when creating widget size
placement_fn = function(c) -- Place the widget using awful.placement (this overrides x & y)
show_client_content = true, -- Whether or not to show the client content
x = 10, -- The x-coord of the popup
y = 10, -- The y-coord of the popup
scale = 0.25, -- The scale of the previews compared to the screen
honor_padding = true, -- Honor padding when creating widget size
honor_workarea = true, -- Honor work area when creating widget size
placement_fn = function(c) -- Place the widget using awful.placement (this overrides x & y)
awful.placement.bottom_left(c, {
margins = {
bottom = 45,
@ -19,10 +19,11 @@ bling.widget.tag_preview.enable {
parent = awful.screen.focused()
})
end,
background_widget = wibox.widget { -- Set a background image (like a wallpaper) for the widget
image = beautiful.wallpaper,
background_widget = wibox.widget { -- Set a background image (like a wallpaper) for the widget
image = "/home/eric/Pictures/wallpapers/96300930_p0_x4_esrgan.jpg",
horizontal_fit_policy = "fit",
vertical_fit_policy = "fit",
widget = wibox.widget.imagebox
widget = wibox.widget.imagebox
}
}
}