diff --git a/user/.config/awesome/core/autostart.lua b/user/.config/awesome/core/autostart.lua index d81aa55bc..83d9874cd 100644 --- a/user/.config/awesome/core/autostart.lua +++ b/user/.config/awesome/core/autostart.lua @@ -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 &") diff --git a/user/.config/awesome/core/bar/bar.lua b/user/.config/awesome/core/bar/bar.lua index f0fc61324..b5361447b 100644 --- a/user/.config/awesome/core/bar/bar.lua +++ b/user/.config/awesome/core/bar/bar.lua @@ -1,4 +1,3 @@ -local gears = require("gears") local wibox = require("wibox") local awful = require("awful") local theme = require("theme.gruvbox.theme") diff --git a/user/.config/awesome/core/bindings.lua b/user/.config/awesome/core/bindings.lua index 5419f4e21..9f0517921 100644 --- a/user/.config/awesome/core/bindings.lua +++ b/user/.config/awesome/core/bindings.lua @@ -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") diff --git a/user/.config/awesome/core/focus.lua b/user/.config/awesome/core/focus.lua deleted file mode 100644 index 6befc60c9..000000000 --- a/user/.config/awesome/core/focus.lua +++ /dev/null @@ -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 diff --git a/user/.config/awesome/core/layouts.lua b/user/.config/awesome/core/layouts.lua index 545909e65..03293e180 100644 --- a/user/.config/awesome/core/layouts.lua +++ b/user/.config/awesome/core/layouts.lua @@ -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. diff --git a/user/.config/awesome/core/rules.lua b/user/.config/awesome/core/rules.lua index 9ae642cc2..fe20489ef 100644 --- a/user/.config/awesome/core/rules.lua +++ b/user/.config/awesome/core/rules.lua @@ -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 = "" } diff --git a/user/.config/awesome/core/signals.lua b/user/.config/awesome/core/signals.lua new file mode 100644 index 000000000..02fec6bc1 --- /dev/null +++ b/user/.config/awesome/core/signals.lua @@ -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) diff --git a/user/.config/awesome/rc.lua b/user/.config/awesome/rc.lua index b8b545665..38590935e 100644 --- a/user/.config/awesome/rc.lua +++ b/user/.config/awesome/rc.lua @@ -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") diff --git a/user/.config/awesome/theme/gruvbox/theme.lua b/user/.config/awesome/theme/gruvbox/theme.lua index b7aca4fea..540559d0e 100644 --- a/user/.config/awesome/theme/gruvbox/theme.lua +++ b/user/.config/awesome/theme/gruvbox/theme.lua @@ -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"