about summary refs log tree commit diff
path: root/emacs/.emacs.d
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d')
-rw-r--r--emacs/.emacs.d/wpc/email.el6
-rw-r--r--emacs/.emacs.d/wpc/region.el4
-rw-r--r--emacs/.emacs.d/wpc/window-manager.el44
-rw-r--r--emacs/.emacs.d/wpc/wpc-misc.el2
-rw-r--r--emacs/.emacs.d/wpc/wpc-org.el1
-rw-r--r--emacs/.emacs.d/wpc/wpc-shell.el2
-rw-r--r--emacs/.emacs.d/wpc/zle.el1
7 files changed, 29 insertions, 31 deletions
diff --git a/emacs/.emacs.d/wpc/email.el b/emacs/.emacs.d/wpc/email.el
index a6b9a7b5a5db..c95eb08bdcec 100644
--- a/emacs/.emacs.d/wpc/email.el
+++ b/emacs/.emacs.d/wpc/email.el
@@ -1,5 +1,9 @@
-;;; email.el --- My Emacs email settings -*- lexical-binding: t -*-
+;;; email.el --- My email settings -*- lexical-binding: t -*-
+
 ;; Author: William Carroll <wpcarro@gmail.com>
+;; Version: 0.0.1
+;; URL: https://git.wpcarro.dev/wpcarro/briefcase
+;; Package-Requires: ((emacs "24"))
 
 ;;; Commentary:
 ;; Attempting to configure to `notmuch' for my personal use.
diff --git a/emacs/.emacs.d/wpc/region.el b/emacs/.emacs.d/wpc/region.el
index 80cd9a273fcd..f915f24ec851 100644
--- a/emacs/.emacs.d/wpc/region.el
+++ b/emacs/.emacs.d/wpc/region.el
@@ -2,8 +2,8 @@
 
 ;; Author: William Carroll <wpcarro@gmail.com>
 ;; Version: 0.0.1
+;; URL: https://git.wpcarro.dev/wpcarro/briefcase
 ;; Package-Requires: ((emacs "24"))
-;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
 
 ;;; Commentary:
 ;; Sometimes Emacs's function names and argument ordering is great; other times,
@@ -16,7 +16,7 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (defun region-to-string ()
-  "Returns the string in the active region."
+  "Return the string in the active region."
   (buffer-substring-no-properties (region-beginning)
                                   (region-end)))
 
diff --git a/emacs/.emacs.d/wpc/window-manager.el b/emacs/.emacs.d/wpc/window-manager.el
index ee25f9203cb2..dca8d10d37f3 100644
--- a/emacs/.emacs.d/wpc/window-manager.el
+++ b/emacs/.emacs.d/wpc/window-manager.el
@@ -107,20 +107,6 @@
   (evil-set-initial-state 'exwm-mode 'emacs)
   (setq exwm-workspace-number
         (list/length window-manager--named-workspaces))
-  ;; EXWM supports "line-mode" and "char-mode".
-  ;;
-  ;; Note: It appears that calling `exwm-input-set-key' works if it's called
-  ;; during startup.  Once a session has started, it seems like this function is
-  ;; significantly less useful.  Is this a bug?
-  ;;
-  ;; Glossary:
-  ;; - char-mode: All keystrokes except `exwm' global ones are passed to the
-  ;;   application.
-  ;; - line-mode:
-  ;;
-  ;; `exwm-input-global-keys' = {line,char}-mode; can also call `exwm-input-set-key'
-  ;; `exwm-mode-map'          = line-mode
-  ;; `???'                    = char-mode. Is there a mode-map for this?
   (let ((kbds `(
                 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
                 ;; Window sizing
@@ -176,7 +162,8 @@
     (setq exwm-input-global-keys
           (->> kbds
                (-map (lambda (plist)
-                       `(,(kbd (plist-get plist :key)) . ,(plist-get plist :fn)))))))
+                       `(,(kbd (plist-get plist :key)) .
+                         ,(plist-get plist :fn)))))))
   (setq exwm-input-simulation-keys
         ;; TODO: Consider supporting M-d and other readline style KBDs.
         '(([?\C-b] . [left])
@@ -304,7 +291,8 @@ Ivy is used to capture the user's input."
 
 (defun window-manager--label->index (label workspaces)
   "Return the index of the workspace in WORKSPACES named LABEL."
-  (let ((index (-elem-index label (-map #'window-manager--named-workspace-label workspaces))))
+  (let ((index (-elem-index label (-map #'window-manager--named-workspace-label
+                                        workspaces))))
     (if index index (error (format "No workspace found for label: %s" label)))))
 
 (defun window-manager--register-kbd (workspace)
@@ -312,7 +300,8 @@ Ivy is used to capture the user's input."
 Currently using super- as the prefix for switching workspaces."
   (let ((handler (lambda ()
                    (interactive)
-                   (window-manager--switch (window-manager--named-workspace-label workspace))))
+                   (window-manager--switch
+                    (window-manager--named-workspace-label workspace))))
         (key (window-manager--named-workspace-kbd workspace)))
     (exwm-input-set-key
      (kbd/for 'workspace key)
@@ -321,10 +310,12 @@ Currently using super- as the prefix for switching workspaces."
 (defun window-manager--change-workspace (workspace)
   "Switch EXWM workspaces to the WORKSPACE struct."
   (exwm-workspace-switch
-   (window-manager--label->index (window-manager--named-workspace-label workspace)
-                      window-manager--named-workspaces))
+   (window-manager--label->index
+    (window-manager--named-workspace-label workspace)
+    window-manager--named-workspaces))
   (window-manager--alert
-   (string/format "Switched to: %s" (window-manager--named-workspace-label workspace))))
+   (string/format "Switched to: %s"
+                  (window-manager--named-workspace-label workspace))))
 
 (defun window-manager--switch (label)
   "Switch to a named workspaces using LABEL."
@@ -339,7 +330,8 @@ Currently using super- as the prefix for switching workspaces."
 (defun window-manager-toggle-previous ()
   "Focus the previously active EXWM workspace."
   (interactive)
-  (window-manager--change-workspace (cycle/focus-previous! window-manager--workspaces)))
+  (window-manager--change-workspace
+   (cycle/focus-previous! window-manager--workspaces)))
 
 (defun window-manager--exwm-buffer? (x)
   "Return t if buffer X is an EXWM buffer."
@@ -347,7 +339,8 @@ Currently using super- as the prefix for switching workspaces."
 
 (defun window-manager--application-name (buffer)
   "Return the name of the application running in the EXWM BUFFER.
-This function asssumes that BUFFER passes the `window-manager--exwm-buffer?' predicate."
+This function asssumes that BUFFER passes the `window-manager--exwm-buffer?'
+predicate."
   (with-current-buffer buffer exwm-class-name))
 
 ;; TODO: Support disambiguating between two or more instances of the same
@@ -358,9 +351,10 @@ This function asssumes that BUFFER passes the `window-manager--exwm-buffer?' pre
   (interactive)
   (let* ((buffer-alist (->> (buffer-list)
                             (-filter #'window-manager--exwm-buffer?)
-                            (-map (lambda (buffer)
-                                    (cons (window-manager--application-name buffer)
-                                          buffer)))))
+                            (-map
+                             (lambda (buffer)
+                               (cons (window-manager--application-name buffer)
+                                     buffer)))))
          (label (completing-read "Switch to EXWM buffer: " buffer-alist)))
     (exwm-workspace-switch-to-buffer
      (alist-get label buffer-alist nil nil #'string=))))
diff --git a/emacs/.emacs.d/wpc/wpc-misc.el b/emacs/.emacs.d/wpc/wpc-misc.el
index f3abc2162b0c..35d6b999620f 100644
--- a/emacs/.emacs.d/wpc/wpc-misc.el
+++ b/emacs/.emacs.d/wpc/wpc-misc.el
@@ -3,7 +3,7 @@
 ;; Author: William Carroll <wpcarro@gmail.com>
 ;; Version: 0.0.1
 ;; Package-Requires: ((emacs "25.1"))
-;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
+;; URL: https://git.wpcarro.dev/wpcarro/briefcase
 
 ;;; Commentary:
 ;; This is the home of any configuration that couldn't find a better home.
diff --git a/emacs/.emacs.d/wpc/wpc-org.el b/emacs/.emacs.d/wpc/wpc-org.el
index e2fd9f9ee2d7..eef74266ede7 100644
--- a/emacs/.emacs.d/wpc/wpc-org.el
+++ b/emacs/.emacs.d/wpc/wpc-org.el
@@ -24,7 +24,6 @@
   :config
   (evil-set-initial-state 'org-mode 'normal)
   (general-add-hook 'org-mode-hook
-                    ;; TODO: consider supporting `(disable (list linum-mode company-mode))'
                     (list (disable linum-mode)
                           (disable company-mode)))
   (setq org-startup-folded nil)
diff --git a/emacs/.emacs.d/wpc/wpc-shell.el b/emacs/.emacs.d/wpc/wpc-shell.el
index 0cd376607190..855f234b281d 100644
--- a/emacs/.emacs.d/wpc/wpc-shell.el
+++ b/emacs/.emacs.d/wpc/wpc-shell.el
@@ -6,7 +6,7 @@
 ;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
 
 ;;; Commentary:
-;; Helpers for my shell scripting. Includes bash, zsh, etc.
+;; Helpers for my shell scripting.  Includes bash, zsh, etc.
 
 ;;; Code:
 
diff --git a/emacs/.emacs.d/wpc/zle.el b/emacs/.emacs.d/wpc/zle.el
index d4aa88258fc4..0e0baad2d974 100644
--- a/emacs/.emacs.d/wpc/zle.el
+++ b/emacs/.emacs.d/wpc/zle.el
@@ -2,6 +2,7 @@
 
 ;; Author: William Carroll <wpcarro@gmail.com>
 ;; Version: 0.0.1
+;; URL: https://git.wpcarro.dev/wpcarro/briefcase
 ;; Package-Requires: ((emacs "24"))
 
 ;;; Commentary: