summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Parri <simonparri@ganzeria.com>2025-11-22 11:28:01 -0600
committerSimon Parri <simonparri@ganzeria.com>2025-11-22 11:28:01 -0600
commitb7e4e1be6a7ae88d0b35c612793b73aeb755b9e2 (patch)
tree7f9b567924bf1a5a17d0af6e5bcbce01ed2ab9aa
parent2515bb86511ac8371614c5b9821d511aff541fdd (diff)
downloaddotfiles-b7e4e1be6a7ae88d0b35c612793b73aeb755b9e2.tar.gz
dotfiles-b7e4e1be6a7ae88d0b35c612793b73aeb755b9e2.zip
Emacs: Make `exwm-run' start programs in home directory by default
-rw-r--r--common/.emacs.d/init.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/common/.emacs.d/init.el b/common/.emacs.d/init.el
index e3715f2..ac15fea 100644
--- a/common/.emacs.d/init.el
+++ b/common/.emacs.d/init.el
@@ -4085,8 +4085,15 @@ instead."
:ensure t
:init
(defun exwm-run (it)
- (interactive (list (read-shell-command "Run: ")))
- (let* ((is-program (eq (string-to-char it) ?!))
+ (interactive
+ (list (let ((default-directory
+ (if current-prefix-arg
+ default-directory "~/")))
+ (read-shell-command "Run: "))))
+ (let* ((default-directory
+ (if current-prefix-arg
+ default-directory "~/"))
+ (is-program (eq (string-to-char it) ?!))
(sym (read it))
(str (if is-program
(coerce (rest (coerce it 'list)) 'string)