[submodule "alloy-mode"]
- path = lib/alloy-mode
+ path = lisp/alloy-mode
url = https://github.com/dwwmmn/alloy-mode.git
[submodule "amx"]
- path = lib/amx
+ path = lisp/amx
url = https://github.com/DarwinAwardWinner/amx.git
-[submodule "async"]
- path = lib/async
- url = https://github.com/jwiegley/emacs-async.git
-[submodule "auto-compile"]
- path = lib/auto-compile
- url = https://github.com/emacscollective/auto-compile.git
-[submodule "biblio.el"]
- path = lib/biblio.el
- url = https://github.com/cpitclaudel/biblio.el.git
-[submodule "borg"]
- path = lib/borg
- url = https://github.com/emacscollective/borg.git
[submodule "boxquote"]
- path = lib/boxquote
+ path = lisp/boxquote
url = https://github.com/davep/boxquote.el.git
-[submodule "dash"]
- path = lib/dash
- url = https://github.com/magnars/dash.el.git
- no-makeinfo = dash-template.texi
- # dash creates a `dir' dash info file, which makes git think
- # that the submodule is dirty. so, let's ignore the untracked
- # files of dash's submodule
- ignore = untracked
-[submodule "debbugs"]
- path = lib/debbugs
- url = https://github.com/emacsmirror/debbugs.git
- # debbugs creates a `instructions.info' info file, which makes git
- # think that the submodule is dirty. so, let's ignore the
- # untracked files of debbugs' submodule
- ignore = untracked
-[submodule "ebdb"]
- path = lib/ebdb
- url = https://github.com/girzel/ebdb.git
-[submodule "erc-hl-nicks"]
- path = lib/erc-hl-nicks
- url = https://github.com/leathekd/erc-hl-nicks.git
-[submodule "expand-region"]
- path = lib/expand-region
- url = https://github.com/magnars/expand-region.el.git
[submodule "hl-todo"]
- path = lib/hl-todo
+ path = lisp/hl-todo
url = https://github.com/tarsius/hl-todo.git
-[submodule "ivy"]
- path = lib/ivy
- url = https://github.com/abo-abo/swiper.git
- info-path = doc
-[submodule "libgit"]
- path = lib/libgit
- url = https://github.com/magit/libegit2.git
- build-step = make
-[submodule "magit"]
- path = lib/magit
- url = https://github.com/magit/magit.git
- recursive-byte-compile = true
- info-path = Documentation
-[submodule "minions"]
- path = lib/minions
- url = https://github.com/tarsius/minions.git
-[submodule "org"]
- path = lib/org
- url = https://code.orgmode.org/bzg/org-mode.git
- build-step = make
- load-path = lisp
- load-path = contrib/lisp
- info-path = doc
-[submodule "org-tanglesync"]
- path = lib/org-tanglesync
- url = https://github.com/mtekman/org-tanglesync.el.git
-[submodule "orgalist"]
- path = lib/orgalist
- url = https://github.com/emacsmirror/orgalist.git
-[submodule "packed"]
- path = lib/packed
- url = https://github.com/emacscollective/packed.git
[submodule "page-break-lines"]
- path = lib/page-break-lines
+ path = lisp/page-break-lines
url = https://github.com/purcell/page-break-lines.git
-[submodule "refinery-theme"]
- path = lib/refinery-theme
- url = https://git.bndl.org/refinery-theme
-[submodule "rich-minority"]
- path = lib/rich-minority
- url = https://github.com/Malabarba/rich-minority.git
-[submodule "rt-liberation"]
- path = lib/rt-liberation
- url = https://git.savannah.gnu.org/git/rtliber.git
- info-path = doc
- # rt-liberation creates doc/{dir,rt-liberation.info} files, which
- # make git think that the submodule is dirty. so, let's ignore
- # the untracked files of rt-liberation's submodule
- ignore = untracked
[submodule "s"]
- path = lib/s
+ path = lisp/s
url = https://github.com/magnars/s.el.git
[submodule "scpaste"]
- path = lib/scpaste
+ path = lisp/scpaste
url = https://git.sr.ht/~technomancy/scpaste
-[submodule "smart-mode-line"]
- path = lib/smart-mode-line
- url = https://github.com/Malabarba/smart-mode-line.git
-[submodule "switch-buffer-functions"]
- path = lib/switch-buffer-functions
- url = https://github.com/10sr/switch-buffer-functions-el.git
-[submodule "transient"]
- path = lib/transient
- url = https://github.com/magit/transient.git
-[submodule "unkillable-scratch"]
- path = lib/unkillable-scratch
- url = https://github.com/EricCrosson/unkillable-scratch.git
-[submodule "which-key"]
- path = lib/which-key
- url = https://github.com/justbur/emacs-which-key.git
-[submodule "with-editor"]
- path = lib/with-editor
- url = https://github.com/magit/with-editor.git
-[submodule "yasnippet"]
- path = lib/yasnippet
- url = https://github.com/joaotavora/yasnippet.git
-[submodule "znc"]
- path = lib/znc
- url = https://git.emacsconf.org/bandali/znc.el.git
--- /dev/null
+;;-*-coding: utf-8;-*-
+(define-abbrev-table 'message-mode-abbrev-table
+ '(
+ ("linux" "GNU/Linux" nil :count 4)
+ ))
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
- '(abbrev-file-name "/home/bandali/.emacs.d/var/abbrev.el")
- '(auth-sources '("~/.authinfo.gpg"))
- '(authinfo-hidden "\\(?:client-secret\\|password\\|token\\)")
- '(auto-revert-verbose nil)
- '(auto-save-file-name-transforms '((".*" "/home/bandali/.emacs.d/var/auto-save/" t)))
- '(backup-by-copying t)
- '(company-dabbrev-char-regexp "\\sw\\|\\s_\\|[-_]" t)
- '(company-dabbrev-downcase nil t)
- '(company-dabbrev-ignore-case nil t)
- '(company-minimum-prefix-length 1)
- '(company-selection-wrap-around t)
- '(debpaste-paste-is-hidden t t)
- '(delete-old-versions t)
- '(display-battery-mode t)
- '(display-time-mode t)
- '(dmenu-prompt-string "run: " t)
- '(dmenu-save-file "/home/bandali/.emacs.d/var/dmenu-items" t)
- '(ebdb-gnus-window-configuration
- '(article
- (vertical 1.0
- (summary 0.25 point)
- (horizontal 1.0
- (article 1.0)
- (ebdb-gnus 0.3)))))
- '(ebdb-gnus-window-size 0.3)
- '(ebdb-mua-pop-up t)
- '(ediff-split-window-function 'split-window-horizontally t)
- '(ediff-window-setup-function 'ediff-setup-windows-plain t)
- '(epa-pinentry-mode 'loopback)
- '(epg-gpg-program "/home/bandali/.guix-profile/bin/gpg")
- '(epg-pinentry-mode 'loopback)
- '(erc-fill-column 77)
- '(erc-fill-function 'erc-fill-static)
- '(erc-fill-static-center 18)
- '(erc-join-buffer 'bury)
- '(erc-lurker-hide-list '("JOIN" "PART" "QUIT"))
- '(erc-nick "bandali")
- '(erc-pcomplete-nick-postfix ", ")
- '(erc-prompt "erc>")
- '(erc-rename-buffers t)
- '(erc-server-reconnect-attempts 5)
- '(erc-server-reconnect-timeout 3)
- '(erc-track-enable-keybindings nil)
- '(erc-track-exclude-types
- '("JOIN" "MODE" "NICK" "PART" "QUIT" "324" "329" "332" "333" "353" "477"))
- '(erc-track-position-in-mode-line t)
- '(erc-track-priority-faces-only 'all)
- '(erc-track-shorten-function nil)
- '(eshell-directory-name "/home/bandali/.emacs.d/var/eshell/")
- '(eshell-hist-ignoredups t)
- '(eshell-input-filter 'eshell-input-filter-initial-space)
'(fci-rule-color "#5B6268")
- '(flycheck-mode-line-prefix "flyc")
- '(global-auto-revert-non-file-buffers nil)
- '(gnus-thread-sort-functions
- '(gnus-thread-sort-by-number gnus-thread-sort-by-subject gnus-thread-sort-by-date))
- '(ibuffer-formats
- '((mark modified read-only locked " "
- (name 72 72 :left :elide)
- " "
- (size-h 9 -1 :right)
- " "
- (mode 16 16 :left :elide)
- " " filename-and-process)
- (mark " "
- (name 16 -1)
- " " filename)) t)
- '(ibuffer-saved-filter-groups
- '(("default"
- ("dired"
- (mode . dired-mode))
- ("org"
- (mode . org-mode))
- ("gnus"
- (or
- (mode . gnus-group-mode)
- (mode . gnus-summary-mode)
- (mode . gnus-article-mode)
- (mode . message-mode)))
- ("web"
- (or
- (mode . web-mode)
- (mode . css-mode)
- (mode . scss-mode)
- (mode . js2-mode)))
- ("shell"
- (or
- (mode . eshell-mode)
- (mode . shell-mode)
- (mode . term-mode)))
- ("programming"
- (or
- (mode . python-mode)
- (mode . c-mode)
- (mode . c++-mode)
- (mode . java-mode)
- (mode . emacs-lisp-mode)
- (mode . scheme-mode)
- (mode . haskell-mode)
- (mode . lean-mode)
- (mode . go-mode)
- (mode . alloy-mode)))
- ("tex"
- (or
- (mode . bibtex-mode)
- (mode . latex-mode)))
- ("emacs"
- (or
- (name . "^\\*scratch\\*$")
- (name . "^\\*Messages\\*$")))
- ("exwm"
- (mode . exwm-mode))
- ("erc"
- (mode . erc-mode)))) t)
'(inhibit-startup-buffer-menu t)
'(inhibit-startup-echo-area-message "bandali")
'(inhibit-startup-screen t)
'(jdee-db-requested-breakpoint-face-colors (cons "#1B2229" "#98be65"))
'(jdee-db-spec-breakpoint-face-colors (cons "#1B2229" "#3f444a"))
'(ls-lisp-dirs-first t)
- '(magit-diff-refine-hunk t t)
- '(magit-display-buffer-function 'magit-display-buffer-fullframe-status-v1 t)
+ '(magit-diff-refine-hunk t)
+ '(magit-display-buffer-function 'magit-display-buffer-fullframe-status-v1)
'(message-elide-ellipsis "[...]
")
'(minions-mode t)
'(org-habit-graph-column 44 t)
'(org-latex-packages-alist '(("" "listings") ("" "color")))
'(org-pretty-entities t)
+ '(package-selected-packages
+ '(delight yasnippet ebdb rt-liberation refinery-theme counsel ivy org-plus-contrib orgalist debbugs))
'(page-break-lines-max-width 70)
'(pdf-view-midnight-colors (cons "#bbc2cf" "#282c34"))
'(pdf-view-resize-factor 1.05)
(eval setq org-latex-prefer-user-labels t)
(eval add-hook 'after-save-hook 'org-latex-export-to-latex t t)))
'(save-interprogram-paste-before-kill t)
- '(save-place-file "/home/bandali/.emacs.d/var/save-place.el" t)
+ '(save-place-file "/home/bandali/.emacs.d/var/save-place.el")
'(savehist-file "/home/bandali/.emacs.d/var/savehist.el")
'(search-default-mode 'char-fold-to-regexp)
'(split-width-threshold 150)
'(ivy-minibuffer-match-face-4 ((t (:background "misty rose" :weight semi-bold))))
'(ivy-virtual ((t (:inherit font-lock-builtin-face :foreground "dim gray"))))
'(magit-diff-file-heading ((t (:weight normal))))
+ '(org-block ((t (:background "#1d1f21"))))
+ '(org-block-begin-line ((t (:foreground "#5a5b5a" :background "#1d1f21"))))
+ '(org-latex-and-related ((t (:foreground "#b294bb"))))
'(quote (org-block-begin-line ((t (:foreground "#5a5b5a" :background "#1d1f21")))))
'(widget-button ((t (:weight semi-bold)))))
'((:eval
(format
"[%s]" (number-to-string
- exwm-workspace-current-index)))))))))
+ exwm-workspace-current-index))))))))
+
+ ;; make some mode-line spaces smaller
+ (csetq
+ mode-line-format
+ (mapcar
+ (lambda (x)
+ (if (and (stringp x) (or (string= x " ") (string= x " ")))
+ " "
+ x))
+ mode-line-format)
+ mode-line-buffer-identification
+ (propertized-buffer-identification "%10b")))
(add-hook 'after-init-hook #'b/post-init)
;; increase number of lines kept in *Messages* log
\f
;;; Package management
-(progn ; `borg'
- (add-to-list 'load-path
- (expand-file-name "lib/borg" user-emacs-directory))
- (require 'borg)
- (borg-initialize)
- (setq borg-rewrite-urls-alist
- '(("git@github.com:" . "https://github.com/")
- ("git@gitlab.com:" . "https://gitlab.com/"))))
-
-(defmacro csetq (&rest args)
- "Set the value of user option VAR to VALUE.
-
-More generally, you can use multiple variables and values, as in
- (csetq VAR VALUE VAR VALUE...)
-This sets each user option VAR's value to the corresponding VALUE.
-
-\(fn [VAR VALUE]...)"
- (declare (debug setq))
- `(progn
- ,@(cl-loop for (var value) on args by 'cddr
- collect
- `(funcall (or (get ',var 'custom-set) #'set-default)
- ',var ,value))))
+;; (progn ; `borg'
+;; (add-to-list 'load-path
+;; (expand-file-name "lib/borg" user-emacs-directory))
+;; (require 'borg)
+;; (borg-initialize)
+;; (setq borg-rewrite-urls-alist
+;; '(("git@github.com:" . "https://github.com/")
+;; ("git@gitlab.com:" . "https://gitlab.com/"))))
+
+;; variables of interest:
+;; package-archive-priorities
+;; package-load-list
+;; package-pinned-packages
+
+;; (let* ((b (find-file-noselect "refinery-theme.el"))
+;; (d (with-current-buffer b (package-buffer-info))))
+;; (package-generate-description-file d "refinery-theme-pkg.el"))
+(run-with-idle-timer 0.01 nil #'require 'package)
+(with-eval-after-load 'package
+ (when (= (length package-archives) 1)
+ (csetq
+ package-archives
+ `(,@package-archives
+ ("org" . "https://orgmode.org/elpa/")
+ ("bndl" . "https://p.bndl.org/elpa/"))))
+ (package-initialize))
+
+(csetq package-archive-upload-base "/ssh:caffeine:~/www/p/elpa")
\f
;;; Initial setup
(expand-file-name
(convert-standard-filename "var/") user-emacs-directory)
"The directory where packages place their persistent data files.")
+(defvar b/lisp-dir
+ (expand-file-name
+ (convert-standard-filename "lisp/") user-emacs-directory)
+ "The directory where packages place their persistent data files.")
(defun b/etc (file)
"Expand filename FILE relative to `b/etc-dir'."
(expand-file-name (convert-standard-filename file) b/etc-dir))
(defun b/var (file)
"Expand filename FILE relative to `b/var-dir'."
(expand-file-name (convert-standard-filename file) b/var-dir))
+(defun b/lisp (file)
+ "Expand filename FILE relative to `b/lisp-dir'."
+ (expand-file-name (convert-standard-filename file) b/lisp-dir))
(csetq
auto-save-list-file-prefix (b/var "auto-save/sessions/")
nsm-settings-file (b/var "nsm-settings.el"))
-(require 'auto-compile)
-(auto-compile-on-load-mode)
-(auto-compile-on-save-mode)
-(setq auto-compile-display-buffer nil)
-(setq auto-compile-mode-line-counter t)
-(setq auto-compile-source-recreate-deletes-dest t)
-(setq auto-compile-toggle-deletes-nonlib-dest t)
-(setq auto-compile-update-autoloads t)
-
;; separate custom file (don't want it mixing with init.el)
(with-eval-after-load 'custom
(setq custom-file (b/etc "custom.el"))
(when (file-exists-p custom-file)
(load custom-file))
;; while at it, treat themes as safe
- (setf custom-safe-themes t)
+ ;; (setf custom-safe-themes t)
;; only one custom theme at a time
(comment
(defadvice load-theme (before clear-previous-themes activate)
;; lazy-person-friendly yes/no prompts
(defalias 'yes-or-no-p #'y-or-n-p)
-;; enable automatic reloading of changed buffers and files
-(progn ; autorevert
- (csetq auto-revert-verbose nil
- global-auto-revert-non-file-buffers nil)
- (require 'autorevert)
- (global-auto-revert-mode 1))
+;; autorevert: enable automatic reloading of changed buffers and files
+(csetq auto-revert-verbose nil
+ global-auto-revert-non-file-buffers nil)
+(require 'autorevert)
+(global-auto-revert-mode 1)
;; time and battery in mode-line
(csetq
(require 'time)
(display-time-mode)
-(csetq battery-mode-line-format "%p%% %t")
+(csetq battery-mode-line-format " %p%% %t")
(require 'battery)
(display-battery-mode)
(require 'bandali-theme)
;; magit, *the* right way to do git
+(comment
(csetq transient-history-file (b/var "transient/history.el")
transient-levels-file (b/etc "transient/levels.el")
transient-values-file (b/etc "transient/values.el"))
(global-set-key (kbd "C-c g b") #'magit-blame-addition)
(global-set-key (kbd "C-c g l") #'magit-log-buffer-file)
(global-set-key (kbd "C-c g y") #'magit-pop-revision-stack)
+)
;; recently opened files
+(csetq recentf-max-saved-items 2000
+ recentf-save-file (b/var "recentf-save.el"))
(run-with-idle-timer 0.2 nil #'require 'recentf)
(with-eval-after-load 'recentf
- (csetq recentf-max-saved-items 2000
- recentf-save-file (b/var "recentf-save.el"))
- (add-to-list 'recentf-keep #'file-remote-p)
+ ;; (add-to-list 'recentf-keep #'file-remote-p)
(recentf-mode))
;; needed for history for counsel
(csetq amx-save-file (b/var "amx-save.el"))
+(add-to-list 'load-path (b/lisp "s"))
+(add-to-list 'load-path (b/lisp "amx"))
(run-with-idle-timer 0.3 nil #'require 'amx)
(with-eval-after-load 'amx
(amx-mode))
-;; (require 'bandali-ido)
(require 'bandali-ivy)
(require 'bandali-eshell)
-;; (require 'bandali-multi-term)
(require 'bandali-ibuffer)
(with-eval-after-load 'help
(temp-buffer-resize-mode)
- (csetq help-window-select t)
+ (csetq help-window-select t))
+(with-eval-after-load 'help-mode
;; local key bindings
(define-key help-mode-map (kbd "p") #'backward-button)
(define-key help-mode-map (kbd "n") #'forward-button))
(require 'bandali-message)
(require 'bandali-ebdb)
-;; IRC (with ERC and ZNC)
+;; IRC (with ERC)
(require 'bandali-erc)
+(add-to-list 'load-path (b/lisp "scpaste"))
(with-eval-after-load 'scpaste
(csetq scpaste-http-destination "https://p.bndl.org"
scpaste-scp-destination "p:~"))
+(autoload 'scpaste "scpaste" nil t)
+(autoload 'scpaste-region "scpaste" nil t)
(global-set-key (kbd "C-c a p p") #'scpaste)
(global-set-key (kbd "C-c a p r") #'scpaste-region)
;; display Lisp objects at point in the echo area
(when (version< "25" emacs-version)
(with-eval-after-load 'eldoc
- (global-eldoc-mode)))
+ (csetq eldoc-minor-mode-string " eldoc")
+ (global-eldoc-mode)))
;; highlight matching parens
(require 'paren)
;; yanking (pasting) what I'd originally intended to.
save-interprogram-paste-before-kill t)
(with-eval-after-load 'simple
- (column-number-mode))
+ (column-number-mode 1))
;; save minibuffer history
(require 'savehist)
(global-prettify-symbols-mode))
(add-hook 'prog-mode-hook #'indicate-buffer-boundaries-left)
-(define-key text-mode-map (kbd "C-*") #'b/insert-asterism)
+(define-key text-mode-map (kbd "C-<return>") #'b/insert-asterism)
(add-hook 'text-mode-hook #'indicate-buffer-boundaries-left)
(add-hook 'text-mode-hook #'flyspell-mode)
(add-to-list 'auto-mode-alist '("\\.bashrc$" . sh-mode))
+(with-eval-after-load 'flyspell
+ (csetq flyspell-mode-line-string " fly"))
+
;; flycheck
;; (run-with-idle-timer 0.6 nil #'require 'flycheck)
;; (with-eval-after-load 'flycheck
;; #'endless/replace-quote))
;; abbrev
-(csetq abbrev-file-name (b/var "abbrev.el"))
+(csetq abbrev-file-name (b/etc "abbrev.el"))
(add-hook 'text-mode-hook #'abbrev-mode)
\f
(setq indent-tabs-mode nil))
(add-hook 'lisp-interaction-mode-hook #'indent-spaces-mode))
+;; alloy
+(add-to-list 'load-path (b/lisp "alloy-mode"))
+(autoload 'alloy-mode "alloy-mode" nil t)
(with-eval-after-load 'alloy-mode
(csetq alloy-basic-offset 2)
;; (defun b/alloy-simple-indent (start end)
(with-eval-after-load 'man
(csetq Man-width 80))
-(run-with-idle-timer 0.4 nil #'require 'which-key)
-(with-eval-after-load 'which-key
- (csetq
- which-key-add-column-padding 5
- which-key-idle-delay 10000
- which-key-idle-secondary-delay 0.05
- which-key-max-description-length 32
- which-key-show-early-on-C-h t)
- (which-key-add-key-based-replacements
- ;; prefixes for global prefixes and minor modes
- "C-c !" "flycheck"
- "C-x RET" "coding system"
- "C-x 8" "unicode"
- "C-x @" "event modifiers"
- "C-x a" "abbrev/expand"
- "C-x r" "rectangle/register/bookmark"
- "C-x t" "tabs"
- "C-x v" "version control"
- "C-x X" "edebug"
- "C-x C-a" "edebug"
- "C-x C-k" "kmacro"
- ;; prefixes for my personal bindings
- "C-c &" "yasnippet"
- "C-c a" "applications"
- "C-c a e" "erc"
- "C-c a o" "org"
- "C-c a s" "shells"
- "C-c b" "buffers"
- "C-c c" "compile-and-comments"
- "C-c e" "eval"
- "C-c f" "files"
- "C-c F" "frames"
- "C-c g" "magit"
- "C-S-h" "help(ful)"
- "C-c q" "boxquote"
- "C-c t" "themes")
- ;; prefixes for major modes
- (which-key-add-major-mode-key-based-replacements 'org-mode
- "C-c C-v" "org-babel")
- (which-key-mode))
-
-;; (require 'bandali-projectile)
-
-(run-with-idle-timer 0.6 nil #'require 'unkillable-scratch)
-(with-eval-after-load 'unkillable-scratch
- (csetq unkillable-buffers '("^\\*scratch\\*$" "^\\*Messages\\*$"))
- (unkillable-scratch 1))
+(defun b/*scratch* ()
+ "Switch to `*scratch*' buffer, creating it if it does not exist."
+ (interactive)
+ (switch-to-buffer
+ (or (get-buffer "*scratch*")
+ (with-current-buffer (get-buffer-create "*scratch*")
+ (set-buffer-major-mode (current-buffer))
+ (current-buffer)))))
+(global-set-key (kbd "C-c s") #'b/*scratch*)
;; ,----
;; | make pretty boxed quotes like this
;; `----
+(add-to-list 'load-path (b/lisp "boxquote"))
(run-with-idle-timer 0.6 nil #'require 'boxquote)
(with-eval-after-load 'boxquote
(defvar b/boxquote-prefix-map)
(define-key b/boxquote-prefix-map (kbd "M-q") #'boxquote-fill-paragraph)
(define-key b/boxquote-prefix-map (kbd "M-w") #'boxquote-kill-ring-save))
+(add-to-list 'load-path (b/lisp "hl-todo"))
(run-with-idle-timer 0.5 nil #'require 'hl-todo)
(with-eval-after-load 'hl-todo
;; highlight TODOs in buffers
(global-hl-todo-mode))
+(add-to-list 'load-path (b/lisp "page-break-lines"))
(run-with-idle-timer 0.5 nil #'require 'page-break-lines)
(with-eval-after-load 'page-break-lines
(csetq page-break-lines-max-width fill-column)
(getenv "XDG_DOWNLOAD_DIR")))
(global-set-key (kbd "C-c a e w") #'eww)
-(comment
-
-;; org-ref
-(csetq
- reftex-default-bibliography '("~/usr/org/references.bib")
- org-ref-default-bibliography '("~/usr/org/references.bib")
- org-ref-bibliography-notes "~/usr/org/notes.org"
- org-ref-pdf-directory "~/usr/org/bibtex-pdfs/")
+;; ;; org-ref
+;; (csetq
+;; reftex-default-bibliography '("~/usr/org/references.bib")
+;; org-ref-default-bibliography '("~/usr/org/references.bib")
+;; org-ref-bibliography-notes "~/usr/org/notes.org"
+;; org-ref-pdf-directory "~/usr/org/bibtex-pdfs/")
;; fill-column-indicator ?
(global-set-key (kbd "C-c w L") #'windmove-swap-states-right)
;; pass
-(global-set-key (kbd "C-c a p") #'pass)
-(add-hook 'pass-mode-hook #'View-exit)
+;; (global-set-key (kbd "C-c a p") #'pass)
+;; (add-hook 'pass-mode-hook #'View-exit)
;; reftex
;; uncomment to disable reftex-cite's default choice of previous word
(add-hook 'latex-mode-hook #'reftex-mode)
;; dmenu
-(csetq
- dmenu-prompt-string "run: "
- dmenu-save-file (b/var "dmenu-items"))
+;; (csetq
+;; dmenu-prompt-string "run: "
+;; dmenu-save-file (b/var "dmenu-items"))
;; eosd ?
+;; delight
+(run-with-idle-timer 0.5 nil #'require 'delight)
+(with-eval-after-load 'delight
+ (delight 'auto-fill-function " f" "simple")
+ (delight 'abbrev-mode "" "abbrev")
+ (delight 'page-break-lines-mode "" "page-break-lines")
+ (delight 'ivy-mode "" "ivy")
+ (delight 'counsel-mode "" "counsel")
+ (delight 'mml-mode " mml" "mml")
+ (delight 'yas-minor-mode "" "yasnippet"))
+
\f
;;; Post initialization
-)
(message "Loading %s...done (%.3fs)" user-init-file
(float-time (time-subtract (current-time)
b/before-user-init-time)))
+++ /dev/null
-Subproject commit 0d05bdd10c77ec04c3d61eccf67e68c08284951f
+++ /dev/null
-Subproject commit ccfc92c600df681df5e8b5fecec328c462ceb71e
+++ /dev/null
-Subproject commit 36a10151e70e956e2f766ed9e65f4a9cfc8479b2
+++ /dev/null
-Subproject commit 3e92c5b1a94b0cf43f2d624180a1cb01df92afd8
+++ /dev/null
-Subproject commit eb9baf1d2bf6a073d24ccb717025baa693e98f3e
+++ /dev/null
-Subproject commit bc6d869c5b26fc969eb103c4be2642c5b8524e35
+++ /dev/null
-Subproject commit 7e47e0e2853bc1215739b2e28f260e9eed93b2c5
+++ /dev/null
-Subproject commit b92ab5a39b987e4fe69317b9d9fda452300baf20
+++ /dev/null
-Subproject commit b801e51076f2ac80083f7ef4365db1389a9d2015
+++ /dev/null
-Subproject commit 0b7038694a4d844581461c261d96a7cd5679ac51
+++ /dev/null
-Subproject commit a67fe361c8f2aa20fc235447fbb898f424b51439
+++ /dev/null
-Subproject commit ea6b4cbb9985ddae532bd2faf9bb00570c9f2781
+++ /dev/null
-Subproject commit 0598b98f63b623c1778cbd2e2f60b774b7a311b9
+++ /dev/null
-Subproject commit 9619e3ccc4e9179780cf48b7abb24239037791d7
+++ /dev/null
-Subproject commit 0ef8b13aef011a98b7da756e4f1ce3bb18e4d55a
+++ /dev/null
-Subproject commit 81a5f5668a7886dcb30c57bac8caf5cb29fbd7fb
+++ /dev/null
-Subproject commit 36d39bd25ae58d1359d17f99142520339bea5974
+++ /dev/null
-Subproject commit 3f04ad8d2ce14074cc786af266984b796d245fc0
+++ /dev/null
-Subproject commit af83a73ae542d5cb3c9d433cbf2ce1d4f4259117
+++ /dev/null
-Subproject commit 5b51845194b75052324be7effdaeb736c1367649
+++ /dev/null
-Subproject commit c41c3dfda86ae33832ffc146923e2a4675cbacfa
+++ /dev/null
-Subproject commit f8c4cd7fc67638ae4113551dcffdf87fcd252d9b
+++ /dev/null
-Subproject commit 83221130cb12be47a38a3748dc8fb00cd2bc6740
+++ /dev/null
-Subproject commit a03e693f6f9232cf75363aaaf1cb041f21675c19
+++ /dev/null
-Subproject commit 9902111423f393c4c0079feb4f51dfe425173b00
+++ /dev/null
-Subproject commit 43ba8b563bee3426cead0e6d4ddc09398e1a349d
+++ /dev/null
-Subproject commit cd4fa0aafecd839736e0b6cba68b4fc4d7045472
+++ /dev/null
-Subproject commit 999be065b195f2eddb4e1b629f99038d832d44b7
+++ /dev/null
-Subproject commit 95a846baa93bac4c3b3c028b9d53507f1042b23a
+++ /dev/null
-Subproject commit 4d44d08e90355a8ef36aaad1f9f79c95de1ce0e9
+++ /dev/null
-Subproject commit b24c2a760529833f230c14cb02ff6e7ec92288ab
+++ /dev/null
-Subproject commit 3642c11d5ef9be3c6fb9edb8fd5ec3c370abd889
+++ /dev/null
-Subproject commit efafd482c21b90decbb0b682ed3159c86014d4f3
+++ /dev/null
-Subproject commit 5cbdbf0d2015540c59ed8ee0fcf4788effdf75b6
+++ /dev/null
-Subproject commit 2fd359e556e05006e6976ba9b0f8cb220ea19863
--- /dev/null
+Subproject commit 0d05bdd10c77ec04c3d61eccf67e68c08284951f
--- /dev/null
+Subproject commit ccfc92c600df681df5e8b5fecec328c462ceb71e
;;; Code:
+(defvar b/erc-detach-on-kill t
+ "Whether killing a channel should send a DETACH command (for ZNC).")
+
(with-eval-after-load 'erc
(make-directory (b/var "erc/dcc/") t)
(csetq
erc-lurker-hide-list '("JOIN" "PART" "QUIT")
erc-nick "bandali"
erc-prompt "erc>"
+ erc-prompt-for-password nil
erc-rename-buffers t
erc-server-reconnect-attempts 5
erc-server-reconnect-timeout 3)
(erc-update-modules)
;; erc-fill
- (csetq
- erc-fill-column 77
- erc-fill-function 'erc-fill-static
- erc-fill-static-center 18)
+ ;; (csetq
+ ;; erc-fill-column 77
+ ;; erc-fill-function 'erc-fill-variable
+ ;; erc-fill-static-center 18)
+ ;; to disable:
+ ;; (erc-fill-mode -1)
;; erc-match
- ;; (csetq
- ;; erc-pal-highlight-type 'message
- ;; erc-pals
- ;; '("aindilis" "blackbeard" "bremner" "brettgilio" "civodul" "dto"
- ;; "ggoes" "jrasata" "jxself" "mplsCorwin" "quiliro" "rindolf" "rwp"
- ;; "sachac" "technomancy"))
- ;; (with-eval-after-load 'erc-match
- ;; (set-face-attribute
- ;; 'erc-pal-face nil
- ;; :foreground 'unspecified
- ;; :weight 'unspecified
- ;; ;; :inherit 'font-lock-string-face
- ;; ;; :background (face-attribute 'font-lock-string-face :background)
- ;; :background "#ffffed"))
+ (csetq
+ erc-pal-highlight-type 'nick
+ erc-pals '("aindilis" "blackbeard" "brettgilio" "civodul" "dto"
+ "ggoes" "jrasata" "mplsCorwin" "rwp" "technomancy"))
+ (with-eval-after-load 'erc-match
+ (set-face-attribute
+ 'erc-pal-face nil
+ :foreground 'unspecified
+ :weight 'unspecified
+ ;; :inherit 'font-lock-string-face
+ ;; :background (face-attribute 'font-lock-string-face :background)
+ :background "#ffffed"))
;; erc-pcomplete
(csetq erc-pcomplete-nick-postfix ", ")
+ ;; erc-stamp
+ (csetq erc-timestamp-only-if-changed-flag nil
+ erc-timestamp-format "%T "
+ erc-insert-timestamp-function 'erc-insert-timestamp-left)
+ (with-eval-after-load 'erc-match
+ (set-face-attribute
+ 'erc-timestamp-face nil
+ :foreground "#aaaaaa"
+ :weight 'unspecified
+ :background 'unspecified))
+
;; erc-track
(csetq
erc-track-enable-keybindings nil
;; key bindings
(global-set-key (kbd "C-c w e") #'erc-switch-to-buffer-other-window)
- (define-key erc-mode-map (kbd "M-a") #'erc-track-switch-buffer))
-
-(with-eval-after-load 'znc
- (let ((pwd (let ((auth (auth-source-search :host "znca")))
- (cond
- ((null auth) (error "Couldn't find znca's authinfo"))
- (t (funcall (plist-get (car auth) :secret)))))))
- (csetq znc-servers
- `(("znc.emacsconf.org" 6697 t
- ((freenode "bandali/freenode" ,pwd)))
- ("znc.emacsconf.org" 6697 t
- ((oftc "bandali/oftc" ,pwd)))
- ("znc.emacsconf.org" 6697 t
- ((tildechat "bandali/tildechat" ,pwd)))))))
+ (define-key erc-mode-map (kbd "M-a") #'erc-track-switch-buffer)
+
+ ;; hooks
+ (defun b/erc-detach-or-kill-channel ()
+ (if b/erc-detach-on-kill
+ (when (erc-server-process-alive)
+ (let ((tgt (erc-default-target)))
+ (erc-server-send (format "DETACH %s" tgt) nil tgt)))
+ (erc-kill-channel)))
+ (add-hook 'erc-kill-channel-hook #'b/erc-detach-or-kill-channel)
+ (remove-hook 'erc-kill-channel-hook #'erc-kill-channel))
+
;; global key bindings
-(global-set-key (kbd "C-c a e e") #'znc-erc)
-(global-set-key (kbd "C-c a e a") #'znc-all)
+(global-set-key
+ (kbd "C-c a e f")
+ (lambda ()
+ (interactive)
+ (let* ((auth (auth-source-search :host "znca"))
+ (p (if (null auth)
+ (error "Couldn't find znca's authinfo")
+ (funcall (plist-get (car auth) :secret)))))
+ (erc-tls :server "znc.emacsconf.org" :port 6697
+ :password (concat "bandali/freenode:" p)))))
+(global-set-key
+ (kbd "C-c a e o")
+ (lambda ()
+ (interactive)
+ (let* ((auth (auth-source-search :host "znca"))
+ (p (if (null auth)
+ (error "Couldn't find znca's authinfo")
+ (funcall (plist-get (car auth) :secret)))))
+ (erc-tls :server "znc.emacsconf.org" :port 6697
+ :password (concat "bandali/oftc:" p)))))
+(global-set-key
+ (kbd "C-c a e t")
+ (lambda ()
+ (interactive)
+ (let* ((auth (auth-source-search :host "znca"))
+ (p (if (null auth)
+ (error "Couldn't find znca's authinfo")
+ (funcall (plist-get (car auth) :secret)))))
+ (erc-tls :server "znc.emacsconf.org" :port 6697
+ :password (concat "bandali/tildechat:" p)))))
(provide 'bandali-erc)
;;; bandali-erc.el ends here
https://shemshak.org/~bandali")
(defvar b/uwaterloo-signature "Amin Bandali, MMath
https://bndl.org")
- (defvar b/csc-signature "Amin Bandali | https://bndl.org
-System Administrator, Systems Committee
-Computer Science Club, University of Waterloo")
+ (defvar b/csc-signature "Amin Bandali (https://bndl.org)
+Systems Committee <syscom@csclub.uwaterloo.ca>
+Computer Science Club of the University of Waterloo")
(defvar b/sfl-signature "Amin Bandali
Free Software Consultant
Savoir-faire Linux
+++ /dev/null
-;;; bandali-ido.el --- bandali's Ido setup -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2018-2020 Amin Bandali
-
-;; Author: Amin Bandali <bandali@gnu.org>
-;; Keywords: convenience, matching
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; My (currently unused) Ido setup.
-
-;;; Code:
-
-(use-package ido
- :demand
- :bind
- (:map ido-common-completion-map
- ([escape] . minibuffer-keyboard-quit)
- ("DEL" . b/ido-backspace))
- :config
- (require 'delsel)
- (defun b/ido-backspace ()
- "Forward to `backward-delete-char'. On error (read-only), quit."
- (interactive)
- (condition-case nil
- (backward-delete-char 1)
- (error
- (minibuffer-keyboard-quit))))
- (ido-mode 1)
- (ido-everywhere 1)
- :custom
- (ido-enable-flex-matching t)
- ;; (ido-enable-regexp t)
- ;; (ido-enable-prefix t)
- (ido-max-window-height 10)
- (ido-use-virtual-buffers t))
-
-(use-package ido-vertical-mode
- :defer 0.3
- :config
- (ido-vertical-mode 1)
- :custom
- (ido-vertical-define-keys 'C-n-C-p-up-and-down)
- (ido-vertical-show-count t))
-
-(use-package ido-completing-read+
- :defer 0.3
- :after ido
- :config
- (ido-ubiquitous-mode 1))
-
-(use-package crm-custom
- :defer 0.3
- :after crm
- :config
- (crm-custom-mode 1))
-
-(use-package ido-at-point
- :defer 0.3
- :config
- (ido-at-point-mode 1))
-
-(provide 'bandali-ido)
-;;; bandali-ido.el ends here
+++ /dev/null
-;;; bandali-multi-term.el --- bandali's multi-term setup -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2020 Amin Bandali
-
-;; Author: Amin Bandali <bandali@gnu.org>
-;; Keywords: terminals
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; My multi-term configuration.
-
-;;; Code:
-
-(use-package multi-term
- :disabled
- :defer 0.6
- :bind (("C-c a s m m" . multi-term)
- ("C-c a s m d" . multi-term-dedicated-toggle)
- ("C-c a s m p" . multi-term-prev)
- ("C-c a s m n" . multi-term-next)
- :map term-mode-map
- ("C-c C-j" . term-char-mode))
- :config
- (setq multi-term-program "screen"
- multi-term-program-switches (concat "-c"
- (getenv "XDG_CONFIG_HOME")
- "/screen/screenrc")
- ;; TODO: add separate bindings for connecting to existing
- ;; session vs. always creating a new one
- multi-term-dedicated-select-after-open-p t
- multi-term-dedicated-window-height 20
- multi-term-dedicated-max-window-height 30
- term-bind-key-alist
- '(("C-c C-c" . term-interrupt-subjob)
- ("C-c C-e" . term-send-esc)
- ("C-c C-j" . term-line-mode)
- ("C-k" . kill-line)
- ;; ("C-y" . term-paste)
- ("C-y" . term-send-raw)
- ("M-f" . term-send-forward-word)
- ("M-b" . term-send-backward-word)
- ("M-p" . term-send-up)
- ("M-n" . term-send-down)
- ("M-j" . term-send-raw-meta)
- ("M-y" . term-send-raw-meta)
- ("M-/" . term-send-raw-meta)
- ("M-0" . term-send-raw-meta)
- ("M-1" . term-send-raw-meta)
- ("M-2" . term-send-raw-meta)
- ("M-3" . term-send-raw-meta)
- ("M-4" . term-send-raw-meta)
- ("M-5" . term-send-raw-meta)
- ("M-6" . term-send-raw-meta)
- ("M-7" . term-send-raw-meta)
- ("M-8" . term-send-raw-meta)
- ("M-9" . term-send-raw-meta)
- ("<C-backspace>" . term-send-backward-kill-word)
- ("<M-DEL>" . term-send-backward-kill-word)
- ("M-d" . term-send-delete-word)
- ("M-," . term-send-raw)
- ("M-." . comint-dynamic-complete))
- term-unbind-key-alist
- '("C-z" "C-x" "C-c" "C-h"
- ;; "C-y"
- "<ESC>")))
-
-(provide 'bandali-multi-term)
-;;; bandali-multi-term.el ends here
+++ /dev/null
-;;; bandali-projectile.el --- bandali's Projectile setup -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2020 Amin Bandali
-
-;; Author: Amin Bandali <bandali@gnu.org>
-;; Keywords: convenience
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; My Projectile setup.
-
-;;; Code:
-
-(use-package projectile
- :disabled
- :defer 0.5
- :bind-keymap ("C-c p" . projectile-command-map)
- :config
- (make-directory (b/var "projectile/") t)
- (projectile-mode)
-
- (defun b/projectile-mode-line-fun ()
- "Report project name and type in the modeline."
- (let ((project-name (projectile-project-name))
- (project-type (projectile-project-type)))
- (format "%s%s"
- projectile-mode-line-prefix
- (if project-type
- (format ":%s" project-type)
- ""))))
- (setq projectile-mode-line-function 'b/projectile-mode-line-fun)
-
- (defun my-projectile-invalidate-cache (&rest _args)
- ;; ignore the args to `magit-checkout'
- (projectile-invalidate-cache nil))
-
- (eval-after-load 'magit-branch
- '(progn
- (advice-add 'magit-checkout
- :after #'my-projectile-invalidate-cache)
- (advice-add 'magit-branch-and-checkout
- :after #'my-projectile-invalidate-cache)))
-
- (when (featurep 'which-key)
- (which-key-add-key-based-replacements
- "C-c p" "projectile"
- "C-c p s" "projectile/search"
- "C-c p x" "projectile/execute"
- "C-c p 4" "projectile/other-window"))
- :custom
- (projectile-cache-file (b/var "projectile/cache.el"))
- (projectile-completion-system 'ivy)
- (projectile-known-projects-file (b/var "projectile/known-projects.el"))
- (projectile-mode-line-prefix " proj"))
-
-(provide 'bandali-projectile)
-;;; bandali-projectile.el ends here
;;; Code:
-(require 'refinery-theme)
-(load-theme 'refinery t)
+(with-eval-after-load 'package
+ (require 'refinery-theme)
+ (load-theme 'refinery t))
-(require 'smart-mode-line)
-;; thanks, but no thanks; don't make fixed-width fills.
-(defun sml/fill-for-buffer-identification nil "")
-(setq sml/theme 'respectful)
-(sml/setup)
-(smart-mode-line-enable)
+;; (require 'smart-mode-line)
+;; ;; thanks, but no thanks; don't make fixed-width fills.
+;; (defun sml/fill-for-buffer-identification nil "")
+;; (setq sml/theme 'respectful)
+;; (let ((sml/no-confirm-load-theme t))
+;; (sml/setup)
+;; (smart-mode-line-enable))
-(require 'minions)
-(minions-mode)
+;; (require 'minions)
+;; (minions-mode)
(defvar b/org-mode-font-lock-keywords
'(("[ \t]*\\(#\\+\\(BEGIN\\|END\\|begin\\|end\\)_\\(\\S-+\\)\\)[ \t]*\\([^\n:]*\\)"
(mapc #'disable-theme custom-enabled-themes)
(load-theme 'refinery t)
(when (featurep 'smart-mode-line)
- (sml/apply-theme 'bandali))
+ (let ((sml/no-confirm-load-theme t))
+ (sml/apply-theme 'respectful)))
(font-lock-remove-keywords
'org-mode b/org-mode-font-lock-keywords)
(when (featurep 'erc-hl-nicks)
(mapc #'disable-theme custom-enabled-themes)
(load-theme 'refinery-dark t)
(when (featurep 'smart-mode-line)
- (sml/apply-theme 'dark))
+ (let ((sml/no-confirm-load-theme t))
+ (sml/apply-theme 'dark)))
(font-lock-add-keywords
'org-mode b/org-mode-font-lock-keywords t)
(when (featurep 'erc-hl-nicks)
;;; Code:
-(defmacro b/setq-every (value &rest vars)
- "Set all the variables from VARS to value VALUE."
- (declare (indent defun) (debug t))
- `(progn ,@(mapcar (lambda (x) (list 'setq x value)) vars)))
+(require 'cl-lib)
+
+(defmacro csetq (&rest args)
+ "Set the value of user option VAR to VALUE.
+
+More generally, you can use multiple variables and values, as in
+ (csetq VAR VALUE VAR VALUE...)
+This sets each user option VAR's value to the corresponding VALUE.
+
+\(fn [VAR VALUE]...)"
+ (declare (debug setq))
+ `(progn
+ ,@(cl-loop for (var value) on args by 'cddr
+ collect
+ `(funcall (or (get ',var 'custom-set) #'set-default)
+ ',var ,value))))
(defun b/start-process (program &rest args)
"Same as `start-process', but doesn't bother about name and buffer."
--- /dev/null
+Subproject commit 7e47e0e2853bc1215739b2e28f260e9eed93b2c5
--- /dev/null
+Subproject commit 0598b98f63b623c1778cbd2e2f60b774b7a311b9
--- /dev/null
+Subproject commit f8c4cd7fc67638ae4113551dcffdf87fcd252d9b
--- /dev/null
+Subproject commit 43ba8b563bee3426cead0e6d4ddc09398e1a349d
--- /dev/null
+Subproject commit cd4fa0aafecd839736e0b6cba68b4fc4d7045472
+++ /dev/null
-;;-*-coding: utf-8;-*-
-(define-abbrev-table 'message-mode-abbrev-table
- '(
- ("linux" "GNU/Linux" nil :count 4)
- ))