getting ready for maximized clients effects

This commit is contained in:
Chris Cochrun 2022-02-01 10:03:31 -06:00
parent 131bb57ac3
commit 5e049104f8
2 changed files with 43 additions and 15 deletions

View file

@ -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
@ -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"
@ -699,6 +704,29 @@
(set c.shape (fn [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.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)))

View file

@ -1,5 +1,5 @@
# Corners
corner-radius = 14.0;
corner-radius = 0.0;
rounded-corners-exclude = [
#"window_type = 'normal'",
"class_g = 'awesome'",