From 45bb0d11161b1c5077a1415eed6dbd0fd25ccb6a Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Fri, 20 Sep 2024 14:16:56 +0200 Subject: Change dotfiles structure, and add guix-channels declaration. --- files/.emacs.d/jd/jd-keys.el | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 files/.emacs.d/jd/jd-keys.el (limited to 'files/.emacs.d/jd/jd-keys.el') diff --git a/files/.emacs.d/jd/jd-keys.el b/files/.emacs.d/jd/jd-keys.el new file mode 100755 index 0000000..8c1c4cb --- /dev/null +++ b/files/.emacs.d/jd/jd-keys.el @@ -0,0 +1,49 @@ +;;; Dotfiles --- Jakub Dlugosz emacs config +;;; Commentary: +;; Custom keysets used in my emacs +;;; Code: + +(use-package multiple-cursors + :guix-package "emacs-multiple-cursors" + :config + (global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines) + (global-set-key (kbd "C->") 'mc/mark-next-like-this) + (global-set-key (kbd "C-<") 'mc/mark-previous-like-this) + (global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)) + +(use-package hydra + :guix-package "emacs-hydra" + ;; :defer t + :config + (defun jd/text-scale-increase () + (interactive) + (let ((old-face-attribute (face-attribute 'default :height))) + (set-face-attribute 'default nil :height (+ old-face-attribute 10)))) + + (defun jd/text-scale-decrease () + (interactive) + (let ((old-face-attribute (face-attribute 'default :height))) + (set-face-attribute 'default nil :height (- old-face-attribute 10)))) + + (defhydra hydra-text-scale-global (:timeout 4) + "scale text" + ("j" jd/text-scale-increase "in") + ("k" jd/text-scale-decrease "out") + ("q" nil "finished" :exit t)) ;; TODO not working + + (defhydra hydra-text-scale (:timeout 4) + "scale text" + ("j" text-scale-increase "in") + ("k" text-scale-decrease "out") + ("q" nil "finished" :exit t))) + +(use-package undo-tree + :guix-package "emacs-undo-tree" + :diminish + :config + (setq undo-tree-auto-save-history nil) + (global-undo-tree-mode 1)) + +(provide 'jd-keys) + +;;; jd-keys.el ends here -- cgit v1.2.3