 ;; Opinel
 (ke/bind-key-to-dired-and-c-map ke/opinel-prefix "o" 'ke/run-opinel-command)
 (ke/bind-key-to-dired-and-c-map ke/opinel-prefix "r" 'ke/reset-opinel-environment)
-
+(ke/bind-key-to-dired-and-c-map ke/opinel-prefix "s" 'ke/opinel-get-services-status)
+(ke/bind-key-to-dired-and-c-map ke/opinel-prefix "x" 'ke/run-opinel-remote-command)
 
 (provide 'init-orange)

                                                (file-name-directory buffer-file-name)))))
    (concat ke/bear-path " -o " full-path "/compile_commands.json -- ")))


(defmacro ke/create-function (argument)
  `(defun ,(intern (concat "ke/compile-" argument)) (&optional prefix)
     "KE Compilation System, calls 'compile without cluttering the default values"
     (interactive "P")

  (interactive "sEnvironment: " ke/opinel-environment)
  (setq ke/opinel-environment environment))

(cl-defun ke/run-opinel-command (command &optional ask-for-filter)
  "Run an opinel command using the stored ke/opinel-environment or
   asking for one if it is not set"
  (interactive "sCommand: \nP")
  (if ask-for-filter (setq ke/opinel-filter (read-from-minibuffer "Filter: " ke/opinel-filter)))
  (let* ((filter (if ask-for-filter ke/opinel-filter nil))
         (ke/project-root (concat (car (ke/find-root-dir (file-name-directory buffer-file-name) ".bzr")) "/../"))
         (ke/opinel-bin (concat ke/project-root "ke-opinel/src/opinel"))
         (buffer (get-buffer-create ke/opinel-buffer-name)))
    (if (null ke/opinel-environment)
        (setq ke/opinel-environment (read-from-minibuffer "Environment name: ")))
    (with-current-buffer buffer
      (async-shell-command (format "%s %s --env=%s %s"
                                   ke/opinel-bin
                                   (if ask-for-filter
                                       (format "-g role:%s" filter)
                                     "")
                                   ke/opinel-environment
                                   command) buffer)
      (read-only-mode))))

(defun ke/run-opinel-remote-command (command &optional ask-for-filter)
  "Convenient wrapper to run cmd -- command"
  (interactive "sCommand: \nP")
  (ke/run-opinel-command (format "cmd -- %s" command) ask-for-filter))

(defun ke/opinel-get-services-status ()
  (interactive)
