diff options
| author | Simon Parri <simonparri@ganzeria.com> | 2025-11-22 11:28:01 -0600 |
|---|---|---|
| committer | Simon Parri <simonparri@ganzeria.com> | 2025-11-22 11:28:01 -0600 |
| commit | b7e4e1be6a7ae88d0b35c612793b73aeb755b9e2 (patch) | |
| tree | 7f9b567924bf1a5a17d0af6e5bcbce01ed2ab9aa | |
| parent | 2515bb86511ac8371614c5b9821d511aff541fdd (diff) | |
| download | dotfiles-b7e4e1be6a7ae88d0b35c612793b73aeb755b9e2.tar.gz dotfiles-b7e4e1be6a7ae88d0b35c612793b73aeb755b9e2.zip | |
Emacs: Make `exwm-run' start programs in home directory by default
| -rw-r--r-- | common/.emacs.d/init.el | 11 |
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) |
