mirror of
http://github.com/JaeUs3792/dotfiles
synced 2025-12-16 00:51:35 +09:00
Compare commits
68 Commits
7788907562
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 1bb836dee1 | |||
| 218ca4bbd7 | |||
| a6759eff18 | |||
| 023a6d0c5b | |||
| aaee6aef92 | |||
| b2b4dd33a5 | |||
| fc4538ac6e | |||
| 92c63e4949 | |||
| 45830fad57 | |||
| 7a7e38806d | |||
| f8d47693c9 | |||
| 8d34b0f472 | |||
| 8a0e52ab03 | |||
| e559352d85 | |||
| e335f8e40c | |||
| baea7cf95e | |||
| 631b54fbcd | |||
| 7bc66f159d | |||
| e8418bd7af | |||
| 24f816edd9 | |||
| 8e17f130e7 | |||
| e363c90761 | |||
| 5ebf4d23bb | |||
| b6dc73188c | |||
| 5a98c1cb31 | |||
| b1128126f4 | |||
| c8633e1d37 | |||
| 5866ff1364 | |||
| 6cdb9c5b8f | |||
| 533a13971d | |||
| ed95c3a26a | |||
| e28bea766c | |||
| cefeb45dce | |||
| 4199b6571f | |||
| a5096ef3a1 | |||
| 5415fbc30f | |||
| 84fce00146 | |||
| d3fcca3431 | |||
| 30107eeb1e | |||
| 8e2da70b04 | |||
| 4388b5cad5 | |||
| fa34474524 | |||
| 16d23ca7da | |||
| a8e4e2a394 | |||
| 08caaa6042 | |||
| 45bdf5fa0d | |||
| 1d9e083f7b | |||
| e3541521dc | |||
| 3306707949 | |||
| 95d8784764 | |||
| 518bc79126 | |||
| a646bebbb5 | |||
| e3b0754b0c | |||
| b1c8ba0421 | |||
| fff61a9139 | |||
| d6e04936a9 | |||
| 33254b574b | |||
| f4d5ef8531 | |||
| 0cf7cd2b9e | |||
| fc0559a4fc | |||
| 6cf734fc13 | |||
| c590f95ce4 | |||
| 7a2834b617 | |||
| 054cea8511 | |||
| 0df06aef69 | |||
| 1bdcedb34b | |||
| 0f6b4b6cd8 | |||
| d10e8aa916 |
5
.config/Code/User/extensions.txt
Normal file
5
.config/Code/User/extensions.txt
Normal file
@ -0,0 +1,5 @@
|
||||
github.copilot
|
||||
github.copilot-chat
|
||||
mshr-h.veriloghdl
|
||||
nonylene.dark-molokai-theme
|
||||
vscodevim.vim
|
||||
3
.config/Code/User/keybindings.json
Normal file
3
.config/Code/User/keybindings.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
|
||||
}
|
||||
3
.config/Code/User/settings.json
Normal file
3
.config/Code/User/settings.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"workbench.colorTheme": "Dark (Molokai)"
|
||||
}
|
||||
@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source ~/.profile
|
||||
|
||||
if [[ $JUPCID == "HOME-DESKTOP" ]]; then
|
||||
xrandr --output DP-4 --primary --mode 2560x1440 --rotate normal --output HDMI-0 --rotate right --right-of DP-4
|
||||
elif [[ $JUPCID == "HWDEV" ]]; then
|
||||
@ -20,6 +22,8 @@ killall nm-applet && nm-applet &
|
||||
killall volumeicon && volumeicon &
|
||||
#killall conky
|
||||
#sleep 3 && conky -c ~/.config/conky/conkyrc
|
||||
emacsclient --eval '(kill-emacs)'
|
||||
emacs --daemon
|
||||
|
||||
~/scripts/random_wallpaper.sh
|
||||
|
||||
@ -64,15 +68,10 @@ bspc config focused_private_border_color "$color1"
|
||||
bspc config active_private_border_color "$color1"
|
||||
bspc config normal_private_border_color "$color1"
|
||||
|
||||
bspc rule -a \* state=tiled
|
||||
# Load session
|
||||
# shellcheck source=/dev/null
|
||||
#. "$BSPWM_CONFIG/restore.cfg"
|
||||
#if [ -e "$BSPWM_STATE" ] ; then
|
||||
# bspc wm --load-state "$BSPWM_STATE"
|
||||
# bspc wm --adopt-orphans
|
||||
# rm "$BSPWM_STATE"
|
||||
#fi
|
||||
bspc rule -a Emacs state=tiled
|
||||
# bspc rule -a \* state=tiled
|
||||
bspc rule -a scpad sticky=on state=floating rectangle=1400x700+660+40
|
||||
bspc rule -a pythonpad sticky=on state=floating rectangle=1400x700+660+40
|
||||
|
||||
# TODO heres polybar
|
||||
if [[ $JUPCID == "HOME-DESKTOP" ]]; then
|
||||
|
||||
1
.config/emacs/.gitignore
vendored
1
.config/emacs/.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
*
|
||||
*/
|
||||
!readme.org
|
||||
!early-init.el
|
||||
!init.el
|
||||
!custom-default.el
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
|
||||
(defun custom-setup-fonts ()
|
||||
"setup fonts..."
|
||||
(when (display-graphic-p)
|
||||
;; default font
|
||||
(cl-loop for font in '("FiraCode Nerd Font Mono" "Jetbrains Mono"
|
||||
"Source Code Pro" "DejaVu Sans Mono")
|
||||
@ -33,20 +32,34 @@
|
||||
when (font-installed-p font)
|
||||
return (progn
|
||||
(setq face-font-rescale-alist `((,font . 1.00)))
|
||||
(set-fontset-font t '(#x1100 . #xffdc) (font-spec :family font))))))
|
||||
(custom-setup-fonts)
|
||||
(set-fontset-font t '(#x1100 . #xffdc) (font-spec :family font)))))
|
||||
(when (display-graphic-p)
|
||||
(custom-setup-fonts))
|
||||
(add-hook 'window-setup-hook #'custom-setup-fonts)
|
||||
|
||||
(if (daemonp)
|
||||
(add-hook 'after-make-frame-functions
|
||||
(lambda (frame)
|
||||
;; (setq doom-modeline-icon t)
|
||||
(with-selected-frame frame
|
||||
(custom-setup-fonts)
|
||||
;; default transparency (85 . 85) or (100 . 100)
|
||||
(set-frame-parameter (selected-frame) 'alpha '(85 . 85)))))
|
||||
(custom-setup-fonts))
|
||||
|
||||
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
|
||||
|
||||
;; select theme
|
||||
(setq custom-theme-sel 'doom-one)
|
||||
;; default transparency (85 . 85) or (100 . 100)
|
||||
(set-frame-parameter (selected-frame) 'alpha '(85 . 85))
|
||||
|
||||
;; Org setup
|
||||
(setq custom-org-directory "~/org"
|
||||
custom-org-roam-directory "~/org/roam"
|
||||
custom-org-agenda-file "~/org/agenda/agenda.org")
|
||||
|
||||
;; Line numbers, relative or comment this line
|
||||
(setq display-line-numbers-type 'relative)
|
||||
|
||||
;; Chatgpt setup
|
||||
(setq custom-chatgpt-my-key "my-key")
|
||||
|
||||
|
||||
@ -24,11 +24,11 @@
|
||||
(push '(ns-transparent-titlebar . t) default-frame-alist))
|
||||
(setq-default mode-line-format nil)
|
||||
|
||||
;;(setq inhibit-startup-message nil)
|
||||
;;(setq inhibit-startup-message nil) ; TODO check.
|
||||
|
||||
;; initial load with blue theme
|
||||
;(load-theme 'deeper-blue)
|
||||
|
||||
;;(customize-set-variable 'initial-major-mode 'fundamental-mode)
|
||||
(setq package-enable-at-startup nil)
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; early-init.el ends here
|
||||
|
||||
@ -73,30 +73,26 @@ Otherwise the startup will be very slow. "
|
||||
(require 'init-highlight)
|
||||
(require 'init-ibuffer)
|
||||
(require 'init-persp)
|
||||
(require 'init-window)
|
||||
;; (require 'init-window) ;; will be removed
|
||||
(require 'init-treemacs)
|
||||
|
||||
;; shell
|
||||
(require 'init-eshell)
|
||||
|
||||
;; markdown
|
||||
;;;; markdown
|
||||
(require 'init-markdown)
|
||||
(require 'init-org)
|
||||
(require 'init-reader)
|
||||
|
||||
;;
|
||||
(require 'init-dict)
|
||||
|
||||
;; docker
|
||||
(when ON-LINUX
|
||||
(require 'init-docker))
|
||||
(require 'init-docker))
|
||||
;; utils
|
||||
(require 'init-utils)
|
||||
|
||||
;; Programming
|
||||
(require 'init-vcs)
|
||||
(require 'init-flycheck)
|
||||
(require 'init-eglot)
|
||||
(require 'init-ctags)
|
||||
(require 'init-prog)
|
||||
|
||||
@ -105,7 +101,6 @@ Otherwise the startup will be very slow. "
|
||||
(require 'init-rust)
|
||||
(require 'init-python)
|
||||
(require 'init-ruby)
|
||||
(require 'init-shell)
|
||||
|
||||
(require 'init-latex)
|
||||
(require 'init-verilog)
|
||||
@ -114,5 +109,7 @@ Otherwise the startup will be very slow. "
|
||||
|
||||
(require 'init-extra)
|
||||
(require 'init-chatgpt)
|
||||
|
||||
(require 'init-copilot)
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; init.el ends here
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
;; init-base.el -*- lexical-binding: t -*-
|
||||
|
||||
(require 'init-const)
|
||||
(require 'init-funcs)
|
||||
|
||||
@ -10,6 +9,8 @@
|
||||
|
||||
;;
|
||||
(use-package gcmh
|
||||
:straight t
|
||||
:ensure t
|
||||
:diminish
|
||||
:hook
|
||||
(emacs-startup . gcmh-mode)
|
||||
@ -28,15 +29,20 @@
|
||||
(set-selection-coding-system 'utf-8))
|
||||
(when ON-LINUX
|
||||
(use-package exec-path-from-shell
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:init (exec-path-from-shell-initialize)))
|
||||
|
||||
;; open file point at where last saved place.
|
||||
(use-package saveplace
|
||||
:ensure nil
|
||||
:straight t
|
||||
:ensure t
|
||||
:hook (after-init . save-place-mode))
|
||||
|
||||
(use-package recentf
|
||||
:ensure nil
|
||||
:straight t
|
||||
:ensure t
|
||||
:bind
|
||||
(("C-x C-r" . recentf-open-files))
|
||||
:hook
|
||||
@ -54,7 +60,8 @@
|
||||
(add-to-list 'recentf-filename-handlers #'abbreviate-file-name))
|
||||
|
||||
(use-package savehist
|
||||
:ensure nil
|
||||
:straight t
|
||||
:ensure t
|
||||
:hook
|
||||
(after-init . savehist-mode)
|
||||
:init
|
||||
@ -68,7 +75,7 @@
|
||||
savehist-autosave-interval 300))
|
||||
|
||||
(use-package simple
|
||||
:ensure nil
|
||||
:ensure nil ; emacs base package
|
||||
:hook ((after-init . size-indication-mode)
|
||||
(text-mode . visual-line-mode)
|
||||
((prog-mode markdown-mode conf-mode) . enable-trailing-whitespace))
|
||||
@ -110,7 +117,7 @@
|
||||
(concat
|
||||
" "
|
||||
(nerd-icons-faicon "nf-fa-bolt" :face 'nerd-icons-lblue))
|
||||
;;(all-the-icons-faicon "nf-fa-bolt" :face 'all-the-icons-lblue))
|
||||
;;(all-the-icons-faicon "nf-fa-bolt" :face 'all-the-icons-lblue))
|
||||
" x"))
|
||||
(name (aref val 0))
|
||||
(pid (aref val 1))
|
||||
@ -150,11 +157,6 @@
|
||||
sentence-end-double-space nil
|
||||
word-wrap-by-category t)
|
||||
|
||||
;; use for org-roam?
|
||||
(when (fboundp 'sqlite-open)
|
||||
(use-package emacsql-sqlite-builtin))
|
||||
|
||||
|
||||
(provide 'init-base)
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; init-base.el ends here
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
;;; init-bookmark.el -*- lexical-binding: t -*-
|
||||
;; Bookmark
|
||||
(use-package bookmark
|
||||
:ensure nil
|
||||
:ensure nil ; emacs built-in
|
||||
:config
|
||||
(with-no-warnings
|
||||
;; Display icons for bookmarks
|
||||
|
||||
@ -39,9 +39,9 @@
|
||||
("<f12>" . compile))
|
||||
:init (setq-default c-basic-offset 4))
|
||||
|
||||
(use-package c-ts-mode
|
||||
:ensure nil
|
||||
:init (setq c-ts-mode-indent-offset 4))
|
||||
;; (use-package c-ts-mode
|
||||
;; :ensure nil
|
||||
;; :init (setq c-ts-mode-indent-offset 4))
|
||||
|
||||
(provide 'init-c)
|
||||
|
||||
|
||||
@ -1,10 +1,23 @@
|
||||
;; init-chatgpt.el -*- lexical-binding: t -*-
|
||||
(use-package chatgpt-shell
|
||||
(use-package gptel
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:config
|
||||
(setq chatgpt-shell-openai-key custom-chatgpt-my-key))
|
||||
(use-package dall-e-shell
|
||||
(setq gptel-model "gpt-4o-mini")
|
||||
(setq gptel-api-key custom-chatgpt-my-key))
|
||||
|
||||
(use-package org-ai
|
||||
:straight t
|
||||
:ensure t
|
||||
:commands (org-ai-mode
|
||||
org-ai-global-mode)
|
||||
:init
|
||||
(add-hook 'org-mode-hook #'org-ai-mode) ; enable org-ai in org-mode
|
||||
(org-ai-global-mode) ; installs global keybindings on C-c M-a
|
||||
:config
|
||||
(setq dall-e-shell-openai-key custom-chatgpt-my-key))
|
||||
(setq org-ai-default-chat-model "gpt-4") ; if you are on the gpt-4 beta:
|
||||
(org-ai-install-yasnippets)) ; if you are using yasnippet and want `ai` snippets
|
||||
|
||||
(provide 'init-chatgpt)
|
||||
;;; init-chatgpt.el ends here
|
||||
|
||||
13
.config/emacs/lisp/init-copilot.el
Normal file
13
.config/emacs/lisp/init-copilot.el
Normal file
@ -0,0 +1,13 @@
|
||||
;; init-copilot.el -*- lexical-binding: t -*-
|
||||
|
||||
(use-package copilot
|
||||
:straight (:host github :repo "copilot-emacs/copilot.el" :files ("*.el"))
|
||||
:ensure t)
|
||||
;; :hook (prog-mode . copilot-mode))
|
||||
|
||||
(use-package copilot-chat
|
||||
:straight (:host github :repo "chep/copilot-chat.el" :files ("*.el"))
|
||||
:after (request org markdown-mode shell-maker))
|
||||
|
||||
(provide 'init-copilot)
|
||||
;;; init-copilot.el ends here
|
||||
@ -5,6 +5,9 @@
|
||||
;; Ctags IDE on the True Editor
|
||||
;; @see https://github.com/universal-ctags/citre#quick-start
|
||||
(use-package citre
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:commands citre-jump-back
|
||||
:functions xref-go-back
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
(require 'init-funcs)
|
||||
|
||||
(use-package dashboard
|
||||
:straight t
|
||||
:ensure t
|
||||
:diminish dashboard-mode
|
||||
:functions (nerd-icons-faicon
|
||||
nerd-icons-mdicon
|
||||
|
||||
@ -28,6 +28,9 @@
|
||||
;; (dap-auto-configure-mode +1)))
|
||||
|
||||
(use-package dap-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:config
|
||||
;; Enabling only some features
|
||||
(setq dap-auto-configure-features '(sessions locals controls tooltip))
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
;;; init-dict.el -*- lexical-binding: t -*-
|
||||
(require 'init-const)
|
||||
(use-package go-translate
|
||||
:init (setq gts-translate-list '(("en" "ko") ("ko" "en")))
|
||||
:config
|
||||
;; config the default translator, it will be used by command gts-do-translate
|
||||
(setq gts-default-translator
|
||||
(gts-translator
|
||||
:picker ; used to pick source text, from, to. choose one.
|
||||
|
||||
;;(gts-noprompt-picker)
|
||||
;;(gts-noprompt-picker :texter (gts-whole-buffer-texter))
|
||||
(gts-prompt-picker)
|
||||
;;(gts-prompt-picker :single t)
|
||||
;;(gts-prompt-picker :texter (gts-current-or-selection-texter) :single t)
|
||||
|
||||
:engines ; engines, one or more. Provide a parser to give different output.
|
||||
|
||||
(list
|
||||
(gts-bing-engine)
|
||||
(gts-google-engine)
|
||||
;;(gts-google-rpc-engine)
|
||||
;;(gts-deepl-engine :auth-key [YOUR_AUTH_KEY] :pro nil)
|
||||
;;(gts-google-engine :parser (gts-google-summary-parser))
|
||||
;;(gts-google-engine :parser (gts-google-parser))
|
||||
;;(gts-google-rpc-engine :parser (gts-google-rpc-summary-parser) :url "https://translate.google.com")
|
||||
;;(gts-google-rpc-engine :parser (gts-google-rpc-parser) :url "https://translate.google.com")
|
||||
)
|
||||
|
||||
:render ; render, only one, used to consumer the output result. Install posframe yourself when use gts-posframe-xxx
|
||||
|
||||
(gts-buffer-render)
|
||||
;;(gts-posframe-pop-render)
|
||||
;;(gts-posframe-pop-render :backcolor "#333333" :forecolor "#ffffff")
|
||||
;;(gts-posframe-pin-render)
|
||||
;;(gts-posframe-pin-render :position (cons 1200 20))
|
||||
;;(gts-posframe-pin-render :width 80 :height 25 :position (cons 1000 20) :forecolor "#ffffff" :backcolor "#111111")
|
||||
;;(gts-kill-ring-render)
|
||||
|
||||
:splitter ; optional, used to split text into several parts, and the translation result will be a list.
|
||||
|
||||
(gts-paragraph-splitter))))
|
||||
|
||||
(provide 'init-dict)
|
||||
;;; init-dict.el ends here
|
||||
@ -4,10 +4,13 @@
|
||||
|
||||
;; Directory operations
|
||||
(use-package dired
|
||||
:ensure nil
|
||||
:ensure nil ; built-in
|
||||
:hook (dired-mode . dired-omit-mode)
|
||||
:general
|
||||
(:keymaps 'dired-mode-map
|
||||
"C-c C-p" 'wdired-change-to-wdired-mode)
|
||||
"C-c C-p" 'wdired-change-to-wdired-mode
|
||||
"C-c C-r" 'dired-rsync)
|
||||
:custom (dired-omit-files (rx (seq bol ".")))
|
||||
:config
|
||||
;; Guess a default target directory
|
||||
(setq dired-dwim-target t)
|
||||
@ -18,54 +21,72 @@
|
||||
|
||||
;; Show directory first
|
||||
(setq dired-listing-switches "-alh --group-directories-first")
|
||||
|
||||
;; Quick sort dired buffers via hydra
|
||||
(use-package dired-quick-sort
|
||||
:hook (after-init . dired-quick-sort-setup)
|
||||
:init
|
||||
(setq dired-quick-sort-suppress-setup-warning t)
|
||||
:config
|
||||
(if (executable-find "fd")
|
||||
(evil-collection-define-key 'normal 'dired-mode-map
|
||||
"f" 'fd-dired)
|
||||
(evil-collection-define-key 'normal 'dired-mode-map
|
||||
"s" 'hydra-dired-quick-sort/body))
|
||||
|
||||
;; Show git info in dired
|
||||
(use-package dired-git-info)
|
||||
|
||||
;; Allow rsync from dired buffers
|
||||
(use-package dired-rsync
|
||||
:bind (:map dired-mode-map
|
||||
("C-c C-r" . dired-rsync)))
|
||||
|
||||
;; Colorful dired
|
||||
(use-package diredfl
|
||||
:hook (dired-mode . diredfl-mode))
|
||||
|
||||
;; Shows icons
|
||||
(use-package nerd-icons-dired
|
||||
:diminish
|
||||
:commands nerd-icons-dired-mode
|
||||
:custom-face
|
||||
(nerd-icons-dired-dir-face ((t (:inherit nerd-icons-dsilver :foreground unspecified))))
|
||||
:hook (dired-mode . nerd-icons-dired-mode))
|
||||
|
||||
;; Extra Dired functionality
|
||||
(use-package dired-aux :ensure nil)
|
||||
|
||||
(use-package dired-single
|
||||
:commands (dired dired-jump))
|
||||
(use-package dired-hide-dotfiles
|
||||
:hook (dired-mode) ;; hide default when dired-mode enabled.
|
||||
:config
|
||||
(evil-collection-define-key 'normal 'dired-mode-map
|
||||
"H" 'dired-hide-dotfiles-mode))
|
||||
"f" 'find-dired))
|
||||
(evil-collection-define-key 'normal 'dired-mode-map
|
||||
"." 'dired-omit-mode
|
||||
"h" 'dired-single-up-directory
|
||||
"l" 'dired-single-buffer
|
||||
")" 'dired-git-info-mode))
|
||||
")" 'dired-git-info-mode
|
||||
"s" 'hydra-dired-quick-sort/body))
|
||||
|
||||
;; Quick sort dired buffers via hydra
|
||||
(use-package dired-quick-sort
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook (after-init . dired-quick-sort-setup)
|
||||
:init
|
||||
(setq dired-quick-sort-suppress-setup-warning t))
|
||||
|
||||
;; Show git info in dired
|
||||
(use-package dired-git-info
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
;; Allow rsync from dired buffers
|
||||
(use-package dired-rsync
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
;; Colorful dired
|
||||
(use-package diredfl
|
||||
:straight t
|
||||
:ensure t
|
||||
:hook (dired-mode . diredfl-mode))
|
||||
|
||||
;; Shows icons
|
||||
(use-package nerd-icons-dired
|
||||
:straight t
|
||||
:ensure t
|
||||
:diminish
|
||||
:commands nerd-icons-dired-mode
|
||||
:custom-face
|
||||
(nerd-icons-dired-dir-face ((t (:inherit nerd-icons-dsilver :foreground unspecified))))
|
||||
:hook (dired-mode . nerd-icons-dired-mode))
|
||||
|
||||
;; Extra Dired functionality
|
||||
(use-package dired-aux ; built-in package
|
||||
:ensure nil)
|
||||
|
||||
(use-package dired-single
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:commands (dired dired-jump))
|
||||
|
||||
|
||||
;; `find-dired' alternative using `fd'
|
||||
(when (executable-find "fd")
|
||||
(use-package fd-dired))
|
||||
(use-package fd-dired
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t))
|
||||
|
||||
(provide 'init-dired)
|
||||
;;; init-dired.el ends here
|
||||
|
||||
@ -1,11 +1,17 @@
|
||||
;;; init-docker.el -*- lexical-binding: t -*-
|
||||
;; Docker
|
||||
(use-package docker
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:defines docker-image-run-arguments
|
||||
:init (setq docker-image-run-arguments '("-i" "-t" "--rm")
|
||||
docker-container-shell-file-name "/bin/bash"))
|
||||
;;(use-package docker-tramp)
|
||||
(use-package dockerfile-mode)
|
||||
|
||||
(use-package dockerfile-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
(provide 'init-docker)
|
||||
;;; init-docker.el ends here
|
||||
|
||||
@ -3,10 +3,14 @@
|
||||
(require 'init-funcs)
|
||||
|
||||
(use-package autorevert
|
||||
:ensure nil
|
||||
:straight t
|
||||
:ensure t
|
||||
:diminish
|
||||
:hook (after-init . global-auto-revert-mode))
|
||||
(use-package avy
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook (after-init . avy-setup-default)
|
||||
:config
|
||||
(setq avy-style 'de-bruijn
|
||||
@ -15,6 +19,8 @@
|
||||
avy-background t))
|
||||
;; Show number of matches in mode-line while searching
|
||||
(use-package anzu
|
||||
:straight t
|
||||
:ensure t
|
||||
:diminish
|
||||
;;:bind (([remap query-replace] . anzu-query-replace)
|
||||
;; ([remap query-replace-regexp] . anzu-query-replace-regexp)
|
||||
@ -22,10 +28,10 @@
|
||||
;; ([remap isearch-query-replace] . anzu-isearch-query-replace)
|
||||
;; ([remap isearch-query-replace-regexp] . anzu-isearch-query-replace-regexp))
|
||||
:hook (after-init . global-anzu-mode))
|
||||
(use-package ialign)
|
||||
|
||||
|
||||
(use-package undo-tree
|
||||
:straight t
|
||||
:ensure t
|
||||
:diminish
|
||||
:hook (after-init . global-undo-tree-mode)
|
||||
:custom
|
||||
@ -42,11 +48,12 @@
|
||||
undo-outer-limit (* 128 1024 1024)))
|
||||
|
||||
(use-package hideshow
|
||||
:ensure nil
|
||||
:straight t
|
||||
:ensure t
|
||||
:diminish hs-minor-mode
|
||||
:pretty-hydra
|
||||
((:title (pretty-hydra-title "HideShow" 'octicon "nf-oct-fold")
|
||||
:color amaranth :quit-key ("q" "C-g"))
|
||||
:color amaranth :quit-key ("q" "C-g"))
|
||||
("Fold"
|
||||
(("t" hs-toggle-all "toggle all")
|
||||
("a" hs-show-all "show all")
|
||||
@ -112,7 +119,16 @@
|
||||
|
||||
;; Hanlde minified code
|
||||
(use-package so-long
|
||||
:straight t
|
||||
:ensure t
|
||||
:hook (after-init . global-so-long-mode))
|
||||
|
||||
;; remote edit
|
||||
(use-package tramp
|
||||
:ensure nil
|
||||
:custom
|
||||
(tramp-default-method "ssh")
|
||||
(tramp-connection-timeout 5))
|
||||
|
||||
(provide 'init-edit)
|
||||
;;; init-edit.el ends here.
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
;;; init-eglot.el -*- lexical-binding: t -*-
|
||||
;;(use-package eglot
|
||||
;; :hook
|
||||
;; ((prog-mode . (lambda ()
|
||||
;; (unless (derived-mode-p
|
||||
;; 'emacs-lisp-mode
|
||||
;; 'lisp-mode
|
||||
;; 'makefile-mode
|
||||
;; 'snippet-mode)
|
||||
;; (eglot-ensure))))
|
||||
;; ((markdown-mode yaml-mode yaml-ts-mode) . eglot-ensure)))
|
||||
(provide 'init-eglot)
|
||||
;;; init-eglot.el ends here
|
||||
@ -18,9 +18,6 @@
|
||||
(when (boundp 'elisp-flymake-byte-compile-load-path)
|
||||
(add-to-list 'elisp-flymake-byte-compile-load-path load-path))
|
||||
|
||||
;; Syntax highlighting of known Elisp symbols
|
||||
(use-package highlight-defined
|
||||
:hook ((emacs-lisp-mode inferior-emacs-lisp-mode) . highlight-defined-mode))
|
||||
|
||||
(with-no-warnings
|
||||
;; Align indent keywords
|
||||
@ -183,6 +180,13 @@ Lisp function does not specify a special indentation."
|
||||
(revert-buffer nil t)))))))
|
||||
(bind-key "r" #'remove-hook-at-point help-mode-map)))
|
||||
|
||||
;; Syntax highlighting of known Elisp symbols
|
||||
(use-package highlight-defined
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook ((emacs-lisp-mode inferior-emacs-lisp-mode) . highlight-defined-mode))
|
||||
|
||||
;; Show function arglist or variable docstring
|
||||
;; `global-eldoc-mode' is enabled by default.
|
||||
(use-package eldoc
|
||||
@ -191,6 +195,9 @@ Lisp function does not specify a special indentation."
|
||||
|
||||
;; A better *Help* buffer
|
||||
(use-package helpful
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:bind (([remap describe-function] . helpful-callable)
|
||||
([remap describe-command] . helpful-command)
|
||||
([remap describe-variable] . helpful-variable)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
;;; init-eshell.el -*- lexical-binding: t -*-
|
||||
;; Emacs command shell
|
||||
(use-package eshell
|
||||
:ensure nil
|
||||
:ensure nil ; built-in
|
||||
:defines eshell-prompt-function
|
||||
:bind (:map eshell-mode-map
|
||||
([remap recenter-top-bottom] . eshell/clear))
|
||||
@ -71,44 +71,60 @@
|
||||
(forward-line line))
|
||||
(eshell-view-file (pop args)))))
|
||||
(defalias 'eshell/more #'eshell/less))
|
||||
(defun ju/get-prompt-path ()
|
||||
(let* ((current-path (eshell/pwd))
|
||||
(git-output (shell-command-to-string "git rev-parse --show-toplevel"))
|
||||
(has-path (not (string-match "^fatal" git-output))))
|
||||
(if (not has-path)
|
||||
(abbreviate-file-name current-path)
|
||||
(string-remove-prefix (file-name-directory git-output) current-path))))
|
||||
(defun ju/eshell-prompt ()
|
||||
(let ((current-branch (magit-get-current-branch)))
|
||||
(concat
|
||||
"\n"
|
||||
(propertize (system-name) 'face `(:foreground "#62aeed"))
|
||||
(propertize " ॐ " 'face `(:foreground "white"))
|
||||
(propertize (ju/get-prompt-path) 'face `(:foreground "#82cfd3"))
|
||||
|
||||
;;(defun ju/eshell-prompt ()
|
||||
;; (let ((current-branch (magit-get-current-branch)))
|
||||
;; (concat
|
||||
;; "\n"
|
||||
;; (propertize (system-name) 'face `(:foreground "#62aeed"))
|
||||
;; (propertize " ॐ " 'face `(:foreground "white"))
|
||||
;; (propertize (ju/get-prompt-path) 'face `(:foreground "#82cfd3"))
|
||||
;; (when current-branch
|
||||
;; (concat
|
||||
;; (propertize " • " 'face `(:foreground "white"))
|
||||
;; (propertize (concat " " current-branch) 'face `(:foreground "#c475f0"))))
|
||||
;; (propertize " • " 'face `(:foreground "white"))
|
||||
;; (propertize (format-time-string "%I:%M:%S %p") 'face `(:foreground "#5a5b7f"))
|
||||
;; (if (= (user-uid) 0)
|
||||
;; (propertize "\n#" 'face `(:foreground "red2"))
|
||||
;; (propertize "\nλ" 'face `(:foreground "#aece4a")))
|
||||
;; (propertize " " 'face `(:foreground "white")))))
|
||||
(when current-branch
|
||||
(concat
|
||||
(propertize " • " 'face `(:foreground "white"))
|
||||
(propertize (concat " " current-branch) 'face `(:foreground "#c475f0"))))
|
||||
(propertize " • " 'face `(:foreground "white"))
|
||||
(propertize (format-time-string "%I:%M:%S %p") 'face `(:foreground "#5a5b7f"))
|
||||
(if (= (user-uid) 0)
|
||||
(propertize "\n#" 'face `(:foreground "red2"))
|
||||
(propertize "\nλ" 'face `(:foreground "#aece4a")))
|
||||
(propertize " " 'face `(:foreground "white")))))
|
||||
|
||||
;;(setq eshell-prompt-function 'ju/eshell-prompt
|
||||
;; eshell-prompt-regexp "^λ ")
|
||||
(setq eshell-prompt-function 'ju/eshell-prompt
|
||||
eshell-prompt-regexp "^λ "))
|
||||
|
||||
|
||||
;; Display extra information for prompt
|
||||
(use-package eshell-prompt-extras
|
||||
:after esh-opt
|
||||
:defines eshell-highlight-prompt
|
||||
:autoload (epe-theme-lambda epe-theme-dakrone epe-theme-pipeline)
|
||||
:init (setq eshell-highlight-prompt t
|
||||
eshell-prompt-function #'epe-theme-lambda))
|
||||
;; Display extra information for prompt
|
||||
(use-package eshell-prompt-extras
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:after esh-opt
|
||||
:defines eshell-highlight-prompt
|
||||
:autoload (epe-theme-lambda epe-theme-dakrone epe-theme-pipeline)
|
||||
:init (setq eshell-highlight-prompt t
|
||||
eshell-prompt-function #'epe-theme-lambda))
|
||||
|
||||
;; `eldoc' support
|
||||
(use-package esh-help
|
||||
:init (setup-esh-help-eldoc))
|
||||
;; `eldoc' support
|
||||
(use-package esh-help
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:init (setup-esh-help-eldoc))
|
||||
|
||||
;; `cd' to frequent directory in `eshell'
|
||||
(use-package eshell-z
|
||||
:hook (eshell-mode . (lambda () (require 'eshell-z)))))
|
||||
;; `cd' to frequent directory in `eshell'
|
||||
(use-package eshell-z
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook (eshell-mode . (lambda () (require 'eshell-z))))
|
||||
|
||||
|
||||
(provide 'init-eshell)
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
(require 'init-funcs)
|
||||
|
||||
(use-package evil
|
||||
:ensure nil
|
||||
:straight t
|
||||
:ensure t
|
||||
:diminish
|
||||
:hook (after-init . evil-mode)
|
||||
:init
|
||||
@ -25,24 +26,28 @@
|
||||
;; eshell no evil
|
||||
(dolist (mode '(eshell-mode))
|
||||
(add-to-list 'evil-emacs-state-modes mode)))
|
||||
|
||||
(with-eval-after-load 'evil
|
||||
(defalias #'forward-evil-word #'forward-evil-symbol)
|
||||
;; make evil-search-word look for symbol rather than word boundaries
|
||||
(setq-default evil-symbol-word-search t))
|
||||
(defalias #'forward-evil-word #'forward-evil-symbol)
|
||||
;; make evil-search-word look for symbol rather than word boundaries
|
||||
(setq-default evil-symbol-word-search t))
|
||||
(use-package evil-collection
|
||||
:defer nil
|
||||
:straight t
|
||||
:ensure t
|
||||
:config
|
||||
(evil-collection-init))
|
||||
|
||||
(use-package evil-nerd-commenter
|
||||
:defer nil
|
||||
:straight t
|
||||
:ensure t
|
||||
:config
|
||||
;; evil nerd commenter
|
||||
(define-key evil-normal-state-map (kbd "g c") 'evilnc-comment-or-uncomment-lines)
|
||||
(define-key evil-visual-state-map (kbd "g c") 'evilnc-comment-or-uncomment-lines))
|
||||
|
||||
(use-package evil-numbers
|
||||
:defer nil
|
||||
:straight t
|
||||
:ensure t
|
||||
:config
|
||||
;; evil numbers
|
||||
;; unfortunately C-x is emacs common key binding.
|
||||
|
||||
@ -1,6 +1,12 @@
|
||||
;; init-extra.el -*- lexical-binding: t -*-
|
||||
(use-package gnuplot)
|
||||
(use-package graphviz-dot-mode)
|
||||
(use-package gnuplot
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
(use-package graphviz-dot-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
(provide 'init-extra)
|
||||
;;; init-extra.el ends here
|
||||
|
||||
@ -3,6 +3,9 @@
|
||||
(require 'init-funcs)
|
||||
|
||||
(use-package flycheck
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:autoload flycheck-redefine-standard-error-levels
|
||||
:hook (after-init . global-flycheck-mode)
|
||||
@ -20,51 +23,56 @@
|
||||
(when (fboundp 'define-fringe-bitmap)
|
||||
(define-fringe-bitmap 'flycheck-fringe-bitmap-arrow
|
||||
[16 48 112 240 112 48 16] nil nil 'center))
|
||||
(flycheck-redefine-standard-error-levels "⏴" 'flycheck-fringe-bitmap-arrow)
|
||||
|
||||
;; Display Flycheck errors
|
||||
(if (childframe-workable-p)
|
||||
(use-package flycheck-posframe
|
||||
:custom-face
|
||||
(flycheck-posframe-face ((t (:foreground ,(face-foreground 'success)))))
|
||||
(flycheck-posframe-info-face ((t (:foreground ,(face-foreground 'success)))))
|
||||
(flycheck-posframe-background-face ((t (:inherit tooltip))))
|
||||
(flycheck-posframe-border-face ((t (:inherit posframe-border))))
|
||||
:hook (flycheck-mode . flycheck-posframe-mode)
|
||||
:init
|
||||
(setq flycheck-posframe-border-width 1)
|
||||
(add-hook 'flycheck-posframe-inhibit-functions
|
||||
(lambda (&rest _) (bound-and-true-p company-backend)))
|
||||
:config
|
||||
(with-no-warnings
|
||||
;; FIXME: Prettify the child frame.
|
||||
;; @see https://github.com/alexmurray/flycheck-posframe/issues/28
|
||||
(defun my-flycheck-posframe-show-posframe (errors)
|
||||
"Display ERRORS, using posframe.el library."
|
||||
(posframe-hide flycheck-posframe-buffer)
|
||||
(when (and errors
|
||||
(not (run-hook-with-args-until-success 'flycheck-posframe-inhibit-functions)))
|
||||
(let ((poshandler (intern (format "posframe-poshandler-%s" flycheck-posframe-position))))
|
||||
(unless (functionp poshandler)
|
||||
(setq poshandler nil))
|
||||
(flycheck-posframe-check-position)
|
||||
(posframe-show
|
||||
flycheck-posframe-buffer
|
||||
:string (flycheck-posframe-format-errors errors)
|
||||
:background-color (face-background 'flycheck-posframe-background-face nil t)
|
||||
:position (point)
|
||||
:left-fringe 4
|
||||
:right-fringe 4
|
||||
:max-width (round (* (frame-width) 0.62))
|
||||
:max-height (round (* (frame-height) 0.62))
|
||||
:internal-border-width flycheck-posframe-border-width
|
||||
:internal-border-color (face-background 'flycheck-posframe-border-face nil t)
|
||||
:poshandler poshandler
|
||||
:hidehandler #'flycheck-posframe-hidehandler))))
|
||||
(advice-add #'flycheck-posframe-show-posframe :override #'my-flycheck-posframe-show-posframe)))
|
||||
(use-package flycheck-popup-tip
|
||||
:hook (flycheck-mode . flycheck-popup-tip-mode))))
|
||||
(flycheck-redefine-standard-error-levels "⏴" 'flycheck-fringe-bitmap-arrow))
|
||||
|
||||
;; Display Flycheck errors
|
||||
(if (childframe-workable-p)
|
||||
(use-package flycheck-posframe
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:custom-face
|
||||
(flycheck-posframe-face ((t (:foreground ,(face-foreground 'success)))))
|
||||
(flycheck-posframe-info-face ((t (:foreground ,(face-foreground 'success)))))
|
||||
(flycheck-posframe-background-face ((t (:inherit tooltip))))
|
||||
(flycheck-posframe-border-face ((t (:inherit posframe-border))))
|
||||
:hook (flycheck-mode . flycheck-posframe-mode)
|
||||
:init
|
||||
(setq flycheck-posframe-border-width 1)
|
||||
(add-hook 'flycheck-posframe-inhibit-functions
|
||||
(lambda (&rest _) (bound-and-true-p company-backend)))
|
||||
:config
|
||||
(with-no-warnings
|
||||
;; FIXME: Prettify the child frame.
|
||||
;; @see https://github.com/alexmurray/flycheck-posframe/issues/28
|
||||
(defun my-flycheck-posframe-show-posframe (errors)
|
||||
"Display ERRORS, using posframe.el library."
|
||||
(posframe-hide flycheck-posframe-buffer)
|
||||
(when (and errors
|
||||
(not (run-hook-with-args-until-success 'flycheck-posframe-inhibit-functions)))
|
||||
(let ((poshandler (intern (format "posframe-poshandler-%s" flycheck-posframe-position))))
|
||||
(unless (functionp poshandler)
|
||||
(setq poshandler nil))
|
||||
(flycheck-posframe-check-position)
|
||||
(posframe-show
|
||||
flycheck-posframe-buffer
|
||||
:string (flycheck-posframe-format-errors errors)
|
||||
:background-color (face-background 'flycheck-posframe-background-face nil t)
|
||||
:position (point)
|
||||
:left-fringe 4
|
||||
:right-fringe 4
|
||||
:max-width (round (* (frame-width) 0.62))
|
||||
:max-height (round (* (frame-height) 0.62))
|
||||
:internal-border-width flycheck-posframe-border-width
|
||||
:internal-border-color (face-background 'flycheck-posframe-border-face nil t)
|
||||
:poshandler poshandler
|
||||
:hidehandler #'flycheck-posframe-hidehandler))))
|
||||
(advice-add #'flycheck-posframe-show-posframe :override #'my-flycheck-posframe-show-posframe)))
|
||||
(use-package flycheck-popup-tip
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook (flycheck-mode . flycheck-popup-tip-mode)))
|
||||
|
||||
(provide 'init-flycheck)
|
||||
;;; init-flycheck.el ends here
|
||||
|
||||
@ -11,10 +11,13 @@
|
||||
(global-set-key (kbd "C-=") 'text-scale-increase)
|
||||
(global-set-key (kbd "C--") 'text-scale-decrease)
|
||||
|
||||
; TODO move to hideshow
|
||||
(global-set-key (kbd "C-<tab>") 'hs-toggle-hiding)
|
||||
|
||||
;; When you begin a keybind, whichkey will show you all keybinds you can follow the first one with in order to form a full keywords.
|
||||
(use-package which-key
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:init (which-key-mode)
|
||||
:diminish which-key-mode
|
||||
@ -22,6 +25,9 @@
|
||||
(setq which-key-idle-delay 0.5))
|
||||
|
||||
(use-package general
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:init
|
||||
(general-auto-unbind-keys)
|
||||
:config
|
||||
@ -135,7 +141,9 @@
|
||||
;; Avy
|
||||
"v" '(:ignore t :which-key "Avy")
|
||||
"vc" '(avy-goto-char :which-key "Avy Goto Char")
|
||||
"vw" '(avy-goto-word-0 :which-key "Avy Goto Word")
|
||||
"ve" '(avy-goto-char-2 :which-key "Avy Goto Char - 2")
|
||||
"vq" '(avy-goto-word-0 :which-key "Avy Goto Word")
|
||||
"vw" '(avy-goto-word-1 :which-key "Avy Goto Word - 1")
|
||||
"vl" '(avy-goto-line :which-key "Avy Goto Line"))
|
||||
|
||||
(provide 'init-general)
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
(require 'init-funcs)
|
||||
|
||||
(use-package hl-line
|
||||
:ensure nil
|
||||
:ensure nil ;; built-in package
|
||||
:hook ((after-init . global-hl-line-mode)
|
||||
((dashboard-mode eshell-mode shell-mode term-mode vterm-mode) .
|
||||
(lambda () (setq-local global-hl-line-mode nil))))
|
||||
@ -11,6 +11,9 @@
|
||||
(set-face-background 'hl-line "gray8"))
|
||||
|
||||
(use-package symbol-overlay
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:custom-face
|
||||
;;(symbol-overlay-default-face ((t (:inherit region :background unspecified :foreground unspecified))))
|
||||
@ -43,10 +46,18 @@
|
||||
(interactive)
|
||||
(when (derived-mode-p 'prog-mode 'yaml-mode)
|
||||
(symbol-overlay-mode 1)))
|
||||
(advice-add #'deactivate-mark :after #'turn-on-symbol-overlay)))
|
||||
(advice-add #'deactivate-mark :after #'turn-on-symbol-overlay))
|
||||
(define-key symbol-overlay-map (kbd "h") nil)
|
||||
(define-key symbol-overlay-map (kbd "d") nil)
|
||||
(define-key symbol-overlay-map (kbd "c") nil)
|
||||
(define-key symbol-overlay-map (kbd "y") nil)
|
||||
(define-key symbol-overlay-map (kbd "g") 'symbol-overlay-map-help))
|
||||
|
||||
;; Colorize color names in buffers
|
||||
(use-package rainbow-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:defines helpful-mode-map
|
||||
:bind (:map help-mode-map
|
||||
@ -74,10 +85,16 @@
|
||||
|
||||
;; Highlight brackets according to their depth
|
||||
(use-package rainbow-delimiters
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook (prog-mode . rainbow-delimiters-mode))
|
||||
|
||||
;; keywords from doom-emacs
|
||||
(use-package hl-todo
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:custom-face
|
||||
(hl-todo ((t (:inherit default :height 0.9 :width condensed :weight bold :underline nil :inverse-video t))))
|
||||
:hook (after-init . global-hl-todo-mode)
|
||||
@ -110,6 +127,9 @@
|
||||
(add-to-list 'hl-todo-keyword-faces `(,keyword . "#8d9eaf"))))
|
||||
|
||||
(use-package diff-hl
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook ((after-init . global-diff-hl-mode)
|
||||
(magit-post-refresh . diff-hl-magit-post-refresh)
|
||||
(dired-mode . diff-hl-dired-mode-unless-remote))
|
||||
@ -143,7 +163,7 @@
|
||||
(add-hook 'magit-post-refresh-hook #'diff-hl-magit-post-refresh))))
|
||||
;; Pulse current line
|
||||
(use-package pulse
|
||||
:ensure nil
|
||||
:ensure nil ;; built-in
|
||||
:custom-face
|
||||
(pulse-highlight-start-face ((t (:inherit region :background unspecified))))
|
||||
(pulse-highlight-face ((t (:inherit region :background unspecified :extend t))))
|
||||
|
||||
@ -2,10 +2,15 @@
|
||||
(require 'init-const)
|
||||
(require 'init-funcs)
|
||||
(use-package hydra
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook (emacs-lisp-mode . hydra-add-imenu))
|
||||
|
||||
;; TODO
|
||||
(use-package pretty-hydra
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:bind ("<f6>" . toggles-hydra/body)
|
||||
:hook (emacs-lisp-mode . (lambda ()
|
||||
(add-to-list
|
||||
@ -23,7 +28,7 @@
|
||||
(concat
|
||||
(when (and (icons-displayable-p) icon-type icon-name)
|
||||
(let ((f (intern (format "nerd-icons-%s" icon-type))))
|
||||
;;(let ((f (intern (format "all-the-icons-%s" icon-type))))
|
||||
;;(let ((f (intern (format "all-the-icons-%s" icon-type))))
|
||||
(when (fboundp f)
|
||||
(concat
|
||||
(apply f (list icon-name :face face :height height :v-adjust v-adjust))
|
||||
|
||||
@ -3,20 +3,30 @@
|
||||
(require 'init-funcs)
|
||||
|
||||
(use-package ibuffer
|
||||
:ensure nil
|
||||
:init (setq ibuffer-filter-group-name-face '(:inherit (font-lock-string-face bold)))
|
||||
:config
|
||||
;; Display icons for buffers
|
||||
(use-package nerd-icons-ibuffer
|
||||
:hook (ibuffer-mode . nerd-icons-ibuffer-mode)
|
||||
:init (setq nerd-icons-ibuffer-icon t)))
|
||||
:ensure nil ; built-in
|
||||
:init
|
||||
(setq ibuffer-filter-group-name-face
|
||||
'(:inherit (font-lock-string-face bold))))
|
||||
(use-package nerd-icons-ibuffer
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook
|
||||
(ibuffer-mode . nerd-icons-ibuffer-mode)
|
||||
:init
|
||||
(setq nerd-icons-ibuffer-icon t))
|
||||
;; Group ibuffer's list by project
|
||||
(use-package ibuffer-project
|
||||
:hook (ibuffer . (lambda ()
|
||||
(setq ibuffer-filter-groups (ibuffer-project-generate-filter-groups))
|
||||
(unless (eq ibuffer-sorting-mode 'project-file-relative)
|
||||
(ibuffer-do-sort-by-project-file-relative))))
|
||||
:init (setq ibuffer-project-use-cache t)
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook
|
||||
(ibuffer . (lambda ()
|
||||
(setq ibuffer-filter-groups (ibuffer-project-generate-filter-groups))
|
||||
(unless (eq ibuffer-sorting-mode 'project-file-relative)
|
||||
(ibuffer-do-sort-by-project-file-relative))))
|
||||
:init
|
||||
(setq ibuffer-project-use-cache t)
|
||||
:config
|
||||
(add-to-list 'ibuffer-project-root-functions '(file-remote-p . "Remote"))
|
||||
(add-to-list 'ibuffer-project-root-functions '("\\*.+\\*" . "Default")))
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
;;; init-latex.el -*- lexical-binding: t -*-
|
||||
(use-package auctex
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:custom
|
||||
(TeX-auto-save t)
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
;;; init-markdown.el -*- lexical-binding: t -*-
|
||||
;; using multimarkdown compiler, could be found at AUR
|
||||
(use-package markdown-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:mode ("README\\.md\\'" . gfm-mode)
|
||||
:init (setq markdown-command "multimarkdown")
|
||||
(setq markdown-enable-wiki-links t
|
||||
@ -9,6 +12,15 @@
|
||||
markdown-make-gfm-checkboxes-buttons t
|
||||
markdown-gfm-uppercase-checkbox t
|
||||
markdown-fontify-code-blocks-natively t))
|
||||
|
||||
(use-package grip-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
;; :config (setq grip-use-mdopen t) ;; to use `mdopen` instead of `grip`
|
||||
:bind (:map markdown-mode-command-map
|
||||
("g" . grip-mode)))
|
||||
|
||||
(provide 'init-markdown)
|
||||
|
||||
;;; init-markdown.el ends here
|
||||
|
||||
@ -4,12 +4,12 @@
|
||||
(require 'init-custom)
|
||||
|
||||
(use-package org
|
||||
:ensure nil
|
||||
:straight (:type built-in)
|
||||
:custom-face (org-ellipsis ((t (:foreground unspecified))))
|
||||
:pretty-hydra
|
||||
;; See `org-structure-template-alist'
|
||||
((:title (pretty-hydra-title "Org Template" 'sucicon "nf-custom-orgmode" :face 'nerd-icons-green)
|
||||
:color blue :quit-key ("q" "C-g"))
|
||||
:color blue :quit-key ("q" "C-g"))
|
||||
("Basic"
|
||||
(("a" (hot-expand "<a") "ascii")
|
||||
("c" (hot-expand "<c") "center")
|
||||
@ -145,31 +145,9 @@ prepended to the element after the #+HEADER: tag."
|
||||
org-startup-indented t
|
||||
org-ellipsis (if (char-displayable-p ?⏷) "\t⤵" nil)
|
||||
org-pretty-entities nil
|
||||
org-hide-emphasis-markers t)
|
||||
org-hide-emphasis-markers t
|
||||
|
||||
|
||||
|
||||
(use-package org-journal
|
||||
:defer t
|
||||
:config
|
||||
(setq org-journal-dir (expand-file-name "journal/" org-directory))
|
||||
(setq org-journal-file-type 'weekly))
|
||||
|
||||
;; Add new template
|
||||
(add-to-list 'org-structure-template-alist '("n" . "note"))
|
||||
|
||||
(use-package org-modern
|
||||
:hook ((org-mode . org-modern-mode)
|
||||
(org-agenda-finalize . org-modern-agenda))
|
||||
:config
|
||||
(setq org-modern-table nil))
|
||||
|
||||
(use-package valign
|
||||
:hook (org-mode . valign-mode)
|
||||
:custom
|
||||
(valign-fancy-bar t))
|
||||
|
||||
(setq org-confirm-babel-evaluate nil
|
||||
org-confirm-babel-evaluate nil
|
||||
org-src-fontify-natively t
|
||||
org-src-tab-acts-natively t)
|
||||
|
||||
@ -177,8 +155,9 @@ prepended to the element after the #+HEADER: tag."
|
||||
'((emacs-lisp . t)
|
||||
(python . t)
|
||||
(ruby . t)
|
||||
(rust . t)
|
||||
(C . t))
|
||||
(C . t)
|
||||
(dot . t)
|
||||
(shell . t))
|
||||
"Alist of org ob languages.")
|
||||
;;(unless ON-WINDOWS
|
||||
;; (add-to-list 'load-language-alist '(latex-as-png . t)))
|
||||
@ -194,70 +173,13 @@ prepended to the element after the #+HEADER: tag."
|
||||
(add-to-list 'org-structure-template-alist '("oc" . "src octave"))
|
||||
(add-to-list 'org-structure-template-alist '("vl" . "src verilog"))
|
||||
(add-to-list 'org-structure-template-alist '("vh" . "src vhdl"))
|
||||
(add-to-list 'org-structure-template-alist '("n" . "note"))
|
||||
(org-babel-do-load-languages 'org-babel-load-languages
|
||||
load-language-alist)
|
||||
|
||||
;; ob-sh renamed to ob-shell since 26.1.
|
||||
(cl-pushnew '(shell . t) load-language-alist)
|
||||
|
||||
(use-package ob-go
|
||||
:init (cl-pushnew '(go . t) load-language-alist))
|
||||
|
||||
(use-package ob-rust
|
||||
:init (cl-pushnew '(rust . t) load-language-alist))
|
||||
(org-babel-do-load-languages 'org-babel-load-languages
|
||||
load-language-alist)
|
||||
;; Auto-toggle Org LaTeX fragments
|
||||
(use-package org-fragtog
|
||||
:diminish
|
||||
:hook (org-mode . org-fragtog-mode))
|
||||
;; Make invisible parts of Org elements appear visible.
|
||||
(use-package org-appear
|
||||
:hook (org-mode)
|
||||
:config
|
||||
(setq org-appear-autoemphasis t
|
||||
org-appear-autolinks t
|
||||
org-appear-autoentities t
|
||||
org-appear-autosubmarkers t))
|
||||
;; Presentation
|
||||
(use-package org-tree-slide
|
||||
:diminish
|
||||
:functions (org-display-inline-images
|
||||
org-remove-inline-images)
|
||||
:bind (:map org-mode-map
|
||||
("s-<f7>" . org-tree-slide-mode))
|
||||
:hook ((org-tree-slide-play . (lambda ()
|
||||
(text-scale-increase 4)
|
||||
(org-display-inline-images)
|
||||
(read-only-mode 1)))
|
||||
(org-tree-slide-stop . (lambda ()
|
||||
(text-scale-increase 0)
|
||||
(org-remove-inline-images)
|
||||
(read-only-mode -1))))
|
||||
:init (setq org-tree-slide-header nil
|
||||
org-tree-slide-slide-in-effect t
|
||||
org-tree-slide-heading-emphasis nil
|
||||
org-tree-slide-cursor-init t
|
||||
org-tree-slide-modeline-display 'outside
|
||||
org-tree-slide-skip-done nil
|
||||
org-tree-slide-skip-comments t
|
||||
org-tree-slide-skip-outline-level 3))
|
||||
;; support drawio
|
||||
(use-package org-drawio
|
||||
:commands (org-drawio-add
|
||||
org-drawio-open)
|
||||
:custom ((org-drawio-input-dir "./draws")
|
||||
(org-drawio-output-dir "./images")
|
||||
(org-drawio-output-page "0")
|
||||
;; set to t, if you want to crop the image.
|
||||
(org-drawio-crop t)))
|
||||
; attachment ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(use-package org-contrib ;; to use org-screenshot-take
|
||||
:defer t)
|
||||
(use-package org-attach-screenshot
|
||||
:defer t)
|
||||
(use-package org-download
|
||||
:defer t)
|
||||
(use-package ob-latex-as-png
|
||||
:ensure t)
|
||||
; useful functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(defun my/org-remove-link-and-trash-linked-file ()
|
||||
"Remove `org-mode' link at point and trash linked file."
|
||||
(interactive)
|
||||
@ -303,40 +225,141 @@ prepended to the element after the #+HEADER: tag."
|
||||
(user-error
|
||||
"Error pasting the image, make sure you have an image in the clipboard!"))))
|
||||
(defun org-time-stamp-with-time()
|
||||
"Insert org mode timestamp at point with current date and time"
|
||||
(interactive)
|
||||
(org-insert-time-stamp (current-time) t))
|
||||
; org-roam ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(use-package org-roam
|
||||
:demand t ;; ensure org-roam is loaded by default
|
||||
:custom
|
||||
(org-roam-directory custom-org-roam-directory)
|
||||
(org-roam-node-display-template (concat "${title:*} " (propertize "${tags:*}" 'face 'org-tag)))
|
||||
;;(org-roam-completion-everywhere t)
|
||||
:config
|
||||
(setq org-roam-capture-templates
|
||||
'(("d" "default" plain "%?"
|
||||
:target
|
||||
(file+head
|
||||
"%<%Y%m%d%H%M%S>-${slug}.org"
|
||||
"#+title: ${title}\n")
|
||||
:unnarrowed t)
|
||||
("p" "project" plain "* TODO %?"
|
||||
:target
|
||||
(file+head+olp
|
||||
"%<%Y%m%d%H%M%S>-${slug}.org"
|
||||
"#+title: ${title}\n#+category: ${title}\n#+filetags: Project"
|
||||
("Tasks"))
|
||||
:unnarrowed t)))
|
||||
(org-roam-db-autosync-mode))
|
||||
;; Org roam ui
|
||||
(use-package org-roam-ui
|
||||
:defer t
|
||||
:config
|
||||
(setq org-roam-ui-sync-theme t
|
||||
org-roam-ui-follow t
|
||||
org-roam-ui-update-on-save t
|
||||
org-roam-ui-open-on-start nil))
|
||||
"Insert org mode timestamp at point with current date and time"
|
||||
(interactive)
|
||||
(org-insert-time-stamp (current-time) t)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Org mode improvement ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(use-package org-journal
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:config
|
||||
(setq org-journal-dir (expand-file-name "journal/" org-directory))
|
||||
(setq org-journal-file-type 'weekly))
|
||||
(use-package org-noter
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:config
|
||||
(setq org-noter-always-create-frame nil
|
||||
org-noter-hide-other nil
|
||||
org-noter-notes-search-path '("~/org/notes")
|
||||
org-noter-separate-notes-from-heading t
|
||||
org-noter-highlight-selected-text t)
|
||||
(org-noter-enable-org-roam-integration))
|
||||
|
||||
(use-package org-modern
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook ((org-mode . org-modern-mode)
|
||||
(org-agenda-finalize . org-modern-agenda))
|
||||
:config
|
||||
(setq org-modern-table nil)
|
||||
(setq org-modern-todo-faces
|
||||
(quote (("TODO" :background "#E6DA73" :foreground "#666666")
|
||||
("PROJ" :background "#50B7D9" :foreground "#666666")
|
||||
("STRT" :background "#A1DC2D" :foreground "#666666")
|
||||
("WAIT" :background "#9E54FD" :foreground "#666666")
|
||||
("HOLD" :background "#9E54FD" :foreground "#666666")
|
||||
("IDEA" :background "#FF7F00" :foreground "#666666")
|
||||
("DONE" :background "#C7C7C7" :foreground "#666666")
|
||||
("KILL" :background "#C7C7C7" :foreground "#666666")))))
|
||||
|
||||
;; (use-package valign
|
||||
;; :straight t
|
||||
;; :ensure t
|
||||
;; :defer t
|
||||
;; :hook (org-mode . valign-mode)
|
||||
;; :custom
|
||||
;; (valign-fancy-bar t))
|
||||
|
||||
|
||||
;; Auto-toggle Org LaTeX fragments
|
||||
(use-package org-fragtog
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:hook (org-mode . org-fragtog-mode))
|
||||
;; Make invisible parts of Org elements appear visible.
|
||||
(use-package org-appear
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook (org-mode . org-appear-mode)
|
||||
:config
|
||||
(setq org-appear-autoemphasis t
|
||||
org-appear-autolinks t
|
||||
org-appear-autoentities t
|
||||
org-appear-autosubmarkers t))
|
||||
;; support drawio
|
||||
(use-package org-drawio
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:commands (org-drawio-add
|
||||
org-drawio-open)
|
||||
:custom ((org-drawio-input-dir "./draws")
|
||||
(org-drawio-output-dir "./images")
|
||||
(org-drawio-output-page "0")
|
||||
;; set to t, if you want to crop the image.
|
||||
(org-drawio-crop t)))
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Org mode attachment ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(use-package org-contrib ;; to use org-screenshot-take
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
(use-package org-attach-screenshot
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
(use-package org-download
|
||||
:after org
|
||||
:straight t
|
||||
:ensure t
|
||||
:demand t
|
||||
:init
|
||||
(setq org-download-image-dir "./images")
|
||||
(setq org-download-heading-lvl nil)
|
||||
:config
|
||||
(org-download-enable))
|
||||
(use-package ob-latex-as-png
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Org roam ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(use-package org-roam
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:demand t ;; ensure org-roam is loaded by default
|
||||
:custom
|
||||
(org-roam-directory custom-org-roam-directory)
|
||||
(org-roam-node-display-template (concat "${title:*} " (propertize "${tags:*}" 'face 'org-tag)))
|
||||
;;(org-roam-completion-everywhere t)
|
||||
:config
|
||||
(setq org-roam-capture-templates
|
||||
'(("d" "default" plain "%?"
|
||||
:target
|
||||
(file+head
|
||||
"%<%Y%m%d%H%M%S>-${slug}.org"
|
||||
"#+title: ${title}\n")
|
||||
:unnarrowed t)
|
||||
("p" "project" plain "* TODO %?"
|
||||
:target
|
||||
(file+head+olp
|
||||
"%<%Y%m%d%H%M%S>-${slug}.org"
|
||||
"#+title: ${title}\n#+category: ${title}\n#+filetags: Project"
|
||||
("Tasks"))
|
||||
:unnarrowed t)))
|
||||
;; functions
|
||||
(defun my/org-roam-rg-search ()
|
||||
"Search org-roam directory using consult-ripgrep. With live-preview."
|
||||
@ -365,33 +388,45 @@ prepended to the element after the #+HEADER: tag."
|
||||
(unless org-note-abort
|
||||
(with-current-buffer (org-capture-get :buffer)
|
||||
(add-to-list 'org-agenda-files (buffer-file-name)))))
|
||||
; Tools ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(use-package ob-async
|
||||
:config
|
||||
(setq ob-async-no-async-languages-alist '("ipython")))
|
||||
(unless ON-WINDOWS
|
||||
(use-package org-pdftools
|
||||
:hook (org-mode . org-pdftools-setup-link)))
|
||||
; Exporter ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(use-package ox-hugo
|
||||
:defer t
|
||||
:after ox)
|
||||
(setq org-latex-minted-options '(("breaklines" "true")
|
||||
("tabsize" "4")
|
||||
("autogobble")
|
||||
("breakanywhere" "true")
|
||||
("bgcolor" "gray!40")
|
||||
("frame" "single")
|
||||
("numbers" "left")))
|
||||
(setq org-latex-listings 'minted
|
||||
org-latex-packages-alist '(("" "minted"))
|
||||
org-latex-pdf-process
|
||||
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
|
||||
"pdflatex -interaction nonstopmode -output-directory %o %f"))
|
||||
(with-eval-after-load 'ox-latex
|
||||
(add-to-list 'org-latex-classes
|
||||
'("article"
|
||||
"\\documentclass[11pt,a4paper]{article}
|
||||
|
||||
; database sync
|
||||
(org-roam-db-autosync-mode))
|
||||
;; Org roam ui
|
||||
(use-package org-roam-ui
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:config
|
||||
(setq org-roam-ui-sync-theme t
|
||||
org-roam-ui-follow t
|
||||
org-roam-ui-update-on-save t
|
||||
org-roam-ui-open-on-start nil))
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Org mode exporter ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(use-package ox-hugo
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:after ox)
|
||||
|
||||
(setq org-latex-minted-options
|
||||
'(("breaklines" "true")
|
||||
("tabsize" "4")
|
||||
("autogobble")
|
||||
("breakanywhere" "true")
|
||||
("bgcolor" "gray!40")
|
||||
("frame" "single")
|
||||
("numbers" "left")))
|
||||
(setq org-latex-listings 'minted
|
||||
org-latex-packages-alist '(("" "minted"))
|
||||
org-latex-pdf-process
|
||||
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
|
||||
"pdflatex -interaction nonstopmode -output-directory %o %f"))
|
||||
(with-eval-after-load 'ox-latex
|
||||
(add-to-list 'org-latex-classes
|
||||
'("article"
|
||||
"\\documentclass[11pt,a4paper]{article}
|
||||
\\usepackage[left=2.5cm,right=2.5cm,top=3cm,bottom=3cm,a4paper]{geometry}
|
||||
[DEFAULT-PACKAGES]
|
||||
\\usepackage{kotex}
|
||||
@ -399,13 +434,13 @@ prepended to the element after the #+HEADER: tag."
|
||||
[EXTRA]
|
||||
\\linespread{1.1}
|
||||
\\hypersetup{pdfborder=0 0 0}"
|
||||
("\\section{%s}" . "\\section*{%s}")
|
||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||
("\\paragraph{%s}" . "\\paragraph*{%s}")))
|
||||
(add-to-list 'org-latex-classes
|
||||
'("org-plain-latex"
|
||||
"\\documentclass[a4paper,11pt,titlepage]{memoir}
|
||||
("\\section{%s}" . "\\section*{%s}")
|
||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||
("\\paragraph{%s}" . "\\paragraph*{%s}")))
|
||||
(add-to-list 'org-latex-classes
|
||||
'("org-plain-latex"
|
||||
"\\documentclass[a4paper,11pt,titlepage]{memoir}
|
||||
\\usepackage[left=2.5cm,right=2.5cm,top=3cm,bottom=3cm,a4paper]{geometry}
|
||||
[DEFAULT-PACKAGES]
|
||||
\\usepackage{kotex}
|
||||
@ -413,16 +448,29 @@ prepended to the element after the #+HEADER: tag."
|
||||
[EXTRA]
|
||||
\\linespread{1.1}
|
||||
\\hypersetup{pdfborder=0 0 0}"
|
||||
("\\chapter{%s}" . "\\chapter*{%s}")
|
||||
("\\section{%s}" . "\\section*{%s}")
|
||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
||||
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))))
|
||||
("\\chapter{%s}" . "\\chapter*{%s}")
|
||||
("\\section{%s}" . "\\section*{%s}")
|
||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
||||
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))))
|
||||
|
||||
;; support calendar
|
||||
(use-package calfw)
|
||||
(use-package calfw-org
|
||||
:after calfw)
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Org babel related ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(use-package ob-async
|
||||
:straight t
|
||||
:ensure t
|
||||
:config
|
||||
(setq ob-async-no-async-languages-alist '("ipython")))
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Tools ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(unless ON-WINDOWS
|
||||
(use-package org-pdftools
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook (org-mode . org-pdftools-setup-link)))
|
||||
(provide 'init-org)
|
||||
;;; init-org.el ends here
|
||||
|
||||
@ -8,74 +8,30 @@
|
||||
|
||||
(and (file-readable-p custom-file) (load custom-file))
|
||||
|
||||
;; HACK: DO NOT save package-selected-packages to `custom-file'.
|
||||
;; https://github.com/jwiegley/use-package/issues/383#issuecomment-247801751
|
||||
(defun my-package--save-selected-packages (&optional value)
|
||||
"Set `package-selected-packages' to VALUE but don't save to `custom-file'."
|
||||
(when value
|
||||
(setq package-selected-packages value))
|
||||
(unless after-init-time
|
||||
(add-hook 'after-init-hook #'my-package--save-selected-packages)))
|
||||
(advice-add 'package--save-selected-packages :override #'my-package--save-selected-packages)
|
||||
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
|
||||
|
||||
(unless (bound-and-true-p package--initialized)
|
||||
(setq package-enable-at-startup nil)
|
||||
(package-initialize))
|
||||
;; Setup `use-package'
|
||||
(unless (package-installed-p 'use-package)
|
||||
(package-refresh-contents)
|
||||
(package-install 'use-package))
|
||||
;; Should set before loading `use-package'
|
||||
(eval-and-compile
|
||||
(setq use-package-always-ensure t)
|
||||
(setq use-package-always-defer t)
|
||||
(setq use-package-expand-minimally t)
|
||||
(setq use-package-enable-imenu-support t))
|
||||
(eval-when-compile
|
||||
(require 'use-package))
|
||||
|
||||
(use-package diminish)
|
||||
(use-package bind-key)
|
||||
|
||||
(use-package paradox
|
||||
:custom-face
|
||||
(paradox-archive-face ((t (:inherit font-lock-doc-face))))
|
||||
(paradox-description-face ((t (:inherit completions-annotations))))
|
||||
:hook
|
||||
(emacs-startup . paradox-enable)
|
||||
:init
|
||||
(setq paradox-execute-asynchronously t
|
||||
paradox-github-token nil
|
||||
paradox-display-star-count nil
|
||||
paradox-status-face-alist ;
|
||||
'(("built-in" . font-lock-builtin-face)
|
||||
("available" . success)
|
||||
("new" . (success bold))
|
||||
("held" . font-lock-constant-face)
|
||||
("disabled" . font-lock-warning-face)
|
||||
("avail-obso" . font-lock-comment-face)
|
||||
("installed" . font-lock-comment-face)
|
||||
("dependency" . font-lock-comment-face)
|
||||
("incompat" . font-lock-comment-face)
|
||||
("deleted" . font-lock-comment-face)
|
||||
("unsigned" . font-lock-warning-face)))
|
||||
:config
|
||||
(add-hook 'paradox-after-execute-functions
|
||||
(lambda (_)
|
||||
"Display `page-break-lines' in \"*Paradox Report*\" buffer."
|
||||
(when (fboundp 'page-break-lines-mode)
|
||||
(let ((buf (get-buffer "*Paradox Report*"))
|
||||
(inhibit-read-only t))
|
||||
(when (buffer-live-p buf)
|
||||
(with-current-buffer buf
|
||||
(page-break-lines-mode 1))))))
|
||||
t))
|
||||
|
||||
(defvar bootstrap-version)
|
||||
(let ((bootstrap-file
|
||||
(expand-file-name
|
||||
"straight/repos/straight.el/bootstrap.el"
|
||||
(or (bound-and-true-p straight-base-dir)
|
||||
user-emacs-directory)))
|
||||
(bootstrap-version 7))
|
||||
(unless (file-exists-p bootstrap-file)
|
||||
(with-current-buffer
|
||||
(url-retrieve-synchronously
|
||||
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
|
||||
'silent 'inhibit-cookies)
|
||||
(goto-char (point-max))
|
||||
(eval-print-last-sexp)))
|
||||
(load bootstrap-file nil 'nomessage))
|
||||
|
||||
(straight-use-package 'use-package)
|
||||
(setq use-package-always-ensure t)
|
||||
|
||||
; hide info in modeline
|
||||
(use-package diminish
|
||||
:straight t
|
||||
:ensure t)
|
||||
|
||||
(provide 'init-package)
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
@ -4,6 +4,9 @@
|
||||
|
||||
;; Windows/buffers sets shared among frames + save/load.
|
||||
(use-package persp-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:autoload (get-current-persp persp-contain-buffer-p)
|
||||
:hook (after-init . persp-mode)
|
||||
@ -13,7 +16,6 @@
|
||||
persp-kill-foreign-buffer-behaviour 'kill
|
||||
persp-auto-resume-time 0)
|
||||
:config
|
||||
|
||||
(with-no-warnings
|
||||
;; Don't save if the state is not loaded
|
||||
(defvar persp-state-loaded nil
|
||||
@ -65,44 +67,46 @@
|
||||
:mode-restore-function (lambda (_) (shell))
|
||||
:save-vars '(major-mode default-directory)))
|
||||
|
||||
;; Project integration
|
||||
;; Project.el integration
|
||||
(use-package persp-mode-project-bridge
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:autoload (persp-mode-project-bridge-find-perspectives-for-all-buffers
|
||||
persp-mode-project-bridge-kill-perspectives)
|
||||
:hook
|
||||
(persp-mode-project-bridge-mode . (lambda ()
|
||||
(if persp-mode-project-bridge-mode
|
||||
(persp-mode-project-bridge-find-perspectives-for-all-buffers)
|
||||
(persp-mode-project-bridge-kill-perspectives))))
|
||||
(persp-mode . persp-mode-project-bridge-mode)
|
||||
:init (when (icons-displayable-p)
|
||||
(setq persp-mode-project-bridge-persp-name-prefix ""))
|
||||
:config
|
||||
(with-no-warnings
|
||||
;; HACK: Allow saving to files
|
||||
(defun my-persp-mode-project-bridge-add-new-persp (name)
|
||||
(let ((persp (persp-get-by-name name *persp-hash* :nil)))
|
||||
(if (eq :nil persp)
|
||||
(prog1
|
||||
(setq persp (persp-add-new name))
|
||||
(when persp
|
||||
(set-persp-parameter 'persp-mode-project-bridge t persp)
|
||||
(persp-add-buffer (cl-remove-if-not #'get-file-buffer (project-files (project-current)))
|
||||
persp nil nil)))
|
||||
persp)))
|
||||
(advice-add #'persp-mode-project-bridge-add-new-persp
|
||||
:override #'my-persp-mode-project-bridge-add-new-persp)
|
||||
|
||||
(use-package persp-mode-project-bridge
|
||||
:autoload (persp-mode-project-bridge-find-perspectives-for-all-buffers
|
||||
persp-mode-project-bridge-kill-perspectives)
|
||||
:hook
|
||||
(persp-mode-project-bridge-mode . (lambda ()
|
||||
(if persp-mode-project-bridge-mode
|
||||
(persp-mode-project-bridge-find-perspectives-for-all-buffers)
|
||||
(persp-mode-project-bridge-kill-perspectives))))
|
||||
(persp-mode . persp-mode-project-bridge-mode)
|
||||
:init (when (icons-displayable-p)
|
||||
(setq persp-mode-project-bridge-persp-name-prefix ""))
|
||||
:config
|
||||
(with-no-warnings
|
||||
;; HACK: Allow saving to files
|
||||
(defun my-persp-mode-project-bridge-add-new-persp (name)
|
||||
(let ((persp (persp-get-by-name name *persp-hash* :nil)))
|
||||
(if (eq :nil persp)
|
||||
(prog1
|
||||
(setq persp (persp-add-new name))
|
||||
(when persp
|
||||
(set-persp-parameter 'persp-mode-project-bridge t persp)
|
||||
(persp-add-buffer (cl-remove-if-not #'get-file-buffer (project-files (project-current)))
|
||||
persp nil nil)))
|
||||
persp)))
|
||||
(advice-add #'persp-mode-project-bridge-add-new-persp
|
||||
:override #'my-persp-mode-project-bridge-add-new-persp)
|
||||
|
||||
;; HACK: Switch to buffer after switching perspective
|
||||
(defun my-persp-mode-project-bridge-hook-switch (fn &rest _args)
|
||||
"Switch to a perspective when hook is activated."
|
||||
(let ((buf (current-buffer)))
|
||||
(funcall fn)
|
||||
(when (buffer-live-p buf)
|
||||
(switch-to-buffer buf))))
|
||||
(advice-add #'persp-mode-project-bridge-hook-switch
|
||||
:around #'my-persp-mode-project-bridge-hook-switch)))
|
||||
;; HACK: Switch to buffer after switching perspective
|
||||
(defun my-persp-mode-project-bridge-hook-switch (fn &rest _args)
|
||||
"Switch to a perspective when hook is activated."
|
||||
(let ((buf (current-buffer)))
|
||||
(funcall fn)
|
||||
(when (buffer-live-p buf)
|
||||
(switch-to-buffer buf))))
|
||||
(advice-add #'persp-mode-project-bridge-hook-switch
|
||||
:around #'my-persp-mode-project-bridge-hook-switch)))
|
||||
|
||||
(provide 'init-persp)
|
||||
;;; init-persp.el ends here
|
||||
|
||||
@ -4,13 +4,13 @@
|
||||
(require 'init-funcs)
|
||||
|
||||
;; Tree-sitter support
|
||||
(use-package treesit-auto
|
||||
:hook (after-init . global-treesit-auto-mode)
|
||||
:init (setq treesit-auto-install 'prompt))
|
||||
;; (use-package treesit-auto
|
||||
;; :hook (after-init . global-treesit-auto-mode)
|
||||
;; :init (setq treesit-auto-install 'prompt))
|
||||
|
||||
;; Search tool
|
||||
(use-package grep
|
||||
:ensure nil
|
||||
:ensure nil ; built-in
|
||||
:autoload grep-apply-setting
|
||||
:config
|
||||
(cond
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
;;;; Cross-referencing commands
|
||||
(use-package xref
|
||||
:ensure nil
|
||||
:ensure nil ; built-in
|
||||
:config
|
||||
(with-no-warnings
|
||||
;; Use faster search tool
|
||||
@ -53,6 +53,9 @@
|
||||
|
||||
;;;; Jump to definition
|
||||
(use-package dumb-jump
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:pretty-hydra
|
||||
((:title (pretty-hydra-title "Dump Jump" 'faicon "nf-fa-anchor")
|
||||
:color blue :quit-key ("q" "C-g"))
|
||||
@ -77,17 +80,26 @@
|
||||
dumb-jump-selector 'ivy))
|
||||
|
||||
;; Code styles
|
||||
(use-package editorconfig
|
||||
:diminish
|
||||
:hook (after-init . editorconfig-mode))
|
||||
;; (use-package editorconfig
|
||||
;; :straight t
|
||||
;; :ensure t
|
||||
;; :defer t
|
||||
;; :diminish
|
||||
;; :hook (after-init . editorconfig-mode))
|
||||
|
||||
;; Run commands quickly
|
||||
(use-package quickrun
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:bind (("C-<f5>" . quickrun)
|
||||
("C-c X" . quickrun)))
|
||||
|
||||
;; Browse devdocs.io documents using EWW
|
||||
(use-package devdocs
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:autoload (devdocs--installed-docs devdocs--available-docs)
|
||||
:bind (:map prog-mode-map
|
||||
("M-<f1>" . devdocs-dwim)
|
||||
@ -140,45 +152,41 @@ Install the doc if it's not installed."
|
||||
(devdocs-lookup nil (thing-at-point 'symbol t))))
|
||||
|
||||
;;;; Misc. programming modes
|
||||
(use-package csv-mode)
|
||||
(use-package csharp-mode)
|
||||
;;(use-package cask-mode)
|
||||
(use-package cmake-mode)
|
||||
;;(use-package dart-mode)
|
||||
;;(use-package groovy-mode)
|
||||
;;(use-package julia-mode)
|
||||
;;(use-package lua-mode)
|
||||
;;(use-package mermaid-mode)
|
||||
;;(use-package plantuml-mode)
|
||||
(use-package rmsbolt) ; A compiler output viewer
|
||||
;;(use-package scala-mode)
|
||||
;;(use-package swift-mode)
|
||||
;;(use-package v-mode)
|
||||
;;(use-package vimrc-mode)
|
||||
(use-package csv-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
(use-package csharp-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
(use-package cmake-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
(use-package lua-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
;;(use-package protobuf-mode
|
||||
;; :hook (protobuf-mode . (lambda ()
|
||||
;; (setq imenu-generic-expression
|
||||
;; '((nil "^[[:space:]]*\\(message\\|service\\|enum\\)[[:space:]]+\\([[:alnum:]]+\\)" 2))))))
|
||||
|
||||
;;(use-package nxml-mode
|
||||
;; :ensure nil
|
||||
;; :mode (("\\.xaml$" . xml-mode)))
|
||||
|
||||
;; Batch Mode eXtras
|
||||
;; Windows Batch Mode eXtras
|
||||
(use-package bmx-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:after company
|
||||
:diminish
|
||||
:hook (after-init . bmx-mode-setup-defaults))
|
||||
|
||||
;; Fish shell
|
||||
(use-package fish-mode
|
||||
:hook (fish-mode . (lambda ()
|
||||
(add-hook 'before-save-hook
|
||||
#'fish_indent-before-save))))
|
||||
|
||||
(use-package pkgbuild-mode)
|
||||
(use-package systemd)
|
||||
; arch PKGBUILD
|
||||
(use-package pkgbuild-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
(use-package systemd
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
|
||||
(provide 'init-prog)
|
||||
|
||||
@ -49,13 +49,19 @@
|
||||
|
||||
;; Env vars
|
||||
(with-eval-after-load 'exec-path-from-shell
|
||||
(exec-path-from-shell-copy-env "PYTHONPATH"))
|
||||
(exec-path-from-shell-copy-env "PYTHONPATH")))
|
||||
|
||||
;; Live Coding in Python
|
||||
(use-package live-py-mode))
|
||||
;; Live Coding in Python
|
||||
(use-package live-py-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
(when ON-LINUX
|
||||
(use-package jupyter))
|
||||
(use-package jupyter
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t))
|
||||
|
||||
(provide 'init-python)
|
||||
|
||||
|
||||
@ -1,44 +1,58 @@
|
||||
;;; init-reader.el -*- lexical-binding: t -*-
|
||||
(use-package pdf-view
|
||||
:ensure pdf-tools
|
||||
:diminish (pdf-view-themed-minor-mode
|
||||
pdf-view-midnight-minor-mode
|
||||
pdf-view-printer-minor-mode)
|
||||
:defines pdf-annot-activate-created-annotations
|
||||
:hook ((pdf-tools-enabled . pdf-view-auto-slice-minor-mode)
|
||||
(pdf-tools-enabled . pdf-isearch-minor-mode)
|
||||
(pdf-tools-enabled . pdf-view-themed-minor-mode))
|
||||
:mode ("\\.[pP][dD][fF]\\'" . pdf-view-mode)
|
||||
:magic ("%PDF" . pdf-view-mode)
|
||||
:bind (:map pdf-view-mode-map
|
||||
("C-s" . isearch-forward))
|
||||
:init (setq pdf-view-use-scaling t
|
||||
pdf-view-use-imagemagick nil
|
||||
pdf-annot-activate-created-annotations t
|
||||
pdf-view-display-size 'fit-page)
|
||||
:config
|
||||
;; install manually
|
||||
;;(pdf-tools-install t nil t nil)
|
||||
;; my funtion
|
||||
(defun my/pdf-view-open-in-zathura ()
|
||||
(interactive)
|
||||
(save-window-excursion
|
||||
(let ((current-file (buffer-file-name))
|
||||
(current-page (number-to-string (pdf-view-current-page))))
|
||||
(async-shell-command
|
||||
(format "zathura -P %s \"%s\"" current-page current-file))))
|
||||
(message "Sent to zathura"))
|
||||
;; Recover last viewed position
|
||||
(use-package pdf-view-restore
|
||||
:defer t
|
||||
:hook (pdf-view-mode . pdf-view-restore-mode)
|
||||
:config
|
||||
(setq pdf-view-restore-filename
|
||||
(expand-file-name "pdf-view-restore" user-emacs-directory))))
|
||||
|
||||
;; Nice reading / writing
|
||||
(use-package olivetti
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:bind ("<f7>" . olivetti-mode)
|
||||
:hook ((markdown-mode . olivetti-mode)
|
||||
(org-mode . olivetti-mode))
|
||||
:init (setq olivetti-body-width 0.62))
|
||||
|
||||
(unless ON-WINDOWS
|
||||
(use-package pdf-tools
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:defines pdf-annot-activate-created-annotations
|
||||
:hook ((pdf-tools-enabled . pdf-view-auto-slice-minor-mode)
|
||||
(pdf-tools-enabled . pdf-isearch-minor-mode))
|
||||
;;(pdf-tools-enabled . pdf-view-themed-minor-mode))
|
||||
:mode ("\\.[pP][dD][fF]\\'" . pdf-view-mode)
|
||||
:magic ("%PDF" . pdf-view-mode)
|
||||
:bind (:map pdf-view-mode-map
|
||||
("C-s" . isearch-forward))
|
||||
:init
|
||||
(pdf-tools-install)
|
||||
:config
|
||||
(setq-default pdf-view-display-size 'fit-page)
|
||||
(setq-default pdf-view-resize-factor 1.1) ;; zoom in/out setting
|
||||
(defun my/pdf-view-open-in-zathura ()
|
||||
(interactive)
|
||||
(save-window-excursion
|
||||
(let ((current-file (buffer-file-name))
|
||||
(current-page (number-to-string (pdf-view-current-page))))
|
||||
(async-shell-command
|
||||
(format "zathura -P %s \"%s\"" current-page current-file))))
|
||||
(message "Sent to zathura"))))
|
||||
|
||||
;; Recover last viewed position
|
||||
(use-package pdf-view-restore
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook (pdf-view-mode . pdf-view-restore-mode)
|
||||
:config
|
||||
(setq pdf-view-restore-filename
|
||||
(expand-file-name "pdf-view-restore" user-emacs-directory)))
|
||||
|
||||
;; Epub reader
|
||||
(use-package nov
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:mode ("\\.epub\\'" . nov-mode)
|
||||
:hook (nov-mode . my-nov-setup)
|
||||
:init
|
||||
@ -66,9 +80,12 @@
|
||||
process-coding-system-alist))))
|
||||
;; Atom/RSS reader
|
||||
(use-package elfeed
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:pretty-hydra
|
||||
((:title (pretty-hydra-title "Elfeed" 'faicon "nf-fa-rss_square" :face 'nerd-icons-orange)
|
||||
:color amaranth :quit-key ("q" "C-g"))
|
||||
:color amaranth :quit-key ("q" "C-g"))
|
||||
("Search"
|
||||
(("c" elfeed-db-compact "compact db")
|
||||
("g" elfeed-search-update--force "refresh")
|
||||
@ -99,11 +116,17 @@
|
||||
(push elfeed-db-directory recentf-exclude))
|
||||
|
||||
(use-package elfeed-goodies
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook (after-init . elfeed-goodies/setup))
|
||||
(use-package elfeed-org
|
||||
:hook (after-init . elfeed-org)
|
||||
:straight t
|
||||
:ensure t
|
||||
:after elfeed
|
||||
:config
|
||||
(setq rmh-elfeed-org-files (list (expand-file-name "elfeed.org" org-directory))))
|
||||
(setq rmh-elfeed-org-files (list (expand-file-name "elfeed.org" org-directory)))
|
||||
(elfeed-org))
|
||||
|
||||
(provide 'init-reader)
|
||||
;;; init-reader.el ends here
|
||||
|
||||
@ -32,33 +32,54 @@
|
||||
|
||||
;; Integrate rbenv
|
||||
(use-package rbenv
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook (after-init . global-rbenv-mode)
|
||||
:init (setq rbenv-show-active-ruby-in-modeline nil))
|
||||
|
||||
;; YAML mode
|
||||
(use-package yaml-mode)
|
||||
(use-package yaml-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
;; Run a Ruby process in a buffer
|
||||
(use-package inf-ruby
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook ((ruby-mode . inf-ruby-minor-mode)
|
||||
(compilation-filter . inf-ruby-auto-enter)))
|
||||
|
||||
;; Ruby YARD comments
|
||||
(use-package yard-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:hook (ruby-mode . yard-mode))
|
||||
|
||||
;; Ruby refactoring helpers
|
||||
(use-package ruby-refactor
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:hook (ruby-mode . ruby-refactor-mode-launch))
|
||||
|
||||
;; Yet Another RI interface for Emacs
|
||||
(use-package yari
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:bind (:map ruby-mode-map ([f1] . yari)))
|
||||
|
||||
;; RSpec
|
||||
(use-package rspec-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:autoload rspec-install-snippets
|
||||
:hook (dired-mode . rspec-dired-mode)
|
||||
|
||||
@ -1,49 +1,36 @@
|
||||
;; init-rust.el --- Initialize Rust configurations. -*- lexical-binding: t -*-
|
||||
|
||||
;; Copyright (C) 2019-2022 Vincent Zhang
|
||||
|
||||
;; Author: Vincent Zhang <seagle0128@gmail.com>
|
||||
;; URL: https://github.com/seagle0128/.emacs.d
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;; This program is free software; you can redistribute it and/or
|
||||
;; modify it under the terms of the GNU General Public License as
|
||||
;; published by the Free Software Foundation; either version 3, or
|
||||
;; (at your option) any later version.
|
||||
;;
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
;; General Public License for more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program; see the file COPYING. If not, write to
|
||||
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
|
||||
;; Floor, Boston, MA 02110-1301, USA.
|
||||
;;
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; Rust configurations.
|
||||
;;
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; Rust
|
||||
(use-package rustic
|
||||
:init
|
||||
(if ON-LINUX
|
||||
(setq rustic-analyzer-command '("~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rust-analyzer"))
|
||||
(setq rustic-analyzer-command '("~/.rustup/toolchains/stable-x86_64-pc-windows-msvc/bin/rust-analyzer.exe")))
|
||||
(setq rustic-lsp-client 'eglot))
|
||||
(use-package rust-playground)
|
||||
|
||||
(use-package rust-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:config
|
||||
(flycheck-rust-setup))
|
||||
(use-package cargo
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:after rust-mode)
|
||||
(use-package flycheck-rust
|
||||
:straight t
|
||||
:ensure t
|
||||
:after (flycheck rust-mode)
|
||||
:config
|
||||
(add-hook 'flycheck-mode-hook #'flycheck-rust-setup))
|
||||
(use-package toml-mode
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:config
|
||||
(add-to-list 'auto-mode-alist '("/\\(Cargo.lock\\|\\.cargo/config\\)\\'" . toml-mode)))
|
||||
|
||||
(provide 'init-rust)
|
||||
; org-babel integration ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(use-package ob-rust
|
||||
:straight t
|
||||
:ensure t)
|
||||
|
||||
(provide 'init-rust)
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; init-rust.el ends here
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
;;; init-eshell.el -*- lexical-binding: t -*-
|
||||
;; Emacs command shell
|
||||
|
||||
(use-package nushell-mode)
|
||||
|
||||
(provide 'init-shell)
|
||||
;;; init-eshell.el ends here
|
||||
@ -3,6 +3,9 @@
|
||||
(require 'init-funcs)
|
||||
;; A tree layout file explorer
|
||||
(use-package treemacs
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:commands (treemacs-follow-mode
|
||||
treemacs-filewatch-mode
|
||||
treemacs-git-mode)
|
||||
@ -26,28 +29,36 @@
|
||||
(`(t . t)
|
||||
(treemacs-git-mode 'deferred))
|
||||
(`(t . _)
|
||||
(treemacs-git-mode 'simple)))
|
||||
(treemacs-git-mode 'simple))))
|
||||
|
||||
(use-package treemacs-nerd-icons
|
||||
:demand
|
||||
:custom-face
|
||||
(treemacs-nerd-icons-root-face ((t (:inherit nerd-icons-green :height 1.3))))
|
||||
(treemacs-nerd-icons-file-face ((t (:inherit nerd-icons-dsilver))))
|
||||
:config (treemacs-load-theme "nerd-icons"))
|
||||
(use-package treemacs-nerd-icons
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:custom-face
|
||||
(treemacs-nerd-icons-root-face ((t (:inherit nerd-icons-green :height 1.3))))
|
||||
(treemacs-nerd-icons-file-face ((t (:inherit nerd-icons-dsilver))))
|
||||
:config (treemacs-load-theme "nerd-icons"))
|
||||
|
||||
(use-package treemacs-magit
|
||||
:after magit
|
||||
:autoload treemacs-magit--schedule-update
|
||||
:hook ((magit-post-commit
|
||||
git-commit-post-finish
|
||||
magit-post-stage
|
||||
magit-post-unstage)
|
||||
. treemacs-magit--schedule-update))
|
||||
(use-package treemacs-magit
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:after magit
|
||||
:autoload treemacs-magit--schedule-update
|
||||
:hook ((magit-post-commit
|
||||
git-commit-post-finish
|
||||
magit-post-stage
|
||||
magit-post-unstage)
|
||||
. treemacs-magit--schedule-update))
|
||||
|
||||
(use-package treemacs-persp
|
||||
:after persp-mode
|
||||
:demand t
|
||||
:functions treemacs-set-scope-type
|
||||
:config (treemacs-set-scope-type 'Perspectives)))
|
||||
(use-package treemacs-persp
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:after persp-mode
|
||||
:demand t
|
||||
:functions treemacs-set-scope-type
|
||||
:config (treemacs-set-scope-type 'Perspectives))
|
||||
(provide 'init-treemacs)
|
||||
;;; init-treemacs.el ends here
|
||||
|
||||
@ -17,15 +17,22 @@
|
||||
|
||||
;; Make certain buffers grossly incandescent
|
||||
(use-package solaire-mode
|
||||
:hook (after-load-theme . solaire-global-mode))
|
||||
:straight t
|
||||
:ensure t
|
||||
:demand t
|
||||
:config
|
||||
(solaire-global-mode +1))
|
||||
|
||||
(use-package doom-themes
|
||||
:straight t
|
||||
:ensure t
|
||||
:init
|
||||
(if (display-graphic-p)
|
||||
(load-theme custom-theme-sel t)
|
||||
(load-theme 'doom-gruvbox t))
|
||||
(load-theme custom-theme-sel t)
|
||||
:config
|
||||
(doom-themes-visual-bell-config))
|
||||
(use-package doom-modeline
|
||||
:straight t
|
||||
:ensure t
|
||||
:hook (after-init . doom-modeline-mode)
|
||||
:init
|
||||
(setq doom-modeline-window-width-limit 110
|
||||
@ -37,25 +44,31 @@
|
||||
doom-modeline-persp-icon t
|
||||
doom-modeline-display-default-persp-name t
|
||||
doom-modeline-indent-info t))
|
||||
;;(use-package hide-mode-line
|
||||
;; :hook (((completion-list-mode
|
||||
;; completion-in-region-mode
|
||||
;; eshell-mode shell-mode
|
||||
;; term-mode vterm-mode
|
||||
;; treemacs-mode
|
||||
;; lsp-ui-imenu-mode
|
||||
;; pdf-annot-list-mode) . hide-mode-line-mode)))
|
||||
(use-package hide-mode-line
|
||||
:straight t
|
||||
:ensure t
|
||||
:hook (((completion-list-mode
|
||||
eshell-mode shell-mode
|
||||
term-mode vterm-mode
|
||||
treemacs-mode
|
||||
lsp-ui-imenu-mode
|
||||
pdf-annot-list-mode) . hide-mode-line-mode)))
|
||||
|
||||
;; A minor-mode menu for mode-line
|
||||
(use-package minions
|
||||
:straight t
|
||||
:ensure t
|
||||
:hook (doom-modeline-mode . minions-mode))
|
||||
|
||||
;; Icons
|
||||
(use-package nerd-icons)
|
||||
(use-package nerd-icons
|
||||
:straight t
|
||||
:ensure t)
|
||||
;;(use-package all-the-icons)
|
||||
|
||||
(use-package display-line-numbers
|
||||
:ensure nil
|
||||
:straight t
|
||||
:ensure t
|
||||
:hook ((prog-mode yaml-mode conf-mode) . display-line-numbers-mode)
|
||||
:init (setq display-line-numbers-width-start t))
|
||||
|
||||
@ -76,7 +89,8 @@
|
||||
(add-hook 'window-setup-hook #'window-divider-mode)
|
||||
|
||||
(use-package time
|
||||
:ensure nil
|
||||
:straight t
|
||||
:ensure t
|
||||
:init (setq display-time-24hr-format t
|
||||
display-time-day-and-date t))
|
||||
|
||||
@ -95,40 +109,44 @@
|
||||
;; Good pixel line scrolling
|
||||
(if (fboundp 'pixel-scroll-precision-mode)
|
||||
(pixel-scroll-precision-mode t)
|
||||
(use-package good-scroll
|
||||
:diminish
|
||||
:hook (after-init . good-scroll-mode)
|
||||
:bind (([remap next] . good-scroll-up-full-screen)
|
||||
([remap prior] . good-scroll-down-full-screen))))
|
||||
(use-package good-scroll
|
||||
:straight t
|
||||
:ensure t
|
||||
:hook (after-init . good-scroll-mode)
|
||||
:bind (([remap next] . good-scroll-up-full-screen)
|
||||
([remap prior] . good-scroll-down-full-screen))))
|
||||
|
||||
;; Smooth scrolling over images
|
||||
(use-package iscroll
|
||||
:diminish
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook (image-mode . iscroll-mode))
|
||||
|
||||
;; Use fixed pitch where it's sensible
|
||||
(use-package mixed-pitch
|
||||
:diminish)
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
;; Display ugly ^L page breaks as tidy horizontal lines
|
||||
(use-package page-break-lines
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:hook (after-init . global-page-break-lines-mode)
|
||||
:config ;; display only half fix.
|
||||
(set-fontset-font "fontset-default"
|
||||
(cons page-break-lines-char page-break-lines-char)
|
||||
(face-attribute 'default :family)))
|
||||
(use-package form-feed
|
||||
:disabled
|
||||
:diminish
|
||||
:hook (after-init . global-form-feed-mode))
|
||||
|
||||
;; emoji
|
||||
(use-package emojify
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:init (global-emojify-mode 1))
|
||||
|
||||
|
||||
|
||||
(provide 'init-ui)
|
||||
;;; init-ui.el ends here.
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
;;; init-utils.el -*- lexical-binding: t -*-
|
||||
(use-package rg)
|
||||
;; Nice writing
|
||||
(use-package olivetti
|
||||
:diminish
|
||||
:bind ("<f7>" . olivetti-mode)
|
||||
:hook (org-mode markdown-mode)
|
||||
:init (setq olivetti-body-width 0.62))
|
||||
(use-package rg
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
;; text mode directory tree
|
||||
(use-package ztree
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:custom-face
|
||||
(ztreep-header-face ((t (:inherit diff-header))))
|
||||
(ztreep-arrow-face ((t (:inherit font-lock-comment-face))))
|
||||
@ -46,6 +46,9 @@
|
||||
ztree-show-number-of-children t))
|
||||
|
||||
(use-package list-environment
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook (list-environment-mode . (lambda ()
|
||||
(setq tabulated-list-format
|
||||
(vconcat `(("" ,(if (icons-displayable-p) 2 0)))
|
||||
@ -69,9 +72,9 @@
|
||||
process-environment))
|
||||
(advice-add #'list-environment-entries :override #'my-list-environment-entries)))
|
||||
|
||||
(unless ON-WINDOWS
|
||||
(use-package daemons) ; system services/daemons
|
||||
(use-package tldr))
|
||||
;; (unless ON-WINDOWS
|
||||
;; (use-package daemons) ; system services/daemons
|
||||
;; (use-package tldr))
|
||||
|
||||
|
||||
(provide 'init-utils)
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
;; Git
|
||||
;; See `magit-maybe-define-global-key-bindings'
|
||||
(use-package magit
|
||||
:ensure nil
|
||||
:commands (magit-status magit-get-current-branch)
|
||||
:init (setq magit-diff-refine-hunk t)
|
||||
:config
|
||||
@ -27,50 +28,58 @@
|
||||
(bury-buffer buf)
|
||||
(kill-buffer buf))))
|
||||
buffers))))
|
||||
(setq magit-bury-buffer-function #'my-magit-kill-buffers))
|
||||
(setq magit-bury-buffer-function #'my-magit-kill-buffers)))
|
||||
|
||||
;; Show TODOs in magit
|
||||
(use-package magit-todos
|
||||
:defines magit-todos-nice
|
||||
:commands magit-todos--scan-with-git-grep
|
||||
:init
|
||||
(setq magit-todos-nice (if (executable-find "nice") t nil))
|
||||
(setq magit-todos-scanner #'magit-todos--scan-with-git-grep)
|
||||
(setq magit-todos-exclude-globs '(".git/" "*.json" "*.js"))
|
||||
(let ((inhibit-message t))
|
||||
(magit-todos-mode 1))))
|
||||
;; Show TODOs in magit
|
||||
(use-package magit-todos
|
||||
:straight t
|
||||
:ensure t
|
||||
:defines magit-todos-nice
|
||||
:commands magit-todos--scan-with-git-grep
|
||||
:init
|
||||
(setq magit-todos-nice (if (executable-find "nice") t nil))
|
||||
(setq magit-todos-scanner #'magit-todos--scan-with-git-grep)
|
||||
(setq magit-todos-exclude-globs '(".git/" "*.json" "*.js"))
|
||||
(let ((inhibit-message t))
|
||||
(magit-todos-mode 1)))
|
||||
|
||||
;; Walk through git revisions of a file
|
||||
(use-package git-timemachine
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:custom-face
|
||||
(git-timemachine-minibuffer-author-face ((t (:inherit success :foreground unspecified))))
|
||||
(git-timemachine-minibuffer-detail-face ((t (:inherit warning :foreground unspecified))))
|
||||
:hook ((git-timemachine-mode . (lambda ()
|
||||
"Improve `git-timemachine' buffers."
|
||||
;; Display different colors in mode-line
|
||||
(if (facep 'mode-line-active)
|
||||
(face-remap-add-relative 'mode-line-active 'custom-state)
|
||||
(face-remap-add-relative 'mode-line 'custom-state))
|
||||
:hook ((git-timemachine-mode
|
||||
. (lambda ()
|
||||
"Improve `git-timemachine' buffers."
|
||||
;; Display different colors in mode-line
|
||||
(if (facep 'mode-line-active)
|
||||
(face-remap-add-relative 'mode-line-active 'custom-state)
|
||||
(face-remap-add-relative 'mode-line 'custom-state))
|
||||
|
||||
;; Highlight symbols in elisp
|
||||
(and (derived-mode-p 'emacs-lisp-mode)
|
||||
(fboundp 'highlight-defined-mode)
|
||||
(highlight-defined-mode t))
|
||||
;; Highlight symbols in elisp
|
||||
(and (derived-mode-p 'emacs-lisp-mode)
|
||||
(fboundp 'highlight-defined-mode)
|
||||
(highlight-defined-mode t))
|
||||
|
||||
;; Display line numbers
|
||||
(and (derived-mode-p 'prog-mode 'yaml-mode)
|
||||
(fboundp 'display-line-numbers-mode)
|
||||
(display-line-numbers-mode t))))
|
||||
;; Display line numbers
|
||||
(and (derived-mode-p 'prog-mode 'yaml-mode)
|
||||
(fboundp 'display-line-numbers-mode)
|
||||
(display-line-numbers-mode t))))
|
||||
(before-revert . (lambda ()
|
||||
(when (bound-and-true-p git-timemachine-mode)
|
||||
(user-error "Cannot revert the timemachine buffer"))))))
|
||||
;; Resolve diff3 conflicts
|
||||
(use-package smerge-mode
|
||||
:ensure nil
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish
|
||||
:pretty-hydra
|
||||
((:title (pretty-hydra-title "Smerge" 'octicon "nf-oct-diff")
|
||||
:color pink :quit-key ("q" "C-g"))
|
||||
:color pink :quit-key ("q" "C-g"))
|
||||
("Move"
|
||||
(("n" smerge-next "next")
|
||||
("p" smerge-prev "previous"))
|
||||
@ -97,7 +106,7 @@
|
||||
(bury-buffer))
|
||||
"Save and bury buffer" :exit t))))
|
||||
:bind (:map smerge-mode-map
|
||||
("C-c m" . smerge-mode-hydra/body))
|
||||
("C-c m" . smerge-mode-hydra/body))
|
||||
:hook ((find-file . (lambda ()
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
@ -108,11 +117,17 @@
|
||||
(smerge-mode-hydra/body))))))
|
||||
;; Open github/gitlab/bitbucket page
|
||||
(use-package browse-at-remote
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:bind (:map vc-prefix-map
|
||||
("B" . browse-at-remote)))
|
||||
("B" . browse-at-remote)))
|
||||
|
||||
;; Git configuration modes
|
||||
(use-package git-modes)
|
||||
;; Git configuration modes (ex: gitignore gitattributes gitconfig)
|
||||
(use-package git-modes
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t)
|
||||
|
||||
|
||||
(provide 'init-vcs)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
;; init-verilog.el -*- lexical-binding: t -*-
|
||||
|
||||
(use-package verilog-mode
|
||||
:ensure nil
|
||||
:ensure nil ; built-in
|
||||
:init
|
||||
(setq verilog-indent-level 4)
|
||||
(setq verilog-indent-level-module 0)
|
||||
@ -13,6 +13,9 @@
|
||||
(setq verilog-case-indent 4)
|
||||
(setq verilog-auto-newline nil))
|
||||
(use-package verilog-ext
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:hook ((verilog-mode . verilog-ext-mode))
|
||||
:init
|
||||
;; Can also be set through `M-x RET customize-group RET verilog-ext':
|
||||
@ -24,7 +27,7 @@
|
||||
(setq verilog-ext-feature-list
|
||||
'(font-lock
|
||||
xref
|
||||
;; capf
|
||||
capf
|
||||
hierarchy
|
||||
eglot
|
||||
;; lsp
|
||||
@ -32,14 +35,14 @@
|
||||
beautify
|
||||
navigation
|
||||
template
|
||||
formatter
|
||||
;; formatter
|
||||
compilation
|
||||
imenu
|
||||
which-func
|
||||
hideshow
|
||||
typedefs
|
||||
time-stamp
|
||||
block-end-comments
|
||||
;; block-end-comments
|
||||
ports))
|
||||
:config
|
||||
(verilog-ext-mode-setup))
|
||||
|
||||
@ -3,6 +3,8 @@
|
||||
(require 'init-funcs)
|
||||
|
||||
(use-package vertico
|
||||
:straight t
|
||||
:ensure t
|
||||
:bind (:map vertico-map
|
||||
("C-j" . vertico-next)
|
||||
("C-k" . vertico-previous))
|
||||
@ -10,27 +12,34 @@
|
||||
:custom
|
||||
(vertico-cycle t))
|
||||
(use-package nerd-icons-completion
|
||||
:straight t
|
||||
:ensure t
|
||||
:hook (vertico-mode . nerd-icons-completion-mode))
|
||||
|
||||
(when (display-graphic-p)
|
||||
(use-package vertico-posframe
|
||||
:when custom-vertico-posframe
|
||||
:after vertico
|
||||
:hook (vertico-mode . vertico-posframe-mode)
|
||||
:config
|
||||
(setq vertico-posframe-border-width 5)))
|
||||
(use-package vertico-posframe
|
||||
:straight t
|
||||
:ensure t
|
||||
:when (and custom-vertico-posframe 'display-graphic-p)
|
||||
:after vertico
|
||||
:hook (vertico-mode . vertico-posframe-mode)
|
||||
:config
|
||||
(setq vertico-posframe-border-width 5))
|
||||
;; (setq vertico-posframe-parameters
|
||||
;; '((left-fringe . 20)
|
||||
;; (right-fringe . 20)))))
|
||||
|
||||
;; simple, but effective sorting and filtering for emacs.
|
||||
(use-package vertico-prescient
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:config
|
||||
(vertico-prescient-mode))
|
||||
|
||||
;; annotations placed at the margin of the minibuffer
|
||||
(use-package marginalia
|
||||
:straight t
|
||||
:ensure t
|
||||
:after vertico
|
||||
:defer t
|
||||
:custom
|
||||
@ -39,6 +48,8 @@
|
||||
|
||||
|
||||
(use-package consult
|
||||
:straight t
|
||||
:ensure t
|
||||
:demand t
|
||||
:bind (:map minibuffer-local-map
|
||||
("C-r" . consult-history))
|
||||
@ -46,15 +57,20 @@
|
||||
(completion-in-region-function #'consult-completion-in-region)
|
||||
:config
|
||||
(global-set-key (kbd "C-s") 'consult-line)
|
||||
;; HACK: https://github.com/Bad-ptr/persp-mode.el/issues/125
|
||||
(with-eval-after-load "persp-mode-autoloads"
|
||||
(defun my/consult-switch-to-buffer ()
|
||||
"`consult-buffer' with buffers provided by persp."
|
||||
(interactive)
|
||||
(with-persp-buffer-list () (consult-buffer)))
|
||||
(global-set-key (kbd "C-M-j") #'my/consult-switch-to-buffer)))
|
||||
(defun my/consult-switch-to-buffer ()
|
||||
"`consult-buffer' with buffers provided by persp."
|
||||
(interactive)
|
||||
(with-persp-buffer-list () (consult-buffer)))
|
||||
(defun my/consult-project-switch-to-buffer ()
|
||||
"`consult-project-buffer' with buffers provided by persp."
|
||||
(interactive)
|
||||
(with-persp-buffer-list () (consult-project-buffer)))
|
||||
(global-set-key (kbd "C-M-j") #'my/consult-switch-to-buffer)
|
||||
(global-set-key (kbd "C-M-h") #'my/consult-project-switch-to-buffer))
|
||||
|
||||
(use-package orderless
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:custom
|
||||
(completion-styles '(orderless basic))
|
||||
@ -62,8 +78,13 @@
|
||||
|
||||
;; Quick action in minibuffer
|
||||
(use-package embark
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:bind (("C-." . embark-act))
|
||||
:bind (("C-," . embark-act)
|
||||
:map minibuffer-local-map
|
||||
("C-c C-c" . embark-collect)
|
||||
("C-c C-e" . embark-export))
|
||||
:config
|
||||
(with-eval-after-load 'embark-consult
|
||||
(add-hook 'embark-collect-mode-hook #'consult-preview-at-point-mode))
|
||||
@ -72,11 +93,15 @@
|
||||
(setq prefix-help-command #'embark-prefix-help-command))
|
||||
|
||||
(use-package embark-consult
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:after embark)
|
||||
|
||||
;;; Corfu
|
||||
(use-package corfu
|
||||
:straight t
|
||||
:ensure t
|
||||
:custom
|
||||
(corfu-cycle t) ;; Enable cycling for `corfu-next/previous'
|
||||
(corfu-auto t) ;; Enable auto completion
|
||||
@ -97,64 +122,62 @@
|
||||
(eldoc-add-command #'corfu-insert)
|
||||
(define-key corfu-map (kbd "M-p") #'corfu-popupinfo-scroll-down)
|
||||
(define-key corfu-map (kbd "M-n") #'corfu-popupinfo-scroll-up)
|
||||
(define-key corfu-map (kbd "M-d") #'corfu-popupinfo-toggle)
|
||||
(define-key corfu-map (kbd "M-d") #'corfu-popupinfo-toggle))
|
||||
|
||||
(use-package kind-icon
|
||||
:defer nil
|
||||
:custom
|
||||
(kind-icon-default-face 'corfu-default) ; to compute blended backgrounds correctly
|
||||
:config
|
||||
(add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)
|
||||
(when (icons-displayable-p)
|
||||
(setq kind-icon-use-icons nil)
|
||||
(setq kind-icon-mapping
|
||||
`(
|
||||
(array ,(nerd-icons-codicon "nf-cod-symbol_array") :face font-lock-type-face)
|
||||
(boolean ,(nerd-icons-codicon "nf-cod-symbol_boolean") :face font-lock-builtin-face)
|
||||
(class ,(nerd-icons-codicon "nf-cod-symbol_class") :face font-lock-type-face)
|
||||
(color ,(nerd-icons-codicon "nf-cod-symbol_color") :face success)
|
||||
(command ,(nerd-icons-codicon "nf-cod-terminal") :face default)
|
||||
(constant ,(nerd-icons-codicon "nf-cod-symbol_constant") :face font-lock-constant-face)
|
||||
(constructor ,(nerd-icons-codicon "nf-cod-triangle_right") :face font-lock-function-name-face)
|
||||
(enummember ,(nerd-icons-codicon "nf-cod-symbol_enum_member") :face font-lock-builtin-face)
|
||||
(enum-member ,(nerd-icons-codicon "nf-cod-symbol_enum_member") :face font-lock-builtin-face)
|
||||
(enum ,(nerd-icons-codicon "nf-cod-symbol_enum") :face font-lock-builtin-face)
|
||||
(event ,(nerd-icons-codicon "nf-cod-symbol_event") :face font-lock-warning-face)
|
||||
(field ,(nerd-icons-codicon "nf-cod-symbol_field") :face font-lock-variable-name-face)
|
||||
(file ,(nerd-icons-codicon "nf-cod-symbol_file") :face font-lock-string-face)
|
||||
(folder ,(nerd-icons-codicon "nf-cod-folder") :face font-lock-doc-face)
|
||||
(interface ,(nerd-icons-codicon "nf-cod-symbol_interface") :face font-lock-type-face)
|
||||
(keyword ,(nerd-icons-codicon "nf-cod-symbol_keyword") :face font-lock-keyword-face)
|
||||
(macro ,(nerd-icons-codicon "nf-cod-symbol_misc") :face font-lock-keyword-face)
|
||||
(magic ,(nerd-icons-codicon "nf-cod-wand") :face font-lock-builtin-face)
|
||||
(method ,(nerd-icons-codicon "nf-cod-symbol_method") :face font-lock-function-name-face)
|
||||
(function ,(nerd-icons-codicon "nf-cod-symbol_method") :face font-lock-function-name-face)
|
||||
(module ,(nerd-icons-codicon "nf-cod-file_submodule") :face font-lock-preprocessor-face)
|
||||
(numeric ,(nerd-icons-codicon "nf-cod-symbol_numeric") :face font-lock-builtin-face)
|
||||
(operator ,(nerd-icons-codicon "nf-cod-symbol_operator") :face font-lock-comment-delimiter-face)
|
||||
(param ,(nerd-icons-codicon "nf-cod-symbol_parameter") :face default)
|
||||
(property ,(nerd-icons-codicon "nf-cod-symbol_property") :face font-lock-variable-name-face)
|
||||
(reference ,(nerd-icons-codicon "nf-cod-references") :face font-lock-variable-name-face)
|
||||
(snippet ,(nerd-icons-codicon "nf-cod-symbol_snippet") :face font-lock-string-face)
|
||||
(string ,(nerd-icons-codicon "nf-cod-symbol_string") :face font-lock-string-face)
|
||||
(struct ,(nerd-icons-codicon "nf-cod-symbol_structure") :face font-lock-variable-name-face)
|
||||
(text ,(nerd-icons-codicon "nf-cod-text_size") :face font-lock-doc-face)
|
||||
(typeparameter ,(nerd-icons-codicon "nf-cod-list_unordered") :face font-lock-type-face)
|
||||
(type-parameter ,(nerd-icons-codicon "nf-cod-list_unordered") :face font-lock-type-face)
|
||||
(unit ,(nerd-icons-codicon "nf-cod-symbol_ruler") :face font-lock-constant-face)
|
||||
(value ,(nerd-icons-codicon "nf-cod-symbol_field") :face font-lock-builtin-face)
|
||||
(variable ,(nerd-icons-codicon "nf-cod-symbol_variable") :face font-lock-variable-name-face)
|
||||
(t ,(nerd-icons-codicon "nf-cod-code") :face font-lock-warning-face))))))
|
||||
|
||||
|
||||
(use-package corfu-terminal
|
||||
(use-package kind-icon
|
||||
:straight t
|
||||
:ensure t
|
||||
:custom
|
||||
(kind-icon-default-face 'corfu-default) ; to compute blended backgrounds correctly
|
||||
:config
|
||||
(unless (display-graphic-p)
|
||||
(corfu-terminal-mode)))
|
||||
(add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)
|
||||
(when (icons-displayable-p)
|
||||
(setq kind-icon-use-icons nil)
|
||||
(setq kind-icon-mapping
|
||||
`(
|
||||
(array ,(nerd-icons-codicon "nf-cod-symbol_array") :face font-lock-type-face)
|
||||
(boolean ,(nerd-icons-codicon "nf-cod-symbol_boolean") :face font-lock-builtin-face)
|
||||
(class ,(nerd-icons-codicon "nf-cod-symbol_class") :face font-lock-type-face)
|
||||
(color ,(nerd-icons-codicon "nf-cod-symbol_color") :face success)
|
||||
(command ,(nerd-icons-codicon "nf-cod-terminal") :face default)
|
||||
(constant ,(nerd-icons-codicon "nf-cod-symbol_constant") :face font-lock-constant-face)
|
||||
(constructor ,(nerd-icons-codicon "nf-cod-triangle_right") :face font-lock-function-name-face)
|
||||
(enummember ,(nerd-icons-codicon "nf-cod-symbol_enum_member") :face font-lock-builtin-face)
|
||||
(enum-member ,(nerd-icons-codicon "nf-cod-symbol_enum_member") :face font-lock-builtin-face)
|
||||
(enum ,(nerd-icons-codicon "nf-cod-symbol_enum") :face font-lock-builtin-face)
|
||||
(event ,(nerd-icons-codicon "nf-cod-symbol_event") :face font-lock-warning-face)
|
||||
(field ,(nerd-icons-codicon "nf-cod-symbol_field") :face font-lock-variable-name-face)
|
||||
(file ,(nerd-icons-codicon "nf-cod-symbol_file") :face font-lock-string-face)
|
||||
(folder ,(nerd-icons-codicon "nf-cod-folder") :face font-lock-doc-face)
|
||||
(interface ,(nerd-icons-codicon "nf-cod-symbol_interface") :face font-lock-type-face)
|
||||
(keyword ,(nerd-icons-codicon "nf-cod-symbol_keyword") :face font-lock-keyword-face)
|
||||
(macro ,(nerd-icons-codicon "nf-cod-symbol_misc") :face font-lock-keyword-face)
|
||||
(magic ,(nerd-icons-codicon "nf-cod-wand") :face font-lock-builtin-face)
|
||||
(method ,(nerd-icons-codicon "nf-cod-symbol_method") :face font-lock-function-name-face)
|
||||
(function ,(nerd-icons-codicon "nf-cod-symbol_method") :face font-lock-function-name-face)
|
||||
(module ,(nerd-icons-codicon "nf-cod-file_submodule") :face font-lock-preprocessor-face)
|
||||
(numeric ,(nerd-icons-codicon "nf-cod-symbol_numeric") :face font-lock-builtin-face)
|
||||
(operator ,(nerd-icons-codicon "nf-cod-symbol_operator") :face font-lock-comment-delimiter-face)
|
||||
(param ,(nerd-icons-codicon "nf-cod-symbol_parameter") :face default)
|
||||
(property ,(nerd-icons-codicon "nf-cod-symbol_property") :face font-lock-variable-name-face)
|
||||
(reference ,(nerd-icons-codicon "nf-cod-references") :face font-lock-variable-name-face)
|
||||
(snippet ,(nerd-icons-codicon "nf-cod-symbol_snippet") :face font-lock-string-face)
|
||||
(string ,(nerd-icons-codicon "nf-cod-symbol_string") :face font-lock-string-face)
|
||||
(struct ,(nerd-icons-codicon "nf-cod-symbol_structure") :face font-lock-variable-name-face)
|
||||
(text ,(nerd-icons-codicon "nf-cod-text_size") :face font-lock-doc-face)
|
||||
(typeparameter ,(nerd-icons-codicon "nf-cod-list_unordered") :face font-lock-type-face)
|
||||
(type-parameter ,(nerd-icons-codicon "nf-cod-list_unordered") :face font-lock-type-face)
|
||||
(unit ,(nerd-icons-codicon "nf-cod-symbol_ruler") :face font-lock-constant-face)
|
||||
(value ,(nerd-icons-codicon "nf-cod-symbol_field") :face font-lock-builtin-face)
|
||||
(variable ,(nerd-icons-codicon "nf-cod-symbol_variable") :face font-lock-variable-name-face)
|
||||
(t ,(nerd-icons-codicon "nf-cod-code") :face font-lock-warning-face)))))
|
||||
|
||||
|
||||
;;; Cape
|
||||
;; Setup Cape for better completion-at-point support and more
|
||||
(use-package cape
|
||||
:straight t
|
||||
:ensure t
|
||||
:config
|
||||
;; Add useful defaults completion sources from cape
|
||||
(add-to-list 'completion-at-point-functions #'cape-file)
|
||||
@ -171,6 +194,5 @@
|
||||
corfu-quit-no-match t
|
||||
corfu-auto nil)
|
||||
(corfu-mode))))
|
||||
|
||||
(provide 'init-vertico)
|
||||
;;; init-vertico.el ends here
|
||||
|
||||
@ -1,13 +1,18 @@
|
||||
;;; init-yasnippet.el -*- lexical-binding: t -*-
|
||||
;; Yet another snippet extension
|
||||
(use-package yasnippet
|
||||
:straight t
|
||||
:ensure t
|
||||
:defer t
|
||||
:diminish yas-minor-mode
|
||||
:hook (after-init . yas-global-mode)
|
||||
:config
|
||||
(setq yas-indent-line nil)) ;; indent does not work properly.
|
||||
|
||||
;; Collection of yasnippet snippets
|
||||
(use-package yasnippet-snippets)
|
||||
(use-package yasnippet-snippets
|
||||
:straight t
|
||||
:ensure t)
|
||||
|
||||
(provide 'init-yasnippet)
|
||||
;;; init-yasnippet.el ends here
|
||||
|
||||
12
.config/emacs/readme.org
Normal file
12
.config/emacs/readme.org
Normal file
@ -0,0 +1,12 @@
|
||||
* Need program list
|
||||
** DIRED
|
||||
*** DIRED-RSYNC
|
||||
RSYNC
|
||||
*** DIRED-FD
|
||||
FD
|
||||
+ Ubuntu : fd-find
|
||||
** Org
|
||||
*** OB-RUST
|
||||
rust script
|
||||
+ Cargo install rust-script
|
||||
|
||||
@ -4,27 +4,93 @@ end
|
||||
|
||||
set fish_greeting
|
||||
|
||||
set VETHER_IP $(/bin/grep nameserver /etc/resolv.conf 2> /dev/null | /bin/tr -s ' ' | /bin/cut -d' ' -f2)
|
||||
export DISPLAY=$VETHER_IP:10.0
|
||||
# Format man pages
|
||||
set -x MANROFFOPT "-c"
|
||||
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
||||
|
||||
# Set settings for https://github.com/franciscolourenco/done
|
||||
set -U __done_min_cmd_duration 10000
|
||||
set -U __done_notification_urgency_level low
|
||||
|
||||
## Environment setup
|
||||
# Apply .profile: use this to put fish compatible .profile stuff in
|
||||
if test -f ~/.fish_profile
|
||||
source ~/.fish_profile
|
||||
end
|
||||
|
||||
# Add ~/.local/bin to PATH
|
||||
if test -d ~/.local/bin
|
||||
if not contains -- ~/.local/bin $PATH
|
||||
set -p PATH ~/.local/bin
|
||||
end
|
||||
end
|
||||
|
||||
## Functions
|
||||
# Functions needed for !! and !$ https://github.com/oh-my-fish/plugin-bang-bang
|
||||
function __history_previous_command
|
||||
switch (commandline -t)
|
||||
case "!"
|
||||
commandline -t $history[1]; commandline -f repaint
|
||||
case "*"
|
||||
commandline -i !
|
||||
end
|
||||
end
|
||||
|
||||
function __history_previous_command_arguments
|
||||
switch (commandline -t)
|
||||
case "!"
|
||||
commandline -t ""
|
||||
commandline -f history-token-search-backward
|
||||
case "*"
|
||||
commandline -i '$'
|
||||
end
|
||||
end
|
||||
|
||||
if [ "$fish_key_bindings" = fish_vi_key_bindings ];
|
||||
bind -Minsert ! __history_previous_command
|
||||
bind -Minsert '$' __history_previous_command_arguments
|
||||
else
|
||||
bind ! __history_previous_command
|
||||
bind '$' __history_previous_command_arguments
|
||||
end
|
||||
|
||||
# Fish command history
|
||||
function history
|
||||
builtin history --show-time='%F %T '
|
||||
end
|
||||
|
||||
## Aliases
|
||||
alias ls='eza -al --color=always --group-directories-first --icons' # preferred listing
|
||||
alias la='eza -a --color=always --group-directories-first --icons' # all files and dirs
|
||||
alias ll='eza -l --color=always --group-directories-first --icons' # long format
|
||||
alias lt='eza -aT --color=always --group-directories-first --icons' # tree listing
|
||||
alias l.="eza -a | grep -e '^\.'" # show only dotfiles
|
||||
|
||||
alias big="expac -H M '%m\t%n' | sort -h | nl" # Sort installed packages according to size in MB
|
||||
alias gitpkg='pacman -Q | grep -i "\-git" | wc -l' # List amount of -git packages
|
||||
#pacman unlock
|
||||
alias fixpacman="sudo rm /var/lib/pacman/db.lck"
|
||||
|
||||
# Get fastest mirrors
|
||||
alias mirror="sudo cachyos-rate-mirrors"
|
||||
# Cleanup orphaned packages
|
||||
alias cleanup='sudo pacman -Rns (pacman -Qtdq)'
|
||||
# Recent installed packages
|
||||
alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl"
|
||||
|
||||
# emacs
|
||||
alias emupgrade="~/.emacs.d/bin/doom upgrade"
|
||||
alias emsync="~/.emacs.d/bin/doom sync"
|
||||
alias emd="emacs --daemon"
|
||||
alias emdk="emacsclient --eval '(kill-emacs)'"
|
||||
alias em="emacsclient -c -a 'emacs'"
|
||||
alias emt="emacsclient -c -a 'emacs -nw'"
|
||||
alias emtangle="emacs --batch -eval \"(require 'org)\" --eval '(org-babel-tangle-file \"~/.config/emacs/emacs.org\")'"
|
||||
|
||||
#neovim to vi
|
||||
alias vi=nvim
|
||||
alias vimdiff="nvim -d"
|
||||
#alias cat=bat
|
||||
#pacman unlock
|
||||
alias paruunlock="sudo rm /var/lib/pacman/db.lck"
|
||||
|
||||
#grub update
|
||||
alias update-grub="sudo grub-mkconfig -o /boot/grub/grub.cfg"
|
||||
#youtube-dl
|
||||
alias ytv-best="youtube-dl -f bestvideo+bestaudio "
|
||||
#gpg for future uses
|
||||
#verify signature for isos
|
||||
#alias gpg-check="gpg2 --keyserver-options auto-key-retrieve --verify"
|
||||
@ -33,21 +99,8 @@ alias ytv-best="youtube-dl -f bestvideo+bestaudio "
|
||||
#alias gpg-retrieve="gpg2 --keyserver-options auto-key-retrieve --receive-keys"
|
||||
#alias fix-gpg-retrieve="gpg2 --keyserver-options auto-key-retrieve --receive-keys"
|
||||
#alias fix-key="[ -d ~/.gnupg ] || mkdir ~/.gnupg ; cp /etc/pacman.d/gnupg/gpg.conf ~/.gnupg/ ; echo 'done'"
|
||||
alias startsv="ssh odroid startsv"
|
||||
alias stopsv="ssh odroid stopsv"
|
||||
alias gpulls="pushd ~/.config/emacs && git pull && pushd ~/org && git pull && popd && popd"
|
||||
|
||||
# Changing "ls" to "exa"
|
||||
alias ls='exa -al --color=always --group-directories-first' # my preferred listing
|
||||
alias la='exa -a --color=always --group-directories-first' # all files and dirs
|
||||
alias ll='exa -l --color=always --group-directories-first' # long format
|
||||
alias lt='exa -aT --color=always --group-directories-first' # tree listing
|
||||
alias l.='exa -a | egrep "^\."'
|
||||
|
||||
#figlet -w 100 "$hostname"
|
||||
export PYTHONSTARTUP=/home/jaeus/scripts/my_imports.py
|
||||
|
||||
starship init fish | source
|
||||
|
||||
cat ~/.cache/wal/sequences &
|
||||
#atuin init fish | source
|
||||
|
||||
15
.config/nvim/init.lua
Normal file
15
.config/nvim/init.lua
Normal file
@ -0,0 +1,15 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup("plugins")
|
||||
require("vim-options")
|
||||
@ -1,129 +0,0 @@
|
||||
" Vim Configuration
|
||||
set nocompatible "move using arrow key
|
||||
"filtype plugin on
|
||||
set number
|
||||
set ai "auto indent
|
||||
set si "smart indent
|
||||
set cindent " c style indent
|
||||
|
||||
set shiftwidth=4 "shift order 4step
|
||||
set tabstop=4 "tab order 4step
|
||||
set hlsearch "highlight empathize the word.
|
||||
|
||||
set history=1000 "history store depth
|
||||
set nobackup "no generate swp file
|
||||
set noswapfile
|
||||
set nowritebackup
|
||||
set backupdir=~/.backup/
|
||||
set directory=~/.backup/
|
||||
|
||||
set ruler "display the cursor position
|
||||
set title "display the title
|
||||
set showmatch "display the matched bracket
|
||||
"set nowrap "no auto linefeed
|
||||
set wmnu "auto word finder
|
||||
|
||||
set autochdir " auto change working directory
|
||||
|
||||
set hidden "buffer hidden
|
||||
set updatetime=300 " 300ms
|
||||
set cmdheight=2 " Better display for messages
|
||||
set shortmess+=c " don't give [ins-completion-menu] messages.
|
||||
set signcolumn=yes " always show signcolumns
|
||||
|
||||
|
||||
set backspace=indent,eol,start
|
||||
set fencs=ucs-bom,utf-8,cp949
|
||||
set clipboard^=unnamed,unnamedplus
|
||||
|
||||
set mouse=a
|
||||
|
||||
" PluginManager in vimrc
|
||||
runtime plugList.vim
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Colorscheme
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
"""""""""""""" One Dark
|
||||
"colorscheme onedark
|
||||
"""""""""""""" Grub_box
|
||||
let g:gruvbox_contrast_dark='soft'
|
||||
set background=dark
|
||||
colorscheme gruvbox
|
||||
let g:airline_theme='gruvbox'
|
||||
"""""""""""""" Paper Color
|
||||
"set background=light
|
||||
"colorscheme PaperColor
|
||||
"let g:airline_theme='hybrid'
|
||||
"let g:PaperColor_Theme_Options = {
|
||||
" \ 'theme': {
|
||||
" \ 'default.light': {
|
||||
" \ 'transparent_background': 1
|
||||
" \ }
|
||||
" \ }
|
||||
" \ }
|
||||
"""""""""""""" Molokai
|
||||
"let g:molokai_original = 1
|
||||
"colorscheme molokai
|
||||
"""""""""""""" Solarized 8
|
||||
"set background=light
|
||||
"colorscheme solarized8_high
|
||||
"let g:airline_theme='solarized8'
|
||||
"""""""""""""" Challenger Deep
|
||||
"colorscheme challenger_deep
|
||||
"colorscheme palenight
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Air-line
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
let g:airline#extensions#tabline#enabled = 1 " turn on buffer list
|
||||
set laststatus=2 " turn on bottom bar
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Git Gutter
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
let g:gitgutter_highlight_lines = 1
|
||||
map <F4> :GitGutterLineHighlightsToggle<cr>
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" easymotion
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" <Leader>f{char} to move to {char}
|
||||
"map <Leader>f <Plug>(easymotion-bd-f)
|
||||
"nmap <Leader>f <Plug>(easymotion-overwin-f)
|
||||
|
||||
" s{char}{char} to move to {char}{char}
|
||||
nmap <Leader>s <Plug>(easymotion-overwin-f2)
|
||||
|
||||
" Move to line
|
||||
"map <Leader>L <Plug>(easymotion-bd-jk)
|
||||
"nmap <Leader>L <Plug>(easymotion-overwin-line)
|
||||
|
||||
" Move to word
|
||||
map <Leader>w <Plug>(easymotion-bd-w)
|
||||
nmap <Leader>w <Plug>(easymotion-overwin-w)
|
||||
|
||||
map <C-c> "+ygv"*y
|
||||
map <C-n> "+p
|
||||
map <F12> :cd %:p:h<cr>:term bash<cr>
|
||||
map <F7> @a
|
||||
map <F8> "byaw/incNumber/b
|
||||
cw"bp
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Visual-star (Search using * / in visual modde)
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
xnoremap * :<C-u>call <SID>VSetSearch('/')<CR>/<C-R>=@/<CR><CR>
|
||||
xnoremap # :<C-u>call <SID>VSetSearch('?')<CR>?<C-R>=@/<CR><CR>
|
||||
|
||||
function! s:VSetSearch(cmdtype)
|
||||
let temp = @s
|
||||
norm! gv"sy
|
||||
let @/ = '\V' . substitute(escape(@s, a:cmdtype.'\'), '\n', '\\n', 'g')
|
||||
let @s = temp
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
1
.config/nvim/lua/plugins.lua
Normal file
1
.config/nvim/lua/plugins.lua
Normal file
@ -0,0 +1 @@
|
||||
return {}
|
||||
25
.config/nvim/lua/plugins/etc.lua
Normal file
25
.config/nvim/lua/plugins/etc.lua
Normal file
@ -0,0 +1,25 @@
|
||||
return {
|
||||
{
|
||||
"tpope/vim-unimpaired",
|
||||
config = function()
|
||||
end
|
||||
},
|
||||
{
|
||||
"tpope/vim-commentary",
|
||||
config = function()
|
||||
end
|
||||
},
|
||||
{
|
||||
"tpope/vim-surround",
|
||||
config = function()
|
||||
end
|
||||
},
|
||||
{
|
||||
"easymotion/vim-easymotion",
|
||||
config = function()
|
||||
vim.keymap.set('n', '<Leader>s', '<Plug>(easymotion-overwin-f2)', {})
|
||||
vim.keymap.set('n', '<Leader>w', '<Plug>(easymotion-bd-w)', {})
|
||||
-- vim.keymap.set('n', '<Leader>w', '<Plug>(easymotion-bd-w)', {})
|
||||
end
|
||||
},
|
||||
}
|
||||
14
.config/nvim/lua/plugins/git.lua
Normal file
14
.config/nvim/lua/plugins/git.lua
Normal file
@ -0,0 +1,14 @@
|
||||
return {
|
||||
{
|
||||
"tpope/vim-fugitive", -- git wrapper
|
||||
config = function()
|
||||
end
|
||||
},
|
||||
{
|
||||
"airblade/vim-gitgutter", -- git modified view;
|
||||
config = function()
|
||||
vim.g.gitgutter_highlight_lines = 1
|
||||
vim.keymap.set({'n', 'v'}, '<F4>', ':GitGutterLineHighlightsToggle<cr>', {})
|
||||
end
|
||||
},
|
||||
}
|
||||
25
.config/nvim/lua/plugins/lsp-config.lua
Normal file
25
.config/nvim/lua/plugins/lsp-config.lua
Normal file
@ -0,0 +1,25 @@
|
||||
return {
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
config = function()
|
||||
require("mason").setup()
|
||||
end
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
config = function()
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {"lua_ls", "clangd"}
|
||||
})
|
||||
end
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
local lspconfig = require("lspconfig")
|
||||
lspconfig.lua_ls.setup({})
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, {})
|
||||
end
|
||||
}
|
||||
}
|
||||
|
||||
12
.config/nvim/lua/plugins/lualine.lua
Normal file
12
.config/nvim/lua/plugins/lualine.lua
Normal file
@ -0,0 +1,12 @@
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
config = function()
|
||||
require('lualine').setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto'
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
12
.config/nvim/lua/plugins/neo-tree.lua
Normal file
12
.config/nvim/lua/plugins/neo-tree.lua
Normal file
@ -0,0 +1,12 @@
|
||||
return {
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
config = function()
|
||||
vim.keymap.set('n', '<F8>', ':Neotree filesystem reveal left<CR>', {})
|
||||
-- vim.keymap.set('n', '<C-n>', ':Neotree filesystem reveal left<CR>', {})
|
||||
end
|
||||
}
|
||||
6
.config/nvim/lua/plugins/suda.lua
Normal file
6
.config/nvim/lua/plugins/suda.lua
Normal file
@ -0,0 +1,6 @@
|
||||
return {
|
||||
'lambdalisue/suda.vim',
|
||||
config = function()
|
||||
end
|
||||
}
|
||||
|
||||
55
.config/nvim/lua/plugins/themes.lua
Normal file
55
.config/nvim/lua/plugins/themes.lua
Normal file
@ -0,0 +1,55 @@
|
||||
return {
|
||||
{
|
||||
"NLKNguyen/papercolor-theme",
|
||||
config = function()
|
||||
-- vim.cmd("set background=light")
|
||||
-- vim.cmd.colorscheme "PaperColor"
|
||||
end
|
||||
},
|
||||
{
|
||||
"tomasr/molokai",
|
||||
config = function()
|
||||
-- vim.cmd.colorscheme "molokai"
|
||||
end
|
||||
},
|
||||
{
|
||||
"joshdick/onedark.vim",
|
||||
config = function()
|
||||
-- vim.cmd.colorscheme "onedark"
|
||||
end
|
||||
},
|
||||
{
|
||||
'morhetz/gruvbox',
|
||||
config = function()
|
||||
vim.g.gruvbox_contrast_dark='soft'
|
||||
vim.cmd("set background=dark")
|
||||
vim.cmd.colorscheme "gruvbox"
|
||||
end
|
||||
},
|
||||
{
|
||||
"drewtempelmeyer/palenight.vim",
|
||||
config = function()
|
||||
-- vim.cmd.colorscheme "palenight"
|
||||
end
|
||||
},
|
||||
{
|
||||
"challenger-deep-theme/vim",
|
||||
name = "challenger_deep",
|
||||
config = function()
|
||||
-- vim.cmd.colorscheme "challenger_deep"
|
||||
end
|
||||
},
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
config = function()
|
||||
-- vim.cmd.colorscheme "catppuccin"
|
||||
end
|
||||
},
|
||||
{
|
||||
"tomasr/molokai",
|
||||
config = function()
|
||||
-- vim.cmd.colorscheme "molokai"
|
||||
end
|
||||
},
|
||||
}
|
||||
|
||||
12
.config/nvim/lua/plugins/treesitter.lua
Normal file
12
.config/nvim/lua/plugins/treesitter.lua
Normal file
@ -0,0 +1,12 @@
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
local configs = require("nvim-treesitter.configs")
|
||||
configs.setup({
|
||||
ensure_installed = {"lua", "c", "rust", "verilog"},
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true }
|
||||
})
|
||||
end
|
||||
}
|
||||
52
.config/nvim/lua/vim-options.lua
Normal file
52
.config/nvim/lua/vim-options.lua
Normal file
@ -0,0 +1,52 @@
|
||||
-- Vim Configuration
|
||||
vim.cmd("set nocompatible") -- move using arrow key
|
||||
-- filtype plugin on
|
||||
vim.cmd("set number")
|
||||
vim.cmd("set ai") -- auto indent
|
||||
vim.cmd("set si") -- smart indent
|
||||
vim.cmd("set cindent") -- c style indent
|
||||
|
||||
vim.cmd("set expandtab") -- tab to space
|
||||
vim.cmd("set shiftwidth=4") -- shift order 4step
|
||||
vim.cmd("set tabstop=4") -- tab order 4step
|
||||
vim.cmd("set hlsearch") -- highlight empathize the word.
|
||||
|
||||
vim.cmd("set history=1000") -- history store depth
|
||||
vim.cmd("set nobackup") -- no generate swp file
|
||||
vim.cmd("set noswapfile")
|
||||
vim.cmd("set nowritebackup")
|
||||
vim.cmd("set backupdir=~/.backup/")
|
||||
vim.cmd("set directory=~/.backup/")
|
||||
|
||||
vim.cmd("set ruler") -- display the cursor position
|
||||
vim.cmd("set title") -- display the title
|
||||
vim.cmd("set showmatch") -- display the matched bracket
|
||||
-- set nowrap "no auto linefeed
|
||||
vim.cmd("set wmnu") -- auto word finder
|
||||
|
||||
vim.cmd("set autochdir") -- auto change working directory
|
||||
|
||||
vim.cmd("set hidden") -- buffer hidden
|
||||
vim.cmd("set updatetime=300") -- 300ms
|
||||
vim.cmd("set cmdheight=2") -- Better display for messages
|
||||
vim.cmd("set shortmess+=c") -- don't give [ins-completion-menu] messages.
|
||||
vim.cmd("set signcolumn=yes") -- always show signcolumns
|
||||
|
||||
|
||||
vim.cmd("set backspace=indent,eol,start")
|
||||
vim.cmd("set fencs=ucs-bom,utf-8,cp949")
|
||||
-- vim.cmd("set clipboard^=unnamed,unnamedplus")
|
||||
vim.cmd("set clipboard+=unnamedplus")
|
||||
|
||||
vim.cmd("set mouse=a")
|
||||
|
||||
-- normal
|
||||
vim.keymap.set('n', '<C-h>', '<C-w>h', {})
|
||||
vim.keymap.set('n', '<C-l>', '<C-w>l', {})
|
||||
vim.keymap.set('n', '<C-j>', '<C-w>j', {})
|
||||
vim.keymap.set('n', '<C-k>', '<C-w>k', {})
|
||||
-- vim.keymap.set('n', '<C-c>', '"*y', {})
|
||||
-- vim.keymap.set('n', '<C-n>', '"*p', {})
|
||||
--
|
||||
vim.keymap.set('n', '<F12>', ':cd %:p:h<cr>:term zsh<cr>', {})
|
||||
vim.keymap.set('n', '<F7>', '@a', {})
|
||||
@ -1,25 +0,0 @@
|
||||
call plug#begin('~/.vim/plugged')
|
||||
Plug 'lambdalisue/suda.vim'
|
||||
" color scheme
|
||||
Plug 'morhetz/gruvbox'
|
||||
"Plug 'lifepillar/vim-solarized8'
|
||||
"Plug 'NLKNguyen/papercolor-theme'
|
||||
"Plug 'tomasr/molokai'
|
||||
"Plug 'joshdick/onedark.vim'
|
||||
"Plug 'challenger-deep-theme/vim', { 'as': 'challenger-deep' }
|
||||
Plug 'drewtempelmeyer/palenight.vim'
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
Plug 'tpope/vim-unimpaired'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'tpope/vim-fugitive' " git wrapper
|
||||
Plug 'airblade/vim-gitgutter' " git modified view;
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'easymotion/vim-easymotion'
|
||||
|
||||
"Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
|
||||
|
||||
|
||||
call plug#end()
|
||||
|
||||
@ -2,10 +2,13 @@
|
||||
|
||||
super+Return
|
||||
alacritty
|
||||
super+shift+Return
|
||||
~/scripts/scpad
|
||||
super+shift+p
|
||||
~/scripts/pythonpad
|
||||
#Apps and programs
|
||||
super+e
|
||||
emacs --debug-init
|
||||
#emacsclient -c -a 'emacs'
|
||||
emacsclient -c -a 'emacs'
|
||||
super+b
|
||||
qutebrowser
|
||||
super+f
|
||||
@ -24,147 +27,41 @@ super+shift+c
|
||||
bspc node -c
|
||||
super+shift+q
|
||||
killall picom & killall sxhkd & bspc quit
|
||||
super+s
|
||||
scrot -e 'xclip -selection clipboard -t image/png -i $f'
|
||||
super+shift+s
|
||||
scrot -s -e 'xclip -selection clipboard -t image/png -i $f'
|
||||
super+shift+e
|
||||
rofi -mode drun -theme solarized -font "hack 20" -show combi
|
||||
rofi -show drun
|
||||
alt+Tab
|
||||
rofi -mode window -theme solarized -font "hack 20" -show
|
||||
rofi -show window
|
||||
|
||||
##rofi things
|
||||
##Launch apps
|
||||
#super+shift+e
|
||||
# ~/.bscripts/rofi.sh drun
|
||||
#
|
||||
##Window switcher
|
||||
#alt+Tab
|
||||
# ~/.bscripts/rofi.sh window
|
||||
#
|
||||
##Configuration launcher
|
||||
#super+shift+s
|
||||
# ~/.bscripts/rofi.sh config
|
||||
#
|
||||
##Resolution switcher
|
||||
##control+shift+p
|
||||
# #bash -c "~/.bscripts/rofi.sh resolution"
|
||||
#
|
||||
##Screenshot
|
||||
#Print
|
||||
# ~/.bscripts/ss.sh
|
||||
##Delayed screenshot
|
||||
#super+Print
|
||||
# sleep 3 && ~/.bscripts/ss.sh
|
||||
#
|
||||
##Color picker
|
||||
#control+alt+c
|
||||
# colorpicker --short --one-shot | xclip -selection "clipboard"
|
||||
#
|
||||
##Suspend the pc
|
||||
#super+o
|
||||
# ~/.bscripts/lock.sh
|
||||
#
|
||||
##Osu stuff
|
||||
#control+alt+o
|
||||
# xsetwacom --set "HUION 420 Pen stylus" Area 1000 0 5000 3700
|
||||
#shift+control+o
|
||||
# xsetwacom set "HUION 420 Pen stylus" ResetArea
|
||||
##super+x
|
||||
## ~/.osuthings/surfdirect.sh raise
|
||||
##super+z
|
||||
## ~/.osuthings/surfdirect.sh lower
|
||||
#
|
||||
##Window and workspace shenanigans
|
||||
#super+c
|
||||
# wmctrl -c `xdotool getwindowfocus` -i
|
||||
#alt+F4
|
||||
# xdotool getwindowfocus windowclose
|
||||
#control+period
|
||||
# ~/.bscripts/wpm_reports.sh move +1
|
||||
#control+comma
|
||||
# ~/.bscripts/wpm_reports.sh move -1
|
||||
#control+alt+period
|
||||
# ~/.bscripts/wpm_reports.sh select +1
|
||||
#control+alt+comma
|
||||
# ~/.bscripts/wpm_reports.sh select -1
|
||||
#super+{1,2,3,4,5}
|
||||
# ~/.bscripts/wpm_reports.sh jump {0,1,2,3,4}
|
||||
#
|
||||
##Weeb
|
||||
#control+alt+b
|
||||
# ~/.mangaread
|
||||
#
|
||||
##Display stuff
|
||||
#super+control+p
|
||||
# xrandr --output HDMI1 --auto --left-of eDP1
|
||||
#super+shift+p
|
||||
# xrandr -s 0
|
||||
#
|
||||
## Toggle picom
|
||||
super+p
|
||||
if (pgrep -c picom); then; killall picom; else; picom; fi
|
||||
super+w
|
||||
~/scripts/random_wallpaper.sh
|
||||
|
||||
##Keyboard layouts
|
||||
#super+space
|
||||
# ~/.config/eww/mybar/scripts/kb_layouts cycle es us
|
||||
#
|
||||
##Media controls
|
||||
#alt+period
|
||||
# ~/.bscripts/volume.sh up #&& pkill -RTMIN+2 i3blocks
|
||||
#alt+comma
|
||||
# ~/.bscripts/volume.sh down #&& pkill -RTMIN+2 i3blocks
|
||||
#alt+m
|
||||
# ~/.bscripts/volume.sh mute
|
||||
#XF86AudioRaiseVolume
|
||||
# ~/.bscripts/volume.sh up #&& pkill -RTMIN+2 i3blocks
|
||||
#XF86AudioLowerVolume
|
||||
# ~/.bscripts/volume.sh down#&& pkill -RTMIN+2 i3blocks
|
||||
#XF86AudioMute
|
||||
# ~/.bscripts/volume.sh mute #&& pkill -RTMIN+2 i3blocks
|
||||
#alt+shift+period
|
||||
# ~/.bscripts/brightness.sh up
|
||||
#alt+shift+comma
|
||||
# ~/.bscripts/brightness.sh down
|
||||
#Pause
|
||||
# playerctl play-pause
|
||||
#XF86AudioPlay
|
||||
# playerctl play-pause
|
||||
#XF86AudioPause
|
||||
# playerctl play-pause
|
||||
#XF86AudioNext
|
||||
# playerctl next
|
||||
#XF86AudioPrev
|
||||
# playerctl previous
|
||||
#
|
||||
##Open-close eww
|
||||
#control+alt+e
|
||||
# ~/.config/eww/dashboard/launch_dashboard
|
||||
#super+m
|
||||
# ~/.config/eww/mybar/scripts/popup_music
|
||||
#
|
||||
##bspwm stuff
|
||||
#super+s
|
||||
# bspc desktop focused --layout next && polybar-msg hook layout 1
|
||||
#super+shift+q
|
||||
# ~/.bscripts/rofi.sh outopts
|
||||
#XF86PowerOff
|
||||
# ~/.bscripts/rofi.sh outopts
|
||||
# reset window manager & SXHKD
|
||||
super+shift+r
|
||||
bspc wm -r
|
||||
#control+alt+space
|
||||
# ~/.bscripts/toggle_float.sh
|
||||
#super+shift+{k,j,h,l}
|
||||
# play -v 0.4 ~/Documents/Sounds/tile.wav& ~/.bscripts/bsmove.sh {north,south,west,east}
|
||||
#super+{k,j,h,l}
|
||||
# ~/.bscripts/bselect.sh {north,south,west,east}
|
||||
#
|
||||
#super+alt+l
|
||||
# bspc node focused -z right 15 0
|
||||
#super+alt+h
|
||||
# bspc node focused -z left -15 0
|
||||
#super+alt+k
|
||||
# bspc node focused -z top 0 -15
|
||||
#super+alt+j
|
||||
# bspc node focused -z bottom 0 15
|
||||
|
||||
|
||||
|
||||
# lock screen
|
||||
super+shift+l
|
||||
i3lock-fancy
|
||||
|
||||
# resize
|
||||
super+alt+l
|
||||
bspc node focused -z right 15 0
|
||||
super+alt+h
|
||||
bspc node focused -z right -15 0
|
||||
super+alt+k
|
||||
bspc node focused -z bottom 0 -15
|
||||
super+alt+j
|
||||
bspc node focused -z bottom 0 15
|
||||
|
||||
super + shift + f
|
||||
bspc node focused -t "~floating"
|
||||
super + {_,shift +} + {h,l}
|
||||
@ -175,10 +72,6 @@ super + j
|
||||
if (bspc query -N -n focused.fullscreen); then; bspc query -N -n .local.window.hidden.!focused | xargs -I\{\} bspc node \{\} -g hidden; bspc node next.leaf.local -f -t fullscreen; bspc query -N -n .local.window.!hidden.!focused | xargs -I\{\} bspc node \{\} -g hidden; else; bspc node -f south; fi
|
||||
super + k
|
||||
if (bspc query -N -n focused.fullscreen); then; bspc query -N -n .local.window.hidden.!focused | xargs -I\{\} bspc node \{\} -g hidden; bspc node prev.leaf.local -f -t fullscreen; bspc query -N -n .local.window.!hidden.!focused | xargs -I\{\} bspc node \{\} -g hidden; else; bspc node -f north; fi
|
||||
#super + {_,shift + }n
|
||||
# bspc node -f {next,prev}.local super + {t,shift + t,s,f}
|
||||
#super + {t,shift + t,s,f}
|
||||
# bspc node -t {\~tiled,\~pseudo_tiled, \~floating,\~fullscreen}
|
||||
|
||||
super+space
|
||||
if (bspc query -N -n focused.fullscreen); then; bspc node -f -t tiled; polybar-msg cmd show; bspc query -N -n .local.window.hidden.!focused | xargs -I\{\} bspc node \{\} -g hidden; else; bspc node -f -t fullscreen; polybar-msg cmd hide; bspc query -N -n .local.window.!hidden.!focused | xargs -I\{\} bspc node \{\} -g hidden; fi
|
||||
|
||||
@ -6,3 +6,11 @@
|
||||
defaultBranch = master
|
||||
[core]
|
||||
editor = vim
|
||||
[protocol "file"]
|
||||
allow = always
|
||||
[commit]
|
||||
gpgsign = false
|
||||
[tag]
|
||||
gpgsign = false
|
||||
[gpg]
|
||||
format = openpgp
|
||||
|
||||
11
.gitignore
vendored
11
.gitignore
vendored
@ -1,17 +1,8 @@
|
||||
.ssh/*
|
||||
!.ssh/config
|
||||
/.emacs.rational.d/backups/
|
||||
/.emacs.rational.d/var/
|
||||
/.emacs.rational.d/undo/
|
||||
/.config/htop/
|
||||
/.config/qutebrowser/
|
||||
/.config/tmux/
|
||||
/.emacs.vanilla/var/
|
||||
/.emacs.vanilla/straight/
|
||||
/.emacs.vanilla/elpa/
|
||||
/.emacs.vanilla/.org-generic-id-locations
|
||||
/.emacs.df/var/
|
||||
/.emacs.vanilla/emacs.el
|
||||
/.config/blender/
|
||||
/.config/configstore/
|
||||
/.config/dconf/
|
||||
@ -23,7 +14,5 @@
|
||||
/.config/pulse/
|
||||
/.config/tmuxinator/
|
||||
/.config/vimb/
|
||||
/.emacs.df/.org-id-locations
|
||||
/.emacs.df/bookmarks
|
||||
/.config/Code - OSS/
|
||||
/.config/Electron/
|
||||
|
||||
37
.minttyrc
Normal file
37
.minttyrc
Normal file
@ -0,0 +1,37 @@
|
||||
# Dracula
|
||||
ForegroundColour=248,248,242
|
||||
BackgroundColour=40,42,54
|
||||
Black=0,0,0
|
||||
BoldBlack=104,104,104
|
||||
Red=255,85,85
|
||||
BoldRed=255,110,103
|
||||
Green=80,250,123
|
||||
BoldGreen=90,247,142
|
||||
Yellow=241,250,140
|
||||
BoldYellow=244,249,157
|
||||
Blue=202,169,250
|
||||
BoldBlue=202,169,250
|
||||
Magenta=255,121,198
|
||||
BoldMagenta=255,146,208
|
||||
Cyan=139,233,253
|
||||
BoldCyan=154,237,254
|
||||
White=191,191,191
|
||||
BoldWhite=230,230,230
|
||||
|
||||
|
||||
Font=ComicShanns Nerd Font
|
||||
FontHeight=12
|
||||
Term=xterm-256color
|
||||
Locale=ko_KR
|
||||
Charset=UTF-8
|
||||
FontSmoothing=default
|
||||
AllowBlinking=no
|
||||
BoldAsFont=no
|
||||
CursorType=block
|
||||
CursorBlinks=yes
|
||||
BellTaskbar=no
|
||||
BellType=0
|
||||
BellFlash=no
|
||||
FontWeight=400
|
||||
FontIsBold=no
|
||||
Transparency=medium
|
||||
16
.zshrc
16
.zshrc
@ -35,11 +35,9 @@ alias ytv-best="youtube-dl -f bestvideo+bestaudio "
|
||||
alias startsv="ssh odroid startsv"
|
||||
alias stopsv="ssh odroid stopsv"
|
||||
|
||||
alias ls="exa -al --color=always --group-directories-first"
|
||||
alias la="exa -a --color=always --group-directories-first"
|
||||
alias ll="exa -l --color=always --group-directories-first"
|
||||
alias lt="exa -aT --color=always --group-directories-first"
|
||||
alias l.='exa -a | egrep "^\."'
|
||||
alias ls="eza -a --icons"
|
||||
alias ll="eza -al --icons"
|
||||
alias lt="eza -a --tree --level=1 --icons"
|
||||
|
||||
# WSL2
|
||||
if [[ $JUPCID == "WSL" ]];then
|
||||
@ -48,6 +46,12 @@ if [[ $JUPCID == "WSL" ]];then
|
||||
fi
|
||||
|
||||
# python env
|
||||
export PYTHONSTARTUP=~/scripts/my_imports.py
|
||||
export PYTHONSTARTUPSCRIPT=~/scripts/my_imports.py
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
|
||||
# pokemon-colorscripts --no-title -s -r
|
||||
|
||||
. "$HOME/.atuin/bin/env"
|
||||
|
||||
eval "$(atuin init zsh)"
|
||||
|
||||
16
scripts/color_test.sh
Executable file
16
scripts/color_test.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
# Based on: https://gist.github.com/XVilka/8346728
|
||||
|
||||
awk -v term_cols="${width:-$(tput cols || echo 80)}" 'BEGIN{
|
||||
s="/\\";
|
||||
for (colnum = 0; colnum<term_cols; colnum++) {
|
||||
r = 255-(colnum*255/term_cols);
|
||||
g = (colnum*510/term_cols);
|
||||
b = (colnum*255/term_cols);
|
||||
if (g>255) g = 510-g;
|
||||
printf "\033[48;2;%d;%d;%dm", r,g,b;
|
||||
printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
|
||||
printf "%s\033[0m", substr(s,colnum%2+1,1);
|
||||
}
|
||||
printf "\n";
|
||||
}'
|
||||
67
scripts/init_script_archlinux.sh
Executable file
67
scripts/init_script_archlinux.sh
Executable file
@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
|
||||
# essential packages
|
||||
paru -S eza --noconfirm
|
||||
|
||||
# clone config
|
||||
git clone https://github.com/JaeUs3792/dotfiles ~/.dotfiles
|
||||
|
||||
paru -S stow --noconfirm
|
||||
cd ~/.dotfiles
|
||||
stow .
|
||||
|
||||
# korean input
|
||||
paru -S ibus-hangul
|
||||
|
||||
#ZSH
|
||||
paru -S zsh starship --noconfirm
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
|
||||
mv ~/.zshrc.pre-oh-my-zsh ~/.zshrc
|
||||
|
||||
# fish
|
||||
paru -S fish starship bat --noconfirm
|
||||
|
||||
|
||||
# neovim
|
||||
paru -S neovim nvim-lazy --noconfirm
|
||||
|
||||
# git config
|
||||
git config --global user.name "JaeYoo-Im"
|
||||
git config --global user.email "cpu3792@gmail.com"
|
||||
git config --global user.autocrlf input
|
||||
|
||||
# tmux
|
||||
paru -S tmux --noconfirm
|
||||
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||
TMUX_PLUGIN_MANAGER_PATH=~/.config/tmux/plugins/tpm ~/.tmux/plugins/tpm/scripts/install_plugins.sh
|
||||
TMUX_PLUGIN_MANAGER_PATH=~/.config/tmux/plugins/tpm ~/.tmux/plugins/tpm/bin/update_plugins all
|
||||
|
||||
# font
|
||||
paru -S ttf-firacode-nerd ttf-mononoki-nerd otf-comicshanns-nerd ttf-times-new-roman ttf-nanum noto-fonts-emoji ttf-symbola noto-fonts-cjk --noconfirm
|
||||
|
||||
#syncthing
|
||||
paru -S syncthing --noconfirm
|
||||
sudo systemctl enable syncthing@jaeus.service
|
||||
sudo systemctl start syncthing@jaeus.service
|
||||
|
||||
# express vpn
|
||||
paru -S expressvpn-gui
|
||||
sudo systemctl enable expressvpn
|
||||
sudo systemctl start expressvpn
|
||||
|
||||
#emacs
|
||||
paru -S emacs --noconfirm
|
||||
paru -S texlive-basic texlive-langkorean --noconfirm
|
||||
paru -S jupyterlab --noconfirm
|
||||
paru -S zathura-pdf-mupdf
|
||||
|
||||
#verilator
|
||||
paru -S verilator
|
||||
|
||||
# trilium
|
||||
paru -S trilium-bin
|
||||
|
||||
# sourcegit
|
||||
paru -S sourcegit-bin
|
||||
@ -1,69 +0,0 @@
|
||||
#!/bin/sh
|
||||
paru
|
||||
paru -S stow trayer --noconfirm
|
||||
|
||||
# config file handling
|
||||
rm ~/.config/polybar/config
|
||||
rm ~/.zshrc ~/.bashrc ~/.xmonad/xmonad.hs
|
||||
rm -rf ~/.config/alacritty ~/.xmonad/scripts
|
||||
cd ~/.dotfiles
|
||||
stow .
|
||||
|
||||
|
||||
#ZSH
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
|
||||
mv ~/.zshrc.pre-oh-my-zsh ~/.zshrc
|
||||
|
||||
# NUSHELL
|
||||
#paru -S nushell
|
||||
#nu ~/scripts/init_script_nushell.nu
|
||||
#echo "Changing Shell to nushell"
|
||||
#chsh -s /bin/nu # change shell
|
||||
|
||||
# FISH
|
||||
#paru -S fish starship
|
||||
#chsh -s /bin/fish
|
||||
|
||||
# neovim
|
||||
paru -S neovim --noconfirm
|
||||
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
|
||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||
nvim +PlugInstall +q +q
|
||||
|
||||
# git config
|
||||
git config --global user.name "JaeYoo-Im"
|
||||
git config --global user.email "cpu3792@gmail.com"
|
||||
git config --global user.autocrlf input
|
||||
|
||||
# tmux
|
||||
paru -S tmux --noconfirm
|
||||
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||
TMUX_PLUGIN_MANAGER_PATH=~/.config/tmux/plugins/tpm ~/.tmux/plugins/tpm/scripts/install_plugins.sh
|
||||
TMUX_PLUGIN_MANAGER_PATH=~/.config/tmux/plugins/tpm ~/.tmux/plugins/tpm/bin/update_plugins all
|
||||
|
||||
# font
|
||||
paru -S ttf-firacode-nerd ttf-nanum ttf-mononoki-nerd --noconfirm
|
||||
|
||||
# hangul
|
||||
paru -S fcitx-hangul fcitx-configtool --noconfirm
|
||||
|
||||
# enpass
|
||||
#paru -S enpass --noconfirm
|
||||
#paru -S bitwarden --noconfirm
|
||||
#paru -S green-tunnel --noconfirm
|
||||
|
||||
#emacs
|
||||
paru -S ripgrep emacs --noconfirm
|
||||
paru -S texlive-most texlive-lang --noconfirm
|
||||
paru -S jupyterlab --noconfirm
|
||||
paru -S zathura zathura-cb zathura-pdf-mupdf
|
||||
|
||||
#syncthing
|
||||
paru -S syncthing --noconfirm
|
||||
mkdir SyncThing
|
||||
sudo systemctl enable syncthing@jaeus.service
|
||||
|
||||
# etc
|
||||
paru -S figlet --noconfirm
|
||||
21
scripts/install_fonts.ps1
Normal file
21
scripts/install_fonts.ps1
Normal file
@ -0,0 +1,21 @@
|
||||
pushd c:\tools
|
||||
|
||||
$a = "FiraCode","ComicShannsMono","Mononoki"
|
||||
|
||||
foreach($i in $a){
|
||||
curl -s https://api.github.com/repos/ryanoasis/nerd-fonts/releases/latest | grep "browser_download_url.*$i.zip" | cut -d : -f 2,3 | tr -d """" | wget -qi -
|
||||
}
|
||||
|
||||
|
||||
$files = Get-ChildItem .\*.zip
|
||||
mkdir Fonts
|
||||
foreach($file in $files){
|
||||
unzip -o $file -d .\Fonts
|
||||
}
|
||||
|
||||
cp Fonts\*.ttf c:\windows\fonts
|
||||
cp Fonts\*.otf c:\windows\fonts
|
||||
|
||||
popd
|
||||
|
||||
|
||||
21
scripts/merge_all_files.sh
Executable file
21
scripts/merge_all_files.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
if [ "$#" -ne 3 ]; then
|
||||
echo "Usage : ./merge_all_files.sh [dir] [pattern] [file]"
|
||||
exit
|
||||
fi
|
||||
|
||||
pushd $1
|
||||
find . -type f -name "*.$2" -exec sh -c 'cat "{}"' >> $3 \;
|
||||
popd
|
||||
|
||||
|
||||
|
||||
# files=()
|
||||
# while IFS= read -r -d $'\0'; do
|
||||
# files+=("$REPLY")
|
||||
# done < <(find . -type f -name "*.$1" -print0)
|
||||
|
||||
# echo $files
|
||||
# for file in files; do
|
||||
# echo $file
|
||||
# done
|
||||
18
scripts/pythonpad
Executable file
18
scripts/pythonpad
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
winclass="$(xdotool search --class pythonpad)";
|
||||
|
||||
if [ -z "$winclass" ]; then
|
||||
PYTHONSTARTUP=/home/jaeus/scripts/my_imports.py alacritty --class pythonpad -e python
|
||||
else
|
||||
if [ ! -f /tmp/pythonpad ]; then
|
||||
touch /tmp/pythonpad && xdo hide "$winclass"
|
||||
elif [ -f /tmp/pythonpad ]; then
|
||||
rm /tmp/pythonpad && xdo show "$winclass"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
3
scripts/questasim_install_libs.sh
Executable file
3
scripts/questasim_install_libs.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
yay -S python2-bin
|
||||
18
scripts/scpad
Executable file
18
scripts/scpad
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
winclass="$(xdotool search --class scpad)";
|
||||
|
||||
if [ -z "$winclass" ]; then
|
||||
alacritty --class scpad
|
||||
else
|
||||
if [ ! -f /tmp/scpad ]; then
|
||||
touch /tmp/scpad && xdo hide "$winclass"
|
||||
elif [ -f /tmp/scpad ]; then
|
||||
rm /tmp/scpad && xdo show "$winclass"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
3
scripts/take_screenshot.sh
Executable file
3
scripts/take_screenshot.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
scrot -e 'xclip -selection clipboard -t image/png -i $f'
|
||||
6
scripts/update_trilium.ps1
Normal file
6
scripts/update_trilium.ps1
Normal file
@ -0,0 +1,6 @@
|
||||
$a = "FiraCode","ComicShannsMono","Mononoki"
|
||||
|
||||
foreach($i in $a){
|
||||
curl -s https://api.github.com/repos/ryanoasis/nerd-fonts/releases/latest | grep "browser_download_url.*$i.zip" | cut -d : -f 2,3 | tr -d """" | wget -qi -
|
||||
}
|
||||
|
||||
3
scripts/vivado_installlibs.sh
Executable file
3
scripts/vivado_installlibs.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
yay -S ncurses5-compat-libs libxcrypt-compat libpng12 lib32-libpng12 gtk3 inetutils xorg-xlsclients cpio
|
||||
11
scripts/vscode-settings-export.sh
Executable file
11
scripts/vscode-settings-export.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
# export settings
|
||||
# cp ~/.config/Code/User/settings.json ~/.dotfiles/scripts/vscode/
|
||||
# export keybindings
|
||||
# cp ~/.config/Code/User/keybindings.json ~/.dotfiles/scripts/vscode/
|
||||
|
||||
|
||||
# export extensions
|
||||
code --list-extensions > ~/.dotfiles/.config/Code/User/extensions.txt
|
||||
|
||||
7
scripts/vscode-settings-import.sh
Executable file
7
scripts/vscode-settings-import.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# import extensions
|
||||
while read extension; do
|
||||
#code --install-extension "$extension"
|
||||
echo $extension
|
||||
done < ~/.dotfiles/scripts/vscode/extensions.txt
|
||||
Reference in New Issue
Block a user