Fixes for niri and emacs configs

This commit is contained in:
Aleksandr Lebedev 2026-02-02 10:18:20 +01:00
parent 26f1b571ec
commit 9ff8e28664
2 changed files with 13 additions and 16 deletions

View file

@ -264,6 +264,7 @@
(use-package org-roam (use-package org-roam
:ensure t :ensure t
:after org
:init :init
(setq org-roam-v2-ack t) (setq org-roam-v2-ack t)
(when (file-exists-p "~/Документы/org") (when (file-exists-p "~/Документы/org")
@ -296,13 +297,6 @@
(org-roam-db-autosync-mode) (org-roam-db-autosync-mode)
(org-roam-setup)) (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 () (defun kylekrein/org-roam-capture-inbox ()
(interactive) (interactive)
@ -955,14 +949,6 @@ one, an error is signaled."
;; (setq consult-preview-key '("S-<down>" "S-<up>")) ;; (setq consult-preview-key '("S-<down>" "S-<up>"))
;; For some commands and buffer sources it is useful to configure the ;; For some commands and buffer sources it is useful to configure the
;; :preview-key on a per-command basis using the `consult-customize' macro. ;; :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. ;; Optionally configure the narrowing key.
;; Both < and C-+ work reasonably well. ;; Both < and C-+ work reasonably well.
@ -975,6 +961,15 @@ one, an error is signaled."
(require 'consult) (require 'consult)
;;(setq read-file-name-function #'consult-find-file-with-preview) ;;(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 ;;Previewing files in find-file
(defun consult-find-file-with-preview (prompt &optional dir default mustmatch initial pred) (defun consult-find-file-with-preview (prompt &optional dir default mustmatch initial pred)
(interactive) (interactive)

View file

@ -276,6 +276,7 @@ spawn-sh-at-startup "gnome-keyring-daemon"
spawn-sh-at-startup "alacritty --daemon" spawn-sh-at-startup "alacritty --daemon"
spawn-sh-at-startup "emacs --daemon" spawn-sh-at-startup "emacs --daemon"
spawn-sh-at-startup "qs" spawn-sh-at-startup "qs"
spawn-sh-at-startup "kunifiedpush-distributor"
spawn-sh-at-startup "wl-paste --watch cliphist store &" spawn-sh-at-startup "wl-paste --watch cliphist store &"
spawn-sh-at-startup "nextcloud --background" spawn-sh-at-startup "nextcloud --background"
spawn-sh-at-startup "wvkbd --hidden || notify-send 'wvkbd crashed'" 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+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+E hotkey-overlay-title="Run Emacs" { spawn-sh "emacsclient -c"; }
Mod+B hotkey-overlay-title="Open a browser: Librewolf" { spawn "librewolf"; } 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. // Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc.
Mod+Space hotkey-overlay-title="Application Launcher" { Mod+Space hotkey-overlay-title="Application Launcher" {