"Invert the `default' face (swap its background and foreground).
Effectively a very simple light/dark theme toggle switch."
(interactive)
- (invert-face 'default)
- (when (display-graphic-p)
- (invert-face 'mode-line)))
+ (invert-face 'default (selected-frame))
+ (invert-face 'mode-line (selected-frame)))
(defun b/export-frame ()
(interactive)
;;; General key bindings
(global-set-key (kbd "C-a") #'b/move-indentation-or-beginning-of-line)
-(global-set-key (kbd "C-c a i") #'ielm)
+(global-set-key (kbd "C-c i") #'ielm)
(global-set-key (kbd "C-c d") #'b/duplicate-line-or-region)
(global-set-key (kbd "C-c j") #'b/join-line-top)
(global-set-key (kbd "C-S-j") #'b/join-line-top)
-(global-set-key (kbd "C-c s") #'b/*scratch*)
+(global-set-key (kbd "C-c s c") #'b/*scratch*)
(global-set-key (kbd "C-c x") #'execute-extended-command)
(global-set-key (kbd "C-c v") #'b/invert-default-face)
scpaste-scp-destination "p:~"))
(autoload 'scpaste "scpaste" nil t)
(autoload 'scpaste-region "scpaste" nil t)
-(global-set-key (kbd "C-c a p p") #'scpaste)
-(global-set-key (kbd "C-c a p r") #'scpaste-region)
+(global-set-key (kbd "C-c p p") #'scpaste)
+(global-set-key (kbd "C-c p r") #'scpaste-region)
\f
;;; Editing
(setq
eww-download-directory
(file-name-as-directory (getenv "XDG_DOWNLOAD_DIR"))))
-(global-set-key (kbd "C-c a e w") #'eww)
+(global-set-key (kbd "C-c e w") #'eww)
;; (with-eval-after-load 'org-ref
;; (setq
;; org-ref-bibliography-notes "~/usr/org/notes.org"
;; org-ref-pdf-directory "~/usr/org/bibtex-pdfs/"))
-(when (featurep 'display-fill-column-indicator)
- (run-with-idle-timer
- 0.2 nil #'require 'display-fill-column-indicator)
- (with-eval-after-load 'display-fill-column-indicator
- (global-display-fill-column-indicator-mode 1)))
+(run-with-idle-timer
+ 0.2 nil #'require 'display-fill-column-indicator nil 'noerror)
+(with-eval-after-load 'display-fill-column-indicator
+ (global-display-fill-column-indicator-mode 1))
(with-eval-after-load 'window
(setq split-width-threshold 150)