summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--attic/misc.el (renamed from attic/orgs/misc.el)29
-rw-r--r--init.el53
2 files changed, 42 insertions, 40 deletions
diff --git a/attic/orgs/misc.el b/attic/misc.el
index b56c5df..a872ce7 100644
--- a/attic/orgs/misc.el
+++ b/attic/misc.el
@@ -1,3 +1,32 @@
+;;;; ace window
+(use-package ace-window
+ :ensure t
+ :demand t
+ :init (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)
+ aw-char-position 'top-left
+ aw-ignore-current nil
+ aw-dispatch-when-more-than 2
+ aw-leading-char-style 'path
+ aw-display-mode-overlay t
+ aw-scope 'frame)
+ :config
+
+ (defun jao-ace-consult-buffer-other-window (w)
+ (interactive)
+ (aw-switch-to-window w)
+ (consult-buffer))
+
+ (setf (alist-get ?b aw-dispatch-alist)
+ '(jao-ace-consult-buffer-other-window "Consult buffer"))
+
+ (setf (alist-get ?B aw-dispatch-alist)
+ (alist-get ?u aw-dispatch-alist))
+
+
+ :bind (("M-o" . ace-window)
+ ("M-O" . ace-swap-window)
+ ("C-x 4 t" . ace-swap-window)))
+
;;;; sway
(defun jao-swaymsg (msg)
(shell-command (format "swaymsg '%s' >/dev/null" msg)))
diff --git a/init.el b/init.el
index f64c8b2..f1d5bbb 100644
--- a/init.el
+++ b/init.el
@@ -124,6 +124,10 @@
;;;; server
(setenv "EDITOR" "emacsclient")
+
+;;;; timers
+(put 'list-timers 'disabled nil)
+
;; (unless (daemonp) (server-start))
;;; System Utilities
@@ -182,18 +186,18 @@
(not (string-empty-p
(shell-command-to-string "setxkbmap -query|grep variant"))))
-(set-keyboard-coding-system 'latin-1)
-(set-language-environment "UTF-8")
+;; (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")
;; http://mbork.pl/2022-03-07_Transient_input_method
(customize-set-variable 'default-transient-input-method "TeX")
-(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)
+;; (defun jao--set-kb-system (frame)
+;; (select-frame frame)
+;; (set-keyboard-coding-system 'utf-8)
+;; t)
+;; (add-to-list 'after-make-frame-functions 'jao--set-kb-system)
(setq echo-keystrokes 1
suggest-key-bindings nil)
@@ -214,7 +218,8 @@
(transient-define-prefix ,name ()
,(format "Transient ops for %s" mode)
[,(format "Operations for %s" mode) :if-derived ',mode ,@suffix])
- (define-key ,mmap (kbd "s-SPC") #',name))))
+ (define-key ,mmap (kbd "s-SPC") #',name)
+ (define-key ,mmap (kbd "C-c SPC") #',name))))
(defmacro jao-transient-major-mode+1 (mode suffix)
(declare (indent defun))
@@ -779,9 +784,6 @@
(jao-exec-in-term "curl wttr.in" "*wttr*"))))
(global-set-key (kbd "<f5>") #'jao-weather)
-;;;; timers
-(put 'list-timers 'disabled nil)
-
;;; Files, dired and scratch buffer
;;;; so-long
(setq large-file-warning-threshold (* 200 1024 1024))
@@ -1021,35 +1023,6 @@
(global-set-key (kbd "s-a") #'jao-first-window)
(global-set-key (kbd "M-a") #'jao-first-window)
-;;;; ace window
-(use-package ace-window
- :ensure t
- :demand t
- :init (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)
- aw-char-position 'top-left
- aw-ignore-current nil
- aw-dispatch-when-more-than 2
- aw-leading-char-style 'path
- aw-display-mode-overlay t
- aw-scope 'frame)
- :config
-
- (defun jao-ace-consult-buffer-other-window (w)
- (interactive)
- (aw-switch-to-window w)
- (consult-buffer))
-
- (setf (alist-get ?b aw-dispatch-alist)
- '(jao-ace-consult-buffer-other-window "Consult buffer"))
-
- (setf (alist-get ?B aw-dispatch-alist)
- (alist-get ?u aw-dispatch-alist))
-
-
- :bind (("M-o" . ace-window)
- ("M-O" . ace-swap-window)
- ("C-x 4 t" . ace-swap-window)))
-
;;;; window navigation (custom)
(defun jao-nth-window (n)
(if (zerop n)