added rounded corners and gaps

This commit is contained in:
Clay Gomera 2022-09-14 23:30:48 -04:00
parent 9e55a355ac
commit 2daafdd93c
9 changed files with 19 additions and 104 deletions

View file

@ -1,5 +1,4 @@
local awful = require("awful") local awful = require("awful")
awful.util.spawn_with_shell("/usr/bin/emacs --daemon &")
awful.util.spawn_with_shell("lxpolkit &") awful.util.spawn_with_shell("lxpolkit &")
awful.util.spawn_with_shell("$HOME/.fehbg &") awful.util.spawn_with_shell("$HOME/.fehbg &")
awful.util.spawn_with_shell("unclutter --hide-on-touch &") awful.util.spawn_with_shell("unclutter --hide-on-touch &")

View file

@ -1,4 +1,3 @@
local gears = require("gears")
local wibox = require("wibox") local wibox = require("wibox")
local awful = require("awful") local awful = require("awful")
local theme = require("theme.gruvbox.theme") local theme = require("theme.gruvbox.theme")

View file

@ -1,6 +1,4 @@
local gears = require("gears")
local awful = require("awful") local awful = require("awful")
local wibox = require("wibox")
local hotkeys_popup = require("awful.hotkeys_popup"); require("awful.hotkeys_popup.keys") local hotkeys_popup = require("awful.hotkeys_popup"); require("awful.hotkeys_popup.keys")
local apps = require("core.apps") local apps = require("core.apps")
require("awful.autofocus") require("awful.autofocus")

View file

@ -1,86 +0,0 @@
--------------------------------------------------------------> dependencies ;
local gears = require('gears')
-----------------------------------------------------------------> locals -- ;
local stay_classes = {
awesome
-- taskbar
}
--+ class names defined here would insist micky stays where
--> he is at.
-------------------------------------------------------------------> methods ;
local function set_contains(set, key)
return set[key] ~= nil
end
local micky = function ()
gears.timer.weak_start_new(0.05, function()
local c = client.focus
local cgeometry = c:geometry()
mouse.coords({
x = cgeometry.x + cgeometry.width / 2,
y = cgeometry.y + cgeometry.height / 2
})
end)
end
--+ relocate mouse after slightly waiting for focus to
--> complete. you can adjust the timer if you are on a slow
--> cpu to give more time for the client to appear.
---------------------------------------------------------------------> signal ;
client.connect_signal("focus", function(c)
local focused_client = c
--+ client the focus is going towards
gears.timer.weak_start_new(0.15, function()
local client_under_mouse = mouse.current_client
local should_stay = set_contains(stay_classes, client_under_mouse.class)
if should_stay then return false end
--+ exclusions
-- if compare_coords(focused_client) then return false end
--+ avoid tabs
if not client_under_mouse then
micky()
return false
end
--+ nothing under the mouse, move directly
if focused_client:geometry().x ~= client_under_mouse:geometry().x
or focused_client:geometry().y ~= client_under_mouse:geometry().y
then
micky()
return false
end
--+ no need to relocate the mouse if already over
--> the client.
end)
--+ mouse.current_client would point to the previous
--> client without the callback.
end)
client.connect_signal("unmanage", function(c)
local client_under_mouse = mouse.current_client
if not client_under_mouse then
return false
end
if client_under_mouse ~= c then
micky()
end
--+ no need for the callback here.
end)
---------------------------------------------------------------------> export ;
return micky

View file

@ -1,4 +1,3 @@
local gears = require("gears")
local awful = require("awful") local awful = require("awful")
-- {{{ Tag layout -- {{{ Tag layout
-- Table of layouts to cover with awful.layout.inc, order matters. -- Table of layouts to cover with awful.layout.inc, order matters.

View file

@ -46,8 +46,7 @@ ruled.client.connect_signal("request::rules", function()
properties = { floating = true } properties = { floating = true }
} }
-- Set Firefox to always map on the tag named "2" on screen 1. -- TAG 1
-- E TAG
ruled.client.append_rule { ruled.client.append_rule {
rule_any = { class = { rule_any = { class = {
"Emacs", "Emacs",
@ -57,12 +56,12 @@ ruled.client.connect_signal("request::rules", function()
}, },
properties = { tag = "" }, properties = { tag = "" },
} }
-- F TAG -- TAG 2
ruled.client.append_rule { ruled.client.append_rule {
rule = { class = "vifm" }, rule = { class = "vifm" },
properties = { tag = "" }, properties = { tag = "" },
} }
-- W TAG -- TAG 3
ruled.client.append_rule { ruled.client.append_rule {
rule_any = { class = { rule_any = { class = {
"Brave-browser", "Brave-browser",
@ -74,12 +73,12 @@ ruled.client.connect_signal("request::rules", function()
}, },
properties = { tag = "" } properties = { tag = "" }
} }
-- C TAG -- TAG 4
ruled.client.append_rule { ruled.client.append_rule {
rule = { class = "gomuks" }, rule = { class = "gomuks" },
properties = { tag = "" } properties = { tag = "" }
} }
-- M TAG -- TAG 5
ruled.client.append_rule { ruled.client.append_rule {
rule_any = { class = { rule_any = { class = {
"cmus", "cmus",
@ -91,7 +90,7 @@ ruled.client.connect_signal("request::rules", function()
}, },
properties = { tag = "" } properties = { tag = "" }
} }
-- V TAG -- TAG 6
ruled.client.append_rule { ruled.client.append_rule {
rule_any = { class = { rule_any = { class = {
"kdenlive", "kdenlive",
@ -105,7 +104,7 @@ ruled.client.connect_signal("request::rules", function()
}, },
properties = { tag = "" } properties = { tag = "" }
} }
-- X TAG -- TAG 7
ruled.client.append_rule { ruled.client.append_rule {
rule_any = { class = { rule_any = { class = {
"Qjackctl", "Qjackctl",
@ -120,7 +119,7 @@ ruled.client.connect_signal("request::rules", function()
}, },
properties = { tag = "" } properties = { tag = "" }
} }
-- D TAG -- TAG 8
ruled.client.append_rule { ruled.client.append_rule {
rule_any = { class = { rule_any = { class = {
"DesktopEditors", "DesktopEditors",
@ -129,7 +128,7 @@ ruled.client.connect_signal("request::rules", function()
}, },
properties = { tag = "" } properties = { tag = "" }
} }
-- G TAG -- TAG 9
ruled.client.append_rule { ruled.client.append_rule {
rule = { class = "retroarch" }, rule = { class = "retroarch" },
properties = { tag = "" } properties = { tag = "" }

View file

@ -0,0 +1,7 @@
local gears = require("gears")
client.connect_signal("manage", function (c)
c.shape = function(cr,w,h)
gears.shape.rounded_rect(cr,w,h,10)
end
end)

View file

@ -2,9 +2,9 @@ require("core.error_handling")
require("core.apps") require("core.apps")
require("theme.init") require("theme.init")
require("core.layouts") require("core.layouts")
require("core.signals")
require("core.bar.bar") require("core.bar.bar")
require("core.bindings") require("core.bindings")
require("core.rules") require("core.rules")
require("core.notif") require("core.notif")
require("core.autostart") require("core.autostart")
require("core.focus")

View file

@ -33,8 +33,8 @@ theme.bg_urgent = "#a89984"
-- }}} -- }}}
-- {{{ Borders -- {{{ Borders
theme.useless_gap = dpi(0) theme.useless_gap = dpi(5)
theme.border_width = dpi(0.5) theme.border_width = dpi(2)
theme.border_normal = "#665c54" theme.border_normal = "#665c54"
theme.border_focus = "#9d0006" theme.border_focus = "#9d0006"
theme.border_marked = "#9d0006" theme.border_marked = "#9d0006"