Remove rounded corners around the stumpwm modeline

- Redefine the ‘stumpwm::make-mode-line-window’ function to set the
  ‘_NET_WM_WINDOW_TYPE’ property to ‘_NET_WM_WINDOW_TYPE_DOCK’ so that it can be
  matched by window type.

- Specify that for picom any “dock” type windows should be excluded from getting
  rounded corners.

- Add ‘rounded-corners-exclude’ initializer for the ‘home-picom-configuration’.
This commit is contained in:
Tom Willemse 2024-07-01 14:17:30 -07:00
parent 53cc05214f
commit eec1396d42
3 changed files with 25 additions and 0 deletions

View file

@ -242,6 +242,8 @@
(wintypes
'((dnd (shadow . #f))
(dock (shadow . #f))))
(rounded-corners-exclude
'("window_type *= \\\"dock\\\""))
(corner-radius 15)
(blur-background #f)
(blur-background-frame #f)

View file

@ -113,6 +113,9 @@
(wintypes
(alist '())
"Window-type-specific settings")
(rounded-corners-exclude
(list '())
"Specify a list of conditions of windows that should have no rounded corners")
(corner-radius
(number 0)
"Sets the radius of rounded window corners")

View file

@ -93,6 +93,26 @@ after it has been unlocked."
"^*5^B[VPN]^b^n "
""))
"%d "))
;;; Redefinition of the make mode-line window to add the Dock window type.
(defun stumpwm::make-mode-line-window (screen)
"Create a window suitable for a modeline."
(let ((window (xlib:create-window
:parent (screen-root screen)
:x 0 :y 0 :width 1 :height 1
:background (stumpwm::alloc-color screen *mode-line-background-color*)
:border (stumpwm::alloc-color screen *mode-line-border-color*)
:border-width *mode-line-border-width*
;; You can click the modeline
:event-mask (xlib:make-event-mask :button-press :exposure)
;; these windows are not controlled by the window manager
:override-redirect :on)))
(xlib:change-property
window :_NET_WM_WINDOW_TYPE
(list (xlib:find-atom *display* :_NET_WM_WINDOW_TYPE_DOCK))
:atom 32)
window))
(mode-line)
;;; Screenshots