summaryrefslogtreecommitdiff
path: root/.config/emacs/modules/bd--utility.el
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-03-18 00:08:23 -0400
committerbd <bdunahu@operationnull.com>2025-03-18 00:08:23 -0400
commit3145b31dcff940ed2ef26d1a34401d8c4eff9ba3 (patch)
tree73e2e702f7bbd8123e508e8e48cf82d62054f454 /.config/emacs/modules/bd--utility.el
parent82aa2fb26843f4ab95f472ab6a7fc126ab5baf1c (diff)
Add midnight mode to auto-kill idle browser windows
Diffstat (limited to '.config/emacs/modules/bd--utility.el')
-rw-r--r--.config/emacs/modules/bd--utility.el15
1 files changed, 11 insertions, 4 deletions
diff --git a/.config/emacs/modules/bd--utility.el b/.config/emacs/modules/bd--utility.el
index b4fa87f..161549e 100644
--- a/.config/emacs/modules/bd--utility.el
+++ b/.config/emacs/modules/bd--utility.el
@@ -8,8 +8,8 @@
(defun bd/set-frame-alpha (value)
"Set the transparency of the frame background to VALUE. 0=transparent/100=opaque."
- (interactive "nTransparency Value (30 - 100 opaque): ")
- (setq value (max 30 (min value 100)))
+ (interactive "nTransparency Value (50 - 100 opaque): ")
+ (setq value (max 50 (min value 100)))
(set-frame-parameter (selected-frame) 'alpha `(,value . ,value))
(message "Alpha set to %d" value))
@@ -19,7 +19,9 @@ ARG can be one of the following:
- nil: set the most recent wallpaper
- directory: set a random image from the directory
-- file: set the specified file"
+- file: set the specified file
+
+TODO default folder"
(interactive "f")
(let ((wall (expand-file-name "~/wf/wall/current")))
(when arg
@@ -131,11 +133,16 @@ ARG can be one of the following:
(not (or (bd/buffer-exwm-p buf)
(bd/buffer-text-p buf)
(bd/buffer-prog-p buf)
- (bd/buffer-shell-p buf)
+ (bd/buffer-shell-p buf)
(bd/buffer-scratch-p buf)
(bd/buffer-dired-p buf)
(bd/buffer-irc-p buf))))
+(defun bd/kill-quietly (proc)
+ "Kill PROC quietly."
+ (ignore-errors (cond ((bufferp proc) (kill-buffer proc))
+ ((stringp proc) (interrupt-process proc)))))
+
(provide 'bd--utility)
;;; bd--utility.el ends here