From b05329a5092fa19e69fd623548e83dd43eb18e5e Mon Sep 17 00:00:00 2001 From: bd Date: Fri, 5 Jan 2024 02:21:52 -0700 Subject: Added function to open eshell on top side-window --- .config/emacs/bd-mode-and-themes.el | 2 +- .config/emacs/bd-org.el | 5 ++--- .config/emacs/bd-shells.el | 22 +++++++++++++++------- 3 files changed, 18 insertions(+), 11 deletions(-) (limited to '.config/emacs') diff --git a/.config/emacs/bd-mode-and-themes.el b/.config/emacs/bd-mode-and-themes.el index a5471ae..ebe5306 100644 --- a/.config/emacs/bd-mode-and-themes.el +++ b/.config/emacs/bd-mode-and-themes.el @@ -118,7 +118,7 @@ ;;;; true transparency ;; (add-to-list 'default-frame-alist '(alpha-background . 60)) -(add-to-list 'default-frame-alist '(alpha . (90 . 90))) +(add-to-list 'default-frame-alist '(alpha . (85 . 85))) (defun set-frame-alpha (value) "Sets the transparency of the frame background. 0=transparent/100=opaque" diff --git a/.config/emacs/bd-org.el b/.config/emacs/bd-org.el index 84c5c86..06a961c 100644 --- a/.config/emacs/bd-org.el +++ b/.config/emacs/bd-org.el @@ -1,6 +1,6 @@ ;; -*- lexical-binding: t; -*- -(defvar-local agenda-file "/home/bdunahu/Personal/roam/agenda/agenda_tasks.org") +(defvar-local agenda-file "~/Personal/roam/agenda/agenda_tasks.org") (defun bd/org-mode-setup-hook () "Sets up improved org-mode defaults upon @@ -30,8 +30,7 @@ each org file open." (org-startup-folded 'show2levels) (org-ellipsis " ▾") (org-agenda-files - `(,agenda-file - (expand-file-name "~/Personal/roam/agenda/archived_tasks.org"))) + `(,agenda-file "~/Personal/roam/agenda/archived_tasks.org")) (org-deadline-warning-days 7) (org-log-done 'time) (org-log-into-drawer "history") diff --git a/.config/emacs/bd-shells.el b/.config/emacs/bd-shells.el index e6789c5..9f0b919 100644 --- a/.config/emacs/bd-shells.el +++ b/.config/emacs/bd-shells.el @@ -1,6 +1,16 @@ ;; -*- lexical-binding: t; -*- +(defun eshell-open-buffer () + "Opens eshell in the bottom +side window." + (interactive) + (let ((curr-buffer (current-buffer)) + (eshell (eshell))) + (switch-to-buffer curr-buffer) + (display-buffer-in-side-window (get-buffer eshell) '((side . top))) + (switch-to-buffer-other-window eshell))) + (defun bd/get-prompt-path () (abbreviate-file-name (eshell/pwd))) @@ -17,18 +27,16 @@ status, and path." (propertize current-branch 'face `(:foreground "#98d1ce")))) (format " %s " (all-the-icons-fileicon "gn")) (propertize (bd/get-prompt-path) 'face `(:foreground "#33859d")) - (format " %s " (all-the-icons-material "watch_later")) - (propertize (format-time-string "%a, %R") 'face `(:foreground "#888ba5")) + (propertize (format-time-string " %a, %R") 'face `(:foreground "#888ba5")) (propertize "\n> " 'face `(:foreground "#c33027"))))) -(current-time-string) -(format-time-string "%a, %R") - (use-package eshell :init (require 'magit) - :bind (:map eshell-mode-map - ("" . completion-at-point)) + :bind (("C-z C-e" . 'eshell-open-buffer) + :map eshell-mode-map + ("C-q" . 'delete-window) ; mostly for side window + ("" . completion-at-point)) :custom (eshell-prompt-function 'bd/eshell-prompt) (eshell-prompt-regexp "^> ") -- cgit v1.2.3