RAC 1 kuukausi sitten
vanhempi
sitoutus
a45f84096e
7 muutettua tiedostoa jossa 27 lisäystä ja 275 poistoa
  1. 0 130
      custom/meow.el
  2. 0 27
      custom/ui.el
  3. 0 28
      custom/unifiedlist.el
  4. 13 60
      custom/utils.el
  5. 8 13
      init.el
  6. 0 8
      packages/editing-packages.el
  7. 6 9
      packages/tutilities-packages.el

+ 0 - 130
custom/meow.el

@@ -1,130 +0,0 @@
-;;; ../../lyfi/configs/apps/doom/custom/meow.el -*- lexical-binding: t; -*-
-;;Custom Meow Cheatsheet Renderer
-
-(defvar my-meow-board-grid
-  '(("1" "2" "3" "4" "5" "6" "7" "8" "9" "0")
-    ("q" "w" "e" "r" "t" "y" "u" "i" "o" "p")
-    ("a" "s" "d" "f" "g" "h" "j" "k" "l" ";")
-    ("z" "x" "c" "v" "b" "n" "m" "," "." "/" "'"))
-  "The physical layout of the board as a 2D array.")
-
-(defun my-meow-get-cmd-name (key)
-  "Helper to get the short name of a command for a given key, or a placeholder."
-  (let ((cmd (key-binding key)))
-    (if cmd
-        (meow--short-command-name cmd)
-      (if (member key '("TAB" "SFT" "CTL" "CAPS" "GUI" "ALT" "MO1" "SPC" "ENT" "BKSL" "LMB" "RMB" "UP" "DN" "N2"))
-          key
-        "<not bound>"))))
-
-(defun my-meow-render-grid ()
-  "Generates a clean table of Meow commands with base and shift layers."
-  (let ((output ""))
-    (dolist (row my-meow-board-grid)
-      (let ((row-lower "")
-            (row-upper ""))
-        (dolist (key row)
-          (let* ((low-name (my-meow-get-cmd-name key))
-                 (up-key (upcase key))
-                 (up-name (my-meow-get-cmd-name up-key)))
-            ;; Build the lower layer string
-            (setq row-lower (concat row-lower
-                                    (format "[%s = %-12s]  " key low-name)))
-            ;; Build the upper layer string
-            (setq row-upper (concat row-upper
-                                    (format "[%s = %-12s]  " up-key up-name)))))
-        ;; Append both layers, then a newline for a gap between physical rows
-        (setq output (concat output row-lower "\n" row-upper "\n\n"))))
-    output))
-
-(defun my-meow-cheatsheet ()
-  "Custom cheatsheet that uses a grid instead of fragile ASCII art."
-  (interactive)
-  (let ((buf (get-buffer-create "*Meow Cheatsheet*")))
-    (with-current-buffer buf
-      (text-mode)
-      (setq buffer-read-only nil)
-      (erase-buffer)
-      (insert "Meow Custom Layout Cheatsheet\n")
-      (insert "====================================================================================================\n\n")
-      (insert (my-meow-render-grid))
-      (insert "\n====================================================================================================\n")
-      (insert meow--cheatsheet-note)
-      (insert (meow--render-cheatsheet-thing-table))
-      (add-face-text-property (point-min) (point-max) 'meow-cheatsheet-command)
-      (setq buffer-read-only t))
-    (switch-to-buffer buf)))
-
-(defun meow-setup ()
-  ;; We no longer need the physical-layout strings because we use my-meow-board-grid
-  (meow-motion-overwrite-define-key
-   '("j" . meow-next)
-   '("k" . meow-prev)
-   '("<escape>" . mode-line-other-buffer))
-
-  (meow-leader-define-key
-   '("/" . meow-keypad-describe-key)
-   '("?" . my-meow-cheatsheet)) ;; Use our new custom renderer here
-
-  (meow-normal-define-key
-   '("0" . meow-expand-0)
-   '("9" . meow-expand-9)
-   '("8" . meow-expand-8)
-   '("7" . meow-expand-7)
-   '("6" . meow-expand-6)
-   '("5" . meow-expand-5)
-   '("4" . meow-expand-4)
-   '("3" . meow-expand-3)
-   '("2" . meow-expand-2)
-   '("1" . meow-expand-1)
-   '("-" . negative-argument)
-   '(";" . meow-reverse)
-   '("," . meow-inner-of-thing)
-   '("." . meow-bounds-of-thing)
-   '("[" . meow-beginning-of-thing)
-   '("]" . meow-end-of-thing)
-   '("a" . meow-append)
-   '("A" . meow-open-below)
-   '("b" . meow-back-word)
-   '("B" . meow-back-symbol)
-   '("c" . meow-change)
-   '("d" . meow-delete)
-   '("D" . meow-backward-delete)
-   '("e" . meow-next-word)
-   '("E" . meow-next-symbol)
-   '("f" . meow-find)
-   '("g" . meow-cancel-selection)
-   '("G" . meow-grab)
-   '("h" . meow-left)
-   '("H" . meow-left-expand)
-   '("i" . meow-insert)
-   '("I" . meow-open-above)
-   '("j" . meow-next)
-   '("J" . meow-next-expand)
-   '("k" . meow-prev)
-   '("K" . meow-prev-expand)
-   '("l" . meow-right)
-   '("L" . meow-right-expand)
-   '("m" . meow-join)
-   '("n" . meow-search)
-   '("o" . meow-block)
-   '("O" . meow-to-block)
-   '("p" . meow-yank)
-   ;;'("q" . meow-quit)
-   '("Q" . meow-goto-line)
-   '("r" . meow-replace)
-   '("R" . meow-swap-grab)
-   '("k" . meow-kill)
-   '("t" . meow-till)
-   '("u" . meow-undo)
-   '("U" . meow-undo-in-selection)
-   '("v" . meow-visit)
-   '("w" . meow-mark-word)
-   '("W" . meow-mark-symbol)
-   '("x" . meow-line)
-   '("X" . meow-goto-line)
-   '("y" . meow-save)
-   '("Y" . meow-sync-grab)
-   '("z" . meow-pop-selection)
-   '("'" . repeat)))
-

+ 0 - 27
custom/ui.el

@@ -1,27 +0,0 @@
-;;; ../../lyfi/configs/apps/doom/custom/ui.el -*- lexical-binding: t; -*-
-
-(defun my/apply-theme (frame)
-  "Apply a specific theme and update package colors based on whether the FRAME is graphic or TUI."
-  (select-frame frame)
-  (if (display-graphic-p frame)
-      (progn
-        (mapc #'disable-theme custom-enabled-themes)
-        (load-theme 'cutarv41 t)
-        ;; Update rainbow-delimiters colors for Light theme
-        (setq rainbow-delimiters-rainbow-colors
-              '("#007cbf" "#cf3f29" "#2374de" "#c75e10" "#b05197" "#429e66" "#129cc9" "#a64dd6")))
-    (progn
-      (mapc #'disable-theme custom-enabled-themes)
-      (load-theme 'cutarv41 t)
-      ;; Update rainbow-delimiters colors for Dark theme
-      ;; (setq rainbow-delimiters-rainbow-colors
-      ;;       '("#4da6ff" "#ff6b6b" "#6da6ff" "#ffb347" "#d18ecb" "#8fbc8f" "#80daeb" "#c8a0f2"))
-	  ))
-(custom-set-faces
-   `(meow-insert-cursor ((t (:inherit unspecified :background ,(face-attribute 'font-lock-builtin-face :foreground)))))
-   `(meow-normal-cursor ((t (:foreground ,(face-attribute 'mode-line-inactive :background), :background ,(face-attribute 'mode-line :foreground)))))
-   )
-  )
-
-
-(provide 'ui)

+ 0 - 28
custom/unifiedlist.el

@@ -1,28 +0,0 @@
-;;; ../../lyfi/configs/apps/doom/custom/unifiedlist.el -*- lexical-binding: t; -*-
-
-(defun my/get-unified-list ()
-  "Combine buffers and recentf into a list for tabulated-list-mode."
-  (let ((items '()))
-    ;; Add Live Buffers
-    (dolist (buf (buffer-list))
-      (with-current-buffer buf
-        (push (list buf (vector (buffer-name) "Live" (format-mode-line mode-name) (or (buffer-file-name) ""))) items)))
-    ;; Add Recent Files (if not already open)
-    (dolist (file recentf-list)
-      (unless (get-file-buffer file)
-        (push (list file (vector (file-name-nondirectory file) "Recent" "File" file)) items)))
-    (nreverse items)))
-
-(define-derived-mode my-unified-list-mode tabulated-list-mode "Unified-List"
-  (setq tabulated-list-format [("Name" 30 t)
-                               ("Status" 10 t)
-                               ("Mode" 15 t)
-                               ("Path" 0 t)])
-  (setq tabulated-list-entries #'my/get-unified-list)
-  (tabulated-list-init-header))
-
-(defun my/open-unified-list ()
-  (interactive)
-  (pop-to-buffer "*Unified Switcher*")
-  (my-unified-list-mode)
-  (tabulated-list-print))

+ 13 - 60
custom/utils.el

@@ -1,13 +1,5 @@
 ;;; utils.el --- General utility functions -*- lexical-binding: t; -*-
 
-(defun dired-follow-symlink ()
-  "In dired, visit the file or directory at point by its true physical path."
-  (interactive)
-  (let ((filename (dired-get-file-for-visit)))
-    (if filename
-        (find-file (file-truename filename))
-      (message "No file at point"))))
-
 (defun my/delete-word-backward ()
   "Delete the previous 'block' of characters without killing them.
 Blocks are defined by: whitespace, alphanumerics, or groups of symbols."
@@ -39,37 +31,13 @@ Blocks are defined by: whitespace, alphanumerics, or groups of symbols."
         
         (delete-region (point) end)))))
 
-(defun my-set-buffer-font ()
-  "Set a specific font for the current buffer only."
-  (buffer-face-set '(:family "Noto Sans" :height 140)))
-
-(defun my/toggle-quote-wrap-all-in-region (beg end)
-  "Toggle wrapping all items in region with double quotes."
-  ;;https://xenodium.com/emacs-quote-wrap-all-in-region
-  (interactive (list (mark) (point)))
-  (unless (region-active-p)
-    (user-error "no region to wrap"))
-  (let ((deactivate-mark nil)
-        (replacement (string-join
-                      (mapcar (lambda (item)
-                                (if (string-match-p "^\".*\"$" item)
-                                    (string-trim item "\"" "\"")
-                                  (format "\"%s\"" item)))
-                              (split-string (buffer-substring beg end)))
-                      " ")))
-    (delete-region beg end)
-    (insert replacement)))
-
-(defun my/meow-wrap-arbitrary (s e)
-  "Wrap the current meow selection with arbitrary strings."
-  (interactive "r")
-  (let ((start-str (read-string "Start: "))
-        (end-str (read-string "End: ")))
-    (save-excursion
-      (goto-char e)
-      (insert end-str)
-      (goto-char s)
-      (insert start-str))))
+(defun dired-follow-symlink ()
+  "In dired, visit the file or directory at point by its true physical path."
+  (interactive)
+  (let ((filename (dired-get-file-for-visit)))
+    (if filename
+        (find-file (file-truename filename))
+      (message "No file at point"))))
 
 (defun my/column-align-regexp ()
   "Aligns the matched regexp to `comment-column`.
@@ -81,7 +49,7 @@ it ensures exactly one space of separation."
          (target-col (if (and (boundp 'comment-column) 
                               (numberp comment-column)) 
                          comment-column 
-                       40))
+                       80))
          (start (region-beginning))
          (end (region-end)))
     
@@ -116,26 +84,6 @@ it ensures exactly one space of separation."
 ;; Optional: Bind it to a key for easier access
 ;; (global-set-key (kbd "C-c a l") 'my/column-align-regexp)
 
-
-(defun diff-buffers (buffer-a buffer-b)
-  "Generate a diff between BUFFER-A and BUFFER-B using standard diff.
-Prompts for the two buffers, defaulting to the current buffer and the
-most recently active one."
-  (interactive
-   (let* ((current (current-buffer))
-          (other (other-buffer current t))
-          (buf-a (read-buffer "New buffer (to diff): " current t))
-          (buf-b (read-buffer "Old buffer (against): " other t)))
-     (list (get-buffer buf-a) (get-buffer buf-b))))
-  
-  (let ((name-a (buffer-name buffer-a))
-        (name-b (buffer-name buffer-b)))
-    (diff buffer-b buffer-a nil t)
-    ;; Rename the diff output buffer to make it clear what was diffed
-    (when (get-buffer "*Diff*")
-      (with-current-buffer "*Diff*"
-        (rename-buffer (format "*Diff: %s vs %s*" name-b name-a) t)))))
-
 (defun my/list-no-prefix-bindings (keymap &optional map-name)
   "Extract and display all single-key (no-prefix) bindings from KEYMAP.
 Outputs a clean list into a dedicated buffer."
@@ -169,6 +117,11 @@ Outputs a clean list into a dedicated buffer."
         (setq buffer-read-only t))
       (pop-to-buffer buf))))
 
+(defun my/insert-file-path (file)
+  "Read a file name from the minibuffer and insert its absolute path at point."
+  (interactive "fInsert path to file: ")
+  (insert (expand-file-name file)))
+
 (provide 'utils)
 
 

+ 8 - 13
init.el

@@ -157,21 +157,16 @@
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
  '(custom-safe-themes
-   '("c9afaac8aedf1bb721d21053a79a65969fd8f44314d22ff29c8981709ee4245f"
-	 "0672d7fbe7fa24344bbe98461a8db26cb52a074354f9a4529cea4ba1af456044"
-	 "664111db1521fe3351061dc87aea95fa98b3f244f4b830fbc048d39c3a8bc125"
-	 "df7b90a88131500ce9e5a911c815ce96eb7855d88747830f298c6914d80be48e"
-	 "4fa3b7b09062f707a4770804dda9dda4807aa5c86623076b9741897df2e7acdd"
-	 "5bfc7c010e3ee71396e421c2e8a5a561c305da812eba9e0e48742896d8e45d97"
-	 "48cebeaf733cae05b5265eceafea44c042f2fc65906ccd999f652d230be25b6f"
-	 "1b4f5bebc7f47257997a8d56e797e2e8d85581bbd824a275bb1ebc7aea7c1399"
-	 "a7dab7ccf5c97be13a1d957e8847cfda7cf768554595429a43f6b6393459c45e"
-	 "ca223796522e77b1813111ad2994b8e579df1000d1e3c34b604fe0a18ad45dec"
-	 default)))
+	 '()))
 (custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
- '(meow-insert-cursor ((t (:inherit unspecified :background "#c75e10"))))
- '(meow-normal-cursor ((t (:foreground "#7cc9f2" :background "#f8f8ff")))))
+ )
+
+
+(setq minimal-emacs--success t)
+
+(setq initial-major-mode 'fundamental-mode
+			initial-scratch-message nil)

+ 0 - 8
packages/editing-packages.el

@@ -1,13 +1,5 @@
 ;;; editing-packages.el --- Editing and navigation configuration -*- lexical-binding: t; -*-
 
-(use-package meow
-  :config
-  (setq meow-use-clipboard nil
-		meow--kbd-kill-region "C-S-x")
-  (meow-setup)
-  (meow-global-mode 1)
-  )
-
 (use-package avy
   :config
   (setq avy-timeout-seconds 0.25

+ 6 - 9
packages/tutilities-packages.el

@@ -1,12 +1,9 @@
-
 (use-package denote
-  :config
-  (setq denote-directory (list (expand-file-name "~/lyfi/SOR/Notes/"))
-        denote-file-type 'markdown-yaml
-        denote-prompts '(title subdirectory keywords)))
-
-(use-package jinx
-  :hook (emacs-startup . global-jinx-mode)
-  :custom (jinx-languages "en_US nl_NL"))
+	:defer t
+	:config
+	(setq denote-directory (list (expand-file-name "~/lyrinv/SOR/Notes/"))
+				denote-file-type 'markdown-yaml
+				denote-prompts '(title subdirectory keywords))
+	)
 
 (provide 'tutilities-packages)