summaryrefslogtreecommitdiffhomepage
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el56
1 files changed, 8 insertions, 48 deletions
diff --git a/init.el b/init.el
index c1b0b59..cbc0af6 100644
--- a/init.el
+++ b/init.el
@@ -364,7 +364,7 @@
:demand t
:init
(setq jao-themes-default-family (jao-d-l "Menlo" "Hack") ;; "RobotoMono Nerd Font"
- jao-themes-default-size (jao-d-l 10 9)
+ jao-themes-default-size (jao-d-l 10 10)
jao-themes-default-variable-pitch-family
(jao-d-l "Helvetica" "Iosevka Etoile")
jao-themes-default-variable-pitch-size (jao-d-l 12 9)))
@@ -422,7 +422,8 @@
jao-minibuffer-inactive-buffer-line-color
(jao-d-l "#dfdfdf" "grey65")))
(setq jao-minibuffer-adaptive-alignment nil
- jao-minibuffer-info-face-alt 'jao-themes-dimm)
+ ; jao-minibuffer-info-face-alt 'jao-themes-dimm
+ jao-minibuffer-info-face-alt 'default)
:commands (jao-minibuffer-add-variable
jao-minibuffer-refresh
jao-minibuffer-mode
@@ -1309,14 +1310,8 @@
;;;; shell modes
(setq sh-basic-offset 2)
;; translates ANSI colors into text-properties, for eshell
-(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
-(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
-(defvar jao-use-vterm nil)
-(defvar jao-use-eat nil)
-
(add-to-list 'display-buffer-alist
'("\\*Async Shell Command\\*" (display-buffer-no-window)))
-
;;;; eat
(use-package eat
:ensure t
@@ -1327,41 +1322,6 @@
;; (eshell-mode . eat-eshell-visual-command-mode))
:diminish ((eat-eshell-mode . "")))
-;;;; term
-(defvar-local jao-term--cmd nil)
-
-(defun jao-term--find (cmd)
- (seq-find (lambda (b)
- (with-current-buffer b
- (and (derived-mode-p 'eat-mode 'term-mode 'vterm-mode)
- (string= (or jao-term--cmd "") cmd))))
- (buffer-list)))
-
-(defun jao-exec-in-term (cmd &optional name)
- (interactive "SCommand")
- (require 'eat nil t)
- (cond ((and jao-use-vterm (fboundp 'jao-exec-in-vterm))
- (jao-exec-in-vterm cmd name))
- (jao-use-eat (let ((eat-term-name "xterm-256color"))
- (with-current-buffer (eat cmd t)
- (setq-local jao-term--cmd cmd))))
- (t (ansi-term "bash" name)
- (set-process-sentinel (get-buffer-process (current-buffer))
- (lambda (process event)
- (when (string= event "finished\n")
- (kill-buffer (process-buffer process)))))
- (setq-local jao-term--cmd cmd)
- (term-send-string nil (concat cmd " ; exit\n")))))
-
-(defmacro jao-def-exec-in-term (name cmd &rest prelude)
- `(defun ,(intern (format "jao-term-%s" name)) (&optional term)
- (interactive "P")
- ,@prelude
- (let ((jao-use-vterm (if term (not jao-use-vterm) jao-use-vterm)))
- (if-let* ((b (jao-term--find ,cmd)))
- (pop-to-buffer b)
- (jao-exec-in-term ,cmd ,(format "*%s*" name))))))
-
;;;; eshell
;;;;; basic custom
(use-package eshell
@@ -1382,6 +1342,8 @@
(autoload 'ansi-color-apply "ansi-color")
;; (add-hook 'eshell-preoutput-filter-functions 'ansi-color-filter-apply)
(add-hook 'eshell-preoutput-filter-functions 'ansi-color-apply)
+(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
+(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
(use-package eshell-syntax-highlighting
:after esh-mode
@@ -2108,15 +2070,13 @@
("k" (lambda () (concat "keyboard" (when (jao-x11-kb-toggled-p) "*")))
jao-x11-kb-toggle :if jao-x11-p)]]))
-(global-set-key (kbd "s-w") #'jao-transient-utils)
-
-(global-set-key (kbd "<f4>")
- (if (display-graphic-p) #'delete-frame #'jao-transient-utils))
-
;;; Global key bindings
(defun jao-global-keybindings ()
(interactive)
(global-set-key (kbd "<f2>") #'magit-status)
+ (global-set-key (kbd "<f4>") #'jao-transient-utils)
+ (global-set-key (kbd "<f5>") #'jao-weather)
+ (global-set-key (kbd "s-w") #'jao-transient-utils)
(global-set-key (kbd "C-x p") #'jao-prev-window)
(global-set-key (kbd "C-x o") 'other-window)
(global-set-key "\C-cj" #'join-line)