summaryrefslogtreecommitdiff
path: root/org-fc-hydra.el
diff options
context:
space:
mode:
authorLeon Rische <leon.rische@me.com>2020-07-04 03:44:36 +0200
committerLeon Rische <leon.rische@me.com>2020-07-04 03:44:36 +0200
commit92b6b8987f9b266304702a50030a456016eb0b17 (patch)
tree320bd7162796fce67686f6a7dc8ee3fb31b94947 /org-fc-hydra.el
parent71c066a5d9aa70a1160ad7f10e64ac4599ba427e (diff)
Move files out of contrib/ folder
Diffstat (limited to 'org-fc-hydra.el')
-rw-r--r--org-fc-hydra.el51
1 files changed, 51 insertions, 0 deletions
diff --git a/org-fc-hydra.el b/org-fc-hydra.el
new file mode 100644
index 0000000..5c63c9a
--- /dev/null
+++ b/org-fc-hydra.el
@@ -0,0 +1,51 @@
+;;; org-fc-hydra.el --- Hydra for interacting with the SRS -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2020 Leon Rische
+
+;; Author: Leon Rische <emacs@leonrische.me>
+
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;
+;; This file contains an example for setting up a hydra to interact
+;; with the flashcard system.
+;;
+;;; Code:
+
+(require 'org-fc)
+(require 'hydra)
+
+(defhydra org-fc-hydra ()
+ ("m" org-fc-dashboard "Dashboard" :exit t)
+ ("r" org-fc-review "Start Review" :exit t)
+ ("u" org-fc-update "Update Card")
+ ("t" org-fc-hydra-type/body "Init Type" :exit t)
+ ("q" nil "Quit" :exit t))
+
+(defhydra org-fc-hydra-type ()
+ ("n" org-fc-type-normal-init "Normal" :exit t)
+ ("d" org-fc-type-double-init "Double" :exit t)
+ ("t" org-fc-type-text-input-init "Text Input" :exit t)
+ ("c" (org-fc-type-cloze-init 'deletion) "Deletion" :exit t)
+ ("e" (org-fc-type-cloze-init 'enumeration) "Enum" :exit t)
+ ("s" (org-fc-type-cloze-init 'single) "Single" :exit t)
+ ("x" (org-fc-type-cloze-init 'context) "Context" :exit t)
+ ("q" nil "Quit" :exit t))
+
+;;;; Footer
+
+(provide 'org-fc-hydra)
+
+;;; org-fc-hydra.el ends here