* .emacs.d/init.el (b/*scratch*): Invert `mode-line' when `display-graphic-p'.
[~bandali/configs] / .emacs.d / init.el
index ce05ab4..60f5f0d 100644 (file)
  resize-mini-windows t
  mode-line-compact t
  ;; mouse-autoselect-window t
+ scroll-conservatively 101
  scroll-preserve-screen-position 1
  ;; i don't feel like jumping out of my chair every now and again;
  ;; so...don't *BEEP* at me, emacs =)
@@ -510,7 +511,9 @@ Make N (default: 1) copies of the current line or region."
   "Invert the `default' face (swap its background and foreground).
 Effectively a very simple light/dark theme toggle switch."
   (interactive)
-  (invert-face 'default))
+  (invert-face 'default)
+  (when (display-graphic-p)
+    (invert-face 'mode-line)))
 
 \f
 ;;; General key bindings
@@ -786,6 +789,12 @@ Effectively a very simple light/dark theme toggle switch."
 (add-hook 'tex-mode-hook #'auto-fill-mode)
 (add-hook 'tex-mode-hook #'flyspell-mode)
 
+(run-with-idle-timer 0.5 nil #'require 'cmake-mode)
+(with-eval-after-load 'cmake-mode
+  (setq cmake-tab-width 4)
+  (add-to-list 'load-path (b/lisp "cmake-font-lock"))
+  (run-with-idle-timer 0.5 nil #'require 'cmake-font-lock))
+
 \f
 ;;; Emacs enhancements & auxiliary packages
 
@@ -954,6 +963,21 @@ Effectively a very simple light/dark theme toggle switch."
 (with-eval-after-load 'emms
   (setq emms-directory (b/var "emms")))
 
+(add-to-list 'load-path (b/lisp "ffs"))
+(run-with-idle-timer 0.5 nil #'require 'ffs)
+(with-eval-after-load 'ffs
+  (global-set-key (kbd "C-c f s") #'ffs))
+
+(defun b/export-frame ()
+  (interactive)
+  ;; TODO: ask for fn and/or take as arg
+  (let* ((fn (make-temp-file "emacs" nil ".pdf"))
+         (data (x-export-frames nil 'pdf)))
+    (with-temp-file fn
+      (insert data))
+    (kill-new fn)
+    (message fn)))
+
 \f
 ;;; Post initialization