diff options
Diffstat (limited to 'configs/shared/emacs/.emacs.d/elpa/docker-20180710.743')
18 files changed, 0 insertions, 1652 deletions
diff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-autoloads.el b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-autoloads.el deleted file mode 100644 index 48aa60651992..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-autoloads.el +++ /dev/null @@ -1,256 +0,0 @@ -;;; docker-autoloads.el --- automatically extracted autoloads -;; -;;; Code: -(add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path)))) - -;;;### (autoloads nil "docker-container" "docker-container.el" (23377 -;;;;;; 61612 979207 18000)) -;;; Generated autoloads from docker-container.el - -(autoload 'docker-start "docker-container" "\ -Start the container named NAME. - -\(fn NAME)" t nil) - -(autoload 'docker-stop "docker-container" "\ -Stop the container named NAME. - -TIMEOUT is the number of seconds to wait for the container to stop before killing it. - -\(fn NAME &optional TIMEOUT)" t nil) - -(autoload 'docker-restart "docker-container" "\ -Restart the container named NAME. - -TIMEOUT is the number of seconds to wait for the container to stop before killing it. - -\(fn NAME &optional TIMEOUT)" t nil) - -(autoload 'docker-pause "docker-container" "\ -Pause the container named NAME. - -\(fn NAME)" t nil) - -(autoload 'docker-unpause "docker-container" "\ -Unpause the container named NAME. - -\(fn NAME)" t nil) - -(autoload 'docker-rm "docker-container" "\ -Remove the container named NAME. - -With prefix argument, sets FORCE to true. - -Force the removal even if the container is running when FORCE is set. -Remove the specified link and not the underlying container when LINK is set. -Remove the volumes associated with the container when VOLUMES is set. - -\(fn NAME &optional FORCE LINK VOLUMES)" t nil) - -(autoload 'docker-kill "docker-container" "\ -Kill the container named NAME using SIGNAL. - -\(fn NAME &optional SIGNAL)" t nil) - -(autoload 'docker-inspect "docker-container" "\ -Inspect the container named NAME. - -\(fn NAME)" t nil) - -(autoload 'docker-diff "docker-container" "\ -Diff the container named NAME. - -\(fn NAME)" t nil) - -(autoload 'docker-rename "docker-container" "\ -Rename CONTAINER using NAME. - -\(fn CONTAINER NAME)" t nil) - -(autoload 'docker-logs "docker-container" "\ -Show the logs from container NAME. - -If FOLLOW is set, run in `async-shell-command'. - -\(fn NAME &optional FOLLOW)" t nil) - -(autoload 'docker-container-find-file "docker-container" "\ -Inside CONTAINER open FILE. - -\(fn CONTAINER FILE)" t nil) - -(autoload 'docker-container-find-directory "docker-container" "\ -Inside CONTAINER open DIRECTORY. - -\(fn CONTAINER DIRECTORY)" t nil) - -(autoload 'docker-container-shell "docker-container" "\ -Open `shell' in CONTAINER. - -\(fn CONTAINER)" t nil) - -(autoload 'docker-container-eshell "docker-container" "\ -Open `eshell' in CONTAINER. - -\(fn CONTAINER)" t nil) - -(autoload 'docker-containers "docker-container" "\ -List docker containers. - -\(fn)" t nil) - -;;;*** - -;;;### (autoloads nil "docker-image" "docker-image.el" (23377 61612 -;;;;;; 980588 315000)) -;;; Generated autoloads from docker-image.el - -(autoload 'docker-pull "docker-image" "\ -Pull the image named NAME. If ALL is set, use \"-a\". - -\(fn NAME &optional ALL)" t nil) - -(autoload 'docker-push "docker-image" "\ -Push the image named NAME. - -\(fn NAME)" t nil) - -(autoload 'docker-rmi "docker-image" "\ -Destroy or untag the image named NAME. - -Force removal of the image when FORCE is set. -Do not delete untagged parents when NO-PRUNE is set. - -\(fn NAME &optional FORCE NO-PRUNE)" t nil) - -(autoload 'docker-tag "docker-image" "\ -Tag IMAGE using NAME. - -\(fn IMAGE NAME)" t nil) - -(autoload 'docker-images "docker-image" "\ -List docker images. - -\(fn)" t nil) - -;;;*** - -;;;### (autoloads nil "docker-machine" "docker-machine.el" (23377 -;;;;;; 61612 976526 978000)) -;;; Generated autoloads from docker-machine.el - -(autoload 'docker-machine-config "docker-machine" "\ -Print the connection config for the machine NAME. - -\(fn NAME)" t nil) - -(autoload 'docker-machine-inspect "docker-machine" "\ -Inspect information about the machine NAME. - -\(fn NAME)" t nil) - -(autoload 'docker-machine-ip "docker-machine" "\ -Get the IP address of the machine NAME. - -\(fn NAME)" t nil) - -(autoload 'docker-machine-status "docker-machine" "\ -Get the status of the machine NAME. - -\(fn NAME)" t nil) - -(autoload 'docker-machine-upgrade "docker-machine" "\ -Upgrade the machine NAME to the latest version of Docker. - -\(fn NAME)" t nil) - -(autoload 'docker-machine-kill "docker-machine" "\ -Kill the machine NAME. - -\(fn NAME)" t nil) - -(autoload 'docker-machine-create "docker-machine" "\ -Create a machine NAME using DRIVER. - -\(fn NAME DRIVER)" t nil) - -(autoload 'docker-machine-start "docker-machine" "\ -Start the machine NAME. - -\(fn NAME)" t nil) - -(autoload 'docker-machine-env "docker-machine" "\ -Parse and set environment variables from \"docker-machine env NAME\" output. - -\(fn NAME)" t nil) - -(autoload 'docker-machine-stop "docker-machine" "\ -Stop the machine NAME. - -\(fn NAME)" t nil) - -(autoload 'docker-machine-restart "docker-machine" "\ -Restart the machine NAME. - -\(fn NAME)" t nil) - -(autoload 'docker-machine-rm "docker-machine" "\ -Destroy or uncommand the machine NAME. If FORCE is set, use \"--force\". - -\(fn NAME &optional FORCE)" t nil) - -(autoload 'docker-machines "docker-machine" "\ -List docker machines. - -\(fn)" t nil) - -;;;*** - -;;;### (autoloads nil "docker-network" "docker-network.el" (23377 -;;;;;; 61612 983483 625000)) -;;; Generated autoloads from docker-network.el - -(autoload 'docker-network-rm "docker-network" "\ -Destroy the network named NAME. - -\(fn NAME)" t nil) - -(autoload 'docker-networks "docker-network" "\ -List docker networks. - -\(fn)" t nil) - -;;;*** - -;;;### (autoloads nil "docker-volume" "docker-volume.el" (23377 61612 -;;;;;; 972590 516000)) -;;; Generated autoloads from docker-volume.el - -(autoload 'docker-volume-rm "docker-volume" "\ -Destroy the volume named NAME. - -\(fn NAME)" t nil) - -(autoload 'docker-volume-dired "docker-volume" "\ - - -\(fn NAME)" t nil) - -(autoload 'docker-volumes "docker-volume" "\ -List docker volumes. - -\(fn)" t nil) - -;;;*** - -;;;### (autoloads nil nil ("docker-pkg.el" "docker-process.el" "docker-utils.el" -;;;;;; "docker.el") (23377 61612 982050 23000)) - -;;;*** - -;; Local Variables: -;; version-control: never -;; no-byte-compile: t -;; no-update-autoloads: t -;; End: -;;; docker-autoloads.el ends here diff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-container.el b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-container.el deleted file mode 100644 index ceebd82c7a09..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-container.el +++ /dev/null @@ -1,478 +0,0 @@ -;;; docker-container.el --- Emacs interface to docker-container -*- lexical-binding: t -*- - -;; Author: Philippe Vaucher <philippe.vaucher@gmail.com> -;; Yuki Inoue <inouetakahiroki@gmail.com> - -;; This file is NOT part of GNU Emacs. - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. - -;;; Commentary: - -;;; Code: - -(require 'docker-process) -(require 'docker-utils) -(require 'magit-popup) -(require 'tablist) -(require 'json) - -(defcustom docker-container-show-all t - "Show non-running containers." - :group 'docker - :type 'boolean) - -(defcustom docker-container-shell-file-name shell-file-name - "Shell to use when entering containers. -For more information see the variable `shell-file-name'." - :group 'docker - :type 'string) - -(defcustom docker-container-default-sort-key '("Image" . nil) - "Sort key for docker containers. - -This should be a cons cell (NAME . FLIP) where -NAME is a string matching one of the column names -and FLIP is a boolean to specify the sort order." - :group 'docker - :type '(cons (choice (const "Id") - (const "Image") - (const "Command") - (const "Created") - (const "Status") - (const "Ports") - (const "Names")) - (choice (const :tag "Ascending" nil) - (const :tag "Descending" t)))) - -(defun docker-container-parse (line) - "Convert a LINE from \"docker ps\" to a `tabulated-list-entries' entry." - (let (data) - (condition-case nil - (setq data (json-read-from-string line)) - (json-readtable-error - (error "Could not read following string as json:\n%s" line))) - (list (aref data 6) data))) - -(defun docker-container-entries () - "Return the docker containers data for `tabulated-list-entries'." - (let* ((fmt "[{{json .ID}},{{json .Image}},{{json .Command}},{{json .RunningFor}},{{json .Status}},{{json .Ports}},{{json .Names}}]") - (data (docker-run "ps" (format "--format=\"%s\"" fmt) (when docker-container-show-all "-a "))) - (lines (s-split "\n" data t))) - (-map #'docker-container-parse lines))) - -(defun docker-container-refresh () - "Refresh the containers list." - (setq tabulated-list-entries (docker-container-entries))) - -(defun docker-container-read-name () - "Read an container name." - (completing-read "Container: " (-map #'car (docker-container-entries)))) - -;;;###autoload -(defun docker-start (name) - "Start the container named NAME." - (interactive (list (docker-container-read-name))) - (docker-run "start" name)) - -;;;###autoload -(defun docker-stop (name &optional timeout) - "Stop the container named NAME. - -TIMEOUT is the number of seconds to wait for the container to stop before killing it." - (interactive (list (docker-container-read-name) current-prefix-arg)) - (docker-run "stop" (when timeout (format "-t %d" timeout)) name)) - -;;;###autoload -(defun docker-restart (name &optional timeout) - "Restart the container named NAME. - -TIMEOUT is the number of seconds to wait for the container to stop before killing it." - (interactive (list (docker-container-read-name) current-prefix-arg)) - (docker-run "restart" (when timeout (format "-t %d" timeout)) name)) - -;;;###autoload -(defun docker-pause (name) - "Pause the container named NAME." - (interactive (list (docker-container-read-name))) - (docker-run "pause" name)) - -;;;###autoload -(defun docker-unpause (name) - "Unpause the container named NAME." - (interactive (list (docker-container-read-name))) - (docker-run "unpause" name)) - -;;;###autoload -(defun docker-rm (name &optional force link volumes) - "Remove the container named NAME. - -With prefix argument, sets FORCE to true. - -Force the removal even if the container is running when FORCE is set. -Remove the specified link and not the underlying container when LINK is set. -Remove the volumes associated with the container when VOLUMES is set." - (interactive (list (docker-container-read-name) current-prefix-arg)) - (docker-run "rm" (when force "-f") (when link "-l") (when volumes "-v") name)) - -;;;###autoload -(defun docker-kill (name &optional signal) - "Kill the container named NAME using SIGNAL." - (interactive (list (docker-container-read-name))) - (docker-run "kill" (when signal (format "-s %s" signal)) name)) - -;;;###autoload -(defun docker-inspect (name) - "Inspect the container named NAME." - (interactive (list (docker-container-read-name))) - (docker-utils-with-buffer (format "inspect %s" name) - (insert (docker-run "inspect" name)) - (json-mode))) - -;;;###autoload -(defun docker-diff (name) - "Diff the container named NAME." - (interactive (list (docker-container-read-name))) - (docker-utils-with-buffer (format "diff %s" name) - (insert (docker-run "diff" name)))) - -;;;###autoload -(defun docker-rename (container name) - "Rename CONTAINER using NAME." - (interactive (list (docker-container-read-name) (read-string "Name: "))) - (docker-run "rename" container name)) - -;;;###autoload -(defun docker-logs (name &optional follow) - "Show the logs from container NAME. - -If FOLLOW is set, run in `async-shell-command'." - (interactive (list (docker-container-read-name))) - (if follow - (async-shell-command (format "%s logs -f %s" docker-command name) (format "* docker logs %s *" name)) - (docker-utils-with-buffer (format "logs %s" name) - (insert (docker-run "logs" name))))) - -;;;###autoload -(defun docker-container-find-file (container file) - "Inside CONTAINER open FILE." - (interactive - (let* ((container-name (docker-container-read-name)) - (tramp-filename (read-file-name "File: " (format "/docker:%s:/" container-name)))) - (with-parsed-tramp-file-name tramp-filename nil - (list host localname)))) - (find-file (format "/docker:%s:%s" container file))) - -;;;###autoload -(defun docker-container-find-directory (container directory) - "Inside CONTAINER open DIRECTORY." - (interactive - (let* ((container-name (docker-container-read-name)) - (tramp-filename (read-directory-name "Directory: " (format "/docker:%s:/" container-name)))) - (with-parsed-tramp-file-name tramp-filename nil - (list host localname)))) - (dired (format "/docker:%s:%s" container directory))) - -(defalias 'docker-container-dired 'docker-container-find-directory) - -;;;###autoload -(defun docker-container-shell (container) - "Open `shell' in CONTAINER." - (interactive (list (docker-container-read-name))) - (let* ((shell-file-name docker-container-shell-file-name) - (container-address (format "docker:%s:/" container)) - (file-prefix (if (file-remote-p default-directory) - (with-parsed-tramp-file-name default-directory nil - (format "/%s:%s|" method host)) - "/")) - (default-directory (format "%s%s" file-prefix container-address))) - (shell (format "*shell %s*" default-directory)))) - -;;;###autoload -(defun docker-container-eshell (container) - "Open `eshell' in CONTAINER." - (interactive (list (docker-container-read-name))) - (let* ((container-address (format "docker:%s:/" container)) - (file-prefix (if (file-remote-p default-directory) - (with-parsed-tramp-file-name default-directory nil - (format "/%s:%s|" method host)) - "/")) - (default-directory (format "%s%s" file-prefix container-address)) - (eshell-buffer-name (format "*eshell %s*" default-directory))) - (eshell))) - -(defun docker-container-start-selection () - "Run `docker-start' on the containers selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-run "start" (docker-container-start-arguments) it)) - (tablist-revert)) - -(defun docker-container-stop-selection () - "Run `docker-stop' on the containers selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-run "stop" (docker-container-stop-arguments) it)) - (tablist-revert)) - -(defun docker-container-restart-selection () - "Run `docker-restart' on the containers selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-run "restart" (docker-container-restart-arguments) it)) - (tablist-revert)) - -(defun docker-container-pause-selection () - "Run `docker-pause' on the containers selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-run "pause" (docker-container-pause-arguments) it)) - (tablist-revert)) - -(defun docker-container-unpause-selection () - "Run `docker-unpause' on the containers selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-run "unpause" (docker-container-unpause-arguments) it)) - (tablist-revert)) - -(defun docker-container-rm-selection () - "Run `docker-rm' on the containers selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-run "rm" (docker-container-rm-arguments) it)) - (tablist-revert)) - -(defun docker-container-kill-selection () - "Run `docker-kill' on the containers selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-run "kill" (docker-container-kill-arguments) it)) - (tablist-revert)) - -(defun docker-container-inspect-selection () - "Run `docker-inspect' on the containers selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-utils-with-buffer (format "inspect %s" it) - (insert (docker-run "inspect" (docker-container-inspect-arguments) it)) - (json-mode)))) - -(defun docker-container-diff-selection () - "Run `docker-diff' on the containers selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-utils-with-buffer (format "diff %s" it) - (insert (docker-run "diff" (docker-container-diff-arguments) it))))) - -(defun docker-container-rename-selection () - "Rename containers." - (interactive) - (docker-utils-select-if-empty) - (--each (docker-utils-get-marked-items-ids) - (docker-rename it (read-string (format "New name for %s: " it)))) - (tablist-revert)) - -(defun docker-container-logs-selection () - "Run \"docker logs\" on the containers selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (async-shell-command - (format "%s logs %s %s" docker-command (s-join " " (docker-container-logs-arguments)) it) - (format "* docker logs %s *" it)))) - -(defun docker-container-find-file-selection (path) - "Run `docker-container-find-file' on the containers selection." - (interactive "sPath: ") - (--each (docker-utils-get-marked-items-ids) - (docker-container-find-file it path))) - -(defun docker-container-shell-selection () - "Run `docker-container-shell' on the containers selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-container-shell it))) - -(defun docker-container-eshell-selection () - "Run `docker-container-eshell' on the containers selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-container-eshell it))) - -(defun docker-container-cp-from-selection (container-path host-path) - "Run \"docker cp\" from CONTAINER-PATH to HOST-PATH for selected container." - (interactive "sContainer path: \nFHost path: ") - (--each (docker-utils-get-marked-items-ids) - (docker-run "cp" (concat it ":" container-path) host-path))) - -(defun docker-container-cp-to-selection (host-path container-path) - "Run \"docker cp\" from HOST-PATH to CONTAINER-PATH for selected containers." - (interactive "fHost path: \nsContainer path: ") - (--each (docker-utils-get-marked-items-ids) - (docker-run "cp" host-path (concat it ":" container-path)))) - -(magit-define-popup docker-container-start-popup - "Popup for starting containers." - 'docker-container-popups - :man-page "docker-start" - :actions '((?S "Start" docker-container-start-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-container-stop-popup - "Popup for stoping containers." - 'docker-container-popups - :man-page "docker-stop" - :options '((?t "Timeout" "-t ")) - :actions '((?O "Stop" docker-container-stop-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-container-restart-popup - "Popup for restarting containers." - 'docker-container-popups - :man-page "docker-restart" - :options '((?t "Timeout" "-t ")) - :actions '((?R "Restart" docker-container-restart-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-container-pause-popup - "Popup for pauseing containers." - 'docker-container-popups - :man-page "docker-pause" - :actions '((?P "Pause" docker-container-pause-selection) - (?U "Unpause" docker-container-unpause-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-container-rm-popup - "Popup for removing containers." - 'docker-container-popups - :man-page "docker-rm" - :switches '((?f "Force" "-f") - (?v "Volumes" "-v")) - :actions '((?D "Remove" docker-container-rm-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-container-kill-popup - "Popup for kill signaling containers" - 'docker-container-popups - :man-page "docker-kill" - :options '((?s "Signal" "-s ")) - :actions '((?K "Kill" docker-container-kill-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-container-inspect-popup - "Popup for inspecting containers." - 'docker-container-popups - :man-page "docker-inspect" - :actions '((?I "Inspect" docker-container-inspect-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-container-diff-popup - "Popup for showing containers diffs." - 'docker-container-popups - :man-page "docker-diff" - :actions '((?d "Diff" docker-container-diff-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-container-logs-popup - "Popup for showing containers logs." - 'docker-container-popups - :man-page "docker-logs" - :switches '((?f "Follow" "-f")) - :actions '((?L "Logs" docker-container-logs-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-container-find-file-popup - "Popup for opening containers files." - 'docker-container-popups - :actions '((?f "Open file" docker-container-find-file-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-container-shell-popup - "Popup for doing M-x `shell'/`eshell' to containers." - 'docker-container-popups - :actions '((?b "Shell" docker-container-shell-selection) - (?e "Eshell" docker-container-eshell-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-container-cp-popup - "Popup for copying files from/to containers." - 'docker-container-popups - :man-page "docker-cp" - :actions '((?F "Copy From" docker-container-cp-from-selection) - (?T "Copy To" docker-container-cp-to-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-container-help-popup - "Help popup for docker containers." - :actions '("Docker containers help" - (?C "Copy" docker-container-cp-popup) - (?D "Remove" docker-container-rm-popup) - (?I "Inspect" docker-container-inspect-popup) - (?K "Kill" docker-container-kill-popup) - (?L "Logs" docker-container-logs-popup) - (?O "Stop" docker-container-stop-popup) - (?P "Pause" docker-container-pause-popup) - (?R "Restart" docker-container-restart-popup) - (?S "Start" docker-container-start-popup) - (?b "Shell" docker-container-shell-popup) - (?d "Diff" docker-container-diff-popup) - (?f "Find file" docker-container-find-file-popup) - (?r "Rename" docker-container-rename-selection) - "Switch to other parts" - (?i "Images" docker-images) - (?m "Machines" docker-machines) - (?n "Networks" docker-networks) - (?v "Volumes" docker-volumes))) - -(defvar docker-container-mode-map - (let ((map (make-sparse-keymap))) - (define-key map "?" 'docker-container-help-popup) - (define-key map "C" 'docker-container-cp-popup) - (define-key map "D" 'docker-container-rm-popup) - (define-key map "I" 'docker-container-inspect-popup) - (define-key map "K" 'docker-container-kill-popup) - (define-key map "L" 'docker-container-logs-popup) - (define-key map "O" 'docker-container-stop-popup) - (define-key map "P" 'docker-container-pause-popup) - (define-key map "R" 'docker-container-restart-popup) - (define-key map "S" 'docker-container-start-popup) - (define-key map "b" 'docker-container-shell-popup) - (define-key map "d" 'docker-container-diff-popup) - (define-key map "f" 'docker-container-find-file-popup) - (define-key map "r" 'docker-container-rename-selection) - map) - "Keymap for `docker-container-mode'.") - -;;;###autoload -(defun docker-containers () - "List docker containers." - (interactive) - (docker-utils-pop-to-buffer "*docker-containers*") - (docker-container-mode) - (tablist-revert)) - -(define-derived-mode docker-container-mode tabulated-list-mode "Containers Menu" - "Major mode for handling a list of docker containers." - (setq tabulated-list-format [("Id" 16 t)("Image" 15 t)("Command" 30 t)("Created" 15 t)("Status" 20 t)("Ports" 10 t)("Names" 10 t)]) - (setq tabulated-list-padding 2) - (setq tabulated-list-sort-key docker-container-default-sort-key) - (add-hook 'tabulated-list-revert-hook 'docker-container-refresh nil t) - (tabulated-list-init-header) - (tablist-minor-mode)) - -(provide 'docker-container) - -;;; docker-container.el ends here diff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-container.elc b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-container.elc deleted file mode 100644 index c7351abce96e..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-container.elc +++ /dev/null Binary files differdiff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-image.el b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-image.el deleted file mode 100644 index a9e3420bdf38..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-image.el +++ /dev/null @@ -1,245 +0,0 @@ -;;; docker-image.el --- Emacs interface to docker-image -*- lexical-binding: t -*- - -;; Author: Philippe Vaucher <philippe.vaucher@gmail.com> - -;; This file is NOT part of GNU Emacs. - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. - -;;; Commentary: - -;;; Code: - -(require 'docker-process) -(require 'docker-utils) -(require 'magit-popup) -(require 'tablist) - -(defcustom docker-image-default-sort-key '("Repository" . nil) - "Sort key for docker images. - -This should be a cons cell (NAME . FLIP) where -NAME is a string matching one of the column names -and FLIP is a boolean to specify the sort order." - :group 'docker - :type '(cons (choice (const "Repository") - (const "Tag") - (const "Id") - (const "Created") - (const "Size")) - (choice (const :tag "Ascending" nil) - (const :tag "Descending" t)))) - -(defun docker-image-parse (line) - "Convert a LINE from \"docker images\" to a `tabulated-list-entries' entry." - (let* ((data (s-split "\t" line)) - (name (format "%s:%s" (nth 0 data) (nth 1 data)))) - (list - (if (s-contains? "<none>" name) (nth 2 data) name) - (apply #'vector data)))) - -(defun docker-image-entries () - "Return the docker images data for `tabulated-list-entries'." - (let* ((fmt "{{.Repository}}\\t{{.Tag}}\\t{{.ID}}\\t{{.CreatedSince}}\\t{{.Size}}") - (data (docker-run "images" (format "--format=\"%s\"" fmt))) - (lines (s-split "\n" data t))) - (-map #'docker-image-parse lines))) - -(defun docker-image-refresh () - "Refresh the images list." - (setq tabulated-list-entries (docker-image-entries))) - -(defun docker-image-read-name () - "Read an image name." - (completing-read "Image: " (-map #'car (docker-image-entries)))) - -;;;###autoload -(defun docker-pull (name &optional all) - "Pull the image named NAME. If ALL is set, use \"-a\"." - (interactive (list (docker-image-read-name) current-prefix-arg)) - (docker-run "pull" (when all "-a ") name)) - -;;;###autoload -(defun docker-push (name) - "Push the image named NAME." - (interactive (list (docker-image-read-name))) - (docker-run "push" name)) - -;;;###autoload -(defun docker-rmi (name &optional force no-prune) - "Destroy or untag the image named NAME. - -Force removal of the image when FORCE is set. -Do not delete untagged parents when NO-PRUNE is set." - (interactive (list (docker-image-read-name) current-prefix-arg)) - (docker-run "rmi" (when force "-f") (when no-prune "--no-prune") name)) - -;;;###autoload -(defun docker-tag (image name) - "Tag IMAGE using NAME." - (interactive (list (docker-image-read-name) (read-string "Name: "))) - (docker-run "tag" image name)) - -(defun docker-image-rm-selection () - "Run \"docker rmi\" on the images selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-run "rmi" (docker-image-rm-arguments) it)) - (tablist-revert)) - -(defun docker-image-pull-selection () - "Run \"docker pull\" on the images selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-run "pull" (docker-image-pull-arguments) it)) - (tablist-revert)) - -(defun docker-image-push-selection () - "Run \"docker push\" on the images selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-run "push" (docker-image-push-arguments) it))) - -(defun docker-image-run-selection (command) - "Run \"docker run\" on the images selection." - (interactive "sCommand: ") - (let ((default-directory (if (and docker-run-as-root - (not (file-remote-p default-directory))) - "/sudo::" - default-directory))) - (--each (docker-utils-get-marked-items-ids) - (async-shell-command - (format "%s run %s %s %s" docker-command (s-join " " (docker-image-run-arguments)) it command) - (format "*run %s*" it))))) - -(defun docker-image-inspect-selection () - "Run \"docker inspect\" on the images selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-utils-with-buffer (format "inspect %s" it) - (insert (docker-run "inspect" (docker-image-inspect-arguments) it)) - (json-mode)))) - -(defun docker-image-tag-selection () - "Tag images." - (interactive) - (docker-utils-select-if-empty) - (--each (docker-utils-get-marked-items-ids) - (docker-tag it (read-string (format "Tag for %s: " it)))) - (tablist-revert)) - -(magit-define-popup docker-image-rm-popup - "Popup for removing images." - 'docker-image-popups - :man-page "docker-rmi" - :switches '((?f "Force" "-f") - (?n "Don't prune" "--no-prune")) - :actions '((?D "Remove" docker-image-rm-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-image-pull-popup - "Popup for pulling images." - 'docker-image-popups - :man-page "docker-pull" - :switches '((?a "All" "-a")) - :actions '((?F "Pull" docker-image-pull-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-image-push-popup - "Popup for pushing images." - 'docker-image-popups - :man-page "docker-push" - :actions '((?P "Push" docker-image-push-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-image-inspect-popup - "Popup for inspecting images." - 'docker-image-popups - :man-page "docker-inspect" - :actions '((?I "Inspect" docker-image-inspect-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-image-run-popup - "Popup for running images." - 'docker-image-popups - :man-page "docker-run" - :switches '((?d "Daemonize" "-d") - (?i "Interactive" "-i") - (?t "TTY" "-t") - (?r "Remove" "--rm") - (?p "Privileged" "--privileged") - (?o "Read only" "--read-only") - (?T "Synchronize time" "-v /etc/localtime:/etc/localtime:ro") - (?W "Web ports" "-p 80:80 -p 443:443 -p 8080:8080") - (?D "With display" "-v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY")) - :options '((?v "volume" "-v ") - (?m "name" "--name ") - (?e "environment" "-e ") - (?p "port" "-p ") - (?w "workdir" "-w ") - (?u "user" "-u ") - (?n "entrypoint" "--entrypoint ")) - :actions '((?R "Run images" docker-image-run-selection)) - :default-arguments '("-i" "-t" "--rm") - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-image-help-popup - "Help popup for docker images." - :actions '("Docker images help" - (?D "Remove" docker-image-rm-popup) - (?F "Pull" docker-image-pull-popup) - (?I "Inspect" docker-image-inspect-popup) - (?P "Push" docker-image-push-popup) - (?R "Run" docker-image-run-popup) - (?T "Tag" docker-image-tag-selection) - "Switch to other parts" - (?c "Containers" docker-containers) - (?m "Machines" docker-machines) - (?n "Networks" docker-networks) - (?v "Volumes" docker-volumes))) - -(defvar docker-image-mode-map - (let ((map (make-sparse-keymap))) - (define-key map "?" 'docker-image-help-popup) - (define-key map "D" 'docker-image-rm-popup) - (define-key map "F" 'docker-image-pull-popup) - (define-key map "I" 'docker-image-inspect-popup) - (define-key map "P" 'docker-image-push-popup) - (define-key map "R" 'docker-image-run-popup) - (define-key map "T" 'docker-image-tag-selection) - map) - "Keymap for `docker-image-mode'.") - -;;;###autoload -(defun docker-images () - "List docker images." - (interactive) - (docker-utils-pop-to-buffer "*docker-images*") - (docker-image-mode) - (tablist-revert)) - -(define-derived-mode docker-image-mode tabulated-list-mode "Images Menu" - "Major mode for handling a list of docker images." - (setq tabulated-list-format [("Repository" 30 t)("Tag" 20 t)("Id" 16 t)("Created" 25 t)("Size" 10 t)]) - (setq tabulated-list-padding 2) - (setq tabulated-list-sort-key docker-image-default-sort-key) - (add-hook 'tabulated-list-revert-hook 'docker-image-refresh nil t) - (tabulated-list-init-header) - (tablist-minor-mode)) - -(provide 'docker-image) - -;;; docker-image.el ends here diff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-image.elc b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-image.elc deleted file mode 100644 index e3ce5f96cc44..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-image.elc +++ /dev/null Binary files differdiff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-machine.el b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-machine.el deleted file mode 100644 index cf72812aea50..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-machine.el +++ /dev/null @@ -1,260 +0,0 @@ -;;; docker-machine.el --- Emacs interface to docker-machine -*- lexical-binding: t -*- - -;; Author: Ben Swift <ben@benswift.me> - -;; This file is NOT part of GNU Emacs. - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. - -;;; Commentary: - -;;; Code: - -(require 'docker-process) -(require 'docker-utils) -(require 'magit-popup) -(require 'tablist) - -(defun docker-machine-parse (line) - "Convert a LINE from \"docker machine ls\" to a `tabulated-list-entries' entry." - (let ((data (s-split "\t" line))) - (list (car data) (apply #'vector data)))) - -(defun docker-machine-entries () - "Return the docker machines data for `tabulated-list-entries'." - (let* ((fmt "{{.Name}}\\t{{.Active}}\\t{{.DriverName}}\\t{{.State}}\\t{{.URL}}\\t{{.Swarm}}\\t{{.DockerVersion}}\\t{{.Error}}") - (data (shell-command-to-string (format "docker-machine ls %s" (format "--format=\"%s\"" fmt)))) - (lines (s-split "\n" data t))) - (-map #'docker-machine-parse lines))) - -(defun docker-machine-refresh () - "Refresh the machines list." - (setq tabulated-list-entries (docker-machine-entries))) - -(defun docker-machine-read-name () - "Read a machine name." - (completing-read "Machine: " (-map #'car (docker-machine-entries)))) - -(defun docker-machine-run (action &rest args) - "Execute \"docker-machine ACTION\" passing arguments ARGS." - (let ((command (format "docker-machine %s %s" action (s-join " " (-non-nil args))))) - (message command) - (shell-command-to-string command))) - -;;;###autoload -(defun docker-machine-config (name) - "Print the connection config for the machine NAME." - (interactive (list (docker-machine-read-name))) - (docker-machine-run "config" name)) - -;;;###autoload -(defun docker-machine-inspect (name) - "Inspect information about the machine NAME." - (interactive (list (docker-machine-read-name))) - (docker-machine-run "inspect" name)) - -;;;###autoload -(defun docker-machine-ip (name) - "Get the IP address of the machine NAME." - (interactive (list (docker-machine-read-name))) - (docker-machine-run "ip" name)) - -;;;###autoload -(defun docker-machine-status (name) - "Get the status of the machine NAME." - (interactive (list (docker-machine-read-name))) - (docker-machine-run "status" name)) - -;;;###autoload -(defun docker-machine-upgrade (name) - "Upgrade the machine NAME to the latest version of Docker." - (interactive (list (docker-machine-read-name))) - (docker-machine-run "upgrade" name)) - -;;;###autoload -(defun docker-machine-kill (name) - "Kill the machine NAME." - (interactive (list (docker-machine-read-name))) - (docker-machine-run "kill" name)) - -;;;###autoload -(defun docker-machine-create (name driver) - "Create a machine NAME using DRIVER." - (interactive "sName: \nsDriver: ") - (docker-machine-run "create" name "-d" driver)) - -;;;###autoload -(defun docker-machine-start (name) - "Start the machine NAME." - (interactive (list (docker-machine-read-name))) - (docker-machine-run "start" name)) - -(defun docker-machine-env-export (line) - "Export the env for LINE." - (let ((index (s-index-of "=" line))) - (unless index - (error (format "Cannot find separator in %s" line))) - (setenv (substring line (length "export ") index) (substring line (+ 2 index) -1)))) - -;;;###autoload -(defun docker-machine-env (name) - "Parse and set environment variables from \"docker-machine env NAME\" output." - (interactive (list (docker-machine-read-name))) - (--each-while - (s-lines (docker-machine-run "env" name)) - (s-prefix? "export" it) - (docker-machine-env-export it))) - -;;;###autoload -(defun docker-machine-stop (name) - "Stop the machine NAME." - (interactive (list (docker-machine-read-name) current-prefix-arg)) - (docker-machine-run "stop" name)) - -;;;###autoload -(defun docker-machine-restart (name) - "Restart the machine NAME." - (interactive (list (docker-machine-read-name) current-prefix-arg)) - (docker-machine-run "restart" name)) - -;;;###autoload -(defun docker-machine-rm (name &optional force) - "Destroy or uncommand the machine NAME. If FORCE is set, use \"--force\"." - (interactive (list (docker-machine-read-name) current-prefix-arg)) - (docker-machine-run "rm" (when force "--force") name)) - -(defun docker-machine-start-selection () - "Run `docker-machine-start' on the machines selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-machine-run "start" (docker-machine-start-arguments))) - (tablist-revert)) - -(defun docker-machine-stop-selection () - "Run `docker-machine-stop' on the machines selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-machine-run "stop" (docker-machine-stop-arguments))) - (tablist-revert)) - -(defun docker-machine-restart-selection () - "Run `docker-machine-restart' on the machines selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-machine-run "restart" (docker-machine-restart-arguments))) - (tablist-revert)) - -(defun docker-machine-rm-selection () - "Run `docker-machine-rm' on the machines selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-machine-run "rm" (docker-machine-rm-arguments))) - (tablist-revert)) - -(defun docker-machine-env-selection () - "Run \"docker-machine env\" on selected machine." - (interactive) - (let ((marked (docker-utils-get-marked-items-ids))) - (when (/= (length marked) 1) - (error "Can only set environment vars for one machine at a time")) - (docker-machine-env (car marked)) - (tablist-revert))) - -(magit-define-popup docker-machine-start-popup - "Popup for starting machines." - 'docker-machine-popups - :man-page "docker-machine-start" - :actions '((?S "Start" docker-machine-start-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-machine-env-popup - "Popup for setting up environment variables." - 'docker-machine-popups - :man-page "docker-machine-env" - :actions '((?E "Env" docker-machine-env-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-machine-stop-popup - "Popup for stoping machines." - 'docker-machine-popups - :man-page "docker-machine-stop" - :actions '((?O "Stop" docker-machine-stop-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-machine-restart-popup - "Popup for restarting machines." - 'docker-machine-popups - :man-page "docker-machine-restart" - :actions '((?R "Restart" docker-machine-restart-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-machine-rm-popup - "Popup for removing machines." - 'docker-machine-popups - :man-page "docker-machine-rm" - :switches '((?y "Automatic yes" "-y") - (?f "Force" "-f")) - :actions '((?D "Remove" docker-machine-rm-selection)) - :default-arguments '("-y") - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-machine-help-popup - "Help popup for docker machine." - :actions '("Docker machines help" - (?C "Create" docker-machine-create) - (?D "Remove" docker-machine-rm-popup) - (?E "Env" docker-machine-env-popup) - (?O "Stop" docker-machine-stop-popup) - (?R "Restart" docker-machine-restart-popup) - (?S "Start" docker-machine-start-popup) - "Switch to other parts" - (?c "Containers" docker-containers) - (?i "Images" docker-images) - (?n "Networks" docker-networks) - (?v "Volumes" docker-volumes))) - -(defvar docker-machine-mode-map - (let ((map (make-sparse-keymap))) - (define-key map "?" 'docker-machine-help-popup) - (define-key map "C" 'docker-machine-create) - (define-key map "D" 'docker-machine-rm-popup) - (define-key map "E" 'docker-machine-env-popup) - (define-key map "O" 'docker-machine-stop-popup) - (define-key map "R" 'docker-machine-restart-popup) - (define-key map "S" 'docker-machine-start-popup) - map) - "Keymap for `docker-machine-mode'.") - -;;;###autoload -(defun docker-machines () - "List docker machines." - (interactive) - (docker-utils-pop-to-buffer "*docker-machines*") - (docker-machine-mode) - (tablist-revert)) - -(define-derived-mode docker-machine-mode tabulated-list-mode "Machines Menu" - "Major mode for handling a list of docker machines." - (setq tabulated-list-format [("Name" 16 t)("Active" 7 t)("Driver" 12 t)("State" 12 t)("URL" 30 t)("Swarm" 10 t)("Docker" 10 t)("Errors" 10 t)]) - (setq tabulated-list-padding 2) - (setq tabulated-list-sort-key (cons "Name" nil)) - (add-hook 'tabulated-list-revert-hook 'docker-machine-refresh nil t) - (tabulated-list-init-header) - (tablist-minor-mode)) - -(provide 'docker-machine) - -;;; docker-machine.el ends here diff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-machine.elc b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-machine.elc deleted file mode 100644 index c3b2b1e4ed22..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-machine.elc +++ /dev/null Binary files differdiff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-network.el b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-network.el deleted file mode 100644 index 78cad5529170..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-network.el +++ /dev/null @@ -1,106 +0,0 @@ -;;; docker-network.el --- Emacs interface to docker-network -*- lexical-binding: t -*- - -;; Author: Philippe Vaucher <philippe.vaucher@gmail.com> - -;; This file is NOT part of GNU Emacs. - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. - -;;; Commentary: - -;;; Code: - -(require 'docker-process) -(require 'docker-utils) -(require 'magit-popup) -(require 'tablist) - -(defun docker-network-parse (line) - "Convert a LINE from \"docker network ls\" to a `tabulated-list-entries' entry." - (let ((data (s-split " \\{3,\\}" line t))) - (list (nth 1 data) (apply #'vector data)))) - -(defun docker-network-entries () - "Return the docker networks data for `tabulated-list-entries'." - (let* ((data (docker-run "network" "ls")) - (lines (cdr (s-split "\n" data t)))) - (-map #'docker-network-parse lines))) - -(defun docker-network-refresh () - "Refresh the networks list." - (setq tabulated-list-entries (docker-network-entries))) - -(defun docker-network-read-name () - "Read a network name." - (completing-read "Network: " (-map #'car (docker-network-entries)))) - -;;;###autoload -(defun docker-network-rm (name) - "Destroy the network named NAME." - (interactive (list (docker-network-read-name))) - (docker-run "network rm" name)) - -(defun docker-network-rm-selection () - "Run \"docker network rm\" on the selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-run "network rm" it)) - (tablist-revert)) - -(magit-define-popup docker-network-rm-popup - "Popup for removing networks." - 'docker-network-popups - :man-page "docker-network-rm" - :actions '((?D "Remove" docker-network-rm-selection)) - :setup-function #'docker-utils-popup-setup) - -(magit-define-popup docker-network-help-popup - "Help popup for docker networks." - :actions '("Docker networks help" - (?D "Remove" docker-network-rm-popup) - "Switch to other parts" - (?c "Containers" docker-containers) - (?i "Images" docker-images) - (?m "Machines" docker-machines) - (?v "Volumes" docker-volumes))) - -(defvar docker-network-mode-map - (let ((map (make-sparse-keymap))) - (define-key map "?" 'docker-network-help-popup) - (define-key map "D" 'docker-network-rm-popup) - map) - "Keymap for `docker-network-mode'.") - -;;;###autoload -(defun docker-networks () - "List docker networks." - (interactive) - (docker-utils-pop-to-buffer "*docker-networks*") - (docker-network-mode) - (tablist-revert)) - -(define-derived-mode docker-network-mode tabulated-list-mode "Networks Menu" - "Major mode for handling a list of docker networks." - (setq tabulated-list-format [("Network ID" 20 t)("Name" 50 t)("Driver" 10 t)]) - (setq tabulated-list-padding 2) - (setq tabulated-list-sort-key (cons "Name" nil)) - (add-hook 'tabulated-list-revert-hook 'docker-network-refresh nil t) - (tabulated-list-init-header) - (tablist-minor-mode)) - -(provide 'docker-network) - -;;; docker-network.el ends here diff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-network.elc b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-network.elc deleted file mode 100644 index 6686fec7d502..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-network.elc +++ /dev/null Binary files differdiff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-pkg.el b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-pkg.el deleted file mode 100644 index 67b3013a5d01..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-pkg.el +++ /dev/null @@ -1,14 +0,0 @@ -(define-package "docker" "20180710.743" "Emacs interface to Docker" - '((emacs "24.5") - (dash "2.14.1") - (docker-tramp "0.1") - (magit-popup "2.12.3") - (s "1.12.0") - (tablist "0.70") - (json-mode "1.7.0")) - :keywords - '("filename" "convenience") - :url "https://github.com/Silex/docker.el") -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-process.el b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-process.el deleted file mode 100644 index 31a370612803..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-process.el +++ /dev/null @@ -1,48 +0,0 @@ -;;; docker-process.el --- Emacs interface to Docker -*- lexical-binding: t -*- - -;; Author: Philippe Vaucher <philippe.vaucher@gmail.com> - -;; This file is NOT part of GNU Emacs. - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. - -;;; Commentary: - -;;; Code: - -(require 's) -(require 'dash) - -(defcustom docker-run-as-root nil - "Run docker as root." - :type 'boolean - :group 'docker) - -(defcustom docker-command "docker" - "The docker binary." - :type 'string - :group 'docker) - -(defun docker-run (action &rest args) - "Execute docker ACTION passing arguments ARGS." - (let ((default-directory (if (and docker-run-as-root (not (file-remote-p default-directory))) "/sudo::" default-directory))) - (let ((command (format "%s %s %s" docker-command action (s-join " " (-flatten (-non-nil args)))))) - (message command) - (shell-command-to-string command)))) - -(provide 'docker-process) - -;;; docker-process.el ends here diff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-process.elc b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-process.elc deleted file mode 100644 index 1354153b0a43..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-process.elc +++ /dev/null Binary files differdiff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-utils.el b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-utils.el deleted file mode 100644 index c56bce55a438..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-utils.el +++ /dev/null @@ -1,73 +0,0 @@ -;;; docker-utils.el --- Random utilities -*- lexical-binding: t -*- - -;; Author: Philippe Vaucher <philippe.vaucher@gmail.com> - -;; This file is NOT part of GNU Emacs. - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. - -;;; Commentary: - -;;; Code: - -(defun docker-utils-get-marked-items () - "Get the marked items data from `tabulated-list-entries'." - (save-excursion - (goto-char (point-min)) - (let ((selection ())) - (while (not (eobp)) - (when (not (null (tablist-get-mark-state))) - (setq selection (-snoc selection (cons (tabulated-list-get-id) (tabulated-list-get-entry))))) - (forward-line)) - selection))) - -(defun docker-utils-get-marked-items-ids () - "Get the id part of `docker-utils-get-marked-items'." - (-map #'car (docker-utils-get-marked-items))) - -(defun docker-utils-setup-popup (val def) - (magit-with-pre-popup-buffer (docker-utils-select-if-empty)) - (magit-popup-default-setup val def)) - -(defun docker-utils-select-if-empty (&optional arg) - "Select current row is selection is empty. -ARG is unused here, but is required by `add-function'." - (save-excursion - (when (null (docker-utils-get-marked-items)) - (tablist-put-mark)))) - -(defun docker-utils-pop-to-buffer (name) - "Like `pop-to-buffer', but suffix NAME with the host if on a remote host." - (pop-to-buffer - (if (file-remote-p default-directory) - (with-parsed-tramp-file-name default-directory nil (concat name " - " host)) - name))) - -(defmacro docker-utils-with-buffer (name &rest body) - "Wrapper around `with-current-buffer'. -Execute BODY in a buffer." - (declare (indent defun)) - `(with-current-buffer (generate-new-buffer (format "* docker - %s *" ,name)) - (setq buffer-read-only nil) - (erase-buffer) - ,@body - (setq buffer-read-only t) - (goto-char (point-min)) - (pop-to-buffer (current-buffer)))) - -(provide 'docker-utils) - -;;; docker-utils.el ends here diff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-utils.elc b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-utils.elc deleted file mode 100644 index 0e14b441d90f..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-utils.elc +++ /dev/null Binary files differdiff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-volume.el b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-volume.el deleted file mode 100644 index 7e487f3919ae..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-volume.el +++ /dev/null @@ -1,121 +0,0 @@ -;;; docker-volume.el --- Emacs interface to docker-volume -*- lexical-binding: t -*- - -;; Author: Philippe Vaucher <philippe.vaucher@gmail.com> - -;; This file is NOT part of GNU Emacs. - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. - -;;; Commentary: - -;;; Code: - -(require 'docker-process) -(require 'docker-utils) -(require 'magit-popup) -(require 'tablist) - -(defun docker-volume-parse (line) - "Convert a LINE from \"docker volume ls\" to a `tabulated-list-entries' entry." - (let ((data (s-split " \\{3,15\\}" line t))) - (list (nth 1 data) (apply #'vector data)))) - -(defun docker-volume-entries () - "Return the docker volumes data for `tabulated-list-entries'." - (let* ((data (docker-run "volume" "ls")) - (lines (cdr (s-split "\n" data t)))) - (-map #'docker-volume-parse lines))) - -(defun docker-volume-refresh () - "Refresh the volumes list." - (setq tabulated-list-entries (docker-volume-entries))) - -(defun docker-volume-read-name () - "Read a volume name." - (completing-read "Volume: " (-map #'car (docker-volume-entries)))) - -;;;###autoload -(defun docker-volume-rm (name) - "Destroy the volume named NAME." - (interactive (list (docker-volume-read-name))) - (docker-run "volume rm" name)) - -;;;###autoload -(defun docker-volume-dired (name) - (interactive (list (docker-volume-read-name))) - (let ((path (docker-run "inspect" "-f" "\"{{ .Mountpoint }}\"" name))) - (dired (format "/sudo::%s" path)))) - -(defun docker-volume-rm-selection () - "Run \"docker volume rm\" on the volumes selection." - (interactive) - (--each (docker-utils-get-marked-items-ids) - (docker-run "volume rm" it)) - (tablist-revert)) - -(defun docker-volume-dired-selection () - "Run `docker-volume-dired' on the volumes selection." - (interactive) - (docker-utils-select-if-empty) - (--each (docker-utils-get-marked-items-ids) - (docker-volume-dired it))) - -(magit-define-popup docker-volume-rm-popup - "Popup for removing volumes." - 'docker-volume-popups - :man-page "docker-volume-rm" - :actions '((?D "Remove" docker-volume-rm-selection)) - :setup-function #'docker-utils-setup-popup) - -(magit-define-popup docker-volume-help-popup - "Help popup for docker volumes." - :actions '("Docker volumes help" - (?D "Remove" docker-volume-rm-popup) - (?d "dired" docker-volume-dired-selection) - "Switch to other parts" - (?c "Containers" docker-containers) - (?i "Images" docker-images) - (?m "Machines" docker-machines) - (?n "Networks" docker-networks))) - -(defvar docker-volume-mode-map - (let ((map (make-sparse-keymap))) - (define-key map "?" 'docker-volume-help-popup) - (define-key map "D" 'docker-volume-rm-popup) - (define-key map "d" 'docker-volume-dired-selection) - map) - "Keymap for `docker-volume-mode'.") - -;;;###autoload -(defun docker-volumes () - "List docker volumes." - (interactive) - (docker-utils-pop-to-buffer "*docker-volumes*") - (docker-volume-mode) - (tablist-revert)) - -(define-derived-mode docker-volume-mode tabulated-list-mode "Volumes Menu" - "Major mode for handling a list of docker volumes." - (setq tabulated-list-format [("Driver" 10 t)("Name" 10 t)]) - (setq tabulated-list-padding 2) - (setq tabulated-list-sort-key (cons "Driver" nil)) - (add-hook 'tabulated-list-revert-hook 'docker-volume-refresh nil t) - (tabulated-list-init-header) - (tablist-minor-mode)) - -(provide 'docker-volume) - -;;; docker-volume.el ends here diff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-volume.elc b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-volume.elc deleted file mode 100644 index e4b8629b9a08..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker-volume.elc +++ /dev/null Binary files differdiff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker.el b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker.el deleted file mode 100644 index 19c9d9d787c4..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker.el +++ /dev/null @@ -1,51 +0,0 @@ -;;; docker.el --- Emacs interface to Docker -*- lexical-binding: t -*- - -;; Author: Philippe Vaucher <philippe.vaucher@gmail.com> -;; URL: https://github.com/Silex/docker.el -;; Keywords: filename, convenience -;; Version: 0.7.0 -;; Package-Requires: ((emacs "24.5") (dash "2.14.1") (docker-tramp "0.1") (magit-popup "2.12.3") (s "1.12.0") (tablist "0.70") (json-mode "1.7.0")) - -;; This file is NOT part of GNU Emacs. - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -;; Boston, MA 02110-1301, USA. - -;;; Commentary: - -;; # Emacs interface to Docker! -;; -;; This package allows you to manipulate docker images, containers & more from Emacs. - -;;; Code: - -(require 'magit-popup) - -(defgroup docker nil - "Docker customization group." - :group 'convenience) - -(magit-define-popup docker - "Popup console for dispatching other popups." - :actions '("Docker" - (?c "Containers" docker-containers) - (?i "Images" docker-images) - (?m "Machines" docker-machines) - (?n "Networks" docker-networks) - (?v "Volumes" docker-volumes))) - -(provide 'docker) - -;;; docker.el ends here diff --git a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker.elc b/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker.elc deleted file mode 100644 index 6fc2976ad597..000000000000 --- a/configs/shared/emacs/.emacs.d/elpa/docker-20180710.743/docker.elc +++ /dev/null Binary files differ |