summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2023-02-04 14:33:12 -0500
committerKjetil Orbekk <kj@orbekk.com>2023-02-04 14:33:12 -0500
commit9eef6a43320aaca4fb6640ef20b1206614312a94 (patch)
tree0a67aa16fb8d53a5cf50637053906b288c93e6e1 /emacs
parent708b47b62ddcb6b205b69b388974c620b5dd730b (diff)
update
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.config/emacs-kj/eshell.el23
-rw-r--r--emacs/.config/emacs-kj/init.el37
2 files changed, 42 insertions, 18 deletions
diff --git a/emacs/.config/emacs-kj/eshell.el b/emacs/.config/emacs-kj/eshell.el
new file mode 100644
index 0000000..b475915
--- /dev/null
+++ b/emacs/.config/emacs-kj/eshell.el
@@ -0,0 +1,23 @@
+;;; -*- lexical-binding: t; -*-
+(use-package eshell
+ :config
+ (add-hook 'eshell-mode-hook
+ (lambda ()
+ (setenv "PAGER" "cat"))
+ (setenv "EDITOR" "emacsclient"))
+ (setq eshell-prefer-lisp-functions t)
+ (setq tramp-remote-path '(tramp-own-remote-path))
+
+ (add-to-list 'eshell-load-hook #'kj/on-eshell-load))
+
+(defun kj/on-eshell-load (&args rest)
+ (add-to-list 'eshell-complex-commands "ssh"))
+
+(defun eshell/ssh (&rest args)
+ (if (= 1 (length args))
+ (throw 'eshell-replace-command
+ (eshell/cd
+ (format "/ssh:%s:" (car args))))
+ (throw 'eshell-replace-command
+ (eshell-parse-command "*ssh"
+ (eshell-stringify-list (flatten-tree args))))))
diff --git a/emacs/.config/emacs-kj/init.el b/emacs/.config/emacs-kj/init.el
index c84cb15..e26409a 100644
--- a/emacs/.config/emacs-kj/init.el
+++ b/emacs/.config/emacs-kj/init.el
@@ -84,6 +84,10 @@
:hook (after-init . global-emojify-mode))
(setq-default show-trailing-whitespace t)
+(dolist (mode '(calendar-mode-hook eshell-mode-hook))
+ (add-hook 'calendar-mode-hook
+ (lambda (&rest args)
+ (setq show-trailing-whitespace nil))))
(use-package rainbow-delimiters
:defer t
@@ -537,6 +541,7 @@
(add-to-list 'org-export-backends 'md)
(load-file (locate-user-emacs-file "development.el"))
+(load-file (locate-user-emacs-file "eshell.el"))
(setq math-additional-units
'((ZiB "1024 * EiB" "Zebibyte")
@@ -665,24 +670,6 @@
alist)))
-(use-package eshell
- :init
- (add-hook 'eshell-mode-hook
- (lambda ()
- (setenv "PAGER" "cat"))
- (setenv "EDITOR" "emacsclient"))
- (setq eshell-prefer-lisp-functions t)
- (setq tramp-remote-path '(tramp-own-remote-path))
- (defun eshell/ssh (&rest args)
- (if (= 1 (length args))
- (throw 'eshell-replace-command
- (eshell/cd
- (format "/ssh:%s:" (car args))))
- (throw 'eshell-replace-command
- (eshell-parse-command "*ssh"
- (eshell-stringify-list (flatten-tree args))))))
- (add-to-list 'eshell-complex-commands "ssh"))
-
(use-package idle-highlight-mode
:config
(setq idle-highlight-idle-time 0.2)
@@ -863,3 +850,17 @@
(display-buffer-in-best-side)
(slot . 0)
))
+
+;; Calendar settings.
+(setq calendar-week-start-day 1)
+;; Show calendar week numbers.
+(copy-face font-lock-constant-face 'calendar-iso-week-face)
+(set-face-attribute 'calendar-iso-week-face nil
+ :height 0.7)
+(setq calendar-intermonth-text
+ '(propertize
+ (format "%2d"
+ (car
+ (calendar-iso-from-absolute
+ (calendar-absolute-from-gregorian (list month day year)))))
+ 'font-lock-face 'calendar-iso-week-face))