summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbd <bdunahu@gmail.com>2024-01-01 21:30:23 -0700
committerbd <bdunahu@gmail.com>2024-01-01 21:30:23 -0700
commitb5822bf603c8ee647391186291ed4620121cebd2 (patch)
tree5437e2799c6d46373d313d94d18d1086970cd1f6
parentf6bc289f35462d29e6a90b0a17105fc0983ad706 (diff)
Moved pinentry, mode line to use custom emms display variables.
-rw-r--r--.config/emacs/bd-mode-and-themes.el26
-rw-r--r--.config/emacs/bd-wm.el6
-rw-r--r--.config/emacs/init.el27
3 files changed, 25 insertions, 34 deletions
diff --git a/.config/emacs/bd-mode-and-themes.el b/.config/emacs/bd-mode-and-themes.el
index 7cdc196..369b8cf 100644
--- a/.config/emacs/bd-mode-and-themes.el
+++ b/.config/emacs/bd-mode-and-themes.el
@@ -7,6 +7,7 @@
;;;; 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."
@@ -28,6 +29,11 @@
(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))
@@ -41,8 +47,7 @@
'(: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.")
- :config
+ "Formats the notification number.")
(ednc-mode))
(defun test ()
@@ -54,12 +59,11 @@
display-time-default-load-average nil)
(display-time)
-(defvar-local bd/misc-mode-line
+(defvar-local bd/time-mode-line
'(:eval
(when (mode-line-window-selected-p)
- global-mode-string))
- "Displays misc mode line content (emms, time, etc.)
-only in the selected buffer.")
+ 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."
@@ -70,9 +74,6 @@ only in the selected buffer.")
(propertize " "
'display `((space :align-to (- (+ right right-fringe right-margin) ,reserve)))))
-;;;; pad out space for time (this method is probably horrendous)
-(insert-into-list global-mode-string (mode-line-fill 21) (cl-position 'display-time-string global-mode-string))
-
(dolist (construct '(bd/buffer-identification-mode-line
bd/vc-mode-line
bd/misc-mode-line))
@@ -92,8 +93,9 @@ only in the selected buffer.")
bd/notify-mode-line
bd/vc-mode-line
" "
- bd/misc-mode-line
- (mode-line-fill 3)))
+ bd/emms-mode-line
+ (mode-line-fill 21)
+ bd/time-mode-line))
;;;; remove mode-line-clutter
(define-minor-mode minor-mode-blackout-mode
@@ -126,7 +128,7 @@ only in the selected buffer.")
;;;; true transparency
;; (add-to-list 'default-frame-alist '(alpha-background . 60))
-(add-to-list 'default-frame-alist '(alpha . (72 . 72)))
+(add-to-list 'default-frame-alist '(alpha . (90 . 90)))
(defun set-frame-alpha (value)
"Sets the transparency of the frame background. 0=transparent/100=opaque"
diff --git a/.config/emacs/bd-wm.el b/.config/emacs/bd-wm.el
index 328faac..06b20ed 100644
--- a/.config/emacs/bd-wm.el
+++ b/.config/emacs/bd-wm.el
@@ -22,6 +22,10 @@ dedicated buffer will never be automatically orphaned."
(if dedicated "no longer " "")
(buffer-name))))
+(use-package pinentry
+ :init
+ (pinentry-start))
+
(use-package exwm
:config
(add-hook 'exwm-init-hook #'bd/exwm-init-hook)
@@ -86,7 +90,7 @@ dedicated buffer will never be automatically orphaned."
(lambda ()
(interactive)
(exwm-workspace-switch-create ,i))))
- (number-sequence 0 9))))
+ (number-sequence 0 9))))
(exwm-input-simulation-keys
'(([?\C-b] . [left])
([?\C-f] . [right])
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 79416e6..58ce2fc 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -45,18 +45,6 @@ open URL at point."
(defun clamp (lower-bound upper-bound value)
(max lower-bound (min value upper-bound)))
-(defun insert-into-list (list el n)
- "Insert into list LIST an element EL at index N.
-
-If N is 0, EL is inserted before the first element.
-
-The resulting list is returned. As the list contents is mutated
-in-place, the old list reference does not remain valid."
- (let* ((padded-list (cons nil list))
- (c (nthcdr n padded-list)))
- (setcdr c (cons el (cdr c)))
- (cdr padded-list)))
-
(defun remote-shell ()
(interactive)
(let ((default-directory "/ssh:bdunahu@perch.cs.colostate.edu:"))
@@ -67,9 +55,6 @@ in-place, the old list reference does not remain valid."
(require 'package)
(add-to-list 'load-path "/home/bdunahu/.guix-profile/share/emacs/site-lisp")
(guix-emacs-autoload-packages)
-(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
-(package-initialize)
-(package-refresh-contents)
(require 'use-package-ensure)
(setq use-package-always-ensure t)
;; (setq use-package-verbose t) ; for debugging
@@ -92,17 +77,15 @@ in-place, the old list reference does not remain valid."
("Arch Linux: Recent news updates" "https://archlinux.org/feeds/news/" nil nil nil)
("Parabola GNU/Linux-libre: Recent news updates" "https://www.parabola.nu/feeds/news/" nil nil nil)
("suckless.org news" "https://suckless.org/atom.xml" nil nil nil)
- ("Richard Stallman's Political News" "https://stallman.org/rss/rss.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)))
+ ("Protesilaos Stravrou" "https://yewtu.be/feed/playlist/PL8Bwba5vnQK14z96Gil86pLMDO2GnOhQ6" nil nil nil)))
;; may require ./newsticker/groups to be cleared
(newsticker-groups '("Feeds"
("READING" "Ambrose and Elsewhere" "James Enge Mastodon" "Book Reviews | Tales From the Magician's Skull")
("TECH" ("GNU/Linux" "Arch Linux: Recent news updates" "Parabola GNU/Linux-libre: Recent news updates") "suckless.org news")
- ("POLITICAL" "Richard Stallman's Political News")
("VIDEO" "Mental Outlaw" "Luke Smith" "Brent Westbrook" "Bugswriter" "Protesilaos Stravrou"))))
(setq erc-server "irc.libera.chat"
@@ -134,9 +117,11 @@ in-place, the old list reference does not remain valid."
(setq fit-window-to-buffer-horizontally t)
-(ido-mode 1)
-;; allow same buffer on multiple frames
-(setq ido-default-buffer-method 'selected-window)
+(use-package vertico
+ :init
+ (vertico-mode)
+ :custom
+ (vertico-cycle t))
;; allow one side window per side of frame
(setq window-sides-slots '(1 1 1 1))