From dbe68852bf44b81f81cc6c514989dd0d835e5769 Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 2 Feb 2021 23:42:18 +0000 Subject: more small config clean-ups --- init.org | 65 +++++++++++++++++++++++++++++----------------------------------- 1 file changed, 29 insertions(+), 36 deletions(-) diff --git a/init.org b/init.org index 4e77933..252487c 100644 --- a/init.org +++ b/init.org @@ -104,16 +104,18 @@ #+end_src *** Load and info path initialisation #+begin_src emacs-lisp - (add-to-list 'load-path jao-local-lisp-dir) - (let ((libd (expand-file-name "lib" jao-emacs-dir))) + (add-to-list 'load-path jao-site-dir) + (add-to-list 'load-path jao-local-lisp-dir) + + (let ((libd (expand-file-name "lib" jao-emacs-dir))) (add-to-list 'load-path libd) (dolist (f (directory-files libd t "^[^.]+$")) (when (file-directory-p f) (add-to-list 'load-path f)))) - (defvar jao-info-dir - (expand-file-name (jao-d-l "~/.emacs.d/info" "~/doc/info"))) - (require 'info) - (add-to-list 'Info-directory-list jao-info-dir) + (defvar jao-info-dir + (expand-file-name (jao-d-l "~/.emacs.d/info" "~/doc/info"))) + (require 'info) + (add-to-list 'Info-directory-list jao-info-dir) #+end_src *** Custom location of custom.el and co. #+begin_src emacs-lisp @@ -523,7 +525,7 @@ (jao-ednc-setup 90) (exwm-enable) (jao-toggle-inactive-mode-line t) - (add-hook 'after-init-hook #'jao-trisect t) + (jao-trisect t) (message "Welcome to exwm")) #+end_src *** sway @@ -557,25 +559,16 @@ #+end_src *** wallpaper #+begin_src emacs-lisp - (defvar jao-wallpaper-dir "~/etc/config/X/wallpapers/") - - (defvar jao-wallpaper-random-candidates '("pattern.jpg" - "pattern2.jpg" - "bluscher.jpg" - "castle.jpg" - "einsteinstable.jpg" - "leaf.jpg" - "galaxy2.jpg" - "galaxy3.jpg" - "polyhedra.jpg" - "blade-runner2.jpg" - "abstract-blue.jpg")) - - (setq jao-wallpaper-random-candidates-light - '("white-owl.jpg" - "moon.jpg" - "einsteinstable.jpg" - "city-lighter.jpg")) + (defvar jao-wallpaper-dir "~/.wallpapers/") + + (defvar jao-wallpaper-random-candidates + '("wallpaper.jpg" "wallpaper2.jpg")) + + (defvar jao-wallpaper-random-candidates-light + '("wallpaper.jpg" "wallpaper2.jpg")) + + (defvar jao-wallpaper-random-wake t + "Set to t for getting a new wallpaper on awaking from sleep") (defun jao-set-wallpaper (&optional path) (interactive) @@ -593,15 +586,15 @@ (defun jao-set-random-wallpaper () (interactive) - (let* ((ws (if (jao-colors-scheme-dark-p) - jao-wallpaper-random-candidates - jao-wallpaper-random-candidates-light)) - (f (seq-random-elt ws))) - (jao-set-wallpaper (expand-file-name f jao-wallpaper-dir)) - (message "%s" f))) + (when jao-wallpaper-random-wake + (let* ((ws (if (jao-colors-scheme-dark-p) + jao-wallpaper-random-candidates + jao-wallpaper-random-candidates-light)) + (f (seq-random-elt ws))) + (jao-set-wallpaper (expand-file-name f jao-wallpaper-dir)) + (message "%s" f)))) (add-to-list 'jao-sleep-awake-functions #'jao-set-random-wallpaper) - #+end_src *** screensaver and lock #+begin_src emacs-lisp @@ -803,7 +796,7 @@ (defvar jao-tracking-string "") (setq jao-tracking-bkg - (if (jao-colors-scheme-dark-p) "grey20" "grey98")) + (if (jao-colors-scheme-dark-p) "grey20" "grey93")) (defface jao-tracking-minibuffer `((t :background ,jao-tracking-bkg)) "") (defface jao-tracking-minibuffer-sep @@ -1439,11 +1432,11 @@ (use-package tool-bar) (tool-bar-mode -1) - (defun jao-trisect () + (defun jao-trisect (&optional force) (interactive) (let ((fw (frame-width))) (delete-other-windows) - (cond ((> fw 242) + (cond ((or force (> fw 242)) (let ((w (- (/ fw 3)))) (delete-other-windows) (split-window-horizontally w) -- cgit v1.2.3