From 5e049104f8f1275b723635f4a966a78195f3cd35 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 1 Feb 2022 10:03:31 -0600 Subject: [PATCH] getting ready for maximized clients effects --- awesome/init.fnl | 56 ++++++++++++++++++++++++++++++++++++------------ picom.conf | 2 +- 2 files changed, 43 insertions(+), 15 deletions(-) diff --git a/awesome/init.fnl b/awesome/init.fnl index 3fe6d52..71f27f2 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -87,12 +87,12 @@ (if (= "syl\n" stdout) (global laptop true) (global laptop false)))) -(local laptop true) +(local laptop false) ;; Table of layouts to cover with awful.layout.inc, order matters. (set awful.layout.layouts [ - bling.layout.mstab awful.layout.suit.tile + bling.layout.mstab bling.layout.centered awful.layout.suit.floating ;; awful.layout.suit.tile.left @@ -368,14 +368,14 @@ 2 s.brighttext 3 s.brightspace :layout wibox.layout.fixed.horizontal}) - :widget wibox.container.margin - :left (dpi 5)} - :widget wibox.container.background - :shape gears.shape.rounded_bar - :bg beautiful.transparent - :fg beautiful.base0B} - :widget wibox.container.margin - :right (dpi 5)}) + :widget wibox.container.margin + :left (dpi 5)} + :widget wibox.container.background + :shape gears.shape.rounded_bar + :bg beautiful.transparent + :fg beautiful.base0B} + :widget wibox.container.margin + :right (dpi 5)}) (set s.volumetext (awful.widget.watch "pamixer --get-volume-human" 0.5)) (set s.mictext (awful.widget.watch "pamixer --default-source --get-volume-human" 1)) @@ -532,7 +532,7 @@ 1 { :layout wibox.layout.fixed.horizontal ;;1 s.pingwidget - 1 s.brightwidget + 1 (if laptop s.brightwidget s.pingwidget) 2 s.mailwidget 3 s.memwidget 4 s.cpuwidget @@ -549,6 +549,11 @@ (local yoffset (dpi 45)) ;; variables to be used for placing the wibox (local xoffset (dpi 16)) ;; Create the wibox + + ;; (if (= s.index 1) + ;; (naughty.notify {:title "screen 1" :text "yes!"}) + ;; (naughty.notify {:title "screen 1" :text "not"}) + ;; ) (set s.mywibox (wibox {;; since we are using a wibox we have a lot we need to set ;; as opposed to what we normally need to do with a wibar :position "bottom" @@ -693,11 +698,34 @@ ;; make fullscreen clients no longer rounded and back afterwards (client.connect_signal "property::fullscreen" (fn [c] - (if c.fullscreen + (if c.fullscreen + (set c.shape (fn [cr w h] + (gears.shape.rectangle cr w h))) (set c.shape (fn [cr w h] - (gears.shape.rectangle cr w h))) + (gears.shape.rounded_rect cr w h (dpi 15))))))) + +(client.connect_signal "property::maximized" + (fn [c] + (when c.maximized (set c.shape (fn [cr w h] - (gears.shape.rounded_rect cr w h (dpi 15))))))) + (gears.shape.rectangle cr w h))) + + ;; (let [s (c.screen)] + ;; (naughty.notify { + ;; :text "IDK!" + ;; }) + ;; (set s.mywibox { + ;; :x 0 + ;; :y s.geometry.height + ;; :width s.geometry.width + ;; :shape gears.shape.rounded_bar + ;; })) + + ) + + (if (not c.maximized) + (set c.shape (fn [cr w h] + (gears.shape.rounded_rect cr w h (dpi 15))))))) (client.connect_signal "focus" (fn [c] (set c.border_color beautiful.border_focus))) (client.connect_signal "unfocus" (fn [c] (set c.border_color beautiful.border_normal))) diff --git a/picom.conf b/picom.conf index 64908cd..7cd1b2d 100644 --- a/picom.conf +++ b/picom.conf @@ -1,5 +1,5 @@ # Corners -corner-radius = 14.0; +corner-radius = 0.0; rounded-corners-exclude = [ #"window_type = 'normal'", "class_g = 'awesome'",