summaryrefslogtreecommitdiffhomepage
path: root/init.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-10-28 01:45:51 +0100
committerjao <jao@gnu.org>2021-10-28 01:45:51 +0100
commit7c47ab51654df9f900b81817d410033ca803ff3d (patch)
tree6bd47d9bc9507a2fc028bd0bfe226ac1432fa16e /init.org
parentc7b34aab545af4f20daf26638536049865e75410 (diff)
downloadelibs-7c47ab51654df9f900b81817d410033ca803ff3d.tar.gz
elibs-7c47ab51654df9f900b81817d410033ca803ff3d.tar.bz2
whitespace and shuffling
Diffstat (limited to 'init.org')
-rw-r--r--init.org62
1 files changed, 31 insertions, 31 deletions
diff --git a/init.org b/init.org
index 2660395..a505ce5 100644
--- a/init.org
+++ b/init.org
@@ -205,12 +205,38 @@
:config (setq repeat-echo-function #'repeat-echo-mode-line))
(when (> emacs-major-version 27) (repeat-mode))
+ (defun jao-kb-toggle (&optional lyt)
+ (interactive)
+ (shell-command-to-string (or lyt
+ (if (jao-kb-toggled-p)
+ "setxkbmap us"
+ "setxkbmap us -variant intl"))))
+
+ (defun jao-kb-toggled-p ()
+ (not (string-empty-p
+ (shell-command-to-string "setxkbmap -query|grep variant"))))
+
+ (set-keyboard-coding-system 'latin-1)
+ (set-language-environment "UTF-8")
+ ;; must be set after current-language-environment
+ (customize-set-variable 'default-input-method "catalan-prefix")
+
+ (defun jao--set-kb-system (frame)
+ (select-frame frame)
+ (set-keyboard-coding-system 'latin-1)
+ t)
+ (add-to-list 'after-make-frame-functions 'jao--set-kb-system)
+
+ (setq echo-keystrokes 1
+ suggest-key-bindings nil)
+ #+end_src
+*** Transient
+ #+begin_src emacs-lisp
(use-package transient
:init (setq transient-show-popup 2.0)
+ :demand t
:config
- (transient-bind-q-to-quit)
-
- :bind (("s-SPC" . jao-transient-major-mode)))
+ (transient-bind-q-to-quit))
(defmacro jao-transient-major-mode (mode &rest suffix)
(declare (indent defun))
@@ -232,35 +258,9 @@
(defmacro jao-transient-major-mode+ (mode &rest suffixes)
(declare (indent defun))
- `(progn
- ,@(mapcar (lambda (s) `(jao-transient-major-mode+1 ,mode ,s))
- suffixes)))
-
-
- (defun jao-kb-toggle (&optional lyt)
- (interactive)
- (shell-command-to-string (or lyt
- (if (jao-kb-toggled-p)
- "setxkbmap us"
- "setxkbmap us -variant intl"))))
-
- (defun jao-kb-toggled-p ()
- (not (string-empty-p
- (shell-command-to-string "setxkbmap -query|grep variant"))))
+ `(progn ,@(mapcar (lambda (s) `(jao-transient-major-mode+1 ,mode ,s))
+ suffixes)))
- (set-keyboard-coding-system 'latin-1)
- (set-language-environment "UTF-8")
- ;; must be set after current-language-environment
- (customize-set-variable 'default-input-method "catalan-prefix")
-
- (defun jao--set-kb-system (frame)
- (select-frame frame)
- (set-keyboard-coding-system 'latin-1)
- t)
- (add-to-list 'after-make-frame-functions 'jao--set-kb-system)
-
- (setq echo-keystrokes 1
- suggest-key-bindings nil)
#+end_src
* Crypto
*** PGP, EPG, passwords