From 65c32014c0027d00568e9cc27786917bc4b128f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20R=C3=B6ger?= Date: Wed, 23 Oct 2024 13:10:14 +0200 Subject: [PATCH] Home Gen374 @ 2024-10-23-13:10 --- modules/home/doom/static/config.el | 17 +++++++++++++++-- modules/home/dunst/config.nix | 10 +++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/modules/home/doom/static/config.el b/modules/home/doom/static/config.el index c51c9c8..483e00e 100644 --- a/modules/home/doom/static/config.el +++ b/modules/home/doom/static/config.el @@ -136,7 +136,20 @@ (setq ccls-initialization-options '(:index (:comments 2) :completion (:detailedLabel t) :compilationDatabaseDirectory "build" :cache (:directory ".cache/ccls" :format "binary"))) (set-lsp-priority! 'ccls 1)) -(map! :map (cpp-mode-map c-mode-map c++-mode-map lsp-mode-map) - :desc "Show Doc-UI" :n "C-h" #'lsp-ui-doc-glance) +(defun my-ui-doc-glance-then-focus () + "Glances UI-Doc if not present, otherwise focus" + (interactive) + (if lsp-ui-doc--bounds + (progn + (lsp-ui-doc-hide) + (lsp-ui-doc-show) + (lsp-ui-doc-focus-frame)) + (lsp-ui-doc-glance))) +(map! :map (cpp-mode-map c-mode-map c++-mode-map lsp-mode-map) + :desc "Show Doc-UI" :n "C-h" #'my-ui-doc-glance-then-focus) + + +;; Bind C-h to the handler function +(map! "C-h" #'my-c-h-handler) (set-formatter! 'alejandra '("alejandra" "--quiet") :modes '(nix-mode)) diff --git a/modules/home/dunst/config.nix b/modules/home/dunst/config.nix index 99dbc41..cf31897 100644 --- a/modules/home/dunst/config.nix +++ b/modules/home/dunst/config.nix @@ -1,4 +1,8 @@ -{config, ...}: { +{ + config, + pkgs, + ... +}: { services.dunst.settings = { global = { origin = "top-right"; @@ -9,6 +13,10 @@ offset = "20x50"; force_xwayland = true; corner_radius = 15; + dmenu = "${pkgs.wofi}/bin/wofi --dmenu"; + mouse_left_click = "do_action, close_current"; + mouse_middle_click = "close_current"; + mouse_right_click = "close_all"; }; urgency_critical = {