Compare commits

...

80 Commits

Author SHA1 Message Date
1bb836dee1 pythonpad : env applied. 2025-12-05 13:52:07 +09:00
218ca4bbd7 emacs : use built-in org-mode 2025-08-13 20:22:12 +09:00
a6759eff18 script : nvim 2025-08-13 20:21:51 +09:00
023a6d0c5b fish : atuin is out 2025-08-13 20:21:09 +09:00
aaee6aef92 emacs : org download location setup 2025-08-12 16:00:59 +09:00
b2b4dd33a5 zsh : python startup env 2025-08-12 16:00:36 +09:00
fc4538ac6e python pad 2025-08-12 16:00:23 +09:00
92c63e4949 pythonpad 2025-08-12 16:00:12 +09:00
45830fad57 fish : zsh to fish config. 2025-05-25 23:11:57 +09:00
7a7e38806d script : endeavouros to cachyOS 2025-05-25 23:11:28 +09:00
f8d47693c9 script : init linux 2025-05-22 22:47:19 +09:00
8d34b0f472 emacs : disable valign mode 2025-04-13 09:48:47 +09:00
8a0e52ab03 bspwm : add scratch pad 2025-03-19 16:26:05 +09:00
e559352d85 Merge remote-tracking branch 'origin/main' 2025-03-19 07:17:00 +09:00
e335f8e40c emacs : pdf-tool disable when windows env. 2025-03-16 22:50:21 +09:00
baea7cf95e emacs : tramp config 2025-03-16 18:07:48 +09:00
631b54fbcd emacs/bspwm : update daemon binding 2025-03-16 12:48:19 +09:00
7bc66f159d Merge remote-tracking branch 'origin/main' 2025-03-16 10:27:56 +09:00
e8418bd7af emacs : org noter - roam integration 2025-03-16 10:27:43 +09:00
24f816edd9 emacs : daemon configuration 2025-03-15 16:58:03 +09:00
8e17f130e7 copilot & gpt packages add 2025-03-08 12:08:53 +09:00
e363c90761 emacs : org noter is added, pdf view 2025-02-18 13:29:04 +09:00
5ebf4d23bb wsltty : restore wsltty config 2025-02-18 10:10:08 +09:00
b6dc73188c Merge remote-tracking branch 'origin/main' 2025-02-18 10:07:15 +09:00
5a98c1cb31 emacs : embark keybinding change, C-. is not work on ubuntu 2025-02-01 14:01:06 +09:00
b1128126f4 emacs : unbind keys (symbol-overlay) 2024-12-26 17:15:46 +09:00
c8633e1d37 neovim : theme is changed, for readability 2024-12-26 17:15:12 +09:00
5866ff1364 gitconfig : remove unused 2024-12-26 17:14:35 +09:00
6cdb9c5b8f sxhkd : remove unused binding 2024-12-26 17:14:19 +09:00
533a13971d bspwm : screen rule is removed for fullscreen session 2024-12-26 17:13:06 +09:00
ed95c3a26a leftwm : removed 2024-12-26 17:12:49 +09:00
e28bea766c leftwm : bspwm to leftwm 2024-09-30 20:09:23 +09:00
cefeb45dce Merge branch 'main' of https://github.com/JaeUs3792/dotfiles 2024-09-23 22:00:06 +09:00
4199b6571f emacs : org-modern foreground color to gray 2024-09-05 14:25:16 +09:00
a5096ef3a1 emacs : org-modern keywords color settings 2024-09-05 14:21:15 +09:00
5415fbc30f emacs : chatgpt -> gptel 2024-09-05 14:21:01 +09:00
84fce00146 vscode : configuration 2024-09-04 22:50:57 +09:00
d3fcca3431 vscode : export import scripts 2024-09-04 22:48:19 +09:00
30107eeb1e emacs : rustic to rust-mode 2024-09-04 18:08:39 +09:00
8e2da70b04 emacs : readme add. 2024-09-04 17:29:07 +09:00
4388b5cad5 emacs : move to straight done. 2024-09-04 17:25:57 +09:00
fa34474524 emacs : org-mode, rust 2024-09-04 16:11:18 +09:00
16d23ca7da emacs : magit 2024-09-04 14:36:13 +09:00
a8e4e2a394 emacs : eshell, prompt improvement 2024-09-04 14:33:29 +09:00
08caaa6042 emacs : markdown, reader, docker, utils 2024-09-04 14:21:39 +09:00
45bdf5fa0d emacs : eshell 2024-09-04 14:20:28 +09:00
1d9e083f7b emacs : init-dict will be removed. 2024-09-04 14:19:42 +09:00
e3541521dc emacs : disable for better UX 2024-09-04 11:23:30 +09:00
3306707949 emacs : Highlight ibuffer 2024-09-04 11:13:14 +09:00
95d8784764 emacs : consult switch buffer 2024-09-04 11:12:42 +09:00
518bc79126 emacs : fd-dired config 2024-09-04 10:41:46 +09:00
a646bebbb5 bspwm : add for login environment 2024-09-04 10:39:28 +09:00
e3b0754b0c emacs : dired bindings fix. 2024-09-04 01:33:25 +09:00
b1c8ba0421 emacs : use-package to straight, bookmark gpt dashboard dired 2024-09-03 19:57:10 +09:00
fff61a9139 emacs : use-package to straight, base edit evil general hydra treemacs ui vertico yassnippet 2024-09-03 17:32:02 +09:00
d6e04936a9 Merge remote-tracking branch 'origin/main' 2024-09-02 21:51:41 +09:00
33254b574b emacs : disable treesitter to use verilog-mode 2024-09-02 17:19:49 +09:00
f4d5ef8531 sxhkd : rofi improvement 2024-09-02 17:18:26 +09:00
0cf7cd2b9e emacs : symbol overlay help keybinding "h" to "g" 2024-08-30 16:13:23 +09:00
fc0559a4fc emacs : init-lua to prog 2024-08-30 16:12:57 +09:00
6cf734fc13 emacs : add avy bindings 2024-08-28 17:47:18 +09:00
c590f95ce4 emacs : add lua-mode 2024-08-28 14:26:12 +09:00
7a2834b617 vim : option change to use. 2024-08-28 14:25:38 +09:00
054cea8511 scripts : some script added 2024-08-26 13:39:36 +09:00
0df06aef69 emacs : copilot support 2024-08-26 13:38:57 +09:00
1bdcedb34b sxhkd : bind screenshot key 2024-08-26 13:07:14 +09:00
0f6b4b6cd8 change vim config lua style. 2024-08-26 13:06:22 +09:00
d10e8aa916 powershell font install scripts 2024-05-22 21:29:13 +09:00
7788907562 emacs : binding config file 2024-04-19 14:28:24 +09:00
11402c7859 emacs : hideshow toggle hiding 2024-04-19 13:42:30 +09:00
4e2d4f2b52 emacs : hideshow keybinding 2024-04-19 13:34:18 +09:00
38627c7b08 emacs : disable org-modern table styling and valign mode is added 2024-04-19 13:12:18 +09:00
d478a6ea76 bspwm : add display for other env. / starship : change style 2024-04-19 11:36:17 +09:00
9989d4640e Emacs : add org-drawio package 2024-04-19 00:24:29 +09:00
cfdd08bfe6 polybar : workspace 10 icon fix 2024-04-11 21:29:35 +09:00
63770c0d61 random wallpaper env selection. 2024-04-11 21:17:39 +09:00
8edbaa5024 bspwm : polybar dual monitor 2024-04-08 20:40:30 +09:00
f558807896 emacs : follow symlinks / bspwm : selecting options using env 2024-04-05 10:04:32 +09:00
4a99c43304 remove unused scripts, 2024-04-05 09:53:49 +09:00
53e5aed015 bspwm - dual monitor config 2024-04-05 01:32:44 +09:00
91 changed files with 2047 additions and 1476 deletions

View File

@ -0,0 +1,5 @@
github.copilot
github.copilot-chat
mshr-h.veriloghdl
nonylene.dark-molokai-theme
vscodevim.vim

View File

@ -0,0 +1,3 @@
{
}

View File

@ -0,0 +1,3 @@
{
"workbench.colorTheme": "Dark (Molokai)"
}

View File

@ -1,9 +1,19 @@
#!/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
xrandr --output HDMI-1 --primary --mode 2560x1440 --rotate normal
fi
killall bspc
##################################################
# AUTOSTART
##################################################
sleep 1
killall sxhkd
killall picom
sxhkd &
@ -12,12 +22,20 @@ 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
wmname LG3D
export _JAVA_AWT_WM_NONREPARETING=1
bspc monitor -d 1 2 3 4 5
if [[ $JUPCID == "HOME-DESKTOP" ]]; then
bspc monitor DP-4 -d 1 2 3 4 5
bspc monitor HDMI-0 -d 6 7 8 9 0
else
bspc monitor -d 1 2 3 4 5 6 7 8 9 0
fi
bspc config border_width 2
bspc config window_gap 10
@ -29,9 +47,9 @@ bspc config gapless_monocle true
#bspc config pointer_follows_focus true
#bspc config single_monocle true
bspc config top_monocle_padding 20
bspc config left_monocle_padding 20
bspc config right_monocle_padding 20
bspc config bottom_monocle_padding 20
bspc config left_monocle_padding 20
bspc config right_monocle_padding 20
bspc config bottom_monocle_padding 20
#bspc config ignore_ewmh_fullscreen enter
# Colors
@ -50,15 +68,14 @@ 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
polybar panel-bspwm
if [[ $JUPCID == "HOME-DESKTOP" ]]; then
polybar panel-bspwm-1 & polybar panel-bspwm-2
else
polybar panel-bspwm --config=~/.config/polybar/config.ini
fi

View File

@ -1,5 +1,6 @@
*
*/
!readme.org
!early-init.el
!init.el
!custom-default.el

View File

@ -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 . 50) or (100 . 100)
(set-frame-parameter (selected-frame) 'alpha '(85 . 50))
;; 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")

View File

@ -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

View File

@ -6,6 +6,8 @@
(setq auto-mode-case-fold nil)
(setq vc-follow-symlinks t) ;; always follow symlink
(unless (or (daemonp) noninteractive init-file-debug)
;; Prevent flashing of messages at startup
(when (display-graphic-p)
@ -71,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)
@ -103,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)
@ -112,5 +109,7 @@ Otherwise the startup will be very slow. "
(require 'init-extra)
(require 'init-chatgpt)
(require 'init-copilot)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; init.el ends here

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View 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

View File

@ -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

View File

@ -2,6 +2,8 @@
(require 'init-funcs)
(use-package dashboard
:straight t
:ensure t
:diminish dashboard-mode
:functions (nerd-icons-faicon
nerd-icons-mdicon

View File

@ -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))

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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")
@ -55,18 +62,7 @@
("c" hs-cycle "cycle block")
("s" hs-show-block "show block")
("h" hs-hide-block "hide block")
("l" hs-hide-level "hide level"))
"Move"
(("C-a" mwim-beginning-of-code-or-line "")
("C-e" mwim-end-of-code-or-line "")
("C-b" backward-char "")
("C-n" next-line "")
("C-p" previous-line "")
("C-f" forward-char "")
("C-v" pager-page-down "")
("M-v" pager-page-up "")
("M-<" beginning-of-buffer "")
("M->" end-of-buffer ""))))
("l" hs-hide-level "hide level"))))
:bind ("C-~" . hideshow-hydra/body)
:hook (prog-mode . hs-minor-mode)
:config
@ -123,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.

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -8,9 +8,16 @@
(global-unset-key (kbd "C-j"))
(global-unset-key (kbd "C-k"))
(global-unset-key (kbd "S-SPC")) ;; input method / use only S-\
(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
@ -18,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
@ -58,16 +68,23 @@
;; Counsel
"f" '(:ignore t :which-key "file op.")
"f r" '(consult-recent-file :which-key "Recent files")
"f i" '((lambda () (interactive) (find-file "~/.config/emacs/init.el")) :which-key "open emacs init file")
"f l" '((lambda () (interactive) (find-file "~/.config/emacs/lisp")) :which-key "open emacs lisp dir")
;; Magit
"g" '(:ignore t :which-key "magit")
"g g" '(magit :which-key "magit")
;; Hydra
"h" '(:ignore t :which-key "hydra")
"h t" '(hydra-text-scale/body :which-key "scale text")
"h w" '(hydra-writeroom-scale/body :which-key "scale whiteroom")
"h a" '(hydra-modify-alpha/body :which-key "modify alpha background")
"h j" '(dumb-jump-hydra/body :which-key "dumb jump hydra")
"h o" '(org-hydra/body :which-key "org hydra")
"h" '(:ignore t :which-key "hydra / hideshow")
"h h" '(:ignore t :which-key "hydra")
"h t" '(hs-toggle-hiding :which-key "hideshow toggle hiding")
"h a" '(hs-hide-all :which-key "hideshow hide all")
"h s" '(hs-show-all :which-key "hideshow show all")
;; "h t" '(hydra-text-scale/body :which-key "scale text")
;; "h w" '(hydra-writeroom-scale/body :which-key "scale whiteroom")
;; "h a" '(hydra-modify-alpha/body :which-key "modify alpha background")
"h h j" '(dumb-jump-hydra/body :which-key "dumb jump hydra")
"h h o" '(org-hydra/body :which-key "org hydra")
"h h h" '(hideshow-hydra/body :which-key "hideshow hydra")
;; Insert something
"i" '(:ignore t :which-key "insert something.")
"i s" '(yas-insert-snippet :which-key "snippet")
@ -124,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)

View File

@ -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))))

View File

@ -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))

View File

@ -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")))

View File

@ -1,5 +1,7 @@
;;; init-latex.el -*- lexical-binding: t -*-
(use-package auctex
:straight t
:ensure t
:defer t
:custom
(TeX-auto-save t)

View File

@ -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

View File

@ -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")
@ -128,7 +128,7 @@ prepended to the element after the #+HEADER: tag."
;; formula a_{i}
org-use-sub-superscripts '{}
;; scale org-latex
org-format-latex-options (plist-put org-format-latex-options :scale 2.0)
org-format-latex-options (plist-put org-format-latex-options :scale 1.3)
org-image-actual-width nil
@ -145,46 +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))
(org-modern-mode . (lambda ()
"Adapt `org-modern-mode'."
;; Disable Prettify Symbols mode
(setq prettify-symbols-alist nil)
(prettify-symbols-mode -1))))
(use-package org-superstar
:if (and (display-graphic-p) (char-displayable-p ?◉))
:hook (org-mode . org-superstar-mode)
:init
(setq org-superstar-headline-bullets-list '("""""""""")
org-superstar-item-bullet-alist ;; dont work with org-modern
'((?+ . ?➢)
(?* . ?✰)
(?- . ?➸))))
(use-package org-fancy-priorities
:diminish
:hook (org-mode . org-fancy-priorities-mode)
:init (setq org-fancy-priorities-list
(if (and (display-graphic-p) (char-displayable-p ?🅐))
'("🅐" "🅑" "🅒" "🅓")
'("HIGH" "MEDIUM" "LOW" "OPTIONAL"))))
(setq org-confirm-babel-evaluate nil
org-confirm-babel-evaluate nil
org-src-fontify-natively t
org-src-tab-acts-natively t)
@ -192,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)))
@ -209,61 +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))
; 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)
@ -309,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."
@ -371,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}
@ -405,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}
@ -419,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

View File

@ -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)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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)

View File

@ -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)

View File

@ -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))

View File

@ -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

View File

@ -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
View 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

View File

@ -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

View File

@ -2,16 +2,16 @@
monitor=DP-3, 2560x1440,0x0,1
monitor=HDMI-A-1,1920x1080,2560x-480,1,transform,3
workspace= name:work1,monitor:DP-3,1
workspace= name:work2,monitor:HDMI-A-1,2
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
exec-once = source ~/.xprofile
exec-once = killall hypaper & hyprpaper -c ~/.config/hypr/hyprpaper/hyprpaper.conf &
exec-once = ~/scripts/random_hypaper.sh
exec-once = killall waybar
exec-once = waybar --config ~/.config/hypr/waybar/config-mon1 --style ~/.config/hypr/waybar/style.css &
exec-once = waybar --config ~/.config/hypr/waybar/config-mon2 --style ~/.config/hypr/waybar/style.css &
exec-once = seadrive-gui &
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
@ -33,9 +33,25 @@ env = LIBVA_DRIVER_NAME, nvidia
env = GBM_BACKEND, nvidia-drm
env = GDK_BACKEND, wayland,x11
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = __GL_VRR_ALLOWED,1
env = WLR_DRM_NO_ATOMIC,1
workspace = 1, monitor:DP-3
workspace = 2, monitor:DP-3
workspace = 3, monitor:DP-3
workspace = 4, monitor:DP-3
workspace = 5, monitor:DP-3
workspace = 6, monitor:HDMI-A-1
workspace = 7, monitor:HDMI-A-1
workspace = 8, monitor:HDMI-A-1
workspace = 9, monitor:HDMI-A-1
workspace = 0, monitor:HDMI-A-1
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us
kb_layout = kr
kb_variant =
kb_model =
kb_options =

View File

@ -1,3 +1,5 @@
splash = false
preload = ~/walls/normal/from_arcolinux/mystery-3840x2160.jpg
preload = ~/walls/idol/portrait/karina/img2.jpeg

15
.config/nvim/init.lua Normal file
View 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")

View File

@ -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

View File

@ -0,0 +1 @@
return {}

View 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
},
}

View 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
},
}

View 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
}
}

View File

@ -0,0 +1,12 @@
return {
'nvim-lualine/lualine.nvim',
config = function()
require('lualine').setup({
options = {
icons_enabled = true,
theme = 'auto'
}
})
end
}

View 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
}

View File

@ -0,0 +1,6 @@
return {
'lambdalisue/suda.vim',
config = function()
end
}

View 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
},
}

View 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
}

View 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', {})

View File

@ -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()

View File

@ -1,8 +1,6 @@
####################################################################################################
## Global Settings
####################################################################################################
[global/wm]
margin-top = 0
margin-bottom = 0
@ -324,6 +322,131 @@ tray-background = ${colors.background}
scroll-up = bspwm-desknext
scroll-down = bspwm-deskprev
####################################################################################################
## BSPWM PANEL1
####################################################################################################
[bar/panel-bspwm-1]
monitor = DP-4
;monitor-fallback = HDMI1
width = 100%
height = 20
;offset-x = 1%
;offset-y = 1%
radius = 0.0
fixed-center = true
bottom = false
separator =
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 2
line-color = #f00
wm-restack = bspwm
override-redirect = true
; Enable support for inter-process messaging
; See the Messaging wiki page for more details.
enable-ipc = true
border-size = 0
;border-left-size = 0
;border-right-size = 25
;border-top-size = 0
;border-bottom-size = 25
border-color = #00000000
padding-left = 1
padding-right = 1
module-margin-left = 0
module-margin-right = 0
font-0 = "Ubuntu:style=Bold:size=9;2"
font-1 = "UbuntuMono Nerd Font:style=Bold:size=18;3"
font-2 = "Font Awesome 6 Free:style=Regular:pixelsize=8;1"
font-3 = "Font Awesome 6 Free:style=Solid:pixelsize=8;1"
font-4 = "Font Awesome 6 Brands:pixelsize=8;1"
modules-left = bspwm xwindow
modules-center =
modules-right = kernel cpu2 memory2 filesystem date networkspeed pacman-updates volume
tray-detached = false
tray-offset-x = 0
tray-offset-y = 0
tray-position = right
tray-padding = 4
tray-maxsize = 20
tray-scale = 1.0
tray-background = ${colors.background}
scroll-up = bspwm-desknext
scroll-down = bspwm-deskprev
####################################################################################################
## BSPWM PANEL2
####################################################################################################
[bar/panel-bspwm-2]
monitor = HDMI-0
;monitor-fallback = HDMI1
width = 100%
height = 20
;offset-x = 1%
;offset-y = 1%
radius = 0.0
fixed-center = true
bottom = false
separator =
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 2
line-color = #f00
wm-restack = bspwm
override-redirect = true
; Enable support for inter-process messaging
; See the Messaging wiki page for more details.
enable-ipc = true
border-size = 0
;border-left-size = 0
;border-right-size = 25
;border-top-size = 0
;border-bottom-size = 25
border-color = #00000000
padding-left = 1
padding-right = 1
module-margin-left = 0
module-margin-right = 0
font-0 = "Ubuntu:style=Bold:size=9;2"
font-1 = "UbuntuMono Nerd Font:style=Bold:size=18;3"
font-2 = "Font Awesome 6 Free:style=Regular:pixelsize=8;1"
font-3 = "Font Awesome 6 Free:style=Solid:pixelsize=8;1"
font-4 = "Font Awesome 6 Brands:pixelsize=8;1"
modules-left = bspwm xwindow
modules-center =
modules-right = kernel cpu2 memory2 filesystem uptime date
tray-detached = false
tray-offset-x = 0
tray-offset-y = 0
tray-position = right
tray-padding = 4
tray-maxsize = 20
tray-scale = 1.0
tray-background = ${colors.background}
scroll-up = bspwm-desknext
scroll-down = bspwm-deskprev
####################################################################################################
## EXWM PANEL
####################################################################################################
@ -401,16 +524,6 @@ enable-scroll = true
reverse-scroll = true
pin-workspaces = true
#ws-icon-0 = 1;1: dev
#ws-icon-1 = 2;2: www
#ws-icon-2 = 3;3: sys
#ws-icon-3 = 4;4: doc
#ws-icon-4 = 5;5: vbox
#ws-icon-5 = 6;6: chat
#ws-icon-6 = 7;7: mus
#ws-icon-7 = 8;8: vid
#ws-icon-8 = 9;9: gfx
#ws-icon-9 = 10;
ws-icon-0 = 1;1
ws-icon-1 = 2;2
ws-icon-2 = 3;3
@ -420,7 +533,7 @@ ws-icon-5 = 6;6
ws-icon-6 = 7;7
ws-icon-7 = 8;8
ws-icon-8 = 9;9
ws-icon-9 = 10;10
ws-icon-9 = 0;10
ws-icon-default = " "
format = <label-state> <label-mode>
@ -506,30 +619,6 @@ content-font = 2
content-foreground = #8b62a9
content-background = #668bd7
[module/arch-aur-updates]
type = custom/script
exec = ~/.config/polybar/scripts/check-all-updates.sh
interval = 1000
label = Updates: %output%
format-prefix = "🗘 "
format-prefix-foreground = ${colors.color2}
format-foreground = ${colors.color2}
format-background = ${colors.background}
format-underline = ${colors.color2}
format-margin = 2
format-padding = 0
[module/aur-updates]
type = custom/script
exec = cower -u | wc -l
interval = 1000
label = Aur: %output%
format-foreground = ${colors.foreground}
format-background = ${colors.background}
format-prefix = "🗘 "
format-prefix-foreground = #FFBB00
format-underline = #FFBB00
[module/backlight-acpi]
inherit = module/xbacklight
type = internal/backlight
@ -839,14 +928,6 @@ format-underline = ${colors.color2}
format-margin = 2
format-padding = 0
[module/jgmenu]
type = custom/script
interval = 120
exec = echo "ArcoLinux"
click-left = "jgmenu_run >/dev/null 2>&1 &"
format-foreground = ${colors.foreground}
format-background = ${colors.background}
[module/load-average]
type = custom/script
exec = uptime | grep -ohe 'load average[s:][: ].*' | awk '{ print $3" "$4" "$5"," }' | sed 's/,//g'
@ -944,7 +1025,7 @@ type = internal/network
;interface = wlp3s0
;interface = enp14s0
;interface = enp0s31f6
interface = enp6s0
interface = enp10s0
label-connected = "%upspeed:7% ↓ %downspeed:7%"
format-connected = <label-connected>
format-connected-prefix = "↑ "
@ -1027,17 +1108,6 @@ label = %output%
format-prefix = "  "
format-prefix-foreground = #FFBB00
[module/release]
type = custom/script
exec = (lsb_release -d | awk {'print $2'} ;echo " "; lsb_release -r | awk {'print $2'}) | tr -d '\n'
interval = 6000
format-foreground = ${colors.foreground}
format-background = ${colors.background}
format-prefix = "  "
format-prefix-foreground = #62FF00
format-underline = #62FF00
[module/sep]
; alternative separator
type = custom/text
@ -1047,21 +1117,6 @@ content-background = ${colors.background}
format-foreground = ${colors.foreground}
format-background = ${colors.background}
[module/spotify]
;https://github.com/NicholasFeldman/dotfiles/blob/master/polybar/.config/polybar/spotify.sh
type = custom/script
exec = ~/.config/polybar/scripts/spotify1.sh
interval = 1
;format = <label>
format-foreground = ${colors.foreground}
format-background = ${colors.background}
format-padding = 2
format-underline = #0f0
format-prefix = " "
format-prefix-foreground = #0f0
label = %output:0:150%
[module/temperature1]
;https://github.com/jaagr/polybar/wiki/Module:-temperature
type = internal/temperature
@ -1107,13 +1162,6 @@ format-underline = #C1B93E
format-prefix-foreground = #C1B93E
label =  %output:0:150:%
[module/xmonad]
type = custom/script
exec = xmonad-log
tail = true
format-background = ${colors.background}
format-foreground = ${colors.foreground}
[module/uptime]
;https://github.com/jaagr/polybar/wiki/User-contributed-modules#uptime
type = custom/script
@ -1161,22 +1209,10 @@ format-muted-prefix-foreground = "#ff0000"
format-muted-foreground = ${colors.foreground}
format-muted-background = ${colors.background}
[module/weather]
type = custom/script
interval = 10
format = <label>
format-prefix = " "
format-prefix-foreground = #3EC13F
format-underline = #3EC13F
format-foreground = ${colors.foreground}
format-background = ${colors.background}
exec = python -u ~/.config/polybar/scripts/weather.py
tail = true
[module/wired-network]
;https://github.com/jaagr/polybar/wiki/Module:-network
type = internal/network
interface = enp4s0
interface = enp10s0
;interface = enp14s0
interval = 3.0
@ -1241,12 +1277,6 @@ ramp-signal-6 = ▇
ramp-signal-7 =
ramp-signal-foreground = #7e52c6
[module/workspaces-xmonad]
type = custom/script
exec = tail -F /tmp/.xmonad-workspace-log
exec-if = [ -p /tmp/.xmonad-workspace-log ]
tail = true
[module/xbacklight]
;https://github.com/jaagr/polybar/wiki/Module:-xbacklight
type = internal/xbacklight
@ -1290,14 +1320,6 @@ label-indicator-background = ${colors.background}
label-indicator-underline = ${colors.foreground}
[module/xmenu]
type = custom/script
interval = 1200
exec = echo "  "
click-left = "sh ~/xmenu/xmenu.sh"
format-foreground = ${colors.foreground}
format-background = ${colors.background}
[module/xwindow]
;https://github.com/jaagr/polybar/wiki/Module:-xwindow
type = internal/xwindow

View File

@ -1,76 +1,167 @@
"$schema" = 'https://starship.rs/config-schema.json'
format = """
[](#a3aed2)\
[](color_orange)\
$os\
[](bg:#769ff0 fg:#a3aed2)\
$username\
[](bg:color_yellow fg:color_orange)\
$directory\
[](fg:#769ff0 bg:#394260)\
[](fg:color_yellow bg:color_aqua)\
$git_branch\
$git_status\
[](fg:#394260 bg:#212736)\
[](fg:color_aqua bg:color_blue)\
$c\
$rust\
$golang\
$nodejs\
$php\
$java\
$kotlin\
$haskell\
$python\
$ruby\
$package\
[](fg:#212736 bg:#1d2230)\
[](fg:color_blue bg:color_bg3)\
$docker_context\
$conda\
[](fg:color_bg3 bg:color_bg1)\
$time\
[ ](fg:#1d2230)\
\n$character"""
[ ](fg:color_bg1)\
$line_break$character"""
#[ ]\
palette = 'gruvbox_dark'
[palettes.gruvbox_dark]
color_fg0 = '#fbf1c7'
color_bg1 = '#3c3836'
color_bg3 = '#665c54'
color_blue = '#458588'
color_aqua = '#689d6a'
color_green = '#98971a'
color_orange = '#d65d0e'
color_purple = '#b16286'
color_red = '#cc241d'
color_yellow = '#d79921'
[os]
style = "bg:#a3aed2 fg:#090c0c"
format = "[ $symbol ($version) ]($style)"
disabled = false
[os.symbols]
Windows = " "
Arch = " "
Ubuntu = " "
style = "bg:color_orange fg:color_fg0"
[os.symbols]
Windows = "󰍲"
Ubuntu = "󰕈"
SUSE = ""
Raspbian = "󰐿"
Mint = "󰣭"
Macos = "󰀵"
Manjaro = ""
Linux = "󰌽"
Gentoo = "󰣨"
Fedora = "󰣛"
Alpine = ""
Amazon = ""
Android = ""
Arch = "󰣇"
Artix = "󰣇"
CentOS = ""
Debian = "󰣚"
Redhat = "󱄛"
RedHatEnterprise = "󱄛"
[username]
show_always = true
style_user = "bg:color_orange fg:color_fg0"
style_root = "bg:color_orange fg:color_fg0"
format = '[ $user ]($style)'
[directory]
style = "fg:#e3e5e5 bg:#769ff0"
style = "fg:color_fg0 bg:color_yellow"
format = "[ $path ]($style)"
truncation_length = 3
truncation_symbol = "…/"
[directory.substitutions]
"Documents" = " "
"Documents" = "󰈙 "
"Downloads" = " "
"Music" = " "
"Music" = "󰝚 "
"Pictures" = " "
"Developer" = "󰲋 "
[git_branch]
symbol = ""
style = "bg:#394260"
format = '[[ $symbol $branch ](fg:#769ff0 bg:#394260)]($style)'
style = "bg:color_aqua"
format = '[[ $symbol $branch ](fg:color_fg0 bg:color_aqua)]($style)'
[git_status]
style = "bg:#394260"
format = '[[($all_status$ahead_behind )](fg:#769ff0 bg:#394260)]($style)'
style = "bg:color_aqua"
format = '[[($all_status$ahead_behind )](fg:color_fg0 bg:color_aqua)]($style)'
[nodejs]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[c]
symbol = " "
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[rust]
symbol = ""
style = "bg:#212736"
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[golang]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[php]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[java]
symbol = " "
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[kotlin]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[haskell]
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[python]
symbol = ""
style = "bg:#212736"
format = '\[[${symbol} ${pyenv_prefix}(${version})(\($virtualenv\))]($style)\]'
symbol = ""
style = "bg:color_blue"
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
[ruby]
symbol = ""
style = "bg:#212736"
format = '\[[$symbol ($version)]($style)\]'
[package]
style = "bg:#212736"
format = '\[[$symbol ($version)]($style)\]'
[docker_context]
symbol = ""
style = "bg:color_bg3"
format = '[[ $symbol( $context) ](fg:#83a598 bg:color_bg3)]($style)'
[conda]
style = "bg:color_bg3"
format = '[[ $symbol( $environment) ](fg:#83a598 bg:color_bg3)]($style)'
[time]
disabled = true
time_format = "%R" # Hour:Minute Format
style = "bg:#1d2230"
format = '[[  $time ](fg:#a0a9cb bg:#1d2230)]($style)'
disabled = false
time_format = "%R"
style = "bg:color_bg1"
format = '[[  $time ](fg:color_fg0 bg:color_bg1)]($style)'
[line_break]
disabled = false
[character]
disabled = false
success_symbol = '[](bold fg:color_green)'
error_symbol = '[](bold fg:color_red)'
vimcmd_symbol = '[](bold fg:color_green)'
vimcmd_replace_one_symbol = '[](bold fg:color_purple)'
vimcmd_replace_symbol = '[](bold fg:color_purple)'
vimcmd_visual_symbol = '[](bold fg:color_yellow)'

View File

@ -1,163 +1,67 @@
#Config file for simple X hotkey daemon
super+Return
# st
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
firefox
# workspace
super + {1,2,3,4,5}
bspc desktop -f {1,2,3,4,5}; bspc query -N -n .local.window.hidden | xargs -I\{\} bspc node \{\} -g hidden; bspc query -N -n .local.window.fullscreen | xargs -I\{\} bspc node \{\} -t tiled; polybar-msg cmd show;
super + shift + {1-5}
bspc node -d '^{1-5}'
super + {1,2,3,4,5,6,7,8,9,0}
bspc desktop -f {1,2,3,4,5,6,7,8,9,0}; bspc query -N -n .local.window.hidden | xargs -I\{\} bspc node \{\} -g hidden; bspc query -N -n .local.window.fullscreen | xargs -I\{\} bspc node \{\} -t tiled; polybar-msg cmd show;
super + shift + {1-9}
bspc node -d '^{1-9}'
super + shift + 0
bspc node -d 0
super+t
thunar
# close & kill
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 -show drun
alt+Tab
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) -eq 0" ]; then; picom; else; killall picom; fi
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}
@ -168,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

View File

@ -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
View File

@ -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
View 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

24
.zshrc
View File

@ -35,17 +35,23 @@ 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 "^\."'
#cat ~/.cache/wal/sequences &
alias ls="eza -a --icons"
alias ll="eza -al --icons"
alias lt="eza -a --tree --level=1 --icons"
# WSL2
#source ~/scripts/custom_env.sh
if [[ $JUPCID == "WSL" ]];then
VETHER_IP=$(/bin/grep nameserver /etc/resolv.conf 2> /dev/null | /bin/tr -s ' ' | /bin/cut -d' ' -f2)
export DISPLAY=$VETHER_IP:10.0
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
View 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";
}'

View File

@ -1,9 +0,0 @@
#!/bin/bash
# configurable parameter
JAEUS_ENV="WSL"
if [[ $JAEUS_ENV == "WSL" ]];then
VETHER_IP=$(/bin/grep nameserver /etc/resolv.conf 2> /dev/null | /bin/tr -s ' ' | /bin/cut -d' ' -f2)
export DISPLAY=$VETHER_IP:10.0
fi

View File

@ -1,23 +0,0 @@
#!/bin/sh
echo "===================================="
echo "Share Directory Mount?(y/N)?"
echo ${whoami}
read val
if [ "${val}" == "" ]; then
val="N"
fi
if [ "${val}" == "y" ];then
echo "address(ex://192.168.1.144/d)?"
read addr
echo "user(ex:JaeUs-HV)?"
read user
echo "password?"
read pass
echo "mount point(ex:/home/jaeus/mnt)?"
read mpoint
sudo echo "${addr} ${mpoint} cifs _netdev,nofail,username=${user},password=${pass},uid=jaeus,gid=jaeus 0 0" >> /etc/fstab
fi

View 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

View File

@ -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
View 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
View 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
View 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

View File

@ -0,0 +1,3 @@
#!/bin/bash
yay -S python2-bin

View File

@ -11,7 +11,7 @@ randomfile=$(printf "%s\n" "${files[RANDOM % ${#files[@]}]}")
echo $randomfile
hyprctl hyprpaper preload $randomfile
hyprctl hyprpaper wallpaper "DP-3,$randomfile"
hyprctl hyprpaper wallpaper "DP-3,contain:$randomfile"
files=()
while IFS= read -r -d $'\0'; do
@ -20,5 +20,6 @@ done < <(find $wal_dir2 -type f -name "*" -print0)
randomfile=$(printf "%s\n" "${files[RANDOM % ${#files[@]}]}")
echo $randomfile
hyprctl hyprpaper preload $randomfile
hyprctl hyprpaper wallpaper "HDMI-A-1,$randomfile"
hyprctl hyprpaper wallpaper "HDMI-A-1,contain:$randomfile"
hyprctl hyprpaper unload all

View File

@ -4,11 +4,28 @@
wal_dir=~/walls/normal
# random wallpaper
files=()
while IFS= read -r -d $'\0'; do
files+=("$REPLY")
done < <(find $wal_dir -type f -name "*" -print0)
randomfile=$(printf "%s\n" "${files[RANDOM % ${#files[@]}]}")
echo $randomfile
wal -i $randomfile --saturate 1.0
#feh --bg-fill $randomfile
if [[ $JUPCID == "HOME-DESKTOP" ]]; then
files=()
while IFS= read -r -d $'\0'; do
files+=("$REPLY")
done < <(find $wal_dir -type f -name "*" -print0)
randomfile=$(printf "%s\n" "${files[RANDOM % ${#files[@]}]}")
echo $randomfile
files=()
while IFS= read -r -d $'\0'; do
files+=("$REPLY")
done < <(find $wal_dir -type f -name "*" -print0)
randomfile2=$(printf "%s\n" "${files[RANDOM % ${#files[@]}]}")
echo $randomfile2
feh --bg-max "$randomfile" --bg-max "$randomfile2"
else
files=()
while IFS= read -r -d $'\0'; do
files+=("$REPLY")
done < <(find $wal_dir -type f -name "*" -print0)
randomfile=$(printf "%s\n" "${files[RANDOM % ${#files[@]}]}")
echo $randomfile
feh --bg-max "$randomfile"
fi

18
scripts/scpad Executable file
View 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
View File

@ -0,0 +1,3 @@
#!/bin/sh
scrot -e 'xclip -selection clipboard -t image/png -i $f'

View File

@ -1,19 +0,0 @@
#!/bin/bash
# update my linux config
cd ~/.dotfiles
git pull
# update linux packages
paru
# update bitwarden
cd ~/server/bitwarden_docker
sudo docker-compose down
sudo docker-compose pull
sudo docker-compose up -d
# wetty
yarn global upgrade wetty
# doom emacs upgrade
~/.emacs.d/bin/doom upgrade

View 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
View File

@ -0,0 +1,3 @@
#!/bin/bash
yay -S ncurses5-compat-libs libxcrypt-compat libpng12 lib32-libpng12 gtk3 inetutils xorg-xlsclients cpio

View 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

View 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

View File

@ -1,10 +0,0 @@
# SSH Daemon
sudo /bin/sshd
# Cron
sudo /bin/crond
# Ip config ( When Netcus desktop )
sudo ip addr add dev eth0 192.168.144.2/24
sudo ip addr add dev eth0 192.168.1.146/24