;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\207" [require cl-lib helm with-editor subr-x] 2) (defvar helm-systemd-command-types '("service" "timer" "mount" "target" "socket" "scope" "device")) (defvar helm-systemd-list-all nil) (defvar helm-systemd-list-not-loaded nil) (defvar helm-systemd-buffer-name "*Helm systemd log*") (defvar helm-systemd-status-mode-hook nil) (defconst helm-systemd-actions-list '(("print" . "Printed") ("restart" . "Restarted") ("stop" . "Stopped") ("start" . "Started"))) (defvar helm-systemd-status-font-lock-keywords '(("\\(Loaded\\|Active\\|Status\\|Docs\\|Process\\|Main PID\\|Tasks\\|CGroup\\):" (1 'helm-bookmark-gnus)) ("active (running)" 0 'hi-green) ("inactive (dead)" 0 'helm-bookmark-info) ("active (exited)" 0 'helm-bookmark-info) ("[fF]ailed" 0 'diredp-executable-tag) ("ā”€\\([0-9]+\\)" (1 'helm-bookmark-info)) ("[ā—ā†³] .*" 0 'helm-buffer-file) "Default expressions to highlight in `helm systemd log'.")) (defvar helm-systemd-status-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [helm-systemd-status-mode-hook variable-documentation put "Hook run after entering Systemd-log mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp helm-systemd-status-mode-map definition-name helm-systemd-status-mode] 4) (defvar helm-systemd-status-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\317#\207" [helm-systemd-status-mode-abbrev-table helm-systemd-status-mode-map variable-documentation put purecopy "Keymap for `helm-systemd-status-mode'." boundp helm-systemd-status-mode-syntax-table definition-name helm-systemd-status-mode (lambda (def-tmp-var) (defvar helm-systemd-status-mode-syntax-table def-tmp-var)) make-syntax-table "Syntax table for `helm-systemd-status-mode'." (lambda (def-tmp-var) (defvar helm-systemd-status-mode-abbrev-table def-tmp-var)) define-abbrev-table nil "Abbrev table for `helm-systemd-status-mode'." derived-mode-parent] 5) #@191 Major mode for viewing systemd status logs. \{helm-systemd-status-mode-map} This mode runs the hook `helm-systemd-status-mode-hook', as the final or penultimate step during initialization. (defalias 'helm-systemd-status-mode #[0 "\306\300!\210\307\310 \210\311\312\313 !\210\314\f!\210 \306\315!\210\316 \317\307!\210)\320\321!\207" [delay-mode-hooks major-mode mode-name helm-systemd-status-mode-map helm-systemd-status-mode-syntax-table helm-systemd-status-mode-abbrev-table make-local-variable t kill-all-local-variables helm-systemd-status-mode "Systemd-log" use-local-map set-syntax-table font-lock-defaults (helm-systemd-status-font-lock-keywords) font-lock-mode run-mode-hooks helm-systemd-status-mode-hook local-abbrev-table] 2 (#$ . 2388) nil]) (byte-code "\301\302\303!\304P\305B\"\207" [helm-systemd-buffer-name add-to-list auto-mode-alist regexp-quote "\\'" helm-systemd-status-mode] 4) (defalias 'helm-systemd-command-line-option #[0 "\302@ \205\303Q\207" [helm-systemd-command-types helm-systemd-list-all "--no-pager --no-legend --plain -t " " --all"] 3]) #@28 Keymap for `helm-systemd'. (defvar helm-systemd-map (byte-code "\301 \302\"\210\303\304\305#\210\303\306\305#\210\303\307\310#\210\303\311\312#\210\313\314\"\207" [helm-map make-sparse-keymap set-keymap-parent define-key [C-return] helm-cr-empty-string [134217741] "" helm-systemd-next-type "" helm-systemd-prev-type delq nil] 5) (#$ . 3475)) #@69 Concatenate list of string with spaces as separator (fn WORD-LIST) (defalias 'helm-systemd-concatspace #[257 "\300\301\302\303\"\304#\207" [mapconcat identity delq nil " "] 6 (#$ . 3833)]) #@71 Construct string with: 'systemctl default-args' ARGS (fn &rest ARGS) (defalias 'helm-systemd-systemctl-command #[128 "\300\301\302 PB\211\262!\207" [helm-systemd-concatspace "systemctl " helm-systemd-command-line-option] 4 (#$ . 4030)]) #@58 Return a list of systemd service unit (fn SYSD-OPTIONS) (defalias 'helm-systemd-get-canditates #[257 "\301C\302\303!C\304\305\306\"\307\310\311\"!\312\313\314\315\"\"\316\317\320\"\"\210\203<\307\310\321\"!\312\313\314\315\"\"\316\317\322\"\"\266\323\242!C\324\317\325\"\"\210\302\242!\240\266\324\317\326#\"\210\242\207" [helm-systemd-list-not-loaded nil number-to-string 25 make-hash-table :test equal shell-command-to-string helm-systemd-systemctl-command " list-units " delete "" split-string "\n" mapc make-closure #[257 "\301\302!@\300#\207" [V0 puthash split-string] 5 "\n\n(fn LINE)"] " list-unit-files " #[257 "\301!@\302\300\303#?\205\304\300#\207" [V0 split-string gethash nil puthash] 6 "\n\n(fn LINE-LUF)"] string-to-number maphash #[514 "\300\211\242G]\240\207" [V0] 5 "\n\n(fn UNIT DESCR)"] #[514 "\302GGO!\303\304\301\242\305Q#\300\300\242B\240\207" [V0 V1 string-trim-left format "%-" "s %s"] 7 "\n\n(fn UNIT DESCR)"]] 12 (#$ . 4276)]) #@53 (fn UNIT-COMMAND UNIT &optional ISUSER NODISPLAY) (defalias 'helm-systemd-display #[1026 "r\301!q\210\302 \210\303\205\304\305$\306\307\261\210\204$\310\230\203,\311!c\210\202I\312\313\314\"r\211q\210\315\316\"\216\317\320!\210\311\321P!\262*\210\211c\210\307c\266\211?\205U\322p!)\207" [helm-systemd-buffer-name get-buffer-create helm-systemd-status-mode helm-systemd-systemctl-command "--user" "--" "\nā†³ " "\n" "status" shell-command-to-string generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] cd "/sudo::/" "sudo " display-buffer] 9 (#$ . 5277)]) (defalias 'helm-systemd-next-type #[0 "\302A@C\" \203\303 \207\304\305!\207" [helm-systemd-command-types helm-alive-p append helm-force-update error "Running helm command outside of context"] 3 nil nil]) (defalias 'helm-systemd-prev-type #[0 "\302\303!\304\303!@\"\" \203\305 \207\306\307!\207" [helm-systemd-command-types helm-alive-p append last remove helm-force-update error "Running helm command outside of context"] 5 nil nil]) #@46 Show unit status (fn LINE &optional ISUSER) (defalias 'helm-system-persis-action #[513 "\300 \301\302\303\"\"\207" [helm-marked-candidates mapc make-closure #[257 "\301!@\302\303\300#\207" [V0 split-string helm-systemd-display "status"] 6 "\n\n(fn LINE)"]] 7 (#$ . 6364)]) #@26 (fn CANDIDATES SOURCE) (defalias 'helm-systemd-transformer #[514 "\300\211\211\211\211\211\211\211\211 :\203* @\262 \301 !\262@\262A@\262\3028\262\3038\262\205=\304\305 \306\"!\262\203\252\307\301\310\304\311\312\313\314\315\236A\"\205X\316\317\257!!!!@\211\320\230\203l\321\202w\211\322\230\203v\323\202w\323\324\325\"\203\230\326\n\327\330#\331 \331R\300\332%\266\204\202\252\326\n\327\330#\331P\300\332%\266\204\333\230\204\266\334\230\203\304\326\327\330\335#\300\332%\262\336\230\204\320\337\230\203\336\326\327\330\321#\300\332%\262\340\230\203\362\326\327\330\341#\300\332%\262\342\230\203\326\327\330\343#\300\332%\262\203\326\327\330\344#\300\332%\262\211\262B\262 A\262\n\300\262\202\n\237\207" [nil split-string 2 3 helm-systemd-concatspace cl-subseq 4 last shell-command-to-string "systemctl" "is-enabled " string-match "User" name "--user" "--" "enabled" helm-bookmark-info "static" helm-bookmark-gnus format "%8s" replace-regexp-in-string propertize face " " t "mounted" "running" helm-ff-directory "exited" "dead" "listening" dired-symlink "failed" dired-warning helm-buffer-process] 23 (#$ . 6648)]) #@25 (fn SYSD-VERB ISUSER) (defalias 'helm-systemd-make-actions '(macro . #[514 "\300\301\302\300\303\304\305\306BBBB\307\310\311\312 \313BBD\314BBDF\315BBE\207" [lambda (_ignore) mapc (candidate) helm-systemd-display (car (split-string candidate)) (t) message concat cdr assoc (helm-systemd-actions-list) (" " (car (split-string candidate))) ((helm-marked-candidates))] 14 (#$ . 7875)])) (defalias 'helm-systemd-build-source #[0 "\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317&\320\321\322\323\324\325\326&\207" [helm-systemd-map helm-make-source "systemd" helm-source-sync :candidates #[0 "\300\301\302!!\207" [reverse helm-systemd-get-canditates ""] 3] :action helm-make-actions "Print" #[257 "\300\301\302 \"\207" [mapc #[257 "\301\302\303!@\304\305$\210\306\307\302\"A\310\303!@Q!\207" [helm-systemd-actions-list helm-systemd-display "status" split-string nil t message assoc #1=" "] 6 "\n\n(fn CANDIDATE)"] helm-marked-candidates] 4 "\n\n(fn IGNORE)"] "Restart" #[257 "\300\301\302 \"\207" [mapc #[257 "\301\302\303!@\304\305$\210\306\307\302\"A\310\303!@Q!\207" [helm-systemd-actions-list helm-systemd-display "restart" split-string nil t message assoc #1#] 6 "\n\n(fn CANDIDATE)"] helm-marked-candidates] 4 "\n\n(fn IGNORE)"] "Stop" #[257 "\300\301\302 \"\207" [mapc #[257 "\301\302\303!@\304\305$\210\306\307\302\"A\310\303!@Q!\207" [helm-systemd-actions-list helm-systemd-display "stop" split-string nil t message assoc #1#] 6 "\n\n(fn CANDIDATE)"] helm-marked-candidates] 4 "\n\n(fn IGNORE)"] "Start" #[257 "\300\301\302 \"\207" [mapc #[257 "\301\302\303!@\304\305$\210\306\307\302\"A\310\303!@Q!\207" [helm-systemd-actions-list helm-systemd-display "start" split-string nil t message assoc #1#] 6 "\n\n(fn CANDIDATE)"] helm-marked-candidates] 4 "\n\n(fn IGNORE)"] :persistent-action helm-system-persis-action :persistent-help "Show unit status" :keymap :filtered-candidate-transformer helm-systemd-transformer] 15]) (defalias 'helm-systemd-build-source-user #[0 "\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321&\n\322\323\324\325\326\327\330&\207" [helm-systemd-map helm-make-source "Systemd User" helm-source-sync :candidates #[0 "\300\301\302!!\207" [reverse helm-systemd-get-canditates "--user"] 3] :action helm-make-actions "Print" #[257 "\300\301\302 \"\207" [mapc #[257 "\301\302\303!@\304\211$\210\305\306\302\"A\307\303!@Q!\207" [helm-systemd-actions-list helm-systemd-display "status" split-string t message assoc #1=" "] 6 "\n\n(fn CANDIDATE)"] helm-marked-candidates] 4 "\n\n(fn IGNORE)"] "Restart" #[257 "\300\301\302 \"\207" [mapc #[257 "\301\302\303!@\304\211$\210\305\306\302\"A\307\303!@Q!\207" [helm-systemd-actions-list helm-systemd-display "restart" split-string t message assoc #1#] 6 "\n\n(fn CANDIDATE)"] helm-marked-candidates] 4 "\n\n(fn IGNORE)"] "Stop" #[257 "\300\301\302 \"\207" [mapc #[257 "\301\302\303!@\304\211$\210\305\306\302\"A\307\303!@Q!\207" [helm-systemd-actions-list helm-systemd-display "stop" split-string t message assoc #1#] 6 "\n\n(fn CANDIDATE)"] helm-marked-candidates] 4 "\n\n(fn IGNORE)"] "Start" #[257 "\300\301\302 \"\207" [mapc #[257 "\301\302\303!@\304\305$\210\306\307\302\"A\310\303!@Q!\207" [helm-systemd-actions-list helm-systemd-display "start" split-string nil t message assoc #1#] 6 "\n\n(fn CANDIDATE)"] helm-marked-candidates] 4 "\n\n(fn IGNORE)"] "Edit with Emacs" #[257 "\300\301\302\303#\210\304\305\306!@P!\207" [add-to-list with-editor-envvars "SYSTEMD_EDITOR" t with-editor-async-shell-command "systemctl --user --full edit " split-string] 5 "\n\n(fn CANDIDATE)"] :persistent-action #[257 "\300\301\"\207" [helm-system-persis-action t] 4 "\n\n(fn LINE)"] :persistent-help "Show unit status" :keymap :filtered-candidate-transformer helm-systemd-transformer] 17]) (defalias 'helm-systemd #[0 "\300\301\302\303\304\"\305\306\307\310&\207" [helm :sources mapcar #[257 "\211 \207" [] 2 "\n\n(fn FUNC)"] (helm-systemd-build-source helm-systemd-build-source-user) :truncate-lines t :buffer "*helm systemd*"] 7 nil nil]) (provide 'helm-systemd)