diff options
Diffstat (limited to '.config/emacs/modules/bd--essential-windowing.el')
-rw-r--r-- | .config/emacs/modules/bd--essential-windowing.el | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/.config/emacs/modules/bd--essential-windowing.el b/.config/emacs/modules/bd--essential-windowing.el new file mode 100644 index 0000000..bba3dee --- /dev/null +++ b/.config/emacs/modules/bd--essential-windowing.el @@ -0,0 +1,30 @@ +;; -*- lexical-binding: t; -*- + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; This file contains sane windowing settings for any ;; +;; environment type. ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + +(menu-bar-mode -1) +(tool-bar-mode -1) +(scroll-bar-mode -1) + +;; allow one side window per side of frame +(setopt window-sides-slots '(1 1 1 1)) + +;; alpha +(defun bd/clamp (lower-bound upper-bound value) + (max lower-bound (min value upper-bound))) + +(defun set-frame-alpha (value) + "Sets the transparency of the frame background. 0=transparent/100=opaque" + (interactive "nTransparency Value (30 - 100 opaque): ") + (setq value (bd/clamp 30 100 value)) + (set-frame-parameter (selected-frame) 'alpha `(,value . ,value)) + (message "Alpha set to %d" value)) +(add-to-list 'default-frame-alist '(alpha . (82 . 82))) + + +(provide 'bd--essential-windowing) |