summaryrefslogtreecommitdiff
path: root/helm-sys.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2016-08-12 14:42:35 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2016-08-12 14:42:35 +0200
commitc185b6dfe4f97ef7c6fe7aebf2c84aae4ce1d03b (patch)
tree10f83d4500e5625c49dc6c24df6544f90280eb0a /helm-sys.el
parent43f8ab4f0827a7fe73ec890775e36f52b2ec21a7 (diff)
Fix last sources not built with helm-source.
Diffstat (limited to 'helm-sys.el')
-rw-r--r--helm-sys.el52
1 files changed, 26 insertions, 26 deletions
diff --git a/helm-sys.el b/helm-sys.el
index 79a6800f..8346b5af 100644
--- a/helm-sys.el
+++ b/helm-sys.el
@@ -337,41 +337,41 @@ Show actions only on line starting by a PID."
(cadr (helm-xrandr-info)))
(defvar helm-source-xrandr-change-resolution
- '((name . "Change Resolution")
- (candidates
- . (lambda ()
- (with-temp-buffer
- (call-process "xrandr" nil (current-buffer) nil
- "--screen" (helm-xrandr-screen) "-q")
- (goto-char 1)
- (cl-loop with modes = nil
- while (re-search-forward " \\([0-9]+x[0-9]+\\)" nil t)
+ (helm-build-sync-source "Change Resolution"
+ :candidates
+ (lambda ()
+ (with-temp-buffer
+ (call-process "xrandr" nil (current-buffer) nil
+ "--screen" (helm-xrandr-screen) "-q")
+ (goto-char 1)
+ (cl-loop while (re-search-forward " \\([0-9]+x[0-9]+\\)" nil t)
for mode = (match-string 1)
unless (member mode modes)
collect mode into modes
- finally return modes))))
- (action
- ("Change Resolution"
- . (lambda (mode)
- (call-process "xrandr" nil nil nil
- "--screen" (helm-xrandr-screen)
- "--output" (helm-xrandr-output)
- "--mode" mode))))))
+ finally return modes)))
+ :action
+ (helm-make-actions "Change Resolution"
+ (lambda (mode)
+ (call-process "xrandr" nil nil nil
+ "--screen" (helm-xrandr-screen)
+ "--output" (helm-xrandr-output)
+ "--mode" mode)))))
;;; Emacs process
;;
;;
(defvar helm-source-emacs-process
- '((name . "Emacs Process")
- (init . (lambda () (list-processes--refresh)))
- (candidates . (lambda () (mapcar #'process-name (process-list))))
- (persistent-action . (lambda (elm)
- (delete-process (get-process elm))
- (helm-delete-current-selection)))
- (persistent-help . "Kill Process")
- (action ("Kill Process" . (lambda (elm)
- (delete-process (get-process elm)))))))
+ (helm-build-sync-source "Emacs Process"
+ :init (lambda () (list-processes--refresh))
+ :candidates (lambda () (mapcar #'process-name (process-list)))
+ :persistent-action (lambda (elm)
+ (delete-process (get-process elm))
+ (helm-delete-current-selection))
+ :persistent-help "Kill Process"
+ :action (helm-make-actions "Kill Process"
+ (lambda (elm)
+ (delete-process (get-process elm))))))
;;;###autoload