Compare commits

...

5 Commits

Author SHA1 Message Date
Case Duckworth c822c9bfd1 Change org-mode pretty symbols 2022-04-28 15:50:11 -05:00
Case Duckworth c2834c3511 Make hiding tracking-mode-line when clocked in configurable 2022-04-28 15:49:42 -05:00
Case Duckworth 7f7ede201b Dim .gitignore files (mostly) in dired 2022-04-28 15:49:22 -05:00
Case Duckworth 8565654433 Add setup forms to imenu /after/ init 2022-04-28 15:48:46 -05:00
Case Duckworth 9c5aa35b2a Move where I italicize comment face 2022-04-28 15:48:21 -05:00
3 changed files with 30 additions and 11 deletions

24
init.el
View File

@ -55,8 +55,6 @@
line-number-minor-tick
line-number-current-line))
(:face face '((t (:inherit fixed-pitch)))))
(:face 'font-lock-comment-face '((t ( :inherit variable-pitch
:slant italic))))
;; Hooks
(add-hook 'prog-mode-hook #'turn-on-auto-fill)
(add-hook 'prog-mode-hook #'font-lock-todo-insinuate)
@ -71,7 +69,8 @@
(setup (:require +init)
(:local-hook user-save-hook #'+init-sort)
(:hook #'+init-add-setup-to-imenu))
(+with-ensure-after-init
(:hook #'+init-add-setup-to-imenu)))
(setup (:require auth-source)
(:option auth-sources (list 'default
@ -270,7 +269,7 @@
compilation-scroll-output t))
(setup dired
(:also-load dired-x +dired)
(:require dired-x +dired)
(:straight dired+)
(:option dired-recursive-copies 'always
dired-recursive-deletes 'always
@ -294,7 +293,8 @@
"j" #'+dired-goto-file)
(:hook #'dired-hide-details-mode
#'hl-line-mode
#'lin-mode)
#'lin-mode
#'+dired-dim-git-ignores)
(:+key "C-x C-j" #'dired-jump)
(dolist (refresh-after-func '(dired-do-flagged-delete))
(advice-add refresh-after-func :after #'revert-buffer))
@ -659,9 +659,9 @@
;; mode. So like, org-mode would be a word count (maybe other text
;; modes?), lui-modes could be .... something? etc.
(defun turn-off-column-number-mode () (setq-local column-number-mode nil)))
(:local-set prettify-symbols-alist '(("DEADLINE:" . ?)
("SCHEDULED:" . ?📅)
("CLOSED:" ?))
(:local-set prettify-symbols-alist '(("DEADLINE:" . ?)
("SCHEDULED:" . ?)
("CLOSED:" ?))
;;+modeline-position-function #'+org-count-words-stupidly
)
(:local-hook user-save-hook #'+org-before-save@prettify-buffer)
@ -1214,7 +1214,8 @@ They are completed by \"M-x TAB\" only in Tramp debug buffers."
(:with-mode tracking-mode
(:option tracking-position 'before-modes)
(:bind "C-c C-SPC" (lambda () (interactive)
(if (and (fboundp 'org-clocking-p)
(if (and +tracking-hide-when-org-clocking
(fboundp 'org-clocking-p)
(org-clocking-p))
(message "Bro, get back to work!")
(call-interactively #'tracking-next-buffer))))
@ -1819,6 +1820,8 @@ See also `crux-reopen-as-root-mode'."
(let ((hook (intern (format "%s-hook" mode))))
(add-hook hook #'visual-fill-column-mode)))
(add-hook 'jabber-activity-mode-hook #'tracking-mode)
(with-eval-after-load 'tracking
(add-to-list 'tracking-ignored-buffers "discuss@conference.soprani.ca"))
(:with-mode jabber-chat-mode
(:local-set +modeline-position-function (lambda ()
(cond
@ -1978,7 +1981,8 @@ See also `crux-reopen-as-root-mode'."
`(font-lock-builtin-face ((,class :inherit modus-themes-bold
:foreground unspecified)))
`(font-lock-comment-delimiter-face ((,class :inherit font-lock-comment-face)))
`(font-lock-comment-face ((,class :inherit modus-themes-slant
`(font-lock-comment-face ((,class :inherit variable-pitch
:slant italic
:foreground ,fg-docstring)))
`(font-lock-constant-face ((,class :inherit underline
:foreground unspecified)))

View File

@ -15,5 +15,15 @@
(push-mark)))
(dired-goto-file file))
;;; [[https://www.reddit.com/r/emacs/comments/u2lf9t/weekly_tips_tricks_c_thread/i4n9aoa/?context=3][Dim files in .gitignore]]
(defun +dired-dim-git-ignores ()
"Dim out .gitignore contents"
(require 'vc)
(when-let ((ignores (vc-default-ignore-completion-table 'git ".gitignore"))
(exts (make-local-variable 'completion-ignored-extensions)))
(dolist (item ignores)
(add-to-list exts item))))
(provide '+dired)
;;; +dired.el ends here

View File

@ -23,12 +23,17 @@
(format-mode-line mode-line-misc-info))
ignore)))
(defcustom +tracking-hide-when-org-clocking nil
"Hide the `tracking-mode' information when clocked in."
:type 'boolean)
(defun +tab-bar-tracking-mode ()
"Display `tracking-mode-line-buffers' in the tab-bar."
;; TODO: write something to convert a mode-line construct to a tab-bar
;; construct.
(when (and tracking-mode
(not (bound-and-true-p org-clock-current-task)))
(not (and +tracking-hide-when-org-clocking
(bound-and-true-p org-clock-current-task))))
(cons (when (> (length tracking-mode-line-buffers) 0)
'(track-mode-line-separator menu-item " " ignore))
(cl-loop for i from 0 below (length tracking-mode-line-buffers)