summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbd <bdunahu@colostate.edu>2024-01-10 19:44:21 -0700
committerbd <bdunahu@colostate.edu>2024-01-10 19:44:21 -0700
commit1ced565816120bfcc351daf9fc3a4e851162e3b7 (patch)
tree93e9c23660cd07f4dba861f334b23c03d322f48c
parentda5922a476cebdbbf338f0192165dbbbcd3f7b6f (diff)
Initial commit of new repository structure
-rw-r--r--.config/emacs/bd-default.el167
-rw-r--r--.config/emacs/bd-development.el85
-rw-r--r--.config/emacs/bd-mode-and-themes.el161
-rw-r--r--.config/emacs/bd-org.el97
-rw-r--r--.config/emacs/bd-shells.el47
-rw-r--r--.config/emacs/early-init.el28
-rw-r--r--.config/emacs/init.el72
-rw-r--r--.config/emacs/modules/bd--devel.el67
-rw-r--r--.config/emacs/modules/bd--dictionary.el9
-rw-r--r--.config/emacs/modules/bd--dired.el21
-rw-r--r--.config/emacs/modules/bd--emms.el (renamed from .config/emacs/bd-emms.el)9
-rw-r--r--.config/emacs/modules/bd--erc.el12
-rw-r--r--.config/emacs/modules/bd--essential-windowing.el30
-rw-r--r--.config/emacs/modules/bd--essentials.el62
-rw-r--r--.config/emacs/modules/bd--eww.el25
-rw-r--r--.config/emacs/modules/bd--exwm-windowing.el (renamed from .config/emacs/bd-wm.el)51
-rw-r--r--.config/emacs/modules/bd--image.el23
-rw-r--r--.config/emacs/modules/bd--minibuffer.el34
-rw-r--r--.config/emacs/modules/bd--modeline.el126
-rw-r--r--.config/emacs/modules/bd--org.el87
-rw-r--r--.config/emacs/modules/bd--roam.el38
-rw-r--r--.config/emacs/modules/bd--rss.el24
-rw-r--r--.config/emacs/modules/bd--shells.el57
-rw-r--r--.config/emacs/modules/bd--themes.el40
-rw-r--r--.config/guix-builds/bdunahu.scm125
-rw-r--r--.config/guix-builds/hati.scm11
-rw-r--r--.config/guix-builds/system-config.scm86
-rw-r--r--.config/guix-builds/vali.scm11
-rw-r--r--.config/guix/hati.scm66
-rw-r--r--.config/guix/modules/base.scm53
-rw-r--r--.config/guix/modules/bat.scm12
-rw-r--r--.config/guix/modules/emacs.scm24
-rw-r--r--.config/guix/modules/gpg.scm14
-rw-r--r--.config/guix/modules/shell.scm22
-rw-r--r--.config/guix/modules/ssh.scm19
-rw-r--r--.config/guix/modules/xdg.scm17
-rw-r--r--.config/guix/modules/xmodmap.scm17
-rw-r--r--.config/guix/modules/ymir.scm87
-rw-r--r--.config/guix/vali.scm62
-rw-r--r--.gitignore1
-rw-r--r--.mozilla/icecat/cg33tk6q.default/chrome/userChrome.css65
41 files changed, 1167 insertions, 897 deletions
diff --git a/.config/emacs/bd-default.el b/.config/emacs/bd-default.el
deleted file mode 100644
index 39cd231..0000000
--- a/.config/emacs/bd-default.el
+++ /dev/null
@@ -1,167 +0,0 @@
-;; -*- lexical-binding: t; -*-
-
-
-;;;; packages
-(require 'package)
-(add-to-list 'load-path (expand-file-name "~/.guix-profile/share/emacs/site-lisp"))
-(guix-emacs-autoload-packages)
-
-(require 'use-package-ensure)
-(setopt use-package-always-ensure t)
-;; (setq use-package-verbose t) ; for debugging
-
-
-(setenv "PATH" (format "%s:%s" (expand-file-name "~/Personal/scripts/") (getenv "PATH")))
-
-
-;;;; functions
-(defun cleanup-buffer ()
- (interactive)
- (delete-trailing-whitespace)
- (untabify (point-min) (point-max))
- (indent-region (point-min) (point-max)))
-
-(defun clamp (lower-bound upper-bound value)
- (max lower-bound (min value upper-bound)))
-
-(defun request-sudo ()
- "Uses TRAMP to edit currently opened file as root."
- (interactive)
- (when buffer-file-name
- (find-alternate-file
- (concat "/sudo:root@localhost:"
- buffer-file-name))))
-
-(defun rip-video (url &rest _)
- "Given a url, rip and play the video
-with yt-dlp and mpv."
- (message "Ludu %s" url)
- (start-process-shell-command "rip-video" nil (concat "rip-video " url)))
-
-(defun parse-and-rip-video ()
- "If region, open SEARCH with mpv in --full-screen. Else,
- open URL at point."
- (interactive)
- (let ((URL-OR-SEARCH
- (if (use-region-p)
- (buffer-substring (mark) (point))
- (shr-url-at-point nil))))
- (rip-video URL)))
-
-
-;;;; defaults
-(global-unset-key (kbd "C-z"))
-(global-unset-key (kbd "C-x C-z")) ; terrible binding
-
-(global-set-key (kbd "C-z =") 'text-scale-increase)
-(global-set-key (kbd "C-z -") 'text-scale-decrease)
-
-(setopt inhibit-startup-message t)
-(menu-bar-mode -1)
-(tool-bar-mode -1)
-(scroll-bar-mode -1)
-
-(require 'display-line-numbers)
-(global-display-line-numbers-mode)
-(global-visual-line-mode t)
-(setopt display-line-numbers-type 'relative)
-(global-hl-line-mode 1)
-
-(global-auto-revert-mode 1)
-(winner-mode 1)
-
-;; messy editing + cleanup buffers on save
-(setopt next-line-add-newlines t)
-(add-hook 'before-save-hook 'cleanup-buffer)
-
-;; prompts
-(setopt use-short-answers t)
-(setopt vc-follow-symlinks t)
-
-(setopt kill-whole-line t)
-
-;; recursive minibuffers
-(setopt enable-recursive-minibuffers t)
-(minibuffer-depth-indicate-mode 1)
-
-;; allow one side window per side of frame
-(setopt window-sides-slots '(1 1 1 1))
-
-;; dictionary
-(keymap-global-set "C-c i" 'dictionary-lookup-definition)
-(setopt dictionary-server "localhost"
- dictionary-use-single-buffer t)
-
-;; do not show async command buffers by default
-(add-to-list 'display-buffer-alist
- (cons "\\*Async Shell Command\\*.*" (cons #'display-buffer-no-window nil)))
-
-(setopt scroll-up-aggressively '0.0
- scroll-down-aggressively '0.0)
-
-;; move backups to tmp folder
-(setopt backup-directory-alist `(("." . ,(expand-file-name "tmp/backups/" user-emacs-directory))))
-(make-directory (expand-file-name "tmp/auto_saves/" user-emacs-directory) t)
-;; move auto-saves to tmp folder
-(setopt auto-save-list-file-prefix (expand-file-name "tmp/auto_saves/sessions/" user-emacs-directory)
- auto-save-file-transforms `((".*" ,(expand-file-name "tmp/auto_saves/" user-emacs-directory) t)))
-
-
-;;;; built-in packages
-(use-package newsticker
- :demand t
- :bind (("C-z C-n" . newsticker-show-news)
- :map newsticker-treeview-item-mode-map
- ("C-j" . parse-and-rip-video))
- :custom
- (newsticker-url-list-defaults nil)
- (newsticker-automatically-mark-items-as-old nil)
- (newsticker-url-list '(("Ambrose and Elsewhere" "https://jamesenge.com/engeblog/feed" nil nil nil)
- ("James Enge Mastodon" "https://mastodon.sdf.org/@jamesenge.rss" nil nil nil)
- ("Tales From the Magician's Skull" "https://goodman-games.com/tftms/category/book-reviews/feed" nil nil nil)
- ("Parabola GNU/Linux-libre" "https://www.parabola.nu/feeds/news/" nil nil nil)
- ("suckless.org news" "https://suckless.org/atom.xml" nil nil nil)
- ("Mental Outlaw" "https://vid.puffyan.us/feed/channel/UC7YOGHUfC1Tb6E4pudI9STA" nil nil nil)
- ("Luke Smith" "https://vid.puffyan.us/feed/channel/UC2eYFnH61tmytImy1mTYvhA" nil nil nil)
- ("Brent Westbrook" "https://yewtu.be/feed/channel/UC0PBefyEK7qQ7HN325nUamQ" nil nil nil)
- ("Bugswriter" "https://yewtu.be/feed/channel/UCngn7SVujlvskHRvRKc1cTw" nil nil nil)
- ("Protesilaos Stravrou" "https://yewtu.be/feed/playlist/PL8Bwba5vnQK14z96Gil86pLMDO2GnOhQ6" nil nil nil)))
- ;; may require ./newsticker/groups to be cleared
- (newsticker-groups '("Feeds"
- ("READING" "James Enge Mastodon" "Tales From the Magician's Skull" "Ambrose and Elsewhere")
- ("TECH" "Parabola GNU/Linux-libre" "suckless.org news")
- ("VIDEO" "Mental Outlaw" "Luke Smith" "Brent Westbrook" "Bugswriter" "Protesilaos Stravrou"))))
-
-(use-package eww
- :demand t
- :custom
- ;; default to eww
- (browse-url-browser-function 'eww-browse-url)
- (shr-use-fonts nil)
- (shr-cookie-policy nil)
- (shr-max-width 85)
- (url-privacy-level '(email os emacs lastloc cookies))
- (eww-search-prefix "https://searx.be/search?q=")
- (eww-auto-rename-buffer 'title)
- (eww-use-browse-url (regexp-opt '("mailto:" "youtube.com" "youtu.be" "yewtu.be")))
- (browse-url-handlers
- `((,(regexp-opt '("youtube.com" "youtu.be" "yewtu.be")) . rip-video))))
-
-(use-package image-dired
- :bind (("C-c d" . dired-jump))
- :custom
- (dired-listing-switches "-alh")
- (dired-guess-shell-alist-user
- `((,(regexp-opt '(".mkv" ".mov" ".mp4" ".webm" ".m4v" ".wav" ".mp3" ".opus" ".ogv" ".flac")) "mpv &")
- (,(regexp-opt '(".pdf")) "zathura &")
- (,(regexp-opt '(".html")) "icecat &"))))
-
-(use-package erc
- :config
- (defalias 'erc 'erc-tls)
- :custom
- (erc-lurker-threshold-time 3600)
- (erc-server "irc.libera.chat")
- (erc-nick "Isaz")
- (erc-kill-buffer-on-part t)
- (erc-autojoin-channels-alist '(("irc.libera.chat" "#parabola" "#emacs" "#guix"))))
diff --git a/.config/emacs/bd-development.el b/.config/emacs/bd-development.el
deleted file mode 100644
index 3e47ad6..0000000
--- a/.config/emacs/bd-development.el
+++ /dev/null
@@ -1,85 +0,0 @@
-;; -*- lexical-binding: t; -*-
-
-(defun remote-shell ()
- (interactive)
- (let ((default-directory "/ssh:bdunahu@perch.cs.colostate.edu:"))
- (shell)))
-
-(defcustom display-line-numbers-exempt-modes
- '(vterm-mode eshell-mode shell-mode term-mode ansi-term-mode image-mode doc-view-mode newsticker-treeview-mode newsticker-treeview-item-mode dired-mode org-agenda-mode)
- "Major modes on which to disable line numbers."
- :group 'display-line-numbers
- :type 'list
- :version "green")
-
-(defun display-line-numbers--turn-on ()
- "Turn on line numbers except for certain major modes.
-Exempt major modes are defined in `display-line-numbers-exempt-modes'."
- (unless (or (minibufferp)
- (member major-mode display-line-numbers-exempt-modes))
- (display-line-numbers-mode)))
-
-;; (use-package tex
-;; :ensure auctex
-;; :hook
-;; ((latex-mode)
-;; (text-mode . (lambda() (setq ispell-parser 'tex)))) ; improves ispell in LaTeX
-;; :custom
-;; (TeX-auto-save t)
-;; ;; better support for latex packages
-;; (TeX-parse-self t)
-;; (TeX-view-program-selection '(((output-dvi has-no-display-manager)
-;; "dvi2tty")
-;; ((output-dvi style-pstricks)
-;; "dvips and gv")
-;; (output-dvi "xdvi")
-;; (output-pdf "Zathura")
-;; (output-html "xdg-open"))))
-
-(use-package vertico
- :init
- (vertico-mode)
- :custom
- (vertico-cycle t))
-
-(use-package orderless
- :init
- (setq completion-styles '(orderless basic)
- completion-category-defaults nil
- completion-category-overrides '((file (styles partial-completion)))))
-
-(use-package company
- :hook (prog-mode text-mode)
- :config
- (global-company-mode)
- :custom
- (company-global-modes '(bash-ts-mode emacs-lisp-mode
- slime-mode js-ts-mode
- json-ts-mode css-ts-mode
- python-ts-mode java-ts-mode))
- (company-set-idle-delay (lambda () (if (company-in-string-or-comment) nil 0.3)))
- (company-minimum-prefix-length 1)
- (company-tooltip-flip-when-above t)
- (company-show-numbers t)
- (company-tooltip-align-annotations t)
- (company-tooltip-limit 15)
- (company-selection-wrap-around t))
-
-(use-package slime
- :commands slime
- :config
- (add-hook 'slime-mode-hook
- (lambda ()
- (local-set-key (kdb "C-c C-k") 'slime-eval-buffer)))
- :custom
- ;; more memory for ml libraries
- (inferior-lisp-program "sbcl --dynamic-space-size 4096"))
-
-(use-package magit
- :commands magit-status
- :custom
- (magit-define-global-key-bindings 'recommended))
-
-
-;; compilation mode
-(setq compilation-always-kill t)
diff --git a/.config/emacs/bd-mode-and-themes.el b/.config/emacs/bd-mode-and-themes.el
deleted file mode 100644
index 528e920..0000000
--- a/.config/emacs/bd-mode-and-themes.el
+++ /dev/null
@@ -1,161 +0,0 @@
-;; -*- lexical-binding: t; -*-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; excellent resources : https://gitlab.com/mark.feller/emacs.d/-/blob/master/modules/module-solarized.el ;;
-;; https://protesilaos.com/codelog/2023-07-29-emacs-custom-modeline-tutorial/ ;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;;; icon components for filename and git status
-(use-package all-the-icons
- :demand t
- :init
- (defun modeline-buffer-name ()
- "Return 'buffer-name' with proper spacing and icon."
- (format " %s %s" (all-the-icons-icon-for-file (buffer-name)) (buffer-name)))
- (defvar-local bd/buffer-identification-mode-line
- '(:eval (format "%s" (modeline-buffer-name)))
- "Formats the modeline-buffer-name.")
-
- (defun git-vc-modeline ()
- (let ((branch (mapconcat 'concat (cdr (split-string vc-mode "[:-]")) "-")))
- (concat
- (propertize (format " %s" (all-the-icons-octicon "git-branch"))
- 'face `(:height 1 :family ,(all-the-icons-octicon-family))
- 'display '(raise 0))
- (propertize (format " %s" branch))
- (propertize " "))))
- (defvar-local bd/vc-mode-line
- '(:eval (when (and vc-mode (not (eq major-mode 'magit-status-mode))) ; temp fix to avoid bug which occurs in magit buffer
- (format "%s"
- (propertize (git-vc-modeline) 'face 'shadow))))
- "Formats the checked out git repository.")
- (defvar-local bd/emms-mode-line
- '(:eval (when (and (mode-line-window-selected-p) emms-mode-line-string)
- (format "%s %s" emms-mode-line-string
- emms-playing-time-string)))
- "Formats the currently playing emms track.")
- :config
- (setq emms-mode-line-icon-before-format (format "%s" (all-the-icons-fileicon "owl"))
- emms-mode-line-icon-enabled-p t))
-
-(use-package ednc
- :init
- (defun get-num-notifications ()
- "Return number of active notifcations as a string."
- (format "%s" (length (ednc-notifications))))
- (defvar-local bd/notify-mode-line
- '(:eval (when (and (ednc-notifications) (mode-line-window-selected-p))
- (format " %s %s" (all-the-icons-material "notifications_active")
- (propertize (get-num-notifications) 'face 'error))))
- "Formats the notification number.")
- (ednc-mode))
-
-;;;; time and date
-(setq display-time-format "%m/%d/%y %H:%M (%a)"
- display-time-default-load-average nil)
-(display-time)
-
-(defvar-local bd/time-mode-line
- '(:eval
- (when (mode-line-window-selected-p)
- display-time-string))
- "displays current time and date in selected window.")
-
-(defun mode-line-fill (reserve)
- "Return empty space, leaving RESERVE space on the right."
- (unless reserve
- (setq reserve 20))
- (when (and window-system (eq 'right (get-scroll-bar-mode)))
- (setq reserve (- reserve 3)))
- (propertize " "
- 'display `((space :align-to (- (+ right right-fringe right-margin) ,reserve)))))
-
-(dolist (construct '(bd/buffer-identification-mode-line
- bd/vc-mode-line
- bd/misc-mode-line))
- (put construct 'risky-local-variable t))
-
-(setq-default mode-line-format
- (list
- mode-line-front-space
- ;; mode-line-mule-info
- ;; mode-line-frame-identification
- bd/buffer-identification-mode-line
- " "
- mode-line-modes
- " "
- ;; mode-line-position
- mode-line-modified
- bd/notify-mode-line
- bd/vc-mode-line
- " "
- bd/emms-mode-line
- (mode-line-fill 21)
- bd/time-mode-line))
-
-;;;; remove mode-line-clutter
-(define-minor-mode minor-mode-blackout-mode
- "Hides minor modes from the mode line."
- t)
-
-(catch 'done
- (mapc (lambda (x)
- (when (and (consp x)
- (equal (cadr x) '("" minor-mode-alist)))
- (let ((original (copy-sequence x)))
- (setcar x 'minor-mode-blackout-mode)
- (setcdr x (list "" original)))
- (throw 'done t)))
- mode-line-modes))
-
-(global-set-key (kbd "C-c m") 'minor-mode-blackout-mode)
-
-(defun disable_mode_line ()
- (setq mode-line-format nil))
-
-;; custom function to remove mode line from images
-(add-hook 'image-mode-hook 'disable_mode_line)
-
-;;;; true transparency
-;; (add-to-list 'default-frame-alist '(alpha-background . 60))
-(add-to-list 'default-frame-alist '(alpha . (80 . 80)))
-
-(defun set-frame-alpha (value)
- "Sets the transparency of the frame background. 0=transparent/100=opaque"
- (interactive "nTransparency Value 0 - 100 opaque:")
- (setq value (clamp 0 100 value))
- (set-frame-parameter (selected-frame) 'alpha-background value)
- (message "Alpha set to %d" value))
-
-;;;; modus themes
-(defun modus-themes-custom-faces ()
- (modus-themes-with-colors
- (custom-set-faces
- `(mode-line-inactive ((,class :background ,bg-main
- :foreground ,fg-active)))
- `(mode-line-active ((,class :background ,bg-main
- :foreground ,fg-active)))
-
- `(hl-line ((,class :background ,magenta-nuanced-bg)))
-
- `(emms-playlist-track-face ((,class :foreground ,blue-nuanced-fg)))
- `(emms-playlist-selected-face ((,class :foreground ,fg-special-cold)))
- `(emms-browser-track-face ((,class :foreground ,blue-nuanced-fg))))))
-
-(add-hook 'modus-themes-after-load-theme-hook #'modus-themes-custom-faces)
-
-(setopt modus-themes-italic-constructs t
- modus-themes-bold-constructs t
- modus-themes-hl-line '(accented)
- modus-themes-subtle-line-numbers t
- modus-themes-paren-match '(intense)
- modus-themes-region '(bg-only)
- modus-themes-syntax '(faint)
- modus-themes-mode-line '(borderless)
- modus-themes-org-blocks 'gray-background
- modus-themes-headings '(
- (1 . (rainbow overline))))
-
-(load-theme 'modus-vivendi t)
-
-(modus-themes-custom-faces)
diff --git a/.config/emacs/bd-org.el b/.config/emacs/bd-org.el
deleted file mode 100644
index 06a961c..0000000
--- a/.config/emacs/bd-org.el
+++ /dev/null
@@ -1,97 +0,0 @@
-;; -*- lexical-binding: t; -*-
-
-(defvar-local agenda-file "~/Personal/roam/agenda/agenda_tasks.org")
-
-(defun bd/org-mode-setup-hook ()
- "Sets up improved org-mode defaults upon
-each org file open."
- (org-indent-mode)
- (org-toggle-inline-images)
- (org-toggle-pretty-entities))
-
-(use-package org
- :hook
- (org-mode . bd/org-mode-setup-hook)
- :commands (org-capture org-agenda)
- :bind (("C-c n a" . 'org-agenda)
- ("C-c n c" . 'org-capture)
- ("C-c n s" . 'org-schedule)
- ("C-c n d" . 'org-deadline)
- ("C-c n r" . 'org-refile))
- :config
- (advice-add 'org-refile :after 'org-save-all-org-buffers) ; after refiling tasks, save all buffers
- (org-babel-do-load-languages
- 'org-babel-load-languages
- '((emacs-lisp . t)
- (python . t)
- (shell . t)
- (lisp . t)))
- :custom
- (org-startup-folded 'show2levels)
- (org-ellipsis " ▾")
- (org-agenda-files
- `(,agenda-file "~/Personal/roam/agenda/archived_tasks.org"))
- (org-deadline-warning-days 7)
- (org-log-done 'time)
- (org-log-into-drawer "history")
- (org-todo-keywords
- '((sequence "TODO(t)" "NEXT(n!)" "|" "DONE(d)" "CANC(c)")))
- (org-refile-targets ; refile into the headings of these files, not tags
- '(("archived_tasks.org" :maxlevel . 1)
- ("agenda_tasks.org" :maxlevel . 1)))
- (org-capture-templates
- `(("t" " Tasks")
- ("tt" "Task" entry (file+olp ,agenda-file "Unsorted")
- "* TODO %?\n %U\n %a" :empty-lines 1)))
- (org-agenda-custom-commands
- '(("S" "Standard Block Agenda"
- ((tags-todo "*"
- ((org-agenda-skip-function '(org-agenda-skip-if nil '(timestamp)))
- (org-agenda-block-separator nil)
- (org-agenda-overriding-header "Undated Tasks\n")))
- (agenda "" ((org-agenda-span 5)
- (org-deadline-warning-days 0)
- (org-agenda-block-separator nil)
- (org-scheduled-past-days 4)
- (org-agenda-overriding-header "\nUpcoming Tasks\n")))
- (agenda "" ((org-agenda-time-grid nil)
- (org-agenda-show-all-dates nil)
- (org-agenda-span 21)
- (org-deadline-warning-days 0)
- (org-agenda-block-separator nil)
- (org-agenda-entry-types '(:deadline))
- (org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
- (org-agenda-overriding-header "\nFuture Deadlines (+21d)\n"))))))))
-
-(defun org-roam-node-insert-immediate (arg &rest args)
- "Insert a new org mode link, but do not open the
-file."
- (interactive "P")
- (let ((args (cons arg args))
- (org-roam-capture-templates (list (append (car org-roam-capture-templates)
- '(:immediate-finish t)))))
- (apply #'org-roam-node-insert args)))
-
-(use-package org-roam
- :after org
- :bind (("C-c n l" . 'org-roam-buffer-toggle)
- ("C-c n f" . 'org-roam-node-find)
- ("C-c n i" . 'org-roam-node-insert)
- ("C-c n g" . 'org-roam-graph)
- ("C-c n I" . 'org-roam-node-insert-immediate)
- ("C-c n j" . 'org-roam-dailies-capture-today)
- :map org-mode-map
- ("C-M-i" . 'completion-at-point))
- :config
- (org-roam-db-autosync-mode)
- :custom
- (org-roam-directory (expand-file-name "~/Personal/roam/"))
- (org-roam-dailies-directory "logs/")
- (org-roam-complete-everywhere t)
- (org-roam-capture-templates '(("e" "extend" plain
- "#+AUTHOR: bdunahu\n#+DESCRIPTION: %^{Description}\n#+STARTUP: show3levels\n" :target
- (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+TITLE: ${title}")
- :unnarrowed t)
- ("d" "default" plain "%?" :target
- (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}")
- :unnarrowed t))))
diff --git a/.config/emacs/bd-shells.el b/.config/emacs/bd-shells.el
deleted file mode 100644
index 4054e5d..0000000
--- a/.config/emacs/bd-shells.el
+++ /dev/null
@@ -1,47 +0,0 @@
-;; -*- lexical-binding: t; -*-
-
-
-(defun eshell-open-buffer ()
- "Opens eshell in the bottom
-side window."
- (interactive)
- (let ((curr-buffer (current-buffer))
- (eshell (eshell)))
- (switch-to-buffer curr-buffer)
- (display-buffer-in-side-window (get-buffer eshell) '((side . top)))
- (switch-to-buffer-other-window eshell)))
-
-(defun bd/get-prompt-path ()
- (abbreviate-file-name (eshell/pwd)))
-
-(defun bd/eshell-prompt ()
- "Assemble a shell prompt including host, git
-status, and path."
- (let ((current-branch (magit-get-current-branch)))
- (concat
- "\n"
- (propertize (system-name) 'face `(:foreground "#edb54b"))
- ;; (when current-branch
- ;; (concat
- ;; (format " %s " (all-the-icons-octicon "git-branch"))
- ;; (propertize current-branch 'face `(:foreground "#98d1ce"))))
- (format " %s " (all-the-icons-fileicon "gn"))
- (propertize (bd/get-prompt-path) 'face `(:foreground "#33859d"))
- (propertize (format-time-string " %a, %R") 'face `(:foreground "#888ba5"))
- (propertize "\n> " 'face `(:foreground "#c33027")))))
-
-(use-package eshell
- :bind (("C-z C-e" . 'eshell-open-buffer)
- :map eshell-mode-map
- ("C-q" . 'delete-window) ; mostly for side window
- ("<tab>" . completion-at-point))
- :custom
- (eshell-prompt-function 'bd/eshell-prompt)
- (eshell-prompt-regexp "^> ")
- (eshell-scroll-to-bottom-on-input 'this)
- (eshell-banner-message (concat "\n" (propertize " " 'display (create-image (expand-file-name "~/.config/emacs/images/raven.png") 'png nil :scale 0.2 :align-to "center")) "\n")))
-
-
-(use-package term
- :config
- (defalias 'term 'ansi-term))
diff --git a/.config/emacs/early-init.el b/.config/emacs/early-init.el
index a80caf9..671a562 100644
--- a/.config/emacs/early-init.el
+++ b/.config/emacs/early-init.el
@@ -1,14 +1,7 @@
;; -*- lexical-binding: t; -*-
-; external package manager
-(setq package-archives nil)
-
-
-(push '(menu-bar-lines . 0) default-frame-alist)
-(push '(tool-bar-lines . 0) default-frame-alist)
-(push '(background-color . "#000000") default-frame-alist)
-
+;;;; display load information + speedups
(defun bd/display-startup-time ()
(message "Emacs loaded in %s with %d garbage collections."
(format "%.2f seconds"
@@ -19,3 +12,22 @@
(add-hook 'emacs-startup-hook #'bd/display-startup-time)
(setq frame-inhibit-implied-resize t)
+
+;; reduce the frequency of garbage collection during startup
+;; by making it happen as little as possible
+;; TODO: `most-positive-fixnum' will pressure system memory if used
+;; as a permanent value
+(setopt gc-cons-threshold most-positive-fixnum
+ gc-cons-percentage 0.5)
+
+(add-hook 'emacs-startup-hook
+ (lambda ()
+ (setopt gc-cons-threshold (* 1024 1024 20)
+ gc-cons-percentage 0.2)))
+
+
+;;;; avoid-blinding startup
+(push '(menu-bar-lines . 0) default-frame-alist)
+(push '(tool-bar-lines . 0) default-frame-alist)
+(push '(background-color . "#000000") default-frame-alist)
+(push '(foreground-color . "#ffffff") default-frame-alist)
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 9d9e674..c6744d5 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -1,21 +1,57 @@
;; -*- lexical-binding: t; -*-
-;; reduce the frequency of garbage collection by making it happen on
-;; each 50MB of allocated data (the default is on every 0.76MB)
-(setopt gc-cons-threshold 50000000)
-
-;;;; do not store customized setting (automatic) here
-(setopt custom-file (expand-file-name "~/.config/emacs/custom.el"))
-(load custom-file t)
-
-;;;; files are segregated but not self-contained
-(load (expand-file-name "~/.config/emacs/bd-default.el"))
-(load (expand-file-name "~/.config/emacs/bd-org.el"))
-(load (expand-file-name "~/.config/emacs/bd-emms.el"))
-(load (expand-file-name "~/.config/emacs/bd-development.el"))
-(load (expand-file-name "~/.config/emacs/bd-wm.el"))
-(load (expand-file-name "~/.config/emacs/bd-mode-and-themes.el"))
-(load (expand-file-name "~/.config/emacs/bd-shells.el"))
-
-(setopt gc-cons-threshold 800000)
+;;;; auto-generated files
+;; disable the custom file by making it temporary
+(setopt custom-file (make-temp-file "emacs-custom-")
+ ;; disable lockfiles
+ create-lockfiles nil
+ ;; move auto-saves to tmp folder
+ auto-save-list-file-prefix (expand-file-name "tmp/auto_saves/sessions/" user-emacs-directory)
+ auto-save-file-transforms `((".*" ,(expand-file-name "tmp/auto_saves/" user-emacs-directory) t))
+ ;; move backups to tmp folder
+ backup-directory-alist `(("." . ,(expand-file-name "tmp/backups/" user-emacs-directory))))
+(make-directory (expand-file-name "tmp/auto_saves/" user-emacs-directory) t)
+
+
+;;;; path
+(setenv "PATH" (format "%s:%s" (expand-file-name "~/Personal/scripts/") (getenv "PATH")))
+
+
+;;;; configure packages
+;; external package manager
+(setopt package-archives nil
+ package-enable-at-startup t)
+(add-to-list 'load-path (expand-file-name "~/.guix-profile/share/emacs/site-lisp"))
+(guix-emacs-autoload-packages)
+;; use-package
+(require 'use-package-ensure)
+(setopt use-package-always-ensure t)
+;; (setq use-package-verbose t)
+
+
+;;;; add my modules to load path
+(mapc
+ (lambda (path)
+ (add-to-list 'load-path (locate-user-emacs-file path)))
+ '("modules" "libraries"))
+
+
+;;;; load modules
+(require 'bd--themes)
+(require 'bd--essentials)
+(require 'bd--essential-windowing)
+(require 'bd--rss)
+(require 'bd--eww)
+(require 'bd--dired)
+(require 'bd--image)
+(require 'bd--dictionary)
+(require 'bd--erc)
+(require 'bd--shells)
+(require 'bd--minibuffer)
+(require 'bd--devel)
+(require 'bd--org)
+(require 'bd--roam)
+(require 'bd--emms)
+(require 'bd--modeline)
+(require 'bd--exwm-windowing)
diff --git a/.config/emacs/modules/bd--devel.el b/.config/emacs/modules/bd--devel.el
new file mode 100644
index 0000000..34d14fc
--- /dev/null
+++ b/.config/emacs/modules/bd--devel.el
@@ -0,0 +1,67 @@
+;; -*- lexical-binding: t; -*-
+
+
+;;;; general
+(defun remote-shell ()
+ (interactive)
+ (let ((default-directory "/ssh:bdunahu@perch"))
+ (shell)))
+
+(defun request-sudo ()
+ "Uses TRAMP to edit current opened file as root."
+ (interactive)
+ (when buffer-file-name
+ (find-alternate-file
+ (concat "/sudo:root@localhost:"
+ buffer-file-name))))
+
+
+(setq compilation-always-kill t)
+
+(add-hook 'prog-mode-hook (lambda ()
+ (font-lock-add-keywords
+ nil '(("\\<\\(FIX\\(ME\\)?\\|TODO\\)"
+ 1 font-lock-warning-face t)))))
+
+
+(use-package company
+ :hook (prog-mode)
+ :custom
+ (company-set-idle-delay (lambda () (if (company-in-string-or-comment) nil 0.3)))
+ (company-minimum-prefix-length 1)
+ (company-tooltip-flip-when-above t)
+ (company-show-numbers t)
+ (company-tooltip-align-annotations t)
+ (company-tooltip-limit 15)
+ (company-selection-wrap-around t))
+
+(use-package magit
+ :commands magit-status
+ :custom
+ (magit-define-global-key-bindings 'recommended))
+
+
+(use-package tex
+ :ensure auctex
+ :hook
+ ((latex-mode)
+ (text-mode . (lambda() (setq ispell-parser 'tex)))) ; improves ispell in LaTeX
+ :config
+ (push '(output-pdf "Zathura") TeX-view-program-selection)
+ :custom
+ (TeX-auto-save t)
+ ;; better support for latex packages
+ (TeX-parse-self t))
+
+(use-package slime
+ :commands slime
+ :config
+ (add-hook 'slime-mode-hook
+ (lambda ()
+ (local-set-key (kdb "C-c C-k") 'slime-eval-buffer)))
+ :custom
+ ;; more memory for ml libraries
+ (inferior-lisp-program "sbcl --dynamic-space-size 4096"))
+
+
+(provide 'bd--devel)
diff --git a/.config/emacs/modules/bd--dictionary.el b/.config/emacs/modules/bd--dictionary.el
new file mode 100644
index 0000000..35c93ca
--- /dev/null
+++ b/.config/emacs/modules/bd--dictionary.el
@@ -0,0 +1,9 @@
+;; -*- lexical-binding: t; -*-
+
+
+(keymap-global-set "C-c i" 'dictionary-lookup-definition)
+(setopt dictionary-server "localhost"
+ dictionary-use-single-buffer t)
+
+
+(provide 'bd--dictionary)
diff --git a/.config/emacs/modules/bd--dired.el b/.config/emacs/modules/bd--dired.el
new file mode 100644
index 0000000..0304435
--- /dev/null
+++ b/.config/emacs/modules/bd--dired.el
@@ -0,0 +1,21 @@
+;; -*- lexical-binding: t; -*-
+
+
+(keymap-global-set "C-c d" 'dired-jump)
+
+(setopt dired-listing-switches "-alhLG --time-style=long-iso --group-directories-first"
+
+ dired-recursive-copies 'always
+ dired-recursive-deletes 'always
+
+ ;; "dwim": guess where to move files
+ dired-dwim-target t
+
+ dired-guess-shell-alist-user
+ `((,(regexp-opt '(".mkv" ".mov" ".mp4" ".webm" ".m4v" ".wav" ".mp3" ".opus" ".ogv" ".flac")) "mpv &")
+ (,(regexp-opt '(".jpeg" ".jpg" ".png")) "feh &")
+ (,(regexp-opt '(".pdf")) "zathura &")
+ (,(regexp-opt '(".html")) "icecat &")))
+
+
+(provide 'bd--dired)
diff --git a/.config/emacs/bd-emms.el b/.config/emacs/modules/bd--emms.el
index 573f275..40acf36 100644
--- a/.config/emacs/bd-emms.el
+++ b/.config/emacs/modules/bd--emms.el
@@ -1,5 +1,6 @@
;; -*- lexical-binding: t; -*-
+
(defun emms-open-playlist-buffer ()
"Opens the current playlist in the right
side window."
@@ -37,4 +38,10 @@ playback."
(emms-volume-change-function 'emms-volume-mpd-change)
;; misc
(emms-mode-line-format "%s ")
- (emms-playlist-buffer-name "*Playlist*"))
+ (emms-playlist-buffer-name "*Playlist*")
+ (require 'all-the-icons)
+ (emms-mode-line-icon-before-format (format "%s" (all-the-icons-fileicon "owl")))
+ (emms-mode-line-icon-enabled-p t))
+
+
+(provide 'bd--emms)
diff --git a/.config/emacs/modules/bd--erc.el b/.config/emacs/modules/bd--erc.el
new file mode 100644
index 0000000..c001834
--- /dev/null
+++ b/.config/emacs/modules/bd--erc.el
@@ -0,0 +1,12 @@
+;; -*- lexical-binding: t; -*-
+
+
+(with-eval-after-load "erc" (defalias 'erc 'erc-tls))
+(setopt erc-lurker-threshold-time 3600
+ erc-server "irc.libera.chat"
+ erc-nick "Isaz"
+ erc-kill-buffer-on-part t
+ erc-autojoin-channels-alist '(("irc.libera.chat" "#parabola" "#emacs" "#guix")))
+
+
+(provide 'bd--erc)
diff --git a/.config/emacs/modules/bd--essential-windowing.el b/.config/emacs/modules/bd--essential-windowing.el
new file mode 100644
index 0000000..bba3dee
--- /dev/null
+++ b/.config/emacs/modules/bd--essential-windowing.el
@@ -0,0 +1,30 @@
+;; -*- lexical-binding: t; -*-
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; This file contains sane windowing settings for any ;;
+;; environment type. ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+(menu-bar-mode -1)
+(tool-bar-mode -1)
+(scroll-bar-mode -1)
+
+;; allow one side window per side of frame
+(setopt window-sides-slots '(1 1 1 1))
+
+;; alpha
+(defun bd/clamp (lower-bound upper-bound value)
+ (max lower-bound (min value upper-bound)))
+
+(defun set-frame-alpha (value)
+ "Sets the transparency of the frame background. 0=transparent/100=opaque"
+ (interactive "nTransparency Value (30 - 100 opaque): ")
+ (setq value (bd/clamp 30 100 value))
+ (set-frame-parameter (selected-frame) 'alpha `(,value . ,value))
+ (message "Alpha set to %d" value))
+(add-to-list 'default-frame-alist '(alpha . (82 . 82)))
+
+
+(provide 'bd--essential-windowing)
diff --git a/.config/emacs/modules/bd--essentials.el b/.config/emacs/modules/bd--essentials.el
new file mode 100644
index 0000000..cc51202
--- /dev/null
+++ b/.config/emacs/modules/bd--essentials.el
@@ -0,0 +1,62 @@
+;; -*- lexical-binding: t; -*-
+
+
+;;;; standard bindings
+;; both of these are bad--especially in exwm
+(global-unset-key (kbd "C-z"))
+(global-unset-key (kbd "C-x C-z"))
+
+(global-set-key (kbd "C-z =") 'text-scale-increase)
+(global-set-key (kbd "C-z -") 'text-scale-decrease)
+
+
+;;;; UI
+(setopt inhibit-startup-message t)
+
+;; line numbers
+(require 'display-line-numbers)
+(global-display-line-numbers-mode)
+(global-visual-line-mode t)
+(setopt display-line-numbers-type 'relative)
+(global-hl-line-mode 1)
+
+(defcustom display-line-numbers-exempt-modes
+ '(vterm-mode eshell-mode shell-mode term-mode ansi-term-mode image-mode doc-view-mode newsticker-treeview-mode newsticker-treeview-item-mode dired-mode org-agenda-mode)
+ "Major modes on which to disable line numbers."
+ :group 'display-line-numbers
+ :type 'list
+ :version "green")
+
+(defun display-line-numbers--turn-on ()
+ "Turn on line numbers except for certain major modes.
+Exempt major modes are defined in `display-line-numbers-exempt-modes'."
+ (unless (or (minibufferp)
+ (member major-mode display-line-numbers-exempt-modes))
+ (display-line-numbers-mode)))
+
+
+;;;; defaults
+;; basic editing
+(setopt kill-whole-line t)
+
+(defun bd/cleanup-buffer ()
+ (interactive)
+ (delete-trailing-whitespace)
+ (untabify (point-min) (point-max))
+ (indent-region (point-min) (point-max)))
+
+(setopt next-line-add-newlines t)
+(add-hook 'before-save-hook 'bd/cleanup-buffer)
+
+
+;;;; buffers
+(global-auto-revert-mode 1)
+(winner-mode 1)
+;; do not show async command buffers by default
+(add-to-list 'display-buffer-alist
+ (cons "\\*Async Shell Command\\*.*" (cons #'display-buffer-no-window nil)))
+(setopt scroll-up-aggressively '0.65
+ scroll-down-aggressively '0.65)
+
+
+(provide 'bd--essentials)
diff --git a/.config/emacs/modules/bd--eww.el b/.config/emacs/modules/bd--eww.el
new file mode 100644
index 0000000..7bde428
--- /dev/null
+++ b/.config/emacs/modules/bd--eww.el
@@ -0,0 +1,25 @@
+;; -*- lexical-binding: t; -*-
+
+
+;; do not use an external browser
+(setopt browse-url-browser-function 'eww-browse-url
+ shr-use-fonts nil
+ shr-cookie-policy nil
+ shr-max-width 85
+ ;; send only user agent
+ url-privacy-level '(email os emacs lastloc cookies)
+ eww-search-prefix "https://searx.be/search?q="
+ eww-auto-rename-buffer 'title
+ eww-use-browse-url (regexp-opt '("mailto:"
+ "youtube.com"
+ "youtu.be"
+ "yewtu.be"
+ "vid.puffyan.us"))
+ browse-url-handlers
+ `((,(regexp-opt'("youtube.com" "youtu.be" "yewtu.be" "vid.puffyan.us")) .
+ (lambda (url &rest _)
+ (message "Ludu %s" url)
+ (start-process-shell-command "rip-video" nil (concat "rip-video " url))))))
+
+
+(provide 'bd--eww)
diff --git a/.config/emacs/bd-wm.el b/.config/emacs/modules/bd--exwm-windowing.el
index 9d7f60a..a275f5a 100644
--- a/.config/emacs/bd-wm.el
+++ b/.config/emacs/modules/bd--exwm-windowing.el
@@ -1,6 +1,15 @@
;; -*- lexical-binding: t; -*-
+;;;; utilities
+;; desktop
+(use-package desktop-environment
+ :custom
+ (desktop-environment-screenshot-directory (xdg-user-dir "PICTURES"))
+ (desktop-environment-screenshot-command "flameshot full")
+ (desktop-environment-screenshot-partial-command "flameshot launcher"))
+
+
(defun bd/exwm-update-class ()
"Changes the buffer name to reflect the class name for
that buffer."
@@ -10,6 +19,7 @@ that buffer."
"Make workspace 1 the default startup workspace."
(exwm-workspace-switch-create 1))
+
(defun toggle-current-window-dedication ()
"Adds or revokes dedicated window status from a buffer. A
dedicated buffer will never be automatically orphaned."
@@ -21,6 +31,8 @@ dedicated buffer will never be automatically orphaned."
(if dedicated "no longer " "")
(buffer-name))))
+
+;;;; bookmarks, passwords
(defun insert-bookmark ()
"Inserts a url or string from permanent
bookmark file. If an x window, place in kill-ring."
@@ -48,7 +60,12 @@ select a line from a file."
(point-max)))
"\n" t)))
+(use-package password-store
+ :custom
+ (password-store-time-before-clipboard-restore 20)
+ (define-key global-map (kbd "C-c k") #'password-store-copy))
+;; emacs-pinentry; wonderful in EXWM, has security flaws
(use-package pinentry
:init
(pinentry-start)
@@ -63,22 +80,15 @@ select a line from a file."
;; order is important
(require 'exwm-randr)
(exwm-randr-enable)
- ;; (start-process-shell-command "xrandr" nil "/home/bdunahu/.config/emacs/exwm_xrandr.sh")
+ ;; because my nvidia driver is currently unsupported with nouveau,
+ ;; xrandr seems to be entirely broken. This line is only here for
+ ;; future reference
+ ;;(start-process-shell-command "xrandr" nil (expand-file-name "exwm_xrandr.sh" user-emacs-directory))
(start-process-shell-command "picom" nil "picom")
(start-process-shell-command "bg" nil "set-bg")
(start-process-shell-command "xrate" nil "xset r rate 250 70")
- (dolist (k '(("s-L" "slock")
- ("s-B" "icecat")
- ("s-P" "passmenu --type")
- ("<f2>" "brightnessctl set 1%-")
- ("<f3>" "brightnessctl set 1%+")
- ("<f6>" "pactl set-sink-mute @DEFAULT_SINK@ toggle")
- ("<f7>" "pactl set-sink-volume @DEFAULT_SINK@ -10%")
- ("<f8>" "pactl set-sink-volume @DEFAULT_SINK@ +5%")
- ("<f9>" "mpc prev")
- ("<f11>" "mpc next")
- ("<print>" "flameshot launcher")))
+ (dolist (k '(("s-B" "icecat")))
(let ((f (lambda () (interactive)
(save-window-excursion
(start-process-shell-command (cadr k) nil (cadr k))))))
@@ -105,11 +115,21 @@ select a line from a file."
([?\s-p] . (lambda ()
(interactive)
(other-window -1)))
+ ([?\s-L] . desktop-environment-lock-screen)
+ ([f2] . desktop-environment-brightness-decrement)
+ ([f3] . desktop-environment-brightness-increment)
+ ([f7] . emms-volume-lower)
+ ([f8] . emms-volume-raise)
+ ([f9] . emms-next)
+ ([f10] . emms-pause)
+ ([f11] . emms-previous)
+ ([print] . desktop-environment-screenshot-part)
+ ([S-print] . desktop-environment-screenshot)
([?\s-O] . insert-bookmark)
+ ([?\s-P] . password-store-copy)
([?\s-r] . exwm-reset)
([?\s-d] . toggle-current-window-dedication)
([?\s-q] . kill-current-buffer)
- ;; ([?\s-<f10>] . emms-pause) ; see rest of mpc commands above--mpc pause performed poorly
([?\s-x] . (lambda (command)
(interactive (list (read-shell-command "s-x ")))
(start-process-shell-command command nil command)))
@@ -142,4 +162,7 @@ select a line from a file."
(exwm-workspace-show-all-buffers t)
(exwm-layout-show-all-buffers t)
- (exwm-randr-workspace-monitor-plist '(0 "DVI-D-1" 2 "DVI-D-1" 4 "DVI-D-1" 6 "DVI-D-1" 8 "DVI-D-1")))
+ (exwm-randr-workspace-monitor-plist '(0 "HDMI-1" 6 "HDMI-1" 7 "HDMI-1" 8 "HDMI-1" 9 "HDMI-1")))
+
+
+(provide 'bd--exwm-windowing)
diff --git a/.config/emacs/modules/bd--image.el b/.config/emacs/modules/bd--image.el
new file mode 100644
index 0000000..3dd2526
--- /dev/null
+++ b/.config/emacs/modules/bd--image.el
@@ -0,0 +1,23 @@
+;; -*- lexical-binding: t; -*-
+
+
+(require 'image-mode)
+(defun toggle-mode-line ()
+ "If the mode line is displayed, toggle it off.
+If the mode line is off, set it to the default value."
+ (interactive)
+ (setq mode-line-format
+ (if mode-line-format
+ nil
+ (default-value 'mode-line-format))))
+
+
+;;;; hooks
+(add-hook 'image-mode-hook 'toggle-mode-line)
+
+
+;;;; binds
+(keymap-set image-mode-map "l" #'toggle-mode-line)
+
+
+(provide 'bd--image)
diff --git a/.config/emacs/modules/bd--minibuffer.el b/.config/emacs/modules/bd--minibuffer.el
new file mode 100644
index 0000000..83b0d08
--- /dev/null
+++ b/.config/emacs/modules/bd--minibuffer.el
@@ -0,0 +1,34 @@
+;; -*- lexical-binding: t; -*-
+
+
+(setopt use-short-answers t
+ vc-follow-symlinks t
+ ;; order to try completions
+ completion-styles '(substring
+ initials
+ flex
+ orderless)
+ ;; required for exwm (pass) but
+ ;; always useful
+ enable-recursive-minibuffers t)
+(minibuffer-depth-indicate-mode 1)
+
+
+(use-package vertico
+ :init
+ (vertico-mode)
+ :custom
+ (vertico-cycle t))
+
+(use-package marginalia
+ :init
+ (marginalia-mode))
+
+(use-package orderless
+ :custom
+ (setopt completion-styles '(orderless basic)
+ completion-category-defaults nil
+ completion-category-overrides '((file (styles partial-completion)))))
+
+
+(provide 'bd--minibuffer)
diff --git a/.config/emacs/modules/bd--modeline.el b/.config/emacs/modules/bd--modeline.el
new file mode 100644
index 0000000..b092081
--- /dev/null
+++ b/.config/emacs/modules/bd--modeline.el
@@ -0,0 +1,126 @@
+;; -*- lexical-binding: t; -*-
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Highly customized modeline. Note this currently requires ;;
+;; many of the previous modules to be loaded to function properly. ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defun mode-line-fill (reserve)
+ "Return empty space, leaving RESERVE space on the right."
+ (unless reserve
+ (setq reserve 20))
+ (when (and window-system (eq 'right (get-scroll-bar-mode)))
+ (setq reserve (- reserve 3)))
+ (propertize " "
+ 'display `((space :align-to (- (+ right right-fringe right-margin) ,reserve)))))
+
+
+;;;; remove mode-line-clutter
+(define-minor-mode minor-mode-blackout-mode
+ "Hides minor modes from the mode line."
+ t)
+
+(catch 'done
+ (mapc (lambda (x)
+ (when (and (consp x)
+ (equal (cadr x) '("" minor-mode-alist)))
+ (let ((original (copy-sequence x)))
+ (setcar x 'minor-mode-blackout-mode)
+ (setcdr x (list "" original)))
+ (throw 'done t)))
+ mode-line-modes))
+
+(global-set-key (kbd "C-c m") 'minor-mode-blackout-mode)
+
+
+;;;; time and date
+(setq display-time-format "%m/%d/%y %H:%M (%a)"
+ display-time-default-load-average nil)
+(display-time)
+
+(defvar-local bd/time-mode-line
+ '(:eval
+ (when (mode-line-window-selected-p)
+ display-time-string))
+ "displays current time and date in selected window.")
+
+
+;;;; notification-server
+(use-package ednc
+ :init
+ (defun get-num-notifications ()
+ "Return number of active notifcations as a string."
+ (format "%s" (length (ednc-notifications))))
+
+ (defvar-local bd/notify-mode-line
+ '(:eval (when (and (ednc-notifications) (mode-line-window-selected-p))
+ (format " %s %s" (all-the-icons-material "notifications_active")
+ (propertize (get-num-notifications) 'face 'error))))
+ "Formats the notification number.")
+ (ednc-mode))
+
+
+;;;; buffer name
+(defun modeline-buffer-name ()
+ "Return 'buffer-name' with proper spacing and icon."
+ (format " %s %s" (all-the-icons-icon-for-file (buffer-name)) (buffer-name)))
+
+(defvar-local bd/buffer-identification-mode-line
+ '(:eval (format "%s" (modeline-buffer-name)))
+ "Formats the modeline-buffer-name.")
+
+
+;;;; git
+(defun git-vc-modeline ()
+ (let ((branch (mapconcat 'concat (cdr (split-string vc-mode "[:-]")) "-")))
+ (concat
+ (propertize (format " %s" (all-the-icons-octicon "git-branch"))
+ 'face `(:height 1 :family ,(all-the-icons-octicon-family))
+ 'display '(raise 0))
+ (propertize (format " %s" branch))
+ (propertize " "))))
+
+(defvar-local bd/vc-mode-line
+ '(:eval (when (and vc-mode (not (eq major-mode 'magit-status-mode))) ; temp fix to avoid bug which occurs in magit buffer
+ (format "%s"
+ (propertize (git-vc-modeline) 'face 'shadow))))
+ "Formats the checked out git repository.")
+
+
+;;;; emms
+(defvar-local bd/emms-mode-line
+ '(:eval (when (and (mode-line-window-selected-p) emms-mode-line-string)
+ (format "%s %s" emms-mode-line-string
+ emms-playing-time-string)))
+ "Formats the currently playing emms track.")
+
+
+(dolist (construct '(bd/time-mode-line
+ bd/notify-mode-line
+ bd/buffer-identification-mode-line
+ bd/vc-mode-line
+ bd/emms-mode-line))
+ (put construct 'risky-local-variable t))
+
+
+(setq-default mode-line-format
+ (list
+ mode-line-front-space
+ ;; mode-line-mule-info
+ ;; mode-line-frame-identification
+ bd/buffer-identification-mode-line
+ " "
+ mode-line-modes
+ " "
+ ;; mode-line-position
+ mode-line-modified
+ bd/notify-mode-line
+ bd/vc-mode-line
+ " "
+ bd/emms-mode-line
+ (mode-line-fill 21)
+ bd/time-mode-line))
+
+
+(provide 'bd--modeline)
diff --git a/.config/emacs/modules/bd--org.el b/.config/emacs/modules/bd--org.el
new file mode 100644
index 0000000..c4ade63
--- /dev/null
+++ b/.config/emacs/modules/bd--org.el
@@ -0,0 +1,87 @@
+;; -*- lexical-binding: t; -*-
+
+
+(defvar-local agenda-file "~/Personal/roam/agenda/agenda_tasks.org")
+
+(defun bd/org-mode-setup-hook ()
+ "Sets up improved org-mode defaults upon
+each org file open."
+ (org-indent-mode)
+ (org-toggle-inline-images)
+ (org-toggle-pretty-entities))
+
+;; hooks
+(add-hook 'org-mode-hook 'bd/org-mode-setup-hook)
+
+;; binds
+(keymap-global-set "C-c n a" 'org-agenda)
+(keymap-global-set "C-c n c" 'org-capture)
+(keymap-global-set "C-c n s" 'org-schedule)
+(keymap-global-set "C-c n d" 'org-deadline)
+(keymap-global-set "C-c n r" 'org-refile)
+
+;; source blocks
+(org-babel-do-load-languages
+ 'org-babel-load-languages
+ '((emacs-lisp . t)
+ (python . t)
+ (shell . t)
+ (lisp . t)))
+
+;; standard
+(setopt org-startup-folded 'show2levels
+ org-ellipsis " ▾")
+
+;; agenda
+(advice-add 'org-refile :after 'org-save-all-org-buffers) ; after refiling tasks, save all buffers
+
+(setopt org-agenda-files
+ `(,agenda-file "~/Personal/roam/agenda/archived_tasks.org")
+
+ org-deadline-warning-days 7
+ org-log-done 'time
+ org-log-into-drawer "history"
+
+ org-todo-keywords
+ '((sequence "TODO(t)" "NEXT(n!)" "|" "DONE(d)" "CANC(c)"))
+
+ org-refile-targets ; refile into the headings of these files, not tags
+ '(("archived_tasks.org" :maxlevel . 1)
+ ("agenda_tasks.org" :maxlevel . 1))
+
+ org-capture-templates
+ `(("t" " Tasks")
+ ("ts" "Software Testing" entry (file+olp ,agenda-file "CS415")
+ "* TODO %?\n DEADLINE: %^t")
+ ("tm" "Machine Learning" entry (file+olp ,agenda-file "CS445")
+ "* TODO %?\n DEADLINE: %^t")
+ ("tp" "Programming Languages" entry (file+olp ,agenda-file "CS454")
+ "* TODO %?\n DEADLINE: %^t")
+ ("tc" "Creative Writing" entry (file+olp ,agenda-file "E210")
+ "* TODO %?\n DEADLINE: %^t")
+ ("s" " Self")
+ ("s" "Unsorted Task" entry (file+olp ,agenda-file "Self")
+ "* TODO %?\n %^t\n %a"))
+
+ org-agenda-custom-commands
+ '(("S" "Standard Block Agenda"
+ ((tags-todo "*"
+ ((org-agenda-skip-function '(org-agenda-skip-if nil '(timestamp)))
+ (org-agenda-block-separator nil)
+ (org-agenda-overriding-header "Undated Tasks\n")))
+ (agenda "" ((org-agenda-span 8)
+ (org-deadline-warning-days 0)
+ (org-agenda-block-separator nil)
+ (org-scheduled-past-days 4)
+ (org-agenda-overriding-header "\nUpcoming Tasks\n")))
+ (agenda "" ((org-agenda-time-grid nil)
+ (org-agenda-show-all-dates nil)
+ (org-agenda-span 21)
+ (org-deadline-warning-days 0)
+ (org-agenda-block-separator nil)
+ (org-agenda-entry-types '(:deadline))
+ (org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
+ (org-agenda-overriding-header "\nFuture Deadlines (+21d)\n")))))))
+
+
+(provide 'bd--org)
diff --git a/.config/emacs/modules/bd--roam.el b/.config/emacs/modules/bd--roam.el
new file mode 100644
index 0000000..21cf573
--- /dev/null
+++ b/.config/emacs/modules/bd--roam.el
@@ -0,0 +1,38 @@
+;; -*- lexical-binding: t; -*-
+
+
+(defun org-roam-node-insert-immediate (arg &rest args)
+ "Insert a new org mode link, but do not open the
+file."
+ (interactive "P")
+ (let ((args (cons arg args))
+ (org-roam-capture-templates (list (append (car org-roam-capture-templates)
+ '(:immediate-finish t)))))
+ (apply #'org-roam-node-insert args)))
+
+(use-package org-roam
+ :after org
+ :bind (("C-c n l" . 'org-roam-buffer-toggle)
+ ("C-c n f" . 'org-roam-node-find)
+ ("C-c n i" . 'org-roam-node-insert)
+ ("C-c n g" . 'org-roam-graph)
+ ("C-c n I" . 'org-roam-node-insert-immediate)
+ ("C-c n j" . 'org-roam-dailies-capture-today)
+ :map org-mode-map
+ ("C-M-i" . 'completion-at-point))
+ :config
+ (org-roam-db-autosync-mode)
+ :custom
+ (org-roam-directory (expand-file-name "~/Personal/roam/"))
+ (org-roam-dailies-directory "logs/")
+ (org-roam-complete-everywhere t)
+ (org-roam-capture-templates '(("e" "extend" plain
+ "#+AUTHOR: bdunahu\n#+DESCRIPTION: %^{Description}\n#+STARTUP: show3levels\n" :target
+ (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+TITLE: ${title}")
+ :unnarrowed t)
+ ("d" "default" plain "%?" :target
+ (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}")
+ :unnarrowed t))))
+
+
+(provide 'bd--roam)
diff --git a/.config/emacs/modules/bd--rss.el b/.config/emacs/modules/bd--rss.el
new file mode 100644
index 0000000..6cd8507
--- /dev/null
+++ b/.config/emacs/modules/bd--rss.el
@@ -0,0 +1,24 @@
+;; -*- lexical-binding: t; -*-
+
+
+(keymap-global-set "C-z C-n" 'newsticker-show-news)
+
+(setopt newsticker-url-list-defaults nil
+ newsticker-automatically-mark-items-as-old nil
+ newsticker-url-list '(("Ambrose and Elsewhere" "https://jamesenge.com/engeblog/feed" nil nil nil)
+ ("James Enge Mastodon" "https://mastodon.sdf.org/@jamesenge.rss" nil nil nil)
+ ("Tales From the Magician's Skull" "https://goodman-games.com/tftms/category/book-reviews/feed" nil nil nil)
+ ("Parabola GNU/Linux-libre" "https://www.parabola.nu/feeds/news/" nil nil nil)
+ ("suckless.org news" "https://suckless.org/atom.xml" nil nil nil)
+ ("Mental Outlaw" "https://vid.puffyan.us/feed/channel/UC7YOGHUfC1Tb6E4pudI9STA" nil nil nil)
+ ("Luke Smith" "https://vid.puffyan.us/feed/channel/UC2eYFnH61tmytImy1mTYvhA" nil nil nil)
+ ("Bugswriter" "https://yewtu.be/feed/channel/UCngn7SVujlvskHRvRKc1cTw" nil nil nil)
+ ("Protesilaos Stravrou" "https://yewtu.be/feed/playlist/PL8Bwba5vnQK14z96Gil86pLMDO2GnOhQ6" nil nil nil))
+ ;; may require ./newsticker/groups to be cleared
+ newsticker-groups '("Feeds"
+ ("READING" "James Enge Mastodon" "Tales From the Magician's Skull" "Ambrose and Elsewhere")
+ ("TECH" "Parabola GNU/Linux-libre" "suckless.org news")
+ ("VIDEO" "Mental Outlaw" "Luke Smith" "Bugswriter" "Protesilaos Stravrou")))
+
+
+(provide 'bd--rss)
diff --git a/.config/emacs/modules/bd--shells.el b/.config/emacs/modules/bd--shells.el
new file mode 100644
index 0000000..8bcd9c4
--- /dev/null
+++ b/.config/emacs/modules/bd--shells.el
@@ -0,0 +1,57 @@
+;; -*- lexical-binding: t; -*-
+
+
+(require 'all-the-icons)
+
+
+;;;; term
+(defalias 'term 'ansi-term)
+
+
+;;;; eshell
+(defun eshell-open-buffer ()
+ "Opens eshell in the bottom
+side window."
+ (interactive)
+ (let ((curr-buffer (current-buffer))
+ (eshell (eshell)))
+ (switch-to-buffer curr-buffer)
+ (display-buffer-in-side-window (get-buffer eshell) '((side . top)))
+ (switch-to-buffer-other-window eshell)))
+
+
+(defun bd/get-prompt-path ()
+ (abbreviate-file-name (eshell/pwd)))
+
+(defun bd/eshell-prompt ()
+ "Assemble a shell prompt including host, git
+status, and path."
+ (concat
+ "\n"
+ (propertize (system-name) 'face `(:foreground "#edb54b"))
+ (format " %s " (all-the-icons-fileicon "gn"))
+ (propertize (bd/get-prompt-path) 'face `(:foreground "#33859d"))
+ (propertize (format-time-string " %a, %R") 'face `(:foreground "#888ba5"))
+ (propertize "\n> " 'face `(:foreground "#c33027"))))
+
+
+(require 'esh-mode)
+(keymap-global-set "C-z C-e" 'eshell-open-buffer)
+(keymap-set eshell-mode-map "C-q" 'delete-window) ; mostly for side window
+(keymap-set eshell-mode-map "<tab>" 'completion-at-point) ; mostly for side window
+(setopt eshell-prompt-function 'bd/eshell-prompt
+ eshell-prompt-regexp "^> "
+ eshell-scroll-to-bottom-on-input 'this
+ eshell-banner-message (concat "\n" (propertize " " 'display (create-image (expand-file-name "~/.config/emacs/images/raven.png") 'png nil :scale 0.2 :align-to "center")) "\n"))
+
+
+;;;; shell
+(require 'shell)
+(keymap-set shell-mode-map "C-c C-k" #'comint-clear-buffer)
+(setopt shell-command-prompt-show-cwd t
+ shell-highlight-undef-enable t
+ shell-kill-buffer-on-exit t
+ comint-prompt-read-only t)
+
+
+(provide 'bd--shells)
diff --git a/.config/emacs/modules/bd--themes.el b/.config/emacs/modules/bd--themes.el
new file mode 100644
index 0000000..abf9887
--- /dev/null
+++ b/.config/emacs/modules/bd--themes.el
@@ -0,0 +1,40 @@
+;; -*- lexical-binding: t; -*-
+
+
+(defun modus-themes-custom-faces ()
+ (modus-themes-with-colors
+ (custom-set-faces
+ `(vertical-border ((,class :background ,bg-main
+ :foreground ,bg-main)))
+
+ `(mode-line-inactive ((,class :background ,bg-main
+ :foreground ,fg-active)))
+ `(mode-line-active ((,class :background ,bg-main
+ :foreground ,fg-active)))
+
+ `(hl-line ((,class :background ,magenta-nuanced-bg)))
+
+ `(emms-playlist-track-face ((,class :foreground ,blue-nuanced-fg)))
+ `(emms-playlist-selected-face ((,class :foreground ,fg-special-cold)))
+ `(emms-browser-track-face ((,class :foreground ,blue-nuanced-fg))))))
+
+(add-hook 'modus-themes-after-load-theme-hook #'modus-themes-custom-faces)
+
+(setopt modus-themes-italic-constructs t
+ modus-themes-bold-constructs t
+ modus-themes-hl-line '(accented)
+ modus-themes-subtle-line-numbers t
+ modus-themes-paren-match '(intense)
+ modus-themes-region '(bg-only)
+ modus-themes-syntax '(faint)
+ modus-themes-mode-line '(borderless)
+ modus-themes-org-blocks 'gray-background
+ modus-themes-headings '(
+ (1 . (rainbow overline))))
+
+(load-theme 'modus-vivendi t)
+
+(modus-themes-custom-faces)
+
+
+(provide 'bd--themes)
diff --git a/.config/guix-builds/bdunahu.scm b/.config/guix-builds/bdunahu.scm
deleted file mode 100644
index 7504436..0000000
--- a/.config/guix-builds/bdunahu.scm
+++ /dev/null
@@ -1,125 +0,0 @@
-;; add this directory to the load path.
-(add-to-load-path (dirname (current-filename)))
-
-(use-modules (host-instance)
- (gnu home)
- (gnu packages)
- (gnu packages gnupg)
- (gnu services)
- (guix gexp)
- (gnu home services shepherd)
- (gnu home services dict)
- (gnu home services xdg)
- (gnu home services shells)
- (gnu home services gnupg)
- (gnu home services desktop)
- (gnu home services pm)
- (gnu home services ssh))
-
-(home-environment
- ;; List of packages that will show up
- ;; under ~/.guix-home/profile.
- (packages (specifications->packages (list "aspell"
- "aspell-dict-en"
- ;; "dmenu"
- "emacs-all-the-icons"
- "emacs-auctex"
- "emacs-company"
- "emacs-ednc"
- "emacs-emms"
- "emacs-exwm"
- "emacs-guix"
- "emacs-magit"
- "emacs-orderless"
- "emacs-org-roam"
- "emacs-pinentry"
- "emacs-slime"
- "emacs-vertico"
- "feh"
- "flameshot"
- "ffmpeg"
- "gimp"
- "gnupg"
- "icecat"
- "libnotify"
- ;; "mpc"
- "mpv"
- "openconnect"
- "password-store"
- "pass-otp"
- "pinentry-emacs"
- "rsync"
- "sbcl"
- "stow"
- ;; "texlive"
- "ungoogled-chromium"
- "xset"
- "yt-dlp"
- "zathura"
- "zathura-pdf-poppler")))
-
- ;; Below is the list of Home services. To search for available
- ;; services, run 'guix home search KEYWORD' in a terminal.
- (services
- (list (service home-shepherd-service-type)
- (service home-dicod-service-type)
- (service home-xdg-user-directories-service-type
- (home-xdg-user-directories-configuration
- (desktop "$HOME")
- (documents "$HOME")
- (download "$HOME/dl")
- (music "$HOME/media")
- (pictures "$HOME/media")
- (publicshare "$HOME")
- (templates "$HOME")
- (videos "$HOME/media")))
- (service home-bash-service-type
- (home-bash-configuration
- (aliases '(("cp" . "cp -i")
- ("grep" . "grep --color=auto")
- ("ll" . "ls -l")
- ("ls" . "ls -p --color=auto")
- ("mkd" . "mkdir -pv")
- ("mv" . "mv -i")
- ("rm" . "rm -i")
- ("vi" . "vim")
- ("ytta" . "yt-dlp --extract-audio --format bestaudio/best")
- ("yttv" . "yt-dlp -f b")))
- (bashrc (list (local-file
- "/home/bdunahu/.config/guix-builds//.bashrc"
- "bashrc")))))
- (service home-openssh-service-type
- (home-openssh-configuration
- (hosts
- (list (openssh-host (name "hati")
- (host-name "192.168.1.68")
- (user "bdunahu"))
- (openssh-host (name "vali")
- (host-name "192.168.1.64")
- (user "bdunahu"))
- (openssh-host (name "perch")
- (host-name "perch.cs.colostate.edu")
- (user "bdunahu"))))))
- (service home-gpg-agent-service-type
- (home-gpg-agent-configuration
- (pinentry-program
- (file-append pinentry-emacs "/bin/pinentry-emacs"))
- (ssh-support? #t)))
-
-
- (when (equal? host-name "vali")
- (service home-batsignal-service-type
- (home-batsignal-configuration
- (warning-level 95)
- (critical-level 15)
- (danger-level 5)
- (notification-command "notify-send")))
- (service home-xmodmap-service-type
- (home-xmodmap-configuration
- (key-map '(("remove Lock" . "Caps_Lock")
- ("remove Control" . "Control_L")
- ("keysym Control_L" ."Caps_Lock")
- ("keysym Caps_Lock" . "Control_L")
- ("add Lock" . "Caps_Lock")
- ("add Control" . "Control_L"))))))
- )))
diff --git a/.config/guix-builds/hati.scm b/.config/guix-builds/hati.scm
deleted file mode 100644
index 1fc3b73..0000000
--- a/.config/guix-builds/hati.scm
+++ /dev/null
@@ -1,11 +0,0 @@
-;; hati (desktop) specific variables
-;; (use-modules (gnu))
-
-(define-module (host-instance)
- #:export (username host-name root-part boot-part hide-part))
-
-(define username "bdunahu")
-(define host-name "hati")
-(define root-part "")
-(define boot-part "")
-(define hide-part "")
diff --git a/.config/guix-builds/system-config.scm b/.config/guix-builds/system-config.scm
deleted file mode 100644
index 68ec53d..0000000
--- a/.config/guix-builds/system-config.scm
+++ /dev/null
@@ -1,86 +0,0 @@
-;; add this directory to the load path.
-(add-to-load-path (dirname (current-filename)))
-
-;; Indicate which modules to import to access the variables
-;; used in this configuration.
-(use-modules (gnu)
- (host-instance))
-(use-service-modules audio desktop networking ssh xorg)
-
-(define user (user-account
- (name username)
- (comment username)
- (group "users")
- (home-directory (string-append "/home/" username))
- (supplementary-groups '("wheel" "netdev" "audio" "video"))))
-
-(operating-system
- (locale "en_US.utf8")
- (timezone "America/Denver")
- (keyboard-layout (keyboard-layout "us"))
- (host-name host-name)
-
- ;; The list of user accounts ('root' is implicit).
- (users (cons* user
- %base-user-accounts))
-
- ;; Packages installed system-wide.
- (packages (append (map specification->package
- '("curl"
- "emacs"
- "emacs-exwm"
- "emacs-desktop-environment"
- "git"
- "imagemagick"
- "mpd"
- "mpd-mpc"
- "nss-certs"
- "picom"
- "pulseaudio"
- "vim"
- "xmodmap"))
- %base-packages))
-
- ;; List of system services.
- (services
- (append (list
-
- (service openssh-service-type)
- (service tor-service-type)
- (service mpd-service-type
- (mpd-configuration
- (user user)
- (music-directory "~/Personal/mpd/music")
- (playlist-directory "~/Personal/mpd/playlist")
- (default-port 6600)))
- (set-xorg-configuration
- (xorg-configuration (keyboard-layout keyboard-layout))))
-
- ;; This is the default list of services we
- ;; are appending to.
- %desktop-services))
- (bootloader (bootloader-configuration
- (bootloader grub-efi-bootloader)
- (targets (list "/boot/efi"))
- (keyboard-layout keyboard-layout)))
-
- ;; List of file systems that get "mounted". ("UUIDs") can
- ;; be obtained by running 'blkid'.
- (file-systems (cons* (file-system
- (mount-point "/boot/efi")
- (device (uuid
- boot-part
- 'fat32))
- (type "vfat"))
- (file-system
- (mount-point "/home/bdunahu/Personal")
- (device (uuid
- hide-part
- 'ext4))
- (type "ext4"))
- (file-system
- (mount-point "/")
- (device (uuid
- root-part
- 'ext4))
- (type "ext4")) %base-file-systems)))
diff --git a/.config/guix-builds/vali.scm b/.config/guix-builds/vali.scm
deleted file mode 100644
index cebcbd1..0000000
--- a/.config/guix-builds/vali.scm
+++ /dev/null
@@ -1,11 +0,0 @@
-;; vali (laptop) specific variables
-;; (use-modules (gnu))
-
-(define-module (host-instance)
- #:export (username host-name root-part boot-part hide-part))
-
-(define username "bdunahu")
-(define host-name "vali")
-(define root-part "69a3593b-12bd-40ad-a932-007674a8cfe8")
-(define boot-part "8A13-7018")
-(define hide-part "020b73df-3991-4271-9d3f-dba00ad260ec")
diff --git a/.config/guix/hati.scm b/.config/guix/hati.scm
new file mode 100644
index 0000000..70b9a6b
--- /dev/null
+++ b/.config/guix/hati.scm
@@ -0,0 +1,66 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; This configuration adapts the base-level 'ymir' ;;
+;; OS declaration for 'hati', a desktop. ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define-module (hati)
+ #:use-module (ymir)
+ #:use-module (gnu)
+ #:use-module (gnu home)
+ #:use-module (gnu packages)
+ #:use-module (gnu home services)
+ #:use-module (gnu services)
+ #:use-module (guix gexp)
+ #:use-module (emacs)
+ #:use-module (xdg)
+ #:use-module (shell)
+ #:use-module (ssh)
+ #:use-module (gpg)
+ #:use-module (base))
+
+
+(define system
+ (operating-system
+ (inherit ymir)
+ (host-name "hati")
+
+ (mapped-devices (list (mapped-device
+ (source (uuid "1e9c3cd7-97c2-411a-975a-40222d185563"))
+ (target "hidden")
+ (type luks-device-mapping))))
+
+ (file-systems (cons* (file-system
+ (mount-point "/boot/efi")
+ (device (uuid
+ "1448-51AE"
+ 'fat32))
+ (type "vfat"))
+ (file-system
+ (mount-point "/home/bdunahu/Personal")
+ (device "/dev/mapper/hidden")
+ (type "ext4")
+ (dependencies mapped-devices))
+ (file-system
+ (mount-point "/")
+ (device (uuid
+ "df334be4-5828-45b4-842a-9a8d97cfa40a"
+ 'ext4))
+ (type "ext4")) %base-file-systems))))
+
+
+(define home
+ (home-environment
+ (packages
+ `(,@desktop-packages
+ ,@program-packages
+ ,@emacs-packages))
+
+ (services
+ `(,@xdg-service
+ ,@shell-service
+ ,@ssh-service
+ ,@gpg-service
+ ,@base-services))))
+
+
+(if (getenv "RUNNING_GUIX_HOME") home system)
diff --git a/.config/guix/modules/base.scm b/.config/guix/modules/base.scm
new file mode 100644
index 0000000..74ef5e4
--- /dev/null
+++ b/.config/guix/modules/base.scm
@@ -0,0 +1,53 @@
+(define-module (base)
+ #:use-module (gnu packages)
+ #:use-module (gnu packages gnupg)
+ #:use-module (gnu services)
+ #:use-module (guix gexp)
+ #:use-module (gnu home services)
+ #:use-module (gnu home services shepherd)
+ #:use-module (gnu home services dict)
+ #:use-module (gnu home services ssh)
+ #:use-module (gnu home services gnupg))
+
+
+;; List of packages that will show up
+;; under ~/.guix-home/profile.
+(define-public desktop-packages
+ (map specification->package
+ (list
+ "aspell"
+ "aspell-dict-en"
+ "flameshot"
+ "libnotify"
+ "pass-otp"
+ "password-store"
+ "pavucontrol"
+ "recutils"
+ "rsync"
+ "stow"
+ "xset")))
+
+(define-public program-packages
+ (map specification->package
+ (list
+ "feh"
+ "ffmpeg"
+ "gimp"
+ "gnupg"
+ "icecat"
+ "mpv"
+ "pinentry-emacs"
+ "sbcl"
+ "texlive"
+ "ungoogled-chromium"
+ "yt-dlp"
+ "zathura"
+ "zathura-pdf-poppler")))
+
+
+;; Below is a list of Home services. To search for available
+;; services, run 'guix home search KEYWORD' in a terminal.
+(define-public base-services
+ (list
+ (service home-shepherd-service-type)
+ (service home-dicod-service-type)))
diff --git a/.config/guix/modules/bat.scm b/.config/guix/modules/bat.scm
new file mode 100644
index 0000000..1a56ee5
--- /dev/null
+++ b/.config/guix/modules/bat.scm
@@ -0,0 +1,12 @@
+(define-module (bat)
+ #:use-module (gnu home services)
+ #:use-module (gnu home services pm))
+
+
+(define-public bat-service
+ (list (service home-batsignal-service-type
+ (home-batsignal-configuration
+ (warning-level 35)
+ (critical-level 15)
+ (danger-level 5)
+ (notification-command "notify-send")))))
diff --git a/.config/guix/modules/emacs.scm b/.config/guix/modules/emacs.scm
new file mode 100644
index 0000000..bb08e7e
--- /dev/null
+++ b/.config/guix/modules/emacs.scm
@@ -0,0 +1,24 @@
+(define-module (emacs)
+ #:use-module (gnu packages))
+
+
+;; List of packages that will show up
+;; under ~/.guix-home/profile.
+(define-public emacs-packages
+ (map specification->package
+ (list
+ "emacs-all-the-icons"
+ "emacs-auctex"
+ "emacs-company"
+ "emacs-ednc"
+ "emacs-emms"
+ "emacs-exwm"
+ "emacs-guix"
+ "emacs-magit"
+ "emacs-marginalia"
+ "emacs-orderless"
+ "emacs-org-roam"
+ "emacs-password-store"
+ "emacs-pinentry"
+ "emacs-slime"
+ "emacs-vertico")))
diff --git a/.config/guix/modules/gpg.scm b/.config/guix/modules/gpg.scm
new file mode 100644
index 0000000..19862f0
--- /dev/null
+++ b/.config/guix/modules/gpg.scm
@@ -0,0 +1,14 @@
+(define-module (gpg)
+ #:use-module (guix gexp)
+ #:use-module (gnu packages gnupg)
+ #:use-module (gnu home services)
+ #:use-module (gnu home services gnupg))
+
+
+(define-public gpg-service
+ (list
+ (service home-gpg-agent-service-type
+ (home-gpg-agent-configuration
+ (pinentry-program
+ (file-append pinentry-emacs "/bin/pinentry-emacs"))
+ (ssh-support? #t)))))
diff --git a/.config/guix/modules/shell.scm b/.config/guix/modules/shell.scm
new file mode 100644
index 0000000..b7bb619
--- /dev/null
+++ b/.config/guix/modules/shell.scm
@@ -0,0 +1,22 @@
+(define-module (shell)
+ #:use-module (gnu home services)
+ #:use-module (gnu home services shells))
+
+
+(define-public shell-service
+ (list
+ (service home-bash-service-type
+ (home-bash-configuration
+ (aliases '(("suspend" . "sudo bash -c 'echo mem > /sys/power/state'")
+ ("guix-home" . "RUNNING_GUIX_HOME=1 guix home -L ${HOME}/.config/guix/modules/ reconfigure ${HOME}/.config/guix/${HOSTNAME}.scm")
+ ("guix-system" . "RUNNING_GUIX_HOME=0 sudo guix system -L ${HOME}/.config/guix/modules/ reconfigure ${HOME}/.config/guix/${HOSTNAME}.scm")
+ ("cp" . "cp -i")
+ ("grep" . "grep --color=auto")
+ ("ll" . "ls -l")
+ ("ls" . "ls -p --color=auto")
+ ("mkd" . "mkdir -pv")
+ ("mv" . "mv -i")
+ ("rm" . "rm -i")
+ ("vi" . "vim")
+ ("ytta" . "yt-dlp --extract-audio --format bestaudio/best")
+ ("yttv" . "yt-dlp -f b")))))))
diff --git a/.config/guix/modules/ssh.scm b/.config/guix/modules/ssh.scm
new file mode 100644
index 0000000..0e80c25
--- /dev/null
+++ b/.config/guix/modules/ssh.scm
@@ -0,0 +1,19 @@
+(define-module (ssh)
+ #:use-module (gnu home services)
+ #:use-module (gnu home services ssh))
+
+
+(define-public ssh-service
+ (list
+ (service home-openssh-service-type
+ (home-openssh-configuration
+ (hosts
+ (list (openssh-host (name "hati")
+ (host-name "192.168.1.76")
+ (user "bdunahu"))
+ (openssh-host (name "vali")
+ (host-name "192.168.1.64")
+ (user "bdunahu"))
+ (openssh-host (name "perch")
+ (host-name "perch.cs.colostate.edu")
+ (user "bdunahu"))))))))
diff --git a/.config/guix/modules/xdg.scm b/.config/guix/modules/xdg.scm
new file mode 100644
index 0000000..76106e9
--- /dev/null
+++ b/.config/guix/modules/xdg.scm
@@ -0,0 +1,17 @@
+(define-module (xdg)
+ #:use-module (gnu home services)
+ #:use-module (gnu home services xdg))
+
+
+(define-public xdg-service
+ (list
+ (service home-xdg-user-directories-service-type
+ (home-xdg-user-directories-configuration
+ (desktop "$HOME")
+ (documents "$HOME")
+ (download "$HOME/dl")
+ (music "$HOME/media")
+ (pictures "$HOME/media")
+ (publicshare "$HOME")
+ (templates "$HOME")
+ (videos "$HOME/media")))))
diff --git a/.config/guix/modules/xmodmap.scm b/.config/guix/modules/xmodmap.scm
new file mode 100644
index 0000000..3cf8be1
--- /dev/null
+++ b/.config/guix/modules/xmodmap.scm
@@ -0,0 +1,17 @@
+(define-module (xmodmap)
+ #:use-module (gnu home services)
+ #:use-module (gnu home services desktop))
+
+
+;; Below is a list of Home services. To search for available
+;; services, run 'guix home search KEYWORD' in a terminal.
+(define-public xmodmap-service
+ (list
+ (service home-xmodmap-service-type
+ (home-xmodmap-configuration
+ (key-map '(("remove Lock" . "Caps_Lock")
+ ("remove Control" . "Control_L")
+ ("keysym Control_L" ."Caps_Lock")
+ ("keysym Caps_Lock" . "Control_L")
+ ("add Lock" . "Caps_Lock")
+ ("add Control" . "Control_L")))))))
diff --git a/.config/guix/modules/ymir.scm b/.config/guix/modules/ymir.scm
new file mode 100644
index 0000000..e3a9921
--- /dev/null
+++ b/.config/guix/modules/ymir.scm
@@ -0,0 +1,87 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; This configuration defines the base-level ;;
+;; services for both of my machines. ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define-module (ymir)
+ #:use-module (gnu))
+(use-service-modules audio desktop networking ssh xorg)
+
+;;;; user
+(define-public username "bdunahu")
+(define user (user-account
+ (name username)
+ (comment username)
+ (group "users")
+ (home-directory (string-append "/home/" username))
+ (supplementary-groups '("audio"
+ "netdev"
+ "video"
+ "wheel"))))
+
+
+;;;; base os
+(define-public ymir
+ (operating-system
+ (host-name "ymir")
+ (locale "en_US.utf8")
+ (timezone "America/Denver")
+ (keyboard-layout (keyboard-layout "us"))
+ (kernel-arguments
+ (list
+ "quiet"))
+
+ ;; 'root' is implicit
+ (users (cons* user
+ %base-user-accounts))
+
+ ;; grub (uefi)
+ (bootloader (bootloader-configuration
+ (bootloader grub-efi-bootloader)
+ (targets (list "/boot/efi"))
+ (keyboard-layout keyboard-layout)))
+
+ ;; packages installed system-wide.
+ (packages (append (map specification->package
+ '("cryptsetup"
+ "curl"
+ "emacs"
+ "emacs-desktop-environment"
+ "emacs-exwm"
+ "git"
+ "imagemagick"
+ "mpd"
+ "mpd-mpc"
+ "nss-certs"
+ "picom"
+ "pulseaudio"
+ "vim"
+ "xmodmap"))
+ %base-packages))
+
+ ;; base system services.
+ (services
+ (append (list
+ (service openssh-service-type)
+ (service tor-service-type)
+ (service mpd-service-type
+ (mpd-configuration
+ (user user)
+ (music-directory "~/Personal/mpd/music")
+ (playlist-directory "~/Personal/mpd/playlist")
+ (default-port 6600)))
+ (set-xorg-configuration
+ (xorg-configuration (keyboard-layout keyboard-layout))))
+
+ ;; This is the default list of services we
+ ;; are appending to.
+ %desktop-services))
+
+ ;; OVERRIDE ME
+ (file-systems (cons*
+ (file-system
+ (mount-point "/")
+ (device "none")
+ (type "tmpfs")
+ (check? #f))
+ %base-file-systems))))
diff --git a/.config/guix/vali.scm b/.config/guix/vali.scm
new file mode 100644
index 0000000..2ace3b9
--- /dev/null
+++ b/.config/guix/vali.scm
@@ -0,0 +1,62 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; This configuration adapts the base-level 'ymir' ;;
+;; OS declaration for 'vali', a laptop. ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define-module (vali)
+ #:use-module (ymir)
+ #:use-module (gnu)
+ #:use-module (gnu home)
+ #:use-module (gnu packages)
+ #:use-module (gnu home services)
+ #:use-module (gnu services)
+ #:use-module (guix gexp)
+ #:use-module (emacs)
+ #:use-module (xdg)
+ #:use-module (shell)
+ #:use-module (ssh)
+ #:use-module (gpg)
+ #:use-module (base))
+
+
+(operating-system
+ (inherit ymir)
+ (host-name "vali")
+
+ (file-systems (cons* (file-system
+ (mount-point "/boot/efi")
+ (device (uuid
+ "8A13-7018"
+ 'fat32))
+ (type "vfat"))
+ (file-system
+ (mount-point "/home/bdunahu/Personal")
+ (device (uuid
+ "020b73df-3991-4271-9d3f-dba00ad260ec"
+ 'ext4))
+ (type "ext4"))
+ (file-system
+ (mount-point "/")
+ (device (uuid
+ "69a3593b-12bd-40ad-a932-007674a8cfe8"
+ 'ext4))
+ (type "ext4")) %base-file-systems)))
+
+
+(home-environment
+ (packages
+ `(,@desktop-packages
+ ,@program-packages
+ ,@emacs-packages))
+
+ (services
+ `(,@xdg-service
+ ,@shell-service
+ ,@ssh-service
+ ,@gpg-service
+ ,@base-services
+ ,@bat-service
+ ,@xmodmap-service)))
+
+
+(if (getenv "RUNNING_GUIX_HOME") home system)
diff --git a/.gitignore b/.gitignore
index e42e229..96e4a26 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1 @@
-/.config/guix-builds/host-instance.scm
/.config/emacs/bookmarks
diff --git a/.mozilla/icecat/cg33tk6q.default/chrome/userChrome.css b/.mozilla/icecat/cg33tk6q.default/chrome/userChrome.css
deleted file mode 100644
index 4688a2e..0000000
--- a/.mozilla/icecat/cg33tk6q.default/chrome/userChrome.css
+++ /dev/null
@@ -1,65 +0,0 @@
-@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
-
-/* remove tab corners, space below tabs */
-#tabbrowser-tabs {
- --user-tab-rounding: None;
-}
-
-.tab-background {
- border-radius: var(--user-tab-rounding) var(--user-tab-rounding) 0px 0px !important; /* Connected */
- margin-block: 1px 0 !important; /* Connected */
-}
-#scrollbutton-up, #scrollbutton-down { /* 6/10/2021 */
- border-top-width: 1px !important;
- border-bottom-width: 0 !important;
-}
-
-/* Override Normal Density height to Compact Density height only for tabs */
-
-#TabsToolbar, #tabbrowser-tabs {
- --tab-min-height: 11px !important;
-}
-/* Tweak for covering a line at the bottom of the active tab on some themes 8/11/2021 */
-#main-window[sizemode="normal"] #toolbar-menubar[autohide="true"] + #TabsToolbar,
-#main-window[sizemode="normal"] #toolbar-menubar[autohide="true"] + #TabsToolbar #tabbrowser-tabs {
- --tab-min-height: 12px !important;
-}
-#scrollbutton-up,
-#scrollbutton-down {
- border-top-width: 0 !important;
- border-bottom-width: 0 !important;
-}
-
-/* [Connected Tabs] Set a max height based on min-height plus margin-block: 1px 0 */
-#TabsToolbar, #TabsToolbar > hbox, #TabsToolbar-customization-target, #tabbrowser-arrowscrollbox {
- max-height: calc(var(--tab-min-height) + 1px) !important;
-}
-/* [Connected Tabs] Adjust padding around icons on buttons to avoid crushed images */
-#TabsToolbar-customization-target toolbarbutton > .toolbarbutton-icon,
-#TabsToolbar-customization-target .toolbarbutton-text,
-#TabsToolbar-customization-target .toolbarbutton-badge-stack,
-#scrollbutton-up,#scrollbutton-down {
- padding-top: 7px !important;
- padding-bottom: 6px !important;
-}
-/* [Connected Tabs] Make sure tab attention dot isn't too high - 10 Dec 2022 */
-.tabbrowser-tab:is([image], [pinned]) > .tab-stack > .tab-content[attention]:not([selected="true"]),
-.tabbrowser-tab > .tab-stack > .tab-content[pinned][titlechanged]:not([selected="true"]),
-#firefox-view-button[attention], .webextension-browser-action[attention="true"] {
- background-position-y: bottom 2px !important;
-}
-
-/* override font size for tabs */
-.tabbrowser-tab {
- font-size: 10px !important;
-}
-
-/* Remove the Bookmark Star */
-#star-button { display: none !important; }
-
-/* Remove Go button from address bar */
-#go-button-stack, .search-go-button-stack { display: none !important; }
-
-/* Remove back and forward buttons when disabled */
-#back-button[disabled="true"] { display: none; }
-#forward-button[disabled="true"] { display: none; }