Adjusting theme, fonts and other utils.
(setq doom-theme 'modus-vivendi-tinted)
(setq display-line-numbers-type 'relative)
(setq doom-font (font-spec :family "Iosevka" :size 25 :weight 'medium))
(setq org-pretty-entities t)
Most of the keybindings I use are default ones, but there are some exceptions.
COMMAND | DESCRIPTION | KEYBINDING |
---|---|---|
eshell | Open terminal | SPC o t |
next-buffer | Switch to next buffer | [tab] |
previous-buffer | Switch to prev buffer | [backtab] |
poetry run current_file | Run current python file in poetry env | SPC c p |
window-down | Select window down | CTRL-j |
window-up | Select window up | CTRL-k |
window-left | Select window left | CTRL-l |
window-right | Select window right | CTRL-r |
show-moonlander-layout | Open keyboard layout | SPC k h |
(map! :leader
:desc "Terminal" "o t" #'eshell)
(map! :n [tab] #'next-buffer
:n [backtab] #'previous-buffer)
(map! :leader
:desc "Run Python script with Poetry" "c p" #'my/run-python-script-with-poetry)
(map! :g "C-j" #'evil-window-down
:g "C-k" #'evil-window-up
:g "C-h" #'evil-window-left
:g "C-l" #'evil-window-right)
(map! :after rustic
:map rustic-mode-map
:localleader
"b" #'rustic-cargo-build
"c" #'rustic-cargo-clippy
"t" #'rustic-cargo-test
"r" #'rustic-cargo-run)
Setting ipython3 as default REPL and some extra settings for poetry
(use-package! poetry
:hook (python-mode . poetry-tracking-mode))
(defun my/run-python-script-with-poetry ()
"Run current buffer's Python script with Poetry."
(interactive)
(compile (concat "poetry run python " (shell-quote-argument (buffer-file-name)))))
(map! :leader
:desc "Run Python script with Poetry" "c p" #'my/run-python-script-with-poetry)
(after! python
(setq python-shell-interpreter "ipython3"
python-shell-interpreter-args "-i --simple-prompt"))
Mostly making rustic buffers to my taste
(after! rustic
(set-popup-rule! "*rustic-compilation*" :ignore nil :actions: nil :side 'right :width 0.4 :quit 'current :select t :slot -1)
(set-popup-rule! "*cargo-run*" :ignore nil :actions: nil :side 'right :width 0.4 :quit 'current :select t :slot -1)
(set-popup-rule! "*cargo-build*" :ignore nil :actions: nil :side 'right :width 0.4 :quit 'current :select t :slot -1)
(set-popup-rule! "*cargo-test*" :ignore nil :actions: nil :side 'right :width 0.4 :quit 'current :select t :slot -1)
(set-popup-rule! "*cargo-clippy*" :ignore nil :actions: nil :side 'right :width 0.4 :quit 'current :select t :slot -1)
)
If I live 3 times longer than @sunsided, maybe I can catch up
(use-package! wakatime-mode
:config
(global-wakatime-mode))
Just setting a dashboard image
(setq fancy-splash-image (concat doom-private-dir "banners/banner.svg"))
(map! :leader
(:prefix ("c h" . "Help info from Clippy")
:desc "Clippy describes function under point" "f" #'clippy-describe-function
:desc "Clippy describes variable under point" "v" #'clippy-describe-variable))
(setq evil-normal-state-cursor '(box "light blue")
evil-insert-state-cursor '(box "medium sea green")
evil-visual-state-cursor '(hollow "orange"))
(defun show-moonlander-layout()
"Display my current moonlander keyboard layout"
(interactive)
(find-file-read-only-other-window "/home/philipp/Pictures/util/moonlander_layout.png")
)
(set-popup-rule! "^moonlander-layout\\.jpg$" :ignore nil :actions nil :quit 'current :select t)
(map! :leader
(:prefix ("k" . "Keyboard")
:desc "Show Moonlander Layout" "h" #'show-moonlander-layout))