Use dmenu caching to launch programs

This commit is contained in:
Benson Chu 2018-05-29 17:58:43 -05:00
parent b4fc7a90be
commit c95e815537
2 changed files with 24 additions and 13 deletions

View file

@ -105,7 +105,7 @@
(,(kbd "s-k") . ido-kill-buffer)
(,(kbd "s-s") . resize-window)))
(global-set-key (kbd "M-T") 'flop-frame)
(global-set-key (kbd "C-x p") 'launch-program)
(global-set-key (kbd "C-x p") 'dmenu)
(global-set-key (kbd "M-…") 'multi-term)
(global-set-key (kbd "C-ü") 'undo-tree-undo)
@ -193,8 +193,19 @@
shell-command-history
:caller 'counsel-shell-command))
(defun read-program ()
(funcall #'completing-read dmenu-prompt-string
(append dmenu--history-list
(cl-remove-if (lambda (x)
(member x dmenu--history-list))
dmenu--cache-executable-files))
nil
'confirm
nil
'dmenu--history-list))
(defun launch-program (command &optional process-name)
(interactive (list (read-shell-command "$ ")))
(interactive (list (read-program)))
(let ((name (or process-name command)))
(start-process-shell-command name nil command)))
@ -2059,18 +2070,18 @@
#+END_SRC
** Gnus
#+BEGIN_SRC emacs-lisp
(setq user-mail-address "bensonchu457@gmail.com"
user-full-name "Benson Chu")
(setq user-mail-address "bensonchu457@gmail.com"
user-full-name "Benson Chu")
(setq gnus-select-method
'(nnimap "gmail"
(nnimap-address "imap.gmail.com")
(nnimap-server-port "imaps")
(nnimap-stream ssl)))
(setq gnus-select-method
'(nnimap "gmail"
(nnimap-address "imap.gmail.com")
(nnimap-server-port "imaps")
(nnimap-stream ssl)))
(setq smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 587
gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")
(setq smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 587
gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")
#+END_SRC
* Broken

View file

@ -18,7 +18,7 @@
'(org-trello-current-prefix-keybinding "C-c o")
'(package-selected-packages
(quote
(ocodo-svg-modelines skewer-mode inf-ruby solarized-theme org-super-agenda restclient shell-pop org-toodledo dired-narrow dired+ quelpa-use-package geiser treemacs-projectile treemacs org-wunderlist youtube-dl irony dired-aux elfeed-org elfeed calfw-ical mu4e org-protocol ox-reveal ob-clojure ob-core org-caldav calfw-org org-habit epa-file switch-window ibuf-ext evil helm-config exwm-randr exwm-config exwm-systemtray use-package glsl-mode oauth2 ng2-mode transpose-frame clojure-snippets common-lisp-snippets go-snippets haskell-snippets java-snippets ensime yasnippet-bundle yasnippet helm-exwm smex matlab-mode beacon company-flx dired-du diredful free-keys elfeed-goodies exwm-surf el-autoyas flycheck-clojure flycheck-haskell flycheck-irony flycheck-pycheckers company-erlang company-ghc company-ghci company-go company-lua company-arduino company-c-headers company-cmake company-distel company-irony ac-c-headers ac-html ac-html-angular ac-slime ac-cider ace-window exwm angular-mode neotree smart-mode-line-powerline-theme smart-mode-line helm-projectile projectile ace-jump-mode ace-jump-buffer ace-jump-helm-line resize-window volume babel babel-repl lua-mode pocket-reader el-pocket magit-svn magit dirtree mu4e-alert habitica scala-mode auto-complete w3m calfw calfw-gcal org-gcal nlinum nlinum-relative color-theme-modern linum-relative helm i3wm org-bullets windresize slime powerline-evil persistent-soft pdf-tools multi-term ergoemacs-mode epresent engine-mode)))
(dmenu ocodo-svg-modelines skewer-mode inf-ruby solarized-theme org-super-agenda restclient shell-pop org-toodledo dired-narrow dired+ quelpa-use-package geiser treemacs-projectile treemacs org-wunderlist youtube-dl irony dired-aux elfeed-org elfeed calfw-ical mu4e org-protocol ox-reveal ob-clojure ob-core org-caldav calfw-org org-habit epa-file switch-window ibuf-ext evil helm-config exwm-randr exwm-config exwm-systemtray use-package glsl-mode oauth2 ng2-mode transpose-frame clojure-snippets common-lisp-snippets go-snippets haskell-snippets java-snippets ensime yasnippet-bundle yasnippet helm-exwm smex matlab-mode beacon company-flx dired-du diredful free-keys elfeed-goodies exwm-surf el-autoyas flycheck-clojure flycheck-haskell flycheck-irony flycheck-pycheckers company-erlang company-ghc company-ghci company-go company-lua company-arduino company-c-headers company-cmake company-distel company-irony ac-c-headers ac-html ac-html-angular ac-slime ac-cider ace-window exwm angular-mode neotree smart-mode-line-powerline-theme smart-mode-line helm-projectile projectile ace-jump-mode ace-jump-buffer ace-jump-helm-line resize-window volume babel babel-repl lua-mode pocket-reader el-pocket magit-svn magit dirtree mu4e-alert habitica scala-mode auto-complete w3m calfw calfw-gcal org-gcal nlinum nlinum-relative color-theme-modern linum-relative helm i3wm org-bullets windresize slime powerline-evil persistent-soft pdf-tools multi-term ergoemacs-mode epresent engine-mode)))
'(safe-local-variable-values (quote ((org-log-done))))
'(send-mail-function (quote mailclient-send-it))
'(show-paren-mode t)