-(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)))