Compare commits
11 Commits
a76650044f
...
f7bb9afa05
Author | SHA1 | Date | |
---|---|---|---|
f7bb9afa05 | |||
abf98cf956 | |||
9cea46891f | |||
44bb63ffe0 | |||
03212a8b64 | |||
1b08590da6 | |||
4b7ac2efa0 | |||
e12f7ff9ce | |||
f8565daf66 | |||
0ca3680097 | |||
![]() |
25b0349e21 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,6 +7,7 @@
|
|||||||
auto-save-list
|
auto-save-list
|
||||||
tramp
|
tramp
|
||||||
.\#*
|
.\#*
|
||||||
|
var/
|
||||||
|
|
||||||
# Org-mode
|
# Org-mode
|
||||||
.org-id-locations
|
.org-id-locations
|
||||||
|
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -19,3 +19,9 @@
|
|||||||
[submodule "site-lisp/beancount-mode"]
|
[submodule "site-lisp/beancount-mode"]
|
||||||
path = site-lisp/beancount-mode
|
path = site-lisp/beancount-mode
|
||||||
url = https://github.com/beancount/beancount-mode.git
|
url = https://github.com/beancount/beancount-mode.git
|
||||||
|
[submodule "site-lisp/lazycat-theme"]
|
||||||
|
path = site-lisp/lazycat-theme
|
||||||
|
url = https://github.com/manateelazycat/lazycat-theme.git
|
||||||
|
[submodule "site-lisp/awesome-tray"]
|
||||||
|
path = site-lisp/awesome-tray
|
||||||
|
url = https://github.com/manateelazycat/awesome-tray.git
|
||||||
|
9
init.el
9
init.el
@ -19,15 +19,14 @@
|
|||||||
(require 'init-save)
|
(require 'init-save)
|
||||||
(require 'init-window)
|
(require 'init-window)
|
||||||
(require 'init-ai)
|
(require 'init-ai)
|
||||||
|
(require 'init-rime)
|
||||||
|
|
||||||
;; Edit
|
;; Edit
|
||||||
|
(require 'init-edit)
|
||||||
(require 'init-completion)
|
(require 'init-completion)
|
||||||
(require 'init-meow)
|
(require 'init-meow)
|
||||||
(require 'init-dired)
|
(require 'init-dired)
|
||||||
|
|
||||||
;; Gtd
|
|
||||||
(require 'init-calendar)
|
|
||||||
|
|
||||||
;; Reading
|
;; Reading
|
||||||
(require 'init-english)
|
(require 'init-english)
|
||||||
|
|
||||||
@ -47,6 +46,10 @@
|
|||||||
(require 'init-tex)
|
(require 'init-tex)
|
||||||
(require 'init-pdf)
|
(require 'init-pdf)
|
||||||
|
|
||||||
|
;; Gtd
|
||||||
|
(require 'init-calendar)
|
||||||
|
(require 'init-pomodoro)
|
||||||
|
|
||||||
(require 'init-session)
|
(require 'init-session)
|
||||||
(emacs-session-restore)
|
(emacs-session-restore)
|
||||||
|
|
||||||
|
46
install/install-arch.sh
Normal file
46
install/install-arch.sh
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if command -v xelatex > /dev/null 2> /dev/null; then
|
||||||
|
echo "TeX Live is already installed."
|
||||||
|
else
|
||||||
|
echo "ERROR! TeX Live has not been installed. Make sure it's installed and environment variables are configured correctly."
|
||||||
|
echo "Depends on the TeX Live edition, append corresponding environments variables into ~/.zshrc"
|
||||||
|
echo 'export PATH="/usr/local/texlive/2024/bin/x86_64-linux:$PATH"'
|
||||||
|
echo 'export MANPATH="/usr/local/texlive/2024/texmf-dist/doc/man:$MANPATH"'
|
||||||
|
echo 'export INFOPATH="/usr/local/texlive/2024/texmf-dist/doc/info:$INFOPATH"'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# emacs
|
||||||
|
sudo pacman -S emacs
|
||||||
|
|
||||||
|
# fonts
|
||||||
|
yay -S nerd-fonts-sarasa-term
|
||||||
|
sudo pacman -S ttf-nerd-fonts-symbols
|
||||||
|
|
||||||
|
# lsp-bridge
|
||||||
|
## dependency
|
||||||
|
sudo pacman -S python-orjson python-six python-setuptools python-paramiko python-rapidfuzz python-watchdog python-packaging
|
||||||
|
yay -S python-epc python-sexpdata python-pynput
|
||||||
|
## lsp
|
||||||
|
sudo pacman -S npm
|
||||||
|
sudo npm install -g yaml-language-server
|
||||||
|
sudo npm install -g bash-language-server
|
||||||
|
sudo npm install -g vscode-langservers-extracted
|
||||||
|
sudo npm install -g pyright
|
||||||
|
yay -S python-lsp-ruff
|
||||||
|
sudo pacman -S texlab
|
||||||
|
|
||||||
|
# vterm
|
||||||
|
sudo pacman -S cmake
|
||||||
|
|
||||||
|
# aider
|
||||||
|
export PATH="$PATH:$HOME/.local/bin"
|
||||||
|
python -m pip install aider-install --break-system-packages
|
||||||
|
aider-install
|
||||||
|
|
||||||
|
# rime
|
||||||
|
sudo pacman -S librime
|
||||||
|
|
||||||
|
# fetch submodules
|
||||||
|
git submodule update --init
|
@ -1,25 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if command -v xelatex > /dev/null 2> /dev/null; then
|
# LaTeX
|
||||||
echo "TeX Live is already installed."
|
brew install texlive
|
||||||
else
|
|
||||||
echo "ERROR! TeX Live has not been installed. Make sure it's installed and environment variables are configured correctly."
|
|
||||||
echo "Depends on the TeX Live edition, append corresponding environments variables into ~/.zshrc"
|
|
||||||
echo 'export PATH="/usr/local/texlive/2023/bin/x86_64-linux:$PATH"'
|
|
||||||
echo 'export MANPATH="/usr/local/texlive/2023/texmf-dist/doc/man:$MANPATH"'
|
|
||||||
echo 'export INFOPATH="/usr/local/texlive/2023/texmf-dist/doc/info:$INFOPATH"'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# emacs
|
# emacs
|
||||||
brew tap d12frosted/emacs-plus
|
brew tap d12frosted/emacs-plus
|
||||||
brew uninstall emacs-plus
|
brew uninstall emacs-plus
|
||||||
brew install emacs-plus --with-xwidgets --with-imagemagick
|
brew install emacs-plus --with-xwidgets --with-imagemagick --with-dbus --with-ctags
|
||||||
brew services restart d12frosted/emacs-plus/emacs-plus@29
|
brew services restart d12frosted/emacs-plus/emacs-plus@29
|
||||||
osascript -e 'tell application "Finder" to make alias file to posix file "/opt/homebrew/opt/emacs-plus@29/Emacs.app" at POSIX file "/Applications" with properties {name:"Emacs.app"}'
|
osascript -e 'tell application "Finder" to make alias file to posix file "/opt/homebrew/opt/emacs-plus@29/Emacs.app" at POSIX file "/Applications" with properties {name:"Emacs.app"}'
|
||||||
|
|
||||||
# fonts
|
# fonts
|
||||||
brew tap laishulu/cask-fonts
|
brew tap laishulu/homebrew
|
||||||
brew install --cask font-sarasa-nerd
|
brew install --cask font-sarasa-nerd
|
||||||
brew install --cask font-symbols-only-nerd-font
|
brew install --cask font-symbols-only-nerd-font
|
||||||
|
|
||||||
@ -29,12 +21,38 @@ brew install node
|
|||||||
npm install -g yaml-language-server
|
npm install -g yaml-language-server
|
||||||
npm install -g bash-language-server
|
npm install -g bash-language-server
|
||||||
npm install -g vscode-langservers-extracted
|
npm install -g vscode-langservers-extracted
|
||||||
npm install -g pyright
|
|
||||||
pip3 install ruff-lsp --break-system-packages
|
|
||||||
brew install texlab
|
brew install texlab
|
||||||
|
brew install basedpyright
|
||||||
|
brew install ruff
|
||||||
|
brew install beancount-language-server
|
||||||
|
|
||||||
# aider
|
# aider
|
||||||
brew install aider
|
brew install aider
|
||||||
|
|
||||||
|
# rime
|
||||||
|
brew install --cask squirrel
|
||||||
|
brew install librime
|
||||||
|
git clone https://github.com/iDvel/rime-ice.git && cd rime-ice
|
||||||
|
sed -i '' 's/page_size: 5/page_size: 9/' default.yaml
|
||||||
|
wget https://github.com/amzxyz/RIME-LMDG/releases/download/LTS/wanxiang-lts-zh-hans.gram
|
||||||
|
cat <<EOL > rime_ice.custom.yaml
|
||||||
|
patch:
|
||||||
|
grammar:
|
||||||
|
language: wanxiang-lts-zh-hans.gram
|
||||||
|
collocation_max_length: 5
|
||||||
|
collocation_min_length: 2
|
||||||
|
translator/contextual_suggestions: true
|
||||||
|
translator/max_homophones: 7
|
||||||
|
translator/max_homographs: 7
|
||||||
|
EOL
|
||||||
|
cd ..
|
||||||
|
cp -r ./rime-ice/* ~/.config/fcitx/rime/
|
||||||
|
cp -r ./rime-ice/* ~/Library/Rime
|
||||||
|
rm -rf rime-ice
|
||||||
|
brew install --cask switchkey
|
||||||
|
|
||||||
|
# org-pomodoro
|
||||||
|
brew install terminal-notifier
|
||||||
|
|
||||||
# fetch submodules
|
# fetch submodules
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
|
12
lisp/init-edit.el
Normal file
12
lisp/init-edit.el
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
;;; init-edit.el --- Edit settings -*- lexical-binding: t -*-
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; sudo-edit
|
||||||
|
(use-package sudo-edit)
|
||||||
|
|
||||||
|
(provide 'init-edit)
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;; init-edit.el ends here
|
@ -17,7 +17,6 @@
|
|||||||
(setq immersive-translate-chatgpt-host "api.deepseek.com")
|
(setq immersive-translate-chatgpt-host "api.deepseek.com")
|
||||||
(setq immersive-translate-chatgpt-model "deepseek-chat")
|
(setq immersive-translate-chatgpt-model "deepseek-chat")
|
||||||
(setq immersive-translate-failed-message "🧐")
|
(setq immersive-translate-failed-message "🧐")
|
||||||
(add-hook 'Info-mode-hook 'immersive-translate-auto-mode)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
when (font-installed-p font)
|
when (font-installed-p font)
|
||||||
return (set-face-attribute 'default nil
|
return (set-face-attribute 'default nil
|
||||||
:family font
|
:family font
|
||||||
:height (cond (sys/macp 130)
|
:height (cond (sys/macp 160)
|
||||||
(sys/win32p 110)
|
(sys/win32p 110)
|
||||||
(t 100))))
|
(t 100))))
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; lsp-bridge
|
||||||
(use-package markdown-mode
|
(use-package markdown-mode
|
||||||
:mode ("README\\.md\\'" . gfm-mode)
|
:mode ("README\\.md\\'" . gfm-mode)
|
||||||
:init (setq markdown-command "multimarkdown")
|
:init (setq markdown-command "multimarkdown")
|
||||||
@ -22,9 +24,13 @@
|
|||||||
(setq lsp-bridge-enable-completion-in-string t)
|
(setq lsp-bridge-enable-completion-in-string t)
|
||||||
(setq lsp-bridge-enable-completion-in-minibuffer t)
|
(setq lsp-bridge-enable-completion-in-minibuffer t)
|
||||||
(setq lsp-bridge-enable-with-tramp t)
|
(setq lsp-bridge-enable-with-tramp t)
|
||||||
(setq lsp-bridge-python-lsp-server "pyright")
|
(setq lsp-bridge-python-lsp-server "basedpyright")
|
||||||
(setq lsp-bridge-tex-lsp-server "texlab")
|
(setq lsp-bridge-tex-lsp-server "texlab")
|
||||||
(setq lsp-bridge-python-command "/usr/bin/python3")
|
(setq lsp-bridge-python-command
|
||||||
|
(cond
|
||||||
|
((eq system-type 'gnu/linux) "/usr/bin/python3")
|
||||||
|
((eq system-type 'darwin) "/opt/homebrew/bin/python3")
|
||||||
|
))
|
||||||
|
|
||||||
(one-key-create-menu
|
(one-key-create-menu
|
||||||
"LSP"
|
"LSP"
|
||||||
@ -35,6 +41,41 @@
|
|||||||
(("s" . "lsp-bridge-toggle-sdcv-helper") . lsp-bridge-toggle-sdcv-helper))
|
(("s" . "lsp-bridge-toggle-sdcv-helper") . lsp-bridge-toggle-sdcv-helper))
|
||||||
t)
|
t)
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; virtual environment
|
||||||
|
(use-package pyvenv
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(setenv "WORKON_HOME" (expand-file-name
|
||||||
|
(cond ((eq system-type 'gnu/linux) "~/miniconda3/envs")
|
||||||
|
((eq system-type 'darwin) "/opt/homebrew/Caskroom/miniconda/base/envs"))))
|
||||||
|
(pyvenv-mode t)
|
||||||
|
(add-hook 'python-mode-hook
|
||||||
|
(lambda () (pyvenv-workon "dev")))
|
||||||
|
)
|
||||||
|
|
||||||
|
(defun local/lsp-bridge-get-single-lang-server-by-project (project-path filepath)
|
||||||
|
(let* ((json-object-type 'plist)
|
||||||
|
(custom-dir (expand-file-name ".cache/lsp-bridge/pyright" user-emacs-directory))
|
||||||
|
(custom-config (expand-file-name "pyright.json" custom-dir))
|
||||||
|
(default-config (json-read-file (expand-file-name "lsp-bridge/langserver/pyright.json" user-emacs-directory)))
|
||||||
|
(settings (plist-get default-config :settings))
|
||||||
|
)
|
||||||
|
(plist-put settings :pythonPath (executable-find "python"))
|
||||||
|
(make-directory (file-name-directory custom-config) t)
|
||||||
|
(with-temp-file custom-config (insert (json-encode default-config)))
|
||||||
|
custom-config))
|
||||||
|
|
||||||
|
(add-hook 'python-mode-hook
|
||||||
|
(lambda ()
|
||||||
|
(setq-local lsp-bridge-get-single-lang-server-by-project
|
||||||
|
'local/lsp-bridge-get-single-lang-server-by-project)))
|
||||||
|
|
||||||
|
(add-hook 'pyvenv-post-activate-hooks
|
||||||
|
(lambda ()
|
||||||
|
(lsp-bridge-restart-process)))
|
||||||
|
|
||||||
|
|
||||||
(provide 'init-lsp)
|
(provide 'init-lsp)
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;; init-lsp.el ends here
|
;;; init-lsp.el ends here
|
||||||
|
@ -8,10 +8,13 @@
|
|||||||
:config
|
:config
|
||||||
; Line Truncation @ https://www.gnu.org/software/emacs/manual/html_node/emacs/Line-Truncation.html
|
; Line Truncation @ https://www.gnu.org/software/emacs/manual/html_node/emacs/Line-Truncation.html
|
||||||
(add-hook 'org-mode-hook (lambda () (setq truncate-lines nil)))
|
(add-hook 'org-mode-hook (lambda () (setq truncate-lines nil)))
|
||||||
; Dynamic Headline Numbering @ https://orgmode.org/manual/Dynamic-Headline-Numbering.html
|
;; ; Dynamic Headline Numbering @ https://orgmode.org/manual/Dynamic-Headline-Numbering.html
|
||||||
(setq org-startup-numerated t)
|
;; (setq org-startup-numerated t)
|
||||||
; Hide emphasis markup characters in buffers @ https://orgmode.org/manual/Emphasis-and-Monospace.html
|
; Hide emphasis markup characters in buffers @ https://orgmode.org/manual/Emphasis-and-Monospace.html
|
||||||
(setq org-hide-emphasis-markers t)
|
(setq org-hide-emphasis-markers t)
|
||||||
|
; if there is a #+ATTR.*: width="200", resize to 200, otherwise resize to 320
|
||||||
|
(setq org-image-actual-width '(320))
|
||||||
|
(setq org-startup-with-inline-images t)
|
||||||
; https://orgmode.org/manual/Fast-access-to-TODO-states.html
|
; https://orgmode.org/manual/Fast-access-to-TODO-states.html
|
||||||
; https://orgmode.org/guide/Progress-Logging.html
|
; https://orgmode.org/guide/Progress-Logging.html
|
||||||
(setq org-todo-keywords
|
(setq org-todo-keywords
|
||||||
@ -91,9 +94,6 @@
|
|||||||
:config
|
:config
|
||||||
(setq-default org-download-heading-lvl nil)
|
(setq-default org-download-heading-lvl nil)
|
||||||
(setq-default org-download-image-dir "./img")
|
(setq-default org-download-image-dir "./img")
|
||||||
;;if there is a #+ATTR.*: width="200", resize to 200, otherwise resize to 320
|
|
||||||
(setq org-image-actual-width '(320))
|
|
||||||
(setq org-startup-with-inline-images t)
|
|
||||||
:hook
|
:hook
|
||||||
(org-mode . org-download-enable))
|
(org-mode . org-download-enable))
|
||||||
|
|
||||||
|
@ -5,19 +5,20 @@
|
|||||||
|
|
||||||
(use-package pdf-tools
|
(use-package pdf-tools
|
||||||
:mode ("\\.pdf\\'" . pdf-view-mode) ; pdf 文件默认打开方式
|
:mode ("\\.pdf\\'" . pdf-view-mode) ; pdf 文件默认打开方式
|
||||||
:bind
|
;; :bind
|
||||||
(:map pdf-view-mode-map
|
;; (:map pdf-view-mode-map
|
||||||
("d" . pdf-view-next-page-command)
|
;; ("d" . pdf-view-next-page-command)
|
||||||
("a" . pdf-view-previous-page-command)
|
;; ("a" . pdf-view-previous-page-command)
|
||||||
("s" . pdf-view-scroll-up-or-next-page)
|
;; ("s" . pdf-view-scroll-up-or-next-page)
|
||||||
("w" . pdf-view-scroll-down-or-previous-page)
|
;; ("w" . pdf-view-scroll-down-or-previous-page)
|
||||||
:map pdf-history-minor-mode-map
|
;; :map pdf-history-minor-mode-map
|
||||||
("b" . pdf-history-backward)
|
;; ("b" . pdf-history-backward)
|
||||||
:map pdf-annot-minor-mode-map
|
;; :map pdf-annot-minor-mode-map
|
||||||
("C-a a" . pdf-annot-add-highlight-markup-annotation)
|
;; ("C-a a" . pdf-annot-add-highlight-markup-annotation)
|
||||||
("C-a s" . pdf-annot-add-squiggly-markup-annotation)
|
;; ("C-a s" . pdf-annot-add-squiggly-markup-annotation)
|
||||||
("C-a u" . pdf-annot-add-underline-markup-annotation)
|
;; ("C-a u" . pdf-annot-add-underline-markup-annotation)
|
||||||
("C-a d" . pdf-annot-delete))
|
;; ("C-a d" . pdf-annot-delete)
|
||||||
|
;; )
|
||||||
:custom
|
:custom
|
||||||
(pdf-view-midnight-colors '("#000000" . "#9bCD9b")) ; 夜间模式设置绿色底色
|
(pdf-view-midnight-colors '("#000000" . "#9bCD9b")) ; 夜间模式设置绿色底色
|
||||||
:config
|
:config
|
||||||
@ -27,7 +28,7 @@
|
|||||||
(require 'pdf-annot) ; 设置 pdf-annot-mimor-mode-map
|
(require 'pdf-annot) ; 设置 pdf-annot-mimor-mode-map
|
||||||
(require 'pdf-history) ; 设置 pdf-history-minor-mode-map
|
(require 'pdf-history) ; 设置 pdf-history-minor-mode-map
|
||||||
(add-hook 'pdf-view-mode-hook 'pdf-view-fit-width-to-window) ; 默认适应页宽
|
(add-hook 'pdf-view-mode-hook 'pdf-view-fit-width-to-window) ; 默认适应页宽
|
||||||
; (add-hook 'pdf-view-mode-hook 'pdf-view-midnight-minor-mode) ; 默认夜间模式
|
(add-hook 'pdf-view-mode-hook 'pdf-view-midnight-minor-mode) ; 默认夜间模式
|
||||||
(add-hook 'TeX-after-compilation-finished-functions
|
(add-hook 'TeX-after-compilation-finished-functions
|
||||||
#'TeX-revert-document-buffer) ; 完成编译后刷新 pdf 文件
|
#'TeX-revert-document-buffer) ; 完成编译后刷新 pdf 文件
|
||||||
)
|
)
|
||||||
|
54
lisp/init-pomodoro.el
Normal file
54
lisp/init-pomodoro.el
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
;;; init-pomodoro.el --- Pomodoro settings -*- lexical-binding: t -*-
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; org-pomodoro
|
||||||
|
(use-package org-pomodoro
|
||||||
|
:custom-face
|
||||||
|
(org-pomodoro-mode-line ((t (:inherit warning))))
|
||||||
|
(org-pomodoro-mode-line-overtime ((t (:inherit error))))
|
||||||
|
(org-pomodoro-mode-line-break ((t (:inherit success))))
|
||||||
|
:bind (:map org-mode-map
|
||||||
|
("C-c C-x m" . org-pomodoro))
|
||||||
|
:init
|
||||||
|
(with-eval-after-load 'org-agenda
|
||||||
|
(bind-keys :map org-agenda-mode-map
|
||||||
|
("K" . org-pomodoro)
|
||||||
|
("C-c C-x m" . org-pomodoro))))
|
||||||
|
|
||||||
|
;; https://github.com/devbins/.emacs.d/blob/5341a41e2b100c1228eb2438aa5a83927857cfb0/lisp/init-func.el#L335
|
||||||
|
(defun notify-osx (title msg)
|
||||||
|
(call-process "terminal-notifier"
|
||||||
|
nil 0 nil
|
||||||
|
"-group" "Emacs"
|
||||||
|
"-title" title
|
||||||
|
;; "-sender" "org.gnu.Emacs"
|
||||||
|
"-message" msg
|
||||||
|
"-sound" "Glass"
|
||||||
|
"-active" "org.gnu.Emacs"))
|
||||||
|
;; org-pomodoro mode hooks
|
||||||
|
(add-hook 'org-pomodoro-started-hook
|
||||||
|
(lambda ()
|
||||||
|
(notify-osx "Pomodoro started!" "Time for a pomodoro.")))
|
||||||
|
|
||||||
|
(add-hook 'org-pomodoro-finished-hook
|
||||||
|
(lambda ()
|
||||||
|
(notify-osx "Pomodoro completed!" "Time for a break.")))
|
||||||
|
|
||||||
|
(add-hook 'org-pomodoro-break-finished-hook
|
||||||
|
(lambda ()
|
||||||
|
(notify-osx "Pomodoro Short Break Finished" "Ready for Another?")))
|
||||||
|
|
||||||
|
(add-hook 'org-pomodoro-long-break-finished-hook
|
||||||
|
(lambda ()
|
||||||
|
(notify-osx "Pomodoro Long Break Finished" "Ready for Another?")))
|
||||||
|
|
||||||
|
(add-hook 'org-pomodoro-killed-hook
|
||||||
|
(lambda ()
|
||||||
|
(notify-osx "Pomodoro Killed" "One does not simply kill a pomodoro!")))
|
||||||
|
|
||||||
|
(provide 'init-pomodoro)
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;; init-pomodoro.el ends here
|
@ -5,7 +5,11 @@
|
|||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; auto-revert
|
;; auto-revert
|
||||||
(global-auto-revert-mode 1)
|
(use-package autorevert
|
||||||
|
:ensure nil
|
||||||
|
:hook
|
||||||
|
(after-init . global-auto-revert-mode)
|
||||||
|
)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Fluently Edit Large Files
|
;; Fluently Edit Large Files
|
||||||
|
45
lisp/init-rime.el
Normal file
45
lisp/init-rime.el
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
;;; init-rime.el --- Rime settings -*- lexical-binding: t -*-
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(use-package rime
|
||||||
|
:ensure t
|
||||||
|
:custom
|
||||||
|
(default-input-method 'rime)
|
||||||
|
:config
|
||||||
|
(setq rime-user-data-dir "~/.config/fcitx/rime")
|
||||||
|
(setq rime-show-candidate 'posframe)
|
||||||
|
(when (eq system-type 'darwin)
|
||||||
|
(setq rime-emacs-module-header-root "/opt/homebrew/include")
|
||||||
|
(setq rime-librime-root "/opt/homebrew/opt/librime"))
|
||||||
|
; 临时英文模式
|
||||||
|
(setq rime-disable-predicates
|
||||||
|
'(meow-motion-mode-p
|
||||||
|
meow-normal-mode-p
|
||||||
|
meow-keypad-mode-p
|
||||||
|
; 在英文字符串之后, 必须以字母开头的英文字符串
|
||||||
|
rime-predicate-after-alphabet-char-p
|
||||||
|
; 在 prog-mode 和 conf-mode 中除注释和引号内字符串之外的区域
|
||||||
|
rime-predicate-prog-in-code-p
|
||||||
|
; 激活 ace-window
|
||||||
|
rime-predicate-ace-window-p
|
||||||
|
; 当要输入的是符号时
|
||||||
|
rime-predicate-current-input-punctuation-p
|
||||||
|
; 在中文字符且有空格之后
|
||||||
|
rime-predicate-space-after-cc-p
|
||||||
|
; 将要输入的是大写字母时
|
||||||
|
rime-predicate-current-uppercase-letter-p
|
||||||
|
; 在 LaTeX 数学环境中或者输入 LaTeX 命令时
|
||||||
|
rime-predicate-tex-math-or-command-p
|
||||||
|
; 在 org-mode 代码块中时
|
||||||
|
rime-predicate-org-in-src-block-p
|
||||||
|
)
|
||||||
|
)
|
||||||
|
; 强制中文模式, 无视 rime-disable-predicates 中的规则
|
||||||
|
(define-key rime-mode-map (kbd "M-j") 'rime-force-enable)
|
||||||
|
)
|
||||||
|
|
||||||
|
(provide 'init-rime)
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;;; init-rime.el ends here
|
@ -4,8 +4,11 @@
|
|||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
;; Ensure auctex is installed
|
;; Ensure auctex is installed
|
||||||
|
(unless (package-installed-p 'auctex)
|
||||||
|
(package-refresh-contents)
|
||||||
|
(package-install 'auctex))
|
||||||
|
|
||||||
(require 'tex)
|
(require 'tex)
|
||||||
(require 'auctex)
|
|
||||||
|
|
||||||
(use-package cdlatex
|
(use-package cdlatex
|
||||||
:ensure t
|
:ensure t
|
||||||
@ -14,6 +17,25 @@
|
|||||||
|
|
||||||
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
|
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; outline-minor-mode
|
||||||
|
;; https://www.bilibili.com/video/BV1i4411a74k?vd_source=d2fb836a26e496b507775f8784008115&spm_id_from=333.788.videopod.sections
|
||||||
|
(use-package outline
|
||||||
|
:init
|
||||||
|
(setq outline-minor-mode-prefix (kbd "C-'"))
|
||||||
|
:bind
|
||||||
|
(:map outline-minor-mode-map
|
||||||
|
("C-' t" . outline-hide-body)
|
||||||
|
("C-' e" . outline-show-entry)
|
||||||
|
("C-' p" . outline-backward-same-level)
|
||||||
|
("C-' n" . outline-forward-same-level)
|
||||||
|
("C-' a" . outline-show-all))
|
||||||
|
:hook
|
||||||
|
(LaTeX-mode . (lambda ()
|
||||||
|
(outline-minor-mode)
|
||||||
|
(outline-hide-body)))
|
||||||
|
)
|
||||||
|
|
||||||
(setq-default TeX-master nil)
|
(setq-default TeX-master nil)
|
||||||
(setq TeX-global-PDF-mode t TeX-engine 'xetex)
|
(setq TeX-global-PDF-mode t TeX-engine 'xetex)
|
||||||
(add-to-list 'TeX-command-list '("XeLaTeX" "%`xelatex --synctex=1%(mode)%' %t" TeX-run-TeX nil t))
|
(add-to-list 'TeX-command-list '("XeLaTeX" "%`xelatex --synctex=1%(mode)%' %t" TeX-run-TeX nil t))
|
||||||
|
@ -5,28 +5,19 @@
|
|||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;; Theme
|
;;; lazycat-themes & awesome-tray
|
||||||
(use-package doom-themes)
|
(add-to-list 'load-path "~/.emacs.d/site-lisp/lazycat-theme")
|
||||||
|
(require 'lazycat-theme)
|
||||||
|
(lazycat-theme-load-dark)
|
||||||
|
|
||||||
(use-package circadian
|
(add-to-list 'load-path "~/.emacs.d/site-lisp/awesome-tray")
|
||||||
:hook
|
(require 'awesome-tray)
|
||||||
(emacs-startup . circadian-setup)
|
(awesome-tray-mode 1)
|
||||||
:config
|
(setq awesome-tray-meow-show-mode t)
|
||||||
(setq calendar-latitude 40.0)
|
(setq awesome-tray-git-show-status t)
|
||||||
(setq calendar-longitude 116.4)
|
|
||||||
(setq circadian-themes '((:sunrise . (
|
; https://emacs-china.org/t/emacs/6853/14
|
||||||
modus-operandi
|
(setq-default mode-line-format (remove 'mode-line-buffer-identification mode-line-format))
|
||||||
adwaita
|
|
||||||
doom-one-light
|
|
||||||
doom-solarized-light
|
|
||||||
))
|
|
||||||
(:sunset . (
|
|
||||||
;; modus-vivendi
|
|
||||||
doom-one
|
|
||||||
;; doom-opera
|
|
||||||
;; doom-nord-aurora
|
|
||||||
))
|
|
||||||
)))
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;; Tab Bar
|
;;; Tab Bar
|
||||||
@ -78,10 +69,10 @@
|
|||||||
)
|
)
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;; Modeline
|
;; global-hl-line-mode
|
||||||
(use-package doom-modeline
|
(use-package hl-line
|
||||||
:ensure t
|
:ensure nil
|
||||||
:hook (after-init . doom-modeline-mode))
|
:hook (after-init . global-hl-line-mode))
|
||||||
|
|
||||||
(provide 'init-ui)
|
(provide 'init-ui)
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
@ -3,6 +3,15 @@
|
|||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; winner-mode
|
||||||
|
(use-package winner-mode
|
||||||
|
:ensure nil
|
||||||
|
:hook
|
||||||
|
(after-init . winner-mode)
|
||||||
|
(ediff-quit . winner-undo)
|
||||||
|
)
|
||||||
|
|
||||||
(use-package shackle
|
(use-package shackle
|
||||||
:ensure t
|
:ensure t
|
||||||
:hook (after-init . shackle-mode)
|
:hook (after-init . shackle-mode)
|
||||||
@ -70,6 +79,10 @@
|
|||||||
(setq popper-display-control nil)
|
(setq popper-display-control nil)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(use-package ace-window
|
||||||
|
:ensure t
|
||||||
|
:bind (("C-x o" . 'ace-window)))
|
||||||
|
|
||||||
(provide 'init-window)
|
(provide 'init-window)
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;; init-window.el ends here
|
;;; init-window.el ends here
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit a7f21534522a725259cf2efd46837d7bd88ec231
|
Subproject commit a256968d1faaf2936d12696a364158df56931cdb
|
1
site-lisp/awesome-tray
Submodule
1
site-lisp/awesome-tray
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 138c7d22b1cd82ed883de1c859ead7a93736a734
|
1
site-lisp/lazycat-theme
Submodule
1
site-lisp/lazycat-theme
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit d0f8566485d8e00f86fd6ad4e93f016c9a88a9d8
|
@ -1 +1 @@
|
|||||||
Subproject commit 402e65f372bb4268c0cd0514a12f0b0e9649c4af
|
Subproject commit 7e382e1bd3ab32e0f4bff981b2355efa59ee4366
|
@ -1 +1 @@
|
|||||||
Subproject commit 425ff7cb89a76e08878d13743728a14a38da98ab
|
Subproject commit cfce055fadf1e96e729d90f86d921bdb6092eba5
|
Loading…
Reference in New Issue
Block a user