From 225249290dbc3890ab14b758a00bf8b72c1495d1 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Fri, 7 Apr 2023 15:26:46 -0400 Subject: [PATCH] add missing comment section headres ; add fundamental burly.el setup ; overhaul dired so it can be setup as a side window at a later point and behaves more how kemo expects notably: - hide details by default - re-use dired buffer for opening folders - open files in other windows --- code/init.el | 3 ++- common/_global.el | 49 +++++++++++++++++++++++++++++++++++++++++++---- org/init.el | 2 +- 3 files changed, 48 insertions(+), 6 deletions(-) diff --git a/code/init.el b/code/init.el index 609fc0c..e980867 100644 --- a/code/init.el +++ b/code/init.el @@ -140,7 +140,8 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(custom-safe-themes - '("dde643b0efb339c0de5645a2bc2e8b4176976d5298065b8e6ca45bc4ddf188b7" default))) + '("dde643b0efb339c0de5645a2bc2e8b4176976d5298065b8e6ca45bc4ddf188b7" default)) + '(temp-buffer-resize-mode t)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/common/_global.el b/common/_global.el index 99aaa70..e8136e5 100644 --- a/common/_global.el +++ b/common/_global.el @@ -8,7 +8,7 @@ (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) ; this goes in chemacs2 init -- DO NOT UNCOMMENT (package-initialize) ; this goes in chemacs2 init -- DO NOT UNCOMMENT (add-to-list 'package-selected-packages - '(rainbow-mode rainbow-delimiters markdown-mode devdocs devdocs-browser focus zoom popwin dired-single diredfl xclip doominhibitinhibit-modeline magit helpful helm helm-org helm-ls-git dired-rainbow dired-rainbow-listing dired-single dash s origami modus-themes use-package) + '(burly rainbow-mode rainbow-delimiters markdown-mode devdocs devdocs-browser focus zoom popwin dired-single diredfl xclip doominhibitinhibit-modeline magit helpful helm helm-org helm-ls-git dired-rainbow dired-rainbow-listing dired-single dash s origami modus-themes use-package) ) (require 'use-package) @@ -68,14 +68,30 @@ ;; (setq dired-x-hands-off-my-keys nil) ) (require 'dired-single) + +; open dirs in same dired window + open files in main window +; facilitates static file browser sidebar +(defun kemonine/dired-open() + (interactive) + (setq file (dired-get-file-for-visit)) + (if (equal (file-directory-p file) t) + (progn + (dired-single-buffer) + ) + (progn + (dired-find-file-other-window) + ) + ) +) + (defun my-dired-init () "Bunch of stuff to run for dired, either immediately or when it's loaded." ;; (define-key dired-mode-map [remap dired-find-file] - 'dired-single-buffer) + 'kemonine/dired-open) (define-key dired-mode-map [remap dired-mouse-find-file-other-window] - 'dired-single-buffer-mouse) + 'kemonine/dired-open) (define-key dired-mode-map [remap dired-up-directory] 'dired-single-up-directory)) @@ -97,9 +113,14 @@ :init (diredfl-global-mode)) +; hide dired details by default, use `(` to toggle +(add-hook 'dired-mode-hook 'dired-hide-details-mode) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; coding general (in case its ever on) (add-hook 'prog-mode-hook #'rainbow-delimiters-mode) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; markdown config (used by kmn all over everything) (use-package markdown-mode :ensure t @@ -355,6 +376,7 @@ position between last non-whitespace and `end-of-line'." (require 'helm-color) (require 'helm-ls-git) +(require 'helm-bookmark) (helm-autoresize-mode 1) @@ -376,6 +398,7 @@ position between last non-whitespace and `end-of-line'." (define-key global-map [remap dabbrev-expand] 'helm-dabbrev) (define-key global-map [remap execute-extended-command] 'helm-M-x) (define-key global-map [remap apropos-command] 'helm-apropos) +(define-key global-map [remap bookmark-jump] 'helm-filtered-bookmarks) (unless (boundp 'completion-in-region-function) (define-key lisp-interaction-mode-map [remap completion-at-point] 'helm-lisp-completion-at-point) (define-key emacs-lisp-mode-map [remap completion-at-point] 'helm-lisp-completion-at-point)) @@ -397,7 +420,7 @@ position between last non-whitespace and `end-of-line'." ;(diminish 'helm-mode) ;(diminish 'eldoc-mode) -; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; doom-modeline (require 'doom-modeline) (setq all-the-icons-color-icons nil) @@ -503,3 +526,21 @@ position between last non-whitespace and `end-of-line'." ; devdocs-browser (setq devdocs-browser-cache-directory "~/devdocs-browser") (global-set-key (kbd "C-x n") 'devdocs-browser-open) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; tabs-bar +(tab-bar-mode t) +(burly-tabs-mode 1) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; burly +(require 'burly) + +; C-x r b 'helm-filtered-bookmarks (list-bookmarks) defined above in helm section +(global-set-key (kbd "C-x r l") 'helm-filtered-bookmarks) ; list-bookmarks +(global-set-key (kbd "C-x r o") 'burly-open-bookmark) +(global-set-key (kbd "C-x r O") 'burly-reset-tab) +(global-set-key (kbd "C-x r k") 'helm-bookmark-rename) +(global-set-key (kbd "C-x r k") 'bookmark-delete) +(global-set-key (kbd "C-x r f") 'burly-bookmark-frames) +(global-set-key (kbd "C-x r w") 'burly-bookmark-windows) diff --git a/org/init.el b/org/init.el index e81093d..14549e7 100644 --- a/org/init.el +++ b/org/init.el @@ -218,4 +218,4 @@ ;; If there is more than one, they won't work right. '(custom-safe-themes '("dde643b0efb339c0de5645a2bc2e8b4176976d5298065b8e6ca45bc4ddf188b7" "bfc0b9c3de0382e452a878a1fb4726e1302bf9da20e69d6ec1cd1d5d82f61e3d" default)) -) + '(temp-buffer-resize-mode t))