From 9ff8e28664d960876f4a8e9215ff81250794d028 Mon Sep 17 00:00:00 2001 From: Aleksandr Lebedev Date: Mon, 2 Feb 2026 10:18:20 +0100 Subject: [PATCH] Fixes for niri and emacs configs --- emacs/.config/emacs/config.el | 25 ++++++++++--------------- niri/.config/niri/config.kdl | 4 +++- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/emacs/.config/emacs/config.el b/emacs/.config/emacs/config.el index 4db734d..9710668 100644 --- a/emacs/.config/emacs/config.el +++ b/emacs/.config/emacs/config.el @@ -264,6 +264,7 @@ (use-package org-roam :ensure t + :after org :init (setq org-roam-v2-ack t) (when (file-exists-p "~/Документы/org") @@ -296,13 +297,6 @@ (org-roam-db-autosync-mode) (org-roam-setup)) -(defun kylekrein/org-roam-ripgrep () - (interactive) - (require 'consult) - (require 'org-roam) - (let ((consult-ripgrep-command "rg --null --ignore-case --type org --line-buffered --color=always --max-columns=500 --no-heading --line-number . -e ARG OPTS")) - (consult-ripgrep org-roam-directory))) -(global-set-key (kbd "C-c n r") #'kylekrein/org-roam-ripgrep) (defun kylekrein/org-roam-capture-inbox () (interactive) @@ -955,14 +949,6 @@ one, an error is signaled." ;; (setq consult-preview-key '("S-" "S-")) ;; For some commands and buffer sources it is useful to configure the ;; :preview-key on a per-command basis using the `consult-customize' macro. - (consult-customize - consult-theme :preview-key '(:debounce 0.2 any) - consult-ripgrep consult-git-grep consult-grep consult-man - consult-bookmark consult-recent-file consult-xref - consult--source-bookmark consult--source-file-register - consult--source-recent-file consult--source-project-recent-file - ;; :preview-key "M-." - :preview-key '(:debounce 0.4 any)) ;; Optionally configure the narrowing key. ;; Both < and C-+ work reasonably well. @@ -975,6 +961,15 @@ one, an error is signaled." (require 'consult) ;;(setq read-file-name-function #'consult-find-file-with-preview) +(defun kylekrein/org-roam-ripgrep () + (interactive) + (require 'consult) + (require 'org-roam) + (let ((consult-ripgrep-command "rg --null --ignore-case --type org --line-buffered --color=always --max-columns=500 --no-heading --line-number . -e ARG OPTS")) + (consult-ripgrep org-roam-directory))) +(global-set-key (kbd "C-c n r") #'kylekrein/org-roam-ripgrep) + +(load-library "org-element.el") ;; Fix for org-roam notes not creating ;;Previewing files in find-file (defun consult-find-file-with-preview (prompt &optional dir default mustmatch initial pred) (interactive) diff --git a/niri/.config/niri/config.kdl b/niri/.config/niri/config.kdl index 4a601c0..aec99e4 100644 --- a/niri/.config/niri/config.kdl +++ b/niri/.config/niri/config.kdl @@ -276,6 +276,7 @@ spawn-sh-at-startup "gnome-keyring-daemon" spawn-sh-at-startup "alacritty --daemon" spawn-sh-at-startup "emacs --daemon" spawn-sh-at-startup "qs" +spawn-sh-at-startup "kunifiedpush-distributor" spawn-sh-at-startup "wl-paste --watch cliphist store &" spawn-sh-at-startup "nextcloud --background" spawn-sh-at-startup "wvkbd --hidden || notify-send 'wvkbd crashed'" @@ -381,7 +382,8 @@ binds { Mod+T hotkey-overlay-title="Open a Terminal: Alacritty" { spawn-sh "alacritty msg create-window"; } Mod+E hotkey-overlay-title="Run Emacs" { spawn-sh "emacsclient -c"; } Mod+B hotkey-overlay-title="Open a browser: Librewolf" { spawn "librewolf"; } - Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; } + Mod+Shift+C hotkey-overlay-title="Open a file manager: Dolphin" { spawn "dolphin"; } + Super+Alt+L hotkey-overlay-title="Lock the Screen" { spawn-sh "qs ipc call lock lock"; } // Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc. Mod+Space hotkey-overlay-title="Application Launcher" {