X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/188c64b591f6341844f4bc6906e8cc9b23ad3b14..05d1c1ac3b62f9b991f5fc11369715c52311d9f1:/.emacs.d/init.el diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 8d05845..7f6ef96 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -418,12 +418,19 @@ Make N (default: 1) copies of the current line or region." (dotimes (_ (abs n1)) (insert text)))))) -(defun b/invert-default-face () - "Invert the `default' face (swap its background and foreground). -Effectively a very simple light/dark theme toggle switch." - (interactive) - (invert-face 'default (selected-frame)) - (invert-face 'mode-line (selected-frame))) +(defun b/invert-default-face (arg) + "Invert the `default' and `mode-line' faces for the current frame. +Swap the background and foreground for the two `default' and +`mode-line' faces, effectively acting like a simple light/dark +theme toggle. If prefix argument ARG is given, invert the faces +for all frames." + (interactive "P") + (let ((frame (unless arg + (selected-frame)))) + (invert-face 'default frame) + (invert-face 'mode-line frame)) + (when (fboundp #'exwm-systemtray--refresh-background-color) + (exwm-systemtray--refresh-background-color 'remap))) (defun b/export-frame () (interactive) @@ -484,8 +491,14 @@ Effectively a very simple light/dark theme toggle switch." (expand-file-name (convert-standard-filename "lisp") user-emacs-directory)) -(when (member (system-name) '("chaman")) - (require 'bandali-exwm)) +(when + (and + (display-graphic-p) + ;; we're not running in another WM/DE + (not (getenv "XDG_CURRENT_DESKTOP")) + (member (system-name) '("chaman"))) + (require 'bandali-exwm) + (global-set-key (kbd "C-x b") #'exwm-workspace-switch-to-buffer)) (require 'bandali-org)