added rounded corners and gaps
This commit is contained in:
parent
9e55a355ac
commit
2daafdd93c
9 changed files with 19 additions and 104 deletions
|
@ -1,5 +1,4 @@
|
|||
local awful = require("awful")
|
||||
awful.util.spawn_with_shell("/usr/bin/emacs --daemon &")
|
||||
awful.util.spawn_with_shell("lxpolkit &")
|
||||
awful.util.spawn_with_shell("$HOME/.fehbg &")
|
||||
awful.util.spawn_with_shell("unclutter --hide-on-touch &")
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
local gears = require("gears")
|
||||
local wibox = require("wibox")
|
||||
local awful = require("awful")
|
||||
local theme = require("theme.gruvbox.theme")
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
local gears = require("gears")
|
||||
local awful = require("awful")
|
||||
local wibox = require("wibox")
|
||||
local hotkeys_popup = require("awful.hotkeys_popup"); require("awful.hotkeys_popup.keys")
|
||||
local apps = require("core.apps")
|
||||
require("awful.autofocus")
|
||||
|
|
|
@ -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
|
|
@ -1,4 +1,3 @@
|
|||
local gears = require("gears")
|
||||
local awful = require("awful")
|
||||
-- {{{ Tag layout
|
||||
-- Table of layouts to cover with awful.layout.inc, order matters.
|
||||
|
|
|
@ -46,8 +46,7 @@ ruled.client.connect_signal("request::rules", function()
|
|||
properties = { floating = true }
|
||||
}
|
||||
|
||||
-- Set Firefox to always map on the tag named "2" on screen 1.
|
||||
-- E TAG
|
||||
-- TAG 1
|
||||
ruled.client.append_rule {
|
||||
rule_any = { class = {
|
||||
"Emacs",
|
||||
|
@ -57,12 +56,12 @@ ruled.client.connect_signal("request::rules", function()
|
|||
},
|
||||
properties = { tag = "" },
|
||||
}
|
||||
-- F TAG
|
||||
-- TAG 2
|
||||
ruled.client.append_rule {
|
||||
rule = { class = "vifm" },
|
||||
properties = { tag = "" },
|
||||
}
|
||||
-- W TAG
|
||||
-- TAG 3
|
||||
ruled.client.append_rule {
|
||||
rule_any = { class = {
|
||||
"Brave-browser",
|
||||
|
@ -74,12 +73,12 @@ ruled.client.connect_signal("request::rules", function()
|
|||
},
|
||||
properties = { tag = "" }
|
||||
}
|
||||
-- C TAG
|
||||
-- TAG 4
|
||||
ruled.client.append_rule {
|
||||
rule = { class = "gomuks" },
|
||||
properties = { tag = "" }
|
||||
}
|
||||
-- M TAG
|
||||
-- TAG 5
|
||||
ruled.client.append_rule {
|
||||
rule_any = { class = {
|
||||
"cmus",
|
||||
|
@ -91,7 +90,7 @@ ruled.client.connect_signal("request::rules", function()
|
|||
},
|
||||
properties = { tag = "" }
|
||||
}
|
||||
-- V TAG
|
||||
-- TAG 6
|
||||
ruled.client.append_rule {
|
||||
rule_any = { class = {
|
||||
"kdenlive",
|
||||
|
@ -105,7 +104,7 @@ ruled.client.connect_signal("request::rules", function()
|
|||
},
|
||||
properties = { tag = "" }
|
||||
}
|
||||
-- X TAG
|
||||
-- TAG 7
|
||||
ruled.client.append_rule {
|
||||
rule_any = { class = {
|
||||
"Qjackctl",
|
||||
|
@ -120,7 +119,7 @@ ruled.client.connect_signal("request::rules", function()
|
|||
},
|
||||
properties = { tag = "" }
|
||||
}
|
||||
-- D TAG
|
||||
-- TAG 8
|
||||
ruled.client.append_rule {
|
||||
rule_any = { class = {
|
||||
"DesktopEditors",
|
||||
|
@ -129,7 +128,7 @@ ruled.client.connect_signal("request::rules", function()
|
|||
},
|
||||
properties = { tag = "" }
|
||||
}
|
||||
-- G TAG
|
||||
-- TAG 9
|
||||
ruled.client.append_rule {
|
||||
rule = { class = "retroarch" },
|
||||
properties = { tag = "" }
|
||||
|
|
7
user/.config/awesome/core/signals.lua
Normal file
7
user/.config/awesome/core/signals.lua
Normal 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)
|
|
@ -2,9 +2,9 @@ require("core.error_handling")
|
|||
require("core.apps")
|
||||
require("theme.init")
|
||||
require("core.layouts")
|
||||
require("core.signals")
|
||||
require("core.bar.bar")
|
||||
require("core.bindings")
|
||||
require("core.rules")
|
||||
require("core.notif")
|
||||
require("core.autostart")
|
||||
require("core.focus")
|
||||
|
|
|
@ -33,8 +33,8 @@ theme.bg_urgent = "#a89984"
|
|||
-- }}}
|
||||
|
||||
-- {{{ Borders
|
||||
theme.useless_gap = dpi(0)
|
||||
theme.border_width = dpi(0.5)
|
||||
theme.useless_gap = dpi(5)
|
||||
theme.border_width = dpi(2)
|
||||
theme.border_normal = "#665c54"
|
||||
theme.border_focus = "#9d0006"
|
||||
theme.border_marked = "#9d0006"
|
||||
|
|
Loading…
Reference in a new issue