 ;;   :defer t ; don't access `dired-mode-map' until `peep-dired' is loaded
 ;;   :bind (:map dired-mode-map
 ;;	      ("P" . peep-dired)))
-
-;; (use-package dumb-jump
-;;   :config
-;;   (global-set-key (kbd "M-.") 'dumb-jump-go))
 
 (defun visit-dir-as-root (hostname)
   (interactive "shost: ")

  :bind (("C-c <f6>" . heaven-and-hell-load-default-theme)
	 ("<f6>" . heaven-and-hell-toggle-theme)))

(require 'dbus)

(defun auto-display-battery-toggle-display-battery (_string values _)
  "Toggle function `display-battery-mode' depending if line power is online.
VALUES is an alist from the \"line_power_AC\" signal."
  (if (caadr (assoc-string "Online" values))
      (display-battery-mode -1)
    (display-battery-mode)))

;;;###autoload
(define-minor-mode auto-display-battery-mode
  "Automatically show hide battery status of your Laptop."
  :global t
  (if (not auto-display-battery-mode)
      (dbus-unregister-service :system
        "org.freedesktop.UPower")

    (dbus-register-signal :system
      "org.freedesktop.UPower"
      "/org/freedesktop/UPower/devices/line_power_AC"
      "org.freedesktop.DBus.Properties"
      "PropertiesChanged"
      #'auto-display-battery-toggle-display-battery)

    (when (car (dbus-call-method :system
                 "org.freedesktop.UPower"
                 "/org/freedesktop/UPower/devices/line_power_AC"
                 "org.freedesktop.DBus.Properties"
                 "Get" "org.freedesktop.UPower.Device" "Online"))
      (display-battery-mode))))
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(custom-enabled-themes (quote (modus-operandi)))
 '(gofmt-command "goimports")
 '(package-selected-packages
   (quote
    (vterm yasnippet-snippets which-key wgrep-ag use-package-ensure-system-package unfill terraform-mode ssh-config-mode smex smartparens racer python-mode protobuf-mode projectile pinentry pass org-bullets notmuch nix-mode multi-term modus-vivendi-theme modus-operandi-theme magit-gh-pulls k8s-mode jinja2-mode helm-pass helm-ls-git helm-company helm-ag heaven-and-hell guide-key gotham-theme gotest godoctor go-tag go-eldoc go-dlv go-add-tags git-timemachine git-gutter-fringe gist flx exec-path-from-shell eshell-bookmark dumb-jump dracula-theme dockerfile-mode docker-tramp direnv deadgrep company-go cmake-mode cargo browse-at-remote auto-compile atomic-chrome almost-mono-themes ag adoc-mode))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

	company-echo-delay 0
	company-require-match nil
	company-auto-complete nil)
  :hook (prog-mode . company-mode)
  ;;(global-company-mode 1)
  )

