;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\310\311\312&\210\313\314\315\316\317DD\320\321\322\311\304&\210\313\323\315\316\324DD\325\311\304\321\326&\210\313\327\315\316\330DD\331\311\304\321\332&\210\303\333\305\334\307\335\311\304\311\336& \210\337\340\341\342\311\333%\210\337\343\344\345\311\333%\210\337\346\347\350\311\333%\207" [require helm helm-for-files custom-declare-group helm-taskswitch nil "Use helm to switch between tasks (X11 windows or buffers)" :prefix "helm-taskswitch-" :group external custom-declare-variable helm-taskswitch-wmctrl-path funcall function #[0 "\300\207" [#1="/usr/bin/wmctrl"] 1 #1#] "Absolute path to wmctrl executable." :type (file :must-match t) helm-taskswitch-title-transform #[0 "\300\207" [identity] 1] "Transform title of a single client window for display in helm selection." (repeat function) helm-taskswitch-wmclass-width #[0 "\300\207" [12] 1] "Column with of wmclass field when displayed." integer helm-taskswitch-faces "Customize the appearance of helm-taskswitch." "helm-" helm-faces custom-declare-face helm-taskswitch-browser-face ((t (:inherit font-lock-constant-face))) "Face used for web browsers." helm-taskswitch-term-face ((t (:inherit font-lock-string-face))) "Face used for terminals." helm-taskswitch-emacs-face ((t (:inherit font-lock-regexp-grouping-construct))) "Face used for emacs."] 10) #@107 Formats a candidate client window for task switcher. AL is the associative list for a window. (fn AL) (defalias 'helm-taskswitch-format-candidate #[257 "\301\302\211#\303\304Q\301\305!\306!#\211CB\207" [helm-taskswitch-wmclass-width format "%d.%d" "%-" "s %s" helm-taskswitch-wmclass helm-taskswitch-title] 8 (#$ . 1465)]) #@84 Formats the title of a window. AL is an associative list for a window. (fn AL) (defalias 'helm-taskswitch-title #[257 "\301\236A\302\303\304#!\207" [helm-taskswitch-title-transform title replace-regexp-in-string "- Google Chrome" ""] 7 (#$ . 1805)]) #@59 Gets the WMCLASS for window AL associative list. (fn AL) (defalias 'helm-taskswitch-wmclass #[257 "\300\236A\211\301\230\203\302\303\304\305#\207\211\306\230\203\302\307\304\310#\207\211\311\230\203(\302\312\304\313#\207\207" [wmclass "google-chrome.Google-chrome" propertize "Chrome" face helm-taskswitch-browser-face "terminator.Terminator" "Terminator" helm-taskswitch-term-face "emacs.Emacs" "Emacs" helm-taskswitch-emacs-face] 6 (#$ . 2068)]) (defconst helm-taskswitch--wmctrl-field-count 10) (defconst helm-taskswitch--wmctrl-field-regex (byte-code "\301\302\303\304S\305\"\306#\307Q\207" [helm-taskswitch--wmctrl-field-count "^" mapconcat identity make-list "\\(\\S-+\\)\\s-+" "" "\\(.+\\)"] 6)) #@66 Internal function to get a list of desktop windows via `wmctrl'. (defalias 'helm-taskswitch--list-windows #[0 "\302\303!\304rq\210\305\306P\304\307#\210eb\210\310 \304\307#\203m\311\312!\311\313!\311\314!\311\315!\311\316!\311\317!\311\320!\311\321!\311\322!\311\323!\324 \325\fB\326\fB\327\fB\330\fB\331\fB\332\fB\333\fB\334\fB\335\fB\336\fB\257\nC\"\266\213\202)\337!\210\207" [helm-taskswitch-wmctrl-path helm-taskswitch--wmctrl-field-regex generate-new-buffer " *helm-taskswitch-wmctrl-output*" nil call-process-shell-command " -lGxp" t re-search-forward match-string 1 2 3 4 5 6 7 8 9 10 append window-id desktop-number pid x-offset y-offset width height wmclass client-host title kill-buffer] 25 (#$ . 2785)]) #@100 Internal function to focus the desktop window specified by AL, a window associative list. (fn AL) (defalias 'helm-taskswitch-focus-window-by-candidate #[257 "\301@\236A\302\303R\304!\210\305!\207" [helm-taskswitch-wmctrl-path window-id " -i -a '" "'" message call-process-shell-command] 6 (#$ . 3525)]) #@101 Closes a candidate AL, a window associative list from ‘helm-taskswitch--list-windows’. (fn AL) (defalias 'helm-taskswitch-close-candidate #[257 "\301@\236A\302\303R\304\305P!\210\306!\207" [helm-taskswitch-wmctrl-path window-id " -i -c '" "'" message "helm-taskswitch: closing X client with " call-process-shell-command] 6 (#$ . 3841)]) #@89 Closes all selected candidates. AL is ignored but seems to be needed by helm. (fn AL) (defalias 'helm-taskswitch-close-candidates #[257 "\300\301\302 \"\207" [mapc helm-taskswitch-close-candidate helm-marked-candidates] 4 (#$ . 4194)]) #@47 Return a list windows with title and wmclass. (defalias 'helm-taskswitch-client-candidates #[0 "\300\301\302 \"\207" [mapcar helm-taskswitch-format-candidate helm-taskswitch--list-windows] 3 (#$ . 4438)]) #@50 Helm source that provides X windows and actions. (defvar helm-taskswitch-source-x-windows (helm-make-source "X Windows" 'helm-source-sync :fuzzy-match t :candidates 'helm-taskswitch-client-candidates :action '(("Focus window" . helm-taskswitch-focus-window-by-candidate) ("Close window(s)" . helm-taskswitch-close-candidates) ("dump client window s-exp" . prin1))) (#$ . 4649)) #@69 Use helm to switch between tasks (X11 windows, buffers or recentf). (defalias 'helm-taskswitch #[0 "\301\302!\210\303\304\305 !!\210\204\306\307\310\"\311\312\313\314\315\316\317&\207" [helm-source-buffers-list run-hooks helm-taskswitch-open-hooks select-frame-set-input-focus window-frame selected-window helm-make-source "Buffers" helm-source-buffers helm :sources (helm-taskswitch-source-x-windows helm-source-buffers-list helm-source-recentf helm-source-buffer-not-found) :buffer "*helm-taskswitch*" :truncate-lines t] 7 (#$ . 5033) nil]) (provide 'helm-taskswitch)