lots of little fixes

This commit is contained in:
knit 2024-04-27 22:29:31 +02:00
parent cb99eeb5a9
commit 4e16d33f97
8 changed files with 69 additions and 70 deletions

View File

@ -23,13 +23,9 @@
(defvar bmark-list '(("o" . "online")
("l" . "local")
("r" . "random")
("h" . "homepages")
("e" . "emacs")
("d" . "default")
("c" . "computers")
("b" . "bangers")
("a" . "articles")))
("b" . "bookmarks")))
;; i'll need this function to print out all keys of
;; bmark-quick-list.
@ -68,8 +64,10 @@
(defun bmark-init (file)
"Set the active bookmark file to FILE and load it (overwriting the original)"
(interactive)
(setq bookmark-default-file file)
(bookmark-load file t t t))
(if (file-exists-p file)
(bookmark-load file t t t)))
;; TODO: popup displaying the available keys
(defun bmark-add (key)
@ -80,7 +78,6 @@
(bookmark-set)
(bmark-save)))
(defun bmark-open (key)
"Open a bookmark file based on single-char inputs"
(interactive (list (char-prompt)))

View File

@ -4,7 +4,6 @@
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(column-number-mode t)
'(custom-enabled-themes '(brutalist))
'(custom-safe-themes t)
'(menu-bar-mode nil)
'(package-selected-packages

View File

@ -9,7 +9,10 @@
;; M-RET -- Toggle collapse all
;; M-n -- Next group
;; M-p -- Prev group
;;
;; TODO
;; - Prettify "~/.config/emacs" to a symbol.
;; - Hide filter groups except when in a certain set.
;;; Collapses / De-collapse all entries.
(defun ibuffer-toggle-all ()
@ -23,28 +26,34 @@
;; Main package declaration
(use-package ibuffer
:bind (("C-c i" . ibuffer)
:map ibuffer-mode-map
:map ibuffer-mode-map
("M-<RET>" . ibuffer-toggle-all))
:config
(setq
ibuffer-expert t
ibuffer-show-empty-filter-groups nil
ibuffer-saved-filter-groups
'(("Home"
("Net" (or (mode . eww-mode)
(mode . rcirc-mode)
(mode . elpher-mode)))
("Dired" (mode . dired-mode))
("Music" (name . "*MPC"))
("Stars" (name . "[*]"))
ibuffer-old-time 12)
(setq ibuffer-saved-filter-groups
'(("home"
("Net" (or (mode . eww-mode)
(mode . rcirc-mode)
(mode . elpher-mode)))
("Dired" (mode . dired-mode))
("emacs" (filename . "config/emacs*"))
("prog" (filename . "/lin/prog*"))
("proc" (process . "*"))
("Music" (name . "*MPC"))
("Stars" (name . "[*]"))
("Gnus" (or (derived-mode gnus-mode)))
("Mail" (or (derived-mode rmail-mode)
(mode . message-mode)))
))))
(mode . message-mode))))))
:hook (ibuffer-mode . (lambda ()
(ibuffer-auto-mode 1)
(ibuffer-switch-to-saved-filter-groups "home")
(setq ibuffer-never-show-predicates '("*messages*\\|*async-native\\|*Completion"))
(setq ibuffer-hidden-filter-groups '("Stars")))))
(add-hook 'ibuffer-mode-hook
(lambda ()
(ibuffer-auto-mode 1)
(ibuffer-switch-to-saved-filter-groups "Home")))
(provide 'ibuffer-conf)

View File

@ -54,34 +54,33 @@
;;; PRETTIFY SYMBOLS MODE
;; i don't know how to elegantly do this lbkmkwkbjbmjxx
(add-hook 'prog-mode-hook
(lambda ()
(setq prettify-symbols-alist
(append prettify-symbols-alist
'(("lambda" . )
("->" . ?→)
("map" . ?↦)
("/=" . ?≠)
("!=" . ?≠)
("==" . ?≡)
("<=" . ?≤)
(">=" . ?≥)
("&&" . ?∧)
("||" . ?)
("sqrt" . ?√)
("..." . ?…))))
(prettify-symbols-mode 1)))
;;(add-hook 'prog-mode-hook (lambda ()
;; (setq prettify-symbols-alist
;; (append prettify-symbols-alist
;; '(("lambda" . ?λ)
;; ("->" . ?→)
;; ("map" . ?↦)
;; ("/=" . ?≠)
;; ("!=" . ?≠)
;; ("==" . ?≡)
;; ("<=" . ?≤)
;; (">=" . ?≥)
;; ("&&" . ?∧)
;; ("||" . ?)
;; ("sqrt" . ?√)
;; ("..." . ?…))))
;; (prettify-symbols-mode 1)))
(add-hook 'scheme-mode-hook
(lambda ()
(setq prettify-symbols-alist
(append prettify-symbols-alist
'(("and" . ?∧)
("or" . ?)
("nil" . ?∅)
("null" . ?∅)
("'()" . ?∅)
("not" . ))))
(prettify-symbols-mode 1)))
;;(add-hook 'scheme-mode-hook
;; (lambda ()
;; (setq prettify-symbols-alist
;; (append prettify-symbols-alist
;; '(("and" . ?∧)
;; ("or" . ?)
;; ("nil" . ?∅)
;; ("null" . ?∅)
;; ("'()" . ?∅)
;; ("not" . ?¬))))
;; (prettify-symbols-mode 1)))
(provide 'langs-conf)

View File

@ -16,6 +16,8 @@
("C-c a" . 'org-agenda)
:map org-mode-map
("C-c C-h" . org-emphasize)
("<f5>" . org-insert-heading-respect-content)
("<f6>" . org-insert-subheading)
("C-c q" . org-set-tags-command)
("C-<return>" . org-open-at-point)
("C-<tab>" . org-next-link)
@ -54,15 +56,11 @@
(setq org-capture-templates ; info org "capture templates"
;; Key Name Type Organization File Headline Text
'(("j" "Journal" entry (file+olp+datetree "journ.org") "")
("p" "Poetry" entry (file+olp+datetree "journ.org") "* %? :poem:\n %i ")
'(("j" "Journal" entry (file+olp+datetree "journ.org") "")
("p" "Poetry" entry (file+olp+datetree "journ.org") "* %? :poem:\n %i ")
("l" "Link")
("lo" "Online" entry (file+headline "bookm.org" "Online") "* %A%?")
("lh" "Homes" entry (file+headline "bookm.org" "Homes") "* %A%?")
("lo" "Online" plain (file "bookm.org") "%A" :unnarrowed t)
("ll" "local" entry (file+headline "bookm.org" "Online") "* %A%?")
("ln" "Nothin" entry (file+headline "bookm.org" "Nothin") "* %A%?")
;; :jump-to-captured
;;; ("c" "Clocked" entry (clock) "* %?" :unnarrowed )
("c" "Clocked" entry (clock) "* %?" :unnarrowed t)
("t" "Todo")
("tl" "Linked" entry (file+headline "notes.org" "Tasks") "* TODO %?\n [[%c][%^{DESC}]]")
@ -71,16 +69,17 @@
("n" "Note")
("nn" "Note" entry (file+headline "notes.org" "Notes") "* %?\n%i")
("nl" "Linked" entry (file+headline "notes.org" "Notes") "* %?\n%i\n [[%L][%f]]"))))
;; :jump-to-captured
(use-package org-capture
:bind (("C-c O" . 'org-capture-goto-last-stored)))
:bind (("C-c O" . 'org-capture-goto-target)))
;; Defining my todo labels
(use-package org-agenda
:bind (:map org-agenda-mode-map
("C-c q" . org-agenda-set-tags)
("n" . org-agenda-next-item)
("p" . org-agenda-previous-item))
("n" . org-agenda-next-item)
("p" . org-agenda-previous-item))
:config
(setq org-agenda-custom-commands
'(("a" "My agenda"

View File

@ -27,11 +27,7 @@
:bind (("C-c m" . rmail)
:map rmail-mode-map
("g" . rmail-my-mra)
("C-o" . other-window)
; :map rmail-summary-mode-map
; ("g" . rmail-my-mra)
; ("C-o" . other-window)
)
("C-o" . other-window))
:config
(setq
rmail-primary-inbox-list my-inboxes

View File

@ -75,6 +75,9 @@ C-c , - org-priority
C-c . - timestamp
C-c C-, - insert content block
C-c " g - plot using Gnuplot
C-c C-x 0 - Start a timer
C-c C-x _ - stop timer
*** tables
- C-c ~ - New table
- C-c ' - Edit table

View File

@ -21,7 +21,6 @@
;;; VARIABLES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq
use-package-always-defer t ; Possibly?
use-short-answers t
inhibit-startup-screen t
epa-armor t
@ -90,10 +89,8 @@ a - agenda o - capture\n")
("C-<right>" . 'windmove-right))
:config
(load-theme 'modus-vivendi)
;; (load-theme 'brutalist)
(set-face-underline 'mode-line nil))
;; (cd "~/") ; on Windows i guess?
(load custom-file)