diff options
-rw-r--r-- | .emacs.d/init.el | 10 | ||||
-rw-r--r-- | .tmux.conf | 7 |
2 files changed, 17 insertions, 0 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index b5ab6462..6884069e 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -129,6 +129,16 @@ windows side-by-side in the frame." :height (if scale-up-p 151 120))))))) (add-to-list 'window-size-change-functions #'spw/maybe-scale-basic-faces) +;; `frame--current-backround-mode' assumes that TERM=screen-256color means a +;; dark background. But if we're in tmux then I can always have dark-on-light +;; by typing C-\ W (see ~/.tmux.conf). +(defun spw/set-tmux-background-mode (frame) + (when (cl-find-if (apply-partially #'string-prefix-p "TMUX=") + (frame-parameter frame 'environment)) + (let ((frame-background-mode 'light)) + (frame-set-background-mode frame)))) +(add-to-list 'after-make-frame-functions #'spw/set-tmux-background-mode) + (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -59,6 +59,13 @@ bind e run-shell tmuxmacs # bind N split-window -v -d "emacsclient -t -a '' -e '(switch-to-buffer \"*scratch*\")'" \; swap-pane -D \; resize-pane -t 1 -y 12 \; send c d Space / s r v / f t p - m a s t e r . d e b i a n . o r g / q u e u e / n e w Enter d a k Space p r o c e s s - n e w Space # bind N send c d Space / s r v / f t p - m a s t e r . d e b i a n . o r g / q u e u e / n e w Enter d a k Space p r o c e s s - n e w Space +# Obtain dark-on-light when the terminal emulator isn't already dark-on-light, +# as it is on my own machines. We don't just set these styles unconditionally +# because we want bg=#FFFFF6 to show through on my own machines. Typing C-\ W +# is faster than trying to configure an unfamiliar local terminal emulator. +bind W set -g window-style 'fg=black,bg=brightwhite'\;\ + set -g window-active-style 'fg=black,bg=brightwhite' + # ---- status bar ---- set -g status-position top |