;ELC   
;;; Compiled
;;; in Emacs version 24.5.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\310\311\302%\210\312\313\314\315\311\306%\207" [require cl-lib helm helm-help helm-utils custom-declare-group helm-sys nil "System related helm library." :group custom-declare-face helm-top-columns ((t :inherit helm-header)) "Face for helm help string in minibuffer."] 6)
(defalias 'helm-top-command-set-fn #[514 "\301\302\"\203\f \303\202 \304L\207" [system-type eql darwin "env COLUMNS=%s ps -axo pid,user,pri,nice,ucomm,tty,start,vsz,%%cpu,%%mem,etime,command" "env COLUMNS=%s top -b -n 1"] 6 "\n\n(fn VAR VALUE)"])
(byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313&	\207" [custom-declare-variable helm-top-command funcall function #[0 "\300\207" ["env COLUMNS=%s top -b -n 1"] 1 "env COLUMNS=%s top -b -n 1\n\n(fn)"] "Top command used to display output of top.\nTo use top command, a version supporting batch mode (-b option) is needed.\nOn Mac OSX top command doesn't support this, so ps command\nis used by default instead.\nIf you modify this the number and order of elements displayed\nshould be the same as top command to have the sort commands\nworking properly, that is 12 elements with the 2 first being\nPID and USER and the last 4 being %CPU, %MEM, TIME and COMMAND.\nA format string where %s will be replaced with `frame-width'." :group helm-sys :type string :set helm-top-command-set-fn] 10)
(defvar helm-top-sort-fn nil)
(defvar helm-top-map (byte-code "\301 \302\"\210\303\304\305#\210\303\306\307#\210\303\310\311#\210\303\312\313#\210\211\207" [helm-map make-sparse-keymap set-keymap-parent define-key [134217808] helm-top-run-sort-by-cpu [134217795] helm-top-run-sort-by-com [134217805] helm-top-run-sort-by-mem [134217813] helm-top-run-sort-by-user] 5))
(defvar helm-source-top (helm-make-source "Top" 'helm-source-in-buffer :header-name #[257 "\211\300P\207" [" (Press C-c C-u to refresh)"] 3 "\n\n(fn NAME)"] :init 'helm-top-init :nomark t :display-to-real 'helm-top-display-to-real :persistent-action 'helm-top-sh-persistent-action :persistent-help "SIGTERM" :help-message 'helm-top-help-message :follow 'never :keymap helm-top-map :filtered-candidate-transformer 'helm-top-sort-transformer :action-transformer 'helm-top-action-transformer))
#@100 Transformer for `helm-top'.
Return empty string for non--valid candidates.

(fn CANDIDATES SOURCE)
(defalias 'helm-top-transformer #[514 "\300\211:\2036 @\262\301\302\"\203 \202+ \301\303\"\203( \304\305\306#\307B\202+ \307BB\262A\262\202 \211\237\207" [nil string-match "^ *[0-9]+" "^ *PID" propertize face helm-top-columns ""] 9 (#$ . 2677)])
#@100 Action transformer for `top'.
Show actions only on line starting by a PID.

(fn ACTIONS CANDIDATE)
(defalias 'helm-top-action-transformer #[514 "\300\301\302\"\303\304\"\203 \305\306\307\310F\202 \207" [helm-get-selection nil t string-match "^ *[0-9]+" ("kill (SIGTERM)" lambda (pid) (helm-top-sh "TERM" pid)) ("kill (SIGKILL)" lambda (pid) (helm-top-sh "KILL" pid)) ("kill (SIGINT)" lambda (pid) (helm-top-sh "INT" pid)) ("kill (Choose signal)" lambda (pid) (helm-top-sh (helm-comp-read (format "Kill [%s] with signal: " pid) '("ALRM" "HUP" "INT" "KILL" "PIPE" "POLL" "PROF" "TERM" "USR1" "USR2" "VTALRM" "STKFLT" "PWR" "WINCH" "CHLD" "URG" "TSTP" "TTIN" "TTOU" "STOP" "CONT" "ABRT" "FPE" "ILL" "QUIT" "SEGV" "TRAP" "SYS" "EMT" "BUS" "XCPU" "XFSZ") :must-match t) pid))] 7 (#$ . 3044)])
#@77 Run kill shell command with signal SIG on PID for `helm-top'.

(fn SIG PID)
(defalias 'helm-top-sh #[514 "\300\301#\302\303\304!#\207" [format "kill -%s %s" message "Executed %s\n%s" shell-command-to-string] 8 (#$ . 3842)])
(defalias 'helm-top-sh-persistent-action #[257 "\300 \210\301\302\"\210\303 \207" [delete-other-windows helm-top-sh "TERM" helm-force-update] 4 "\n\n(fn PID)"])
#@57 Insert output of top command in candidate buffer.

(fn)
(defalias 'helm-top-init #[0 "\204 \302\303!\210r\304\305!q\210\306\307	\310 \"\311p#)\207" [helm-top-sort-fn helm-top-command helm-top-set-mode-line "CPU" helm-candidate-buffer global call-process-shell-command format frame-width nil] 4 (#$ . 4238)])
#@39 Return pid only from LINE.

(fn LINE)
(defalias 'helm-top-display-to-real #[257 "\300!@\207" [split-string] 3 (#$ . 4554)])
(defalias 'helm-top-set-mode-line #[257 "\301\302\"\203 \303\304\211\305%\211\207\306\307\"P\211\207" [helm-top-mode-line string-match "Sort:\\[\\(.*\\)\\] " replace-match nil 1 format "Sort:[%s] "] 7 "\n\n(fn STR)"])
(defalias 'helm-top-sort-transformer #[514 "\301\203; \302\211\211:\203/ @\262\303\304\"\203\" C\244\262\202( \211C\244\262A\262\202	 \305\306\"\"\266\204\202< \"\207" [helm-top-sort-fn helm-top-transformer nil string-match "^ *[0-9]+" append sort] 12 "\n\n(fn CANDIDATES SOURCE)"])
(defalias 'helm-top-sort-by-com #[514 "\300!\300!\3018\3018\231\207" [split-string 11] 8 "\n\n(fn S1 S2)"])
(defalias 'helm-top-sort-by-mem #[514 "\300!\300!\301\3028!\301\3028!V\207" [split-string string-to-number 9] 8 "\n\n(fn S1 S2)"])
(defalias 'helm-top-sort-by-user #[514 "\300!\300!A@A@\231\207" [split-string] 8 "\n\n(fn S1 S2)"])
(defalias 'helm-top-run-sort-by-com #[0 "\301\302!\210\303\304 \207" [helm-top-sort-fn helm-top-set-mode-line "COM" helm-top-sort-by-com helm-force-update] 2 "\n\n(fn)" nil])
(defalias 'helm-top-run-sort-by-cpu #[0 "\301\302!\210\303\304 \207" [helm-top-sort-fn helm-top-set-mode-line "CPU" nil helm-force-update] 2 "\n\n(fn)" nil])
(defalias 'helm-top-run-sort-by-mem #[0 "\301\302!\210\303\304 \207" [helm-top-sort-fn helm-top-set-mode-line "MEM" helm-top-sort-by-mem helm-force-update] 2 "\n\n(fn)" nil])
(defalias 'helm-top-run-sort-by-user #[0 "\301\302!\210\303\304 \207" [helm-top-sort-fn helm-top-set-mode-line "USER" helm-top-sort-by-user helm-force-update] 2 "\n\n(fn)" nil])
#@78 Return a pair with current X screen number and current X display name.

(fn)
(defalias 'helm-xrandr-info #[0 "\300\301!r\211q\210\302\303\304\305\306\307!\310\"\311\312%DC\216\313\314\315p\315\316%\210\315\211eb\210\212\317\320\315\321#\2033 \322\311!\262)\317\323\315\321#\203A \322\324!\262D\266\202*\207" [generate-new-buffer " *temp*" funcall make-byte-code 0 "\301\300!\205	 \302\300!\207" vconcat vector [buffer-name kill-buffer] 2 "\n\n(fn)" call-process "xrandr" nil "--current" re-search-forward "\\(^Screen \\)\\([0-9]\\):" t match-string "^\\(.*\\) connected" 1] 8 (#$ . 6259)])
#@39 Return current X screen number.

(fn)
(defalias 'helm-xrandr-screen #[0 "\300 @\207" [helm-xrandr-info] 1 (#$ . 6861)])
#@38 Return current X display name.

(fn)
(defalias 'helm-xrandr-output #[0 "\300 \211A@\207" [helm-xrandr-info] 2 (#$ . 6987)])
(defvar helm-source-xrandr-change-resolution '((name . "Change Resolution") (candidates lambda nil (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) 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)))))
(defvar helm-source-emacs-process '((name . "Emacs Process") (init lambda nil (list-processes--refresh)) (candidates lambda nil (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))))))
#@45 Preconfigured `helm' for top command.

(fn)
(defalias 'helm-top #[0 "\301 \302\303\304\305\306\307!\310\"\311\312%DC\216\204 \313 \210\314\315\316\317\320\321\322\323\324\325\326&\n)\207" [helm-alive-p current-window-configuration funcall make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 "\n\n(fn)" delete-other-windows helm :sources helm-source-top :buffer "*helm top*" :full-frame t :candidate-number-limit 9999 :preselect "^\\s-*[0-9]+"] 12 (#$ . 8060) nil])
#@47 Preconfigured `helm' for emacs process.

(fn)
(defalias 'helm-list-emacs-process #[0 "\300\301\302\"\207" [helm-other-buffer helm-source-emacs-process "*helm process*"] 3 (#$ . 8560) nil])
#@38 Preconfigured helm for xrandr.

(fn)
(defalias 'helm-xrandr-set #[0 "\300\301\302\303\304$\207" [helm :sources helm-source-xrandr-change-resolution :buffer "*helm xrandr*"] 5 (#$ . 8755) nil])
(provide 'helm-sys)
