From be0cc578b0173ebe377b5e608f12695cebf98e28 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 5 Mar 2020 22:50:18 -0800 Subject: Add oni-hydra configuration, spruce up some hydras --- oni-css/oni-css.el | 4 ++-- oni-hydra.el | 42 ++++++++++++++++++++++++++++++++++++++++++ oni-ivy.el | 4 ++-- oni-java.el | 4 ++-- oni-magit.el | 17 +++++++++++------ oni-org/oni-org.el | 23 +++++++++++++++-------- oni-php/oni-php.el | 4 ++-- oni-python/oni-python.el | 4 ++-- 8 files changed, 78 insertions(+), 24 deletions(-) create mode 100644 oni-hydra.el diff --git a/oni-css/oni-css.el b/oni-css/oni-css.el index ab2ae3f..f886d6a 100644 --- a/oni-css/oni-css.el +++ b/oni-css/oni-css.el @@ -4,8 +4,8 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2019.1210.225029 -;; Package-Requires: (oni-company oni-fci hydra rainbow-mode yasnippet) +;; Version: 2020.0305.222317 +;; Package-Requires: (oni-company oni-fci oni-hydra rainbow-mode yasnippet) ;; 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 diff --git a/oni-hydra.el b/oni-hydra.el new file mode 100644 index 0000000..502577e --- /dev/null +++ b/oni-hydra.el @@ -0,0 +1,42 @@ +;;; oni-hydra.el --- Configuration for using Hydra -*- lexical-binding: t; -*- + +;; Copyright (C) 2020 Tom Willemse + +;; Author: Tom Willemse +;; Keywords: local +;; Version: 2020.0305.224628 +;; Package-Requires: (hydra posframe) + +;; 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 of the License, 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 this program. If not, see . + +;;; Commentary: + +;; Configuration for hydra. Set it up to use posframe instead of the default lv. + +;;; Code: + +(require 'hydra) + +(setq hydra-hint-display-type 'posframe) + +(plist-put hydra-posframe-show-params :poshandler + 'posframe-poshandler-window-bottom-center) +(plist-put hydra-posframe-show-params :internal-border-width 15) +(plist-put hydra-posframe-show-params :internal-border-color "#222222") +(plist-put hydra-posframe-show-params :background-color "#222222") + +;;;###autoload(with-eval-after-load 'hydra (require 'oni-hydra)) + +(provide 'oni-hydra) +;;; oni-hydra.el ends here diff --git a/oni-ivy.el b/oni-ivy.el index 8bf3309..c5848f3 100644 --- a/oni-ivy.el +++ b/oni-ivy.el @@ -4,8 +4,8 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2020.0224.231056 -;; Package-Requires: (ivy oni-prescient ivy-hydra diminish ivy-posframe ivy-prescient) +;; Version: 2020.0305.221151 +;; Package-Requires: (ivy oni-prescient oni-hydra ivy-hydra diminish ivy-posframe ivy-prescient) ;; 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 diff --git a/oni-java.el b/oni-java.el index fb4fe42..b46ebbc 100644 --- a/oni-java.el +++ b/oni-java.el @@ -4,8 +4,8 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2019.1021.002901 -;; Package-Requires: (oni-fci oni-data-dir oni-lsp lsp-java company-lsp hydra) +;; Version: 2020.0305.222356 +;; Package-Requires: (oni-fci oni-data-dir oni-lsp oni-hydra lsp-java company-lsp) ;; 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 diff --git a/oni-magit.el b/oni-magit.el index 364badd..74312a2 100644 --- a/oni-magit.el +++ b/oni-magit.el @@ -4,8 +4,8 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2020.0203.214309 -;; Package-Requires: (magit magit-popup hydra forge) +;; Version: 2020.0305.221116 +;; Package-Requires: (magit magit-popup oni-hydra forge) ;; 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 @@ -40,10 +40,15 @@ Delete all other windows and then pass BUFFER and ALIST on to (display-buffer-same-window buffer alist)) ;;;###autoload(autoload 'oni-hydra-magit/body "oni-magit") -(defhydra oni-hydra-magit (:color blue) - "Magit" - ("s" magit-status "Status") - ("i" magit-init "Init")) +(defhydra oni-hydra-magit (:color teal :hint nil) + " +^Magit^ +^^--------- +_s_: Status +_i_: Init +" + ("s" magit-status) + ("i" magit-init)) (setq magit-diff-refine-hunk 'all) diff --git a/oni-org/oni-org.el b/oni-org/oni-org.el index db11606..e865594 100644 --- a/oni-org/oni-org.el +++ b/oni-org/oni-org.el @@ -4,8 +4,8 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2020.0203.221615 -;; Package-Requires: (oni-yasnippet oni-alert org-plus-contrib org-bullets hydra) +;; Version: 2020.0305.224948 +;; Package-Requires: (oni-yasnippet oni-alert oni-hydra org-plus-contrib org-bullets) ;; 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 @@ -164,12 +164,19 @@ After running it once remove it from `org-capture-after-finalize-hook'." (org-set-tag-faces 'org-tag-faces org-tag-faces)) ;;;###autoload(autoload 'oni-hydra-org/body "oni-org") -(defhydra oni-hydra-org (:color blue) - "Org" - ("l" org-store-link "Store link") - ("a" org-agenda "Agenda") - ("c" org-capture "Capture") - ("b" org-switchb "Switch to org buffer")) +(defhydra oni-hydra-org (:color teal :hint nil) + " +^Org^ +^^----------------------- +_a_: Show Agenda +_c_: Capture new heading +_l_: Store link +_b_: Switch to org buffer +" + ("l" org-store-link) + ("a" org-agenda) + ("c" org-capture) + ("b" org-switchb)) (setq org-default-notes-file (oni-org-expand-to-home "documents/gtd/inbox.org")) diff --git a/oni-php/oni-php.el b/oni-php/oni-php.el index c6f4757..e302890 100644 --- a/oni-php/oni-php.el +++ b/oni-php/oni-php.el @@ -4,8 +4,8 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2019.1210.224202 -;; Package-Requires: (php-mode oni-yasnippet oni-flycheck oni-company oni-fci ggtags fic-mode hydra company-php phpcbf) +;; Version: 2020.0305.222253 +;; Package-Requires: (php-mode oni-yasnippet oni-flycheck oni-company oni-fci oni-hydra ggtags fic-mode company-php phpcbf) ;; 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 diff --git a/oni-python/oni-python.el b/oni-python/oni-python.el index 1496bf6..39454a7 100644 --- a/oni-python/oni-python.el +++ b/oni-python/oni-python.el @@ -4,8 +4,8 @@ ;; Author: Tom Willemse ;; Keywords: local -;; Version: 2019.1210.230756 -;; Package-Requires: (oni-yasnippet oni-company company-jedi oni-fci oni-flycheck rainbow-delimiters reformatter traad hydra) +;; Version: 2020.0305.222235 +;; Package-Requires: (oni-yasnippet oni-company company-jedi oni-fci oni-flycheck oni-hydra rainbow-delimiters reformatter traad) ;; 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 -- cgit v1.2.3-54-g00ecf