summaryrefslogtreecommitdiff
path: root/.config/emacs/modules/bd--windows.el
diff options
context:
space:
mode:
Diffstat (limited to '.config/emacs/modules/bd--windows.el')
-rw-r--r--.config/emacs/modules/bd--windows.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/.config/emacs/modules/bd--windows.el b/.config/emacs/modules/bd--windows.el
index 81ea1df..b92eb1a 100644
--- a/.config/emacs/modules/bd--windows.el
+++ b/.config/emacs/modules/bd--windows.el
@@ -42,12 +42,17 @@ dedicated buffer will never be automatically orphaned."
(max lower-bound (min value upper-bound)))
(defun set-frame-alpha (value)
- "Sets the transparency of the frame background. 0=transparent/100=opaque"
+ "Sets the transparency of the frame background. 0=transparent/100=opaque
+Due to a bug with guix-packaged emacs, only uses true-transparency on wayland."
(interactive "nTransparency Value (30 - 100 opaque): ")
(setq value (bd/clamp 30 100 value))
- (set-frame-parameter (selected-frame) 'alpha `(,value . ,value))
+ (if (equal display "wayland")
+ (set-frame-parameter (selected-frame) 'alpha-background value)
+ (set-frame-parameter (selected-frame) 'alpha `(,value . ,value)))
(message "Alpha set to %d" value))
-(add-to-list 'default-frame-alist '(alpha . (82 . 82)))
+(if (equal display "wayland")
+ (add-to-list 'default-frame-alist '(alpha-background . 66))
+ (add-to-list 'default-frame-alist '(alpha . (82 . 82))))
(require 'project)