-;; Time-stamp: <2015-02-10 15:10:49 kmodi>
+;; Time-stamp: <2015-02-12 10:05:22 kmodi>
 
 ;; Miscellaneous config not categorized in other setup-* files
 

            "launch"
            ("a"       ag-regexp-cwd                         "ag here") ; ag in current dir
            ("b"       bookmark-jump                         "bookmark")
            ("c"       org-capture                           "org capture")
            ("d"       dired-single-magic-buffer-current-dir "dired")
            ("e"       (eww (browse-url-url-at-point))       "eww") ; browse in eww
            ("f"       browse-url-firefox                    "firefox")
            ("m"       man                                   "man")
            ("s"       shell-command                         "shell cmd")
            ("<s-SPC>" hydra-freq/body                       "freq files")
            ("<SPC>"   ace-jump-mode                         "ace jump")
            ("q"       nil                                   "cancel")))


(provide 'setup-misc)

;; Toggles
;; http://endlessparentheses.com/the-toggle-map-and-wizardry.html
(autoload 'dired-toggle-read-only "dired" nil t)
(defhydra hydra-toggle (:color blue)
  "toggle"
  ("b"     modi/toggle-menu-bar         "menu bar")
  ("c"     xah-cycle-letter-case        "letter case" :color red)
  ("d"     toggle-debug-on-error        "debug on error")
  ("e"     modi/toggle-edebug-defun     "edebug")
  ("E"     modi/toggle-debug-defun      "debug on entry")
  ("f"     auto-fill-mode               "auto fill")
  ("g"     indent-guide-mode            "indent guide")
  ("i"     fci-mode                     "fci")
  ("k"     key-chord-mode               "key chord" :color red)
  ("l"     modi/toggle-linum            "linum")
  ("m"     modi-mode                    "modi mode")
  ("n"     endless/narrow-or-widen-dwim "narrow/widen")
  ("N"     neotree-toggle               "neotree")
  ("p"     prez-mode                    "presentation")
  ("r"     dired-toggle-read-only       "read only") ; generalized `read-only-mode'
  ("s"     toggle-window-split          "split horz/vert" :color red)
  ("t"     toggle-truncate-lines        "truncate" :color red)
  ("s-t"   toggle-theme                 "theme")
  ("T"     toggle-theme                 "theme")
  ("v"     recenter-top-bottom          "recenter" :color red)
  ("<SPC>" whitespace-mode              "whitespace" :color red)
  ("<f11>" toggle-frame-maximized       "fullscreen")
  ("q"     nil                          "cancel" :color blue))
(key-chord-define-global "qq"  #'hydra-toggle/body)
(bind-key                "s-t" #'hydra-toggle/body modi-mode-map)

;; Launcher
(defhydra hydra-freq (:color blue)
