diff options
Diffstat (limited to 'blendoit')
| -rw-r--r-- | blendoit/blendoit-init.org | 299 | ||||
| -rw-r--r-- | blendoit/themes/blendoit-light-theme.el | 24 | 
2 files changed, 34 insertions, 289 deletions
| diff --git a/blendoit/blendoit-init.org b/blendoit/blendoit-init.org index 716675f..7a0e853 100644 --- a/blendoit/blendoit-init.org +++ b/blendoit/blendoit-init.org @@ -25,7 +25,17 @@ view of publication: this is the endgame of /literate programming/.  # (org-babel-load-file "~/.emacs.d/blendoit/test.org")  # #+END_SRC -* Preliminary setup +* TODO First-time setup + +Spacemacs-like dialog for default settings. + +#+NAME: first-setup +#+BEGIN_SRC emacs-lisp +  ;; Prompt enterprise or personal install. Create file in .emacs.d/ on Linux, +  ;; AppData/ on Windows. Ask user for details and preferred bindings. +#+END_SRC + +* Early setup  ** Garbage collection @@ -638,95 +648,10 @@ Disable minibuffer scroll bar.  ** Clean up menus -We reduce the burden on the user by reducing total amount of entries in GUI -menus. - -*** File - -#+BEGIN_SRC emacs-lisp -(define-key menu-bar-file-menu [dired] nil) -(define-key menu-bar-file-menu [print-buffer] nil) -(define-key menu-bar-file-menu [print-region] nil) -(define-key menu-bar-file-menu [ps-print-buffer-faces] nil) -(define-key menu-bar-file-menu [ps-print-region-faces] nil) -(define-key menu-bar-file-menu [ps-print-buffer] nil) -(define-key menu-bar-file-menu [ps-print-region] nil) -(define-key menu-bar-file-menu [split-window-below] nil) -(define-key menu-bar-file-menu [split-window-right] nil) -(define-key menu-bar-file-menu [dired] nil) -#+END_SRC - -*** Edit - -#+BEGIN_SRC emacs-lisp -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -(define-key menu-bar-file-menu [dired] nil) -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -#+END_SRC - -*** Options - -#+BEGIN_SRC emacs-lisp -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -(define-key menu-bar-file-menu [dired] nil) -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -#+END_SRC - -*** Buffers - -#+BEGIN_SRC emacs-lisp -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -(define-key menu-bar-file-menu [dired] nil) -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -#+END_SRC - -*** Tools - -#+BEGIN_SRC emacs-lisp -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -(define-key menu-bar-file-menu [dired] nil) -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -#+END_SRC - -*** Org - -#+BEGIN_SRC emacs-lisp -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -(define-key menu-bar-file-menu [dired] nil) -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -#+END_SRC +Originally, I wished to inhibit certain entries in the GUI menus. Not worth the +effort at this time. -*** Tbl - -#+BEGIN_SRC emacs-lisp -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -(define-key menu-bar-file-menu [dired] nil) -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -#+END_SRC - -*** Text - -#+BEGIN_SRC emacs-lisp -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -(define-key menu-bar-file-menu [dired] nil) -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -#+END_SRC - -*** Projectile - -#+BEGIN_SRC emacs-lisp -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -(define-key menu-bar-file-menu [dired] nil) -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -#+END_SRC - -*** Help - -#+BEGIN_SRC emacs-lisp -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -(define-key menu-bar-file-menu [dired] nil) -(define-key menu-bar-help-menu [emacs-psychotherapist] nil) -#+END_SRC +~menu-bar-mode~ is inhibited in =../custom-init.el=.  ** Coding standards @@ -737,201 +662,19 @@ This is just a better default.        c-basic-offset 4)  #+END_SRC -** Tabs +** Dividers + +This ensures users can resize windows using the GUI.  #+BEGIN_SRC emacs-lisp -(use-package tabbar) +(menu-bar-bottom-and-right-window-divider)  #+END_SRC -Thank you -https://andreyorst.gitlab.io/posts/2020-05-10-making-emacs-tabs-look-like-in-atom/ + +** Tabs  #+BEGIN_SRC emacs-lisp -(when (and window-system -           (not (version< emacs-version "27"))) -  (use-package tab-line -    :hook (after-init . global-tab-line-mode) -    :config -    (defun tab-line-close-tab (&optional e) -      "Close the selected tab. - -If tab is presented in another window, close the tab by using -`bury-buffer` function.  If tab is unique to all existing -windows, kill the buffer with `kill-buffer` function.  Lastly, if -no tabs left in the window, it is deleted with `delete-window` -function." -      (interactive "e") -      (let* ((posnp (event-start e)) -             (window (posn-window posnp)) -             (buffer (get-pos-property 1 'tab (car (posn-string posnp))))) -        (with-selected-window window -          (let ((tab-list (tab-line-tabs-window-buffers)) -                (buffer-list (flatten-list -                              (seq-reduce (lambda (list window) -                                            (select-window window t) -                                            (cons (tab-line-tabs-window-buffers) list)) -                                          (window-list) nil)))) -            (select-window window) -            (if (> (seq-count (lambda (b) (eq b buffer)) buffer-list) 1) -                (progn -                  (if (eq buffer (current-buffer)) -                      (bury-buffer) -                    (set-window-prev-buffers window (assq-delete-all buffer (window-prev-buffers))) -                    (set-window-next-buffers window (delq buffer (window-next-buffers)))) -                  (unless (cdr tab-list) -                    (ignore-errors (delete-window window)))) -              (and (kill-buffer buffer) -                   (unless (cdr tab-list) -                     (ignore-errors (delete-window window))))))))) - - -    (defcustom tab-line-tab-min-width 10 -      "Minimum width of a tab in characters." -      :type 'integer -      :group 'tab-line) - - -    (defcustom tab-line-tab-max-width 30 -      "Maximum width of a tab in characters." -      :type 'integer -      :group 'tab-line) - -    (defcustom tab-line-ellipsis-string "…" -      "String for indicating truncated names" -      :type 'string -      :group 'tab-line) - -    (defun aorst/tab-line--tab-width (window-width tab-amount) -      "Calculate width of single tab dividing WINDOW-WIDTH by TAB-AMOUNT." -      (let* ((close-button-size -              (if tab-line-close-button-show -                  (length (substring-no-properties tab-line-close-button)) 0)) -             (tab-width (/ window-width tab-amount))) -        (- (cond ((< window-width 0) -                  tab-line-tab-min-width) -                 ((>= tab-width tab-line-tab-max-width) -                  tab-line-tab-max-width) -                 ((< tab-width tab-line-tab-min-width) -                  tab-line-tab-min-width) -                 (t tab-width)) -           close-button-size))) - -    (defun aorst/tab-line--max-width (window) -      "Calculate free width of the WINDOW. - -Free width means amount of space we can use to display tabs -without truncation." -      (- (window-width window) -         (length (substring-no-properties tab-line-left-button)) -         (length (substring-no-properties tab-line-right-button)) -         (if tab-line-new-button-show -             (length (substring-no-properties tab-line-new-button)) -           0))) - - -    (defun aorst/tab-line--make-pad (tab-width name-width) -      "Generate padding string based on TAB-WIDTH and NAME-WIDTH." -      (let* ((width (- tab-width name-width)) -             (padding (/ (if (oddp width) (+ width 1) width) 2))) -        (make-string padding ?\s))) - - -    (defun aorst/tab-line-name-buffer (buffer &rest _buffers) -      "Create name for tab with padding and truncation. - -If buffer name is shorter than `tab-line-tab-max-width' it gets -centered with spaces, otherwise it is truncated, to preserve -equal width for all tabs.  This function also tries to fit as -many tabs in window as possible, so if there are no room for tabs -with maximum width, it calculates new width for each tab and -truncates text if needed.  Minimal width can be set with -`tab-line-tab-min-width' variable." -      (with-current-buffer buffer -        (let* ((amount (length (tab-line-tabs-window-buffers))) -               (width (aorst/tab-line--tab-width -                       (aorst/tab-line--max-width (get-buffer-window buffer)) -                       amount)) -               (buffer (string-trim (buffer-name))) -               (name-width (length buffer)) -               (right-pad (if tab-line-close-button-show "" " ")) -               (truncate-width (- width -                                  (length tab-line-ellipsis-string) -                                  (length right-pad)))) -          (if (>= name-width truncate-width) -              (concat  " " (truncate-string-to-width buffer truncate-width) tab-line-ellipsis-string right-pad) -            (let* ((padding (aorst/tab-line--make-pad width name-width)) -                   (tab-text (concat padding buffer)) -                   (text-width (length tab-text))) -              (concat tab-text (make-string (- width text-width) ?\s))))))) - - -    (setq tab-line-close-button-show t -          tab-line-new-button-show nil -          tab-line-separator "" -          tab-line-tab-name-function #'aorst/tab-line-name-buffer -          tab-line-right-button (propertize (if (char-displayable-p ?▶) " ▶ " " > ") -                                            'keymap tab-line-right-map -                                            'mouse-face 'tab-line-highlight -                                            'help-echo "Click to scroll right") -          tab-line-left-button (propertize (if (char-displayable-p ?◀) " ◀ " " < ") -                                           'keymap tab-line-left-map -                                           'mouse-face 'tab-line-highlight -                                           'help-echo "Click to scroll left") -          tab-line-close-button (propertize (if (char-displayable-p ?×) " × " " x ") -                                            'keymap tab-line-tab-close-map -                                            'mouse-face 'tab-line-close-highlight -                                            'help-echo "Click to close tab")) - - -    (let ((bg (if (facep 'solaire-default-face) -                  (face-attribute 'solaire-default-face :background) -                (face-attribute 'default :background))) -          (fg (face-attribute 'default :foreground)) -          (base (if (facep 'solaire-default-face) -                    (face-attribute 'default :background) -                  (face-attribute 'mode-line :background))) -          (box-width (/ (line-pixel-height) 2))) -      (when (and (color-defined-p bg) -                 (color-defined-p fg) -                 (color-defined-p base) -                 (numberp box-width)) -        (set-face-attribute 'tab-line nil -                            :background base -                            :foreground fg -                            :height 1.0 -                            :inherit nil -                            :box (list :line-width -1 :color base)) -        (set-face-attribute 'tab-line-tab nil -                            :foreground fg -                            :background bg -                            :weight 'normal -                            :inherit nil -                            :box (list :line-width box-width :color bg)) -        (set-face-attribute 'tab-line-tab-inactive nil -                            :foreground fg -                            :background base -                            :weight 'normal -                            :inherit nil -                            :box (list :line-width box-width :color base)) -        (set-face-attribute 'tab-line-tab-current nil -                            :foreground fg -                            :background bg -                            :weight 'normal -                            :inherit nil -                            :box (list :line-width box-width :color bg)))) -    (setq tab-line-exclude-modes '()) -    (dolist (mode '(ediff-mode -                    process-menu-mode -                    term-mode -                    vterm-mode)) -      (add-to-list 'tab-line-exclude-modes mode)) - -    (defun aorst/tab-line-drop-caches () -      "Drops `tab-line' cache in every window." -      (dolist (window (window-list)) -        (set-window-parameter window 'tab-line-cache nil))) - -    (add-hook 'window-configuration-change-hook #'aorst/tab-line-drop-caches))) +  #+END_SRC  ** auto fill diff --git a/blendoit/themes/blendoit-light-theme.el b/blendoit/themes/blendoit-light-theme.el index a80b34e..9131a6c 100644 --- a/blendoit/themes/blendoit-light-theme.el +++ b/blendoit/themes/blendoit-light-theme.el @@ -1,9 +1,9 @@  (deftheme blendoit-light -  "Created 2020-08-03.") +  "Created 2020-08-09.")  (custom-theme-set-faces   'blendoit-light - '(fixed-pitch ((t (:inherit default :family "Dejavu Sans Mono")))) + '(fixed-pitch ((t (:family "Dejavu Sans Mono"))))   '(variable-pitch ((t (:family "Liberation Sans"))))   '(escape-glyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown"))))   '(homoglyph ((((background dark)) (:foreground "cyan")) (((type pc)) (:foreground "magenta")) (t (:foreground "brown")))) @@ -16,15 +16,14 @@   '(font-lock-builtin-face ((((class grayscale) (background light)) (:weight bold :foreground "LightGray")) (((class grayscale) (background dark)) (:weight bold :foreground "DimGray")) (((class color) (min-colors 88) (background light)) (:foreground "dark slate blue")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Orchid")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSteelBlue")) (((class color) (min-colors 8)) (:weight bold :foreground "blue")) (t (:weight bold))))   '(font-lock-comment-delimiter-face ((t (:inherit font-lock-comment-face :foreground "dim gray"))))   '(font-lock-comment-face ((t (:foreground "dark gray" :slant italic)))) - '(font-lock-constant-face ((((class grayscale) (background light)) (:underline (:color foreground-color :style line) :weight bold :foreground "LightGray")) (((class grayscale) (background dark)) (:underline (:color foreground-color :style line) :weight bold :foreground "Gray50")) (((class color) (min-colors 88) (background light)) (:foreground "dark cyan")) (((class color) (min-colors 88) (background dark)) (:foreground "Aquamarine")) (((class color) (min-colors 16) (background light)) (:foreground "CadetBlue")) (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine")) (((class color) (min-colors 8)) (:foreground "magenta")) (t (:underline (:color foreground-color :style line) :weight bold)))) - '(font-lock-doc-face ((t (:inherit font-lock-string-face)))) + '(font-lock-constant-face ((t (:foreground "dark cyan"))))   '(font-lock-function-name-face ((((class color) (min-colors 88) (background light)) (:foreground "Blue1")) (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue")) (((class color) (min-colors 16) (background light)) (:foreground "Blue")) (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue")) (((class color) (min-colors 8)) (:weight bold :foreground "blue")) (t (:weight bold :inverse-video t))))   '(font-lock-keyword-face ((t (:foreground "DodgerBlue4"))))   '(font-lock-negation-char-face ((t nil)))   '(font-lock-preprocessor-face ((t (:inherit (font-lock-builtin-face)))))   '(font-lock-regexp-grouping-backslash ((t (:inherit (bold)))))   '(font-lock-regexp-grouping-construct ((t (:inherit (bold))))) - '(font-lock-string-face ((t (:foreground "dark cyan")))) + '(font-lock-string-face ((t (:foreground "DeepSkyBlue3"))))   '(font-lock-type-face ((t (:foreground "ForestGreen"))))   '(font-lock-variable-name-face ((t (:foreground "sienna"))))   '(font-lock-warning-face ((t (:inherit (error))))) @@ -41,7 +40,7 @@   '(isearch-fail ((((class color) (min-colors 88) (background light)) (:background "RosyBrown1")) (((class color) (min-colors 88) (background dark)) (:background "red4")) (((class color) (min-colors 16)) (:background "red")) (((class color) (min-colors 8)) (:background "red")) (((class color grayscale)) (:foreground "grey")) (t (:inverse-video t))))   '(lazy-highlight ((t (:background "paleturquoise"))))   '(match ((((class color) (min-colors 88) (background light)) (:background "yellow1")) (((class color) (min-colors 88) (background dark)) (:background "RoyalBlue3")) (((class color) (min-colors 8) (background light)) (:foreground "black" :background "yellow")) (((class color) (min-colors 8) (background dark)) (:foreground "white" :background "blue")) (((type tty) (class mono)) (:inverse-video t)) (t (:background "gray")))) - '(next-error ((t (:inherit (region))))) + '(next-error ((t (:inherit region))))   '(query-replace ((t (:inherit (isearch)))))   '(org-table ((t (:box (:line-width 2 :color "gainsboro" :style released-button)))))   '(org-formula ((t (:inherit org-table)))) @@ -50,8 +49,8 @@   '(org-level-1 ((t (:inherit fixed-pitch :height 1.6 :weight bold))))   '(org-level-2 ((t (:inherit fixed-pitch :height 1.4 :weight bold))))   '(org-level-3 ((t (:inherit fixed-pitch :weight bold :height 1.2)))) - '(org-level-4 ((t (:height 1.1 :weight bold :inherit fixed-pitch)))) - '(org-date ((t (:inherit link :foreground "DodgerBlue3" :slant italic :family "Liberation Serif")))) + '(org-level-4 ((t (:inherit fixed-pitch :weight bold :height 1.1)))) + '(org-date ((t (:family "Liberation Serif" :slant italic :foreground "DodgerBlue3" :inherit link))))   '(org-footnote ((t (:foreground "DodgerBlue3" :inherit link))))   '(org-block ((t (:inherit nil :family "Hermit"))))   '(org-tag ((t (:inherit link :weight bold :foreground "DodgerBlue3")))) @@ -59,8 +58,11 @@   '(link ((t (:foreground "blue" :underline t))))   '(org-document-info-keyword ((t (:inherit org-meta-line))))   '(dashboard-heading ((t (:inherit font-lock-keyword-face)))) - '(default ((t (:background "white" :foreground "black" :height 142 :family "Liberation Mono")))) - '(org-todo ((t (:foreground "Red1" :box 2 :weight bold)))) - '(org-done ((t (:foreground "ForestGreen" :box 2 :weight bold))))) + '(org-todo ((t (:weight bold :box nil :foreground "Red1")))) + '(org-done ((t (:weight bold :box nil :foreground "ForestGreen")))) + '(font-lock-doc-face ((t (:foreground "steel blue" :inherit default)))) + '(org-code ((t (:inherit default :background "light grey" :foreground "black")))) + '(org-verbatim ((t (:inherit org-meta-line)))) + '(default ((t (:background "white" :foreground "black" :height 142 :family "Liberation Mono")))))  (provide-theme 'blendoit-light) | 
