From 1ced565816120bfcc351daf9fc3a4e851162e3b7 Mon Sep 17 00:00:00 2001 From: bd Date: Wed, 10 Jan 2024 19:44:21 -0700 Subject: Initial commit of new repository structure --- .config/emacs/modules/bd--essential-windowing.el | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .config/emacs/modules/bd--essential-windowing.el (limited to '.config/emacs/modules/bd--essential-windowing.el') 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) -- cgit v1.2.3