more changes, all should work pretty nicely now
This commit is contained in:
@@ -0,0 +1,558 @@
|
|||||||
|
(defvar elpaca-installer-version 0.6)
|
||||||
|
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||||
|
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||||
|
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
||||||
|
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
||||||
|
:ref nil
|
||||||
|
:files (:defaults (:exclude "extensions"))
|
||||||
|
:build (:not elpaca--activate-package)))
|
||||||
|
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
|
||||||
|
(build (expand-file-name "elpaca/" elpaca-builds-directory))
|
||||||
|
(order (cdr elpaca-order))
|
||||||
|
(default-directory repo))
|
||||||
|
(add-to-list 'load-path (if (file-exists-p build) build repo))
|
||||||
|
(unless (file-exists-p repo)
|
||||||
|
(make-directory repo t)
|
||||||
|
(when (< emacs-major-version 28) (require 'subr-x))
|
||||||
|
(condition-case-unless-debug err
|
||||||
|
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
||||||
|
((zerop (call-process "git" nil buffer t "clone"
|
||||||
|
(plist-get order :repo) repo)))
|
||||||
|
((zerop (call-process "git" nil buffer t "checkout"
|
||||||
|
(or (plist-get order :ref) "--"))))
|
||||||
|
(emacs (concat invocation-directory invocation-name))
|
||||||
|
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
|
||||||
|
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
|
||||||
|
((require 'elpaca))
|
||||||
|
((elpaca-generate-autoloads "elpaca" repo)))
|
||||||
|
(kill-buffer buffer)
|
||||||
|
(error "%s" (with-current-buffer buffer (buffer-string))))
|
||||||
|
((error) (warn "%s" err) (delete-directory repo 'recursive))))
|
||||||
|
(unless (require 'elpaca-autoloads nil t)
|
||||||
|
(require 'elpaca)
|
||||||
|
(elpaca-generate-autoloads "elpaca" repo)
|
||||||
|
(load "./elpaca-autoloads")))
|
||||||
|
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||||
|
(elpaca `(,@elpaca-order))
|
||||||
|
|
||||||
|
;; Install use-package support
|
||||||
|
(elpaca elpaca-use-package
|
||||||
|
;; Enable :elpaca use-package keyword.
|
||||||
|
(elpaca-use-package-mode)
|
||||||
|
;; Assume :elpaca t unless otherwise specified.
|
||||||
|
(setq elpaca-use-package-by-default t))
|
||||||
|
|
||||||
|
;; Block until current queue processed.
|
||||||
|
(elpaca-wait)
|
||||||
|
|
||||||
|
;;When installing a package which modifies a form used at the top-level
|
||||||
|
;;(e.g. a package which adds a use-package key word),
|
||||||
|
;;use `elpaca-wait' to block until that package has been installed/configured.
|
||||||
|
;;For example:
|
||||||
|
;;(use-package general :demand t)
|
||||||
|
;;(elpaca-wait)
|
||||||
|
|
||||||
|
;;Turns off elpaca-use-package-mode current declartion
|
||||||
|
;;Note this will cause the declaration to be interpreted immediately (not deferred).
|
||||||
|
;;Useful for configuring built-in emacs features.
|
||||||
|
;;(use-package emacs :elpaca nil :config (setq ring-bell-function #'ignore))
|
||||||
|
|
||||||
|
;; Don't install anything. Defer execution of BODY
|
||||||
|
;;(elpaca nil (message "deferred"))
|
||||||
|
|
||||||
|
;; Expands to: (elpaca evil (use-package evil :demand t))
|
||||||
|
(use-package evil
|
||||||
|
:bind (:map evil-normal-state-map
|
||||||
|
("<C-u>" . evil-scroll-page-up))
|
||||||
|
:init ;; tweak evil's configuration before loading it
|
||||||
|
(setq evil-want-integration t) ;; This is optional since it's already set to t by default.
|
||||||
|
(setq evil-respect-visual-line-mode t)
|
||||||
|
(setq evil-want-keybinding nil)
|
||||||
|
(setq evil-vsplit-window-right t)
|
||||||
|
(setq evil-split-window-below t)
|
||||||
|
(evil-mode))
|
||||||
|
(use-package evil-collection
|
||||||
|
:after evil
|
||||||
|
:config
|
||||||
|
(setq evil-collection-mode-list '(dashboard dired ibuffer))
|
||||||
|
(evil-collection-init))
|
||||||
|
|
||||||
|
(use-package general
|
||||||
|
:config
|
||||||
|
(general-evil-setup)
|
||||||
|
;; set 'SPC' as global leader key
|
||||||
|
(general-create-definer lm/leader-keys
|
||||||
|
:states '(normal insert visual emacs)
|
||||||
|
:keymaps 'override
|
||||||
|
:prefix "SPC" ;; set leader
|
||||||
|
:global-prefix "M-SPC") ;; access leader in insert mode
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"b" '(:ignore t :wk "buffer")
|
||||||
|
"b b" '(switch-to-buffer :wk "Switch buffer")
|
||||||
|
"b i" '(ibuffer :wk "Ibuffer")
|
||||||
|
"b k" '(kill-this-buffer :wk "Kill this buffer")
|
||||||
|
"b n" '(next-buffer :wk "Next buffer")
|
||||||
|
"b p" '(previous-buffer :wk "Previous buffer")
|
||||||
|
"b r" '(revert-buffer :wk "Reload buffer"))
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"e" '(:ignore t :wk "Eshell/Evaluate")
|
||||||
|
"e b" '(eval-buffer :wk "Evaluate elisp in buffer")
|
||||||
|
"e d" '(eval-defun :wk "Evaluate defun containing or after point")
|
||||||
|
"e e" '(eval-expression :wk "Evaluate an elisp expression")
|
||||||
|
"e l" '(eval-last-sexp :wk "Evaluate elisp expression before point")
|
||||||
|
"e r" '(eval-region :wk "Evaluate elisp in region")
|
||||||
|
"e h" '(counsel-esh-history :wk "Eshell history")
|
||||||
|
"e s" '(eshell :wk "Eshell"))
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"SPC" '(counsel-M-x :wk "Counsel M-x")
|
||||||
|
"." '(find-file :wk "Find file")
|
||||||
|
"f c" '((lambda () (interactive) (find-file "~/.config/emacs/config.org")) :wk "Edit emacs config")
|
||||||
|
"f r" '(counsel-recentf :wk "Find recent files")
|
||||||
|
"TAB TAB" '(comment-line :wk "Comment lines"))
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"h" '(:ignore t :wk "Help")
|
||||||
|
"h f" '(describe-function :wk "Describe function")
|
||||||
|
"h v" '(describe-variable :wk "Describe variable")
|
||||||
|
"h r r" '(reload-init-file :wk "Reload emacs config"))
|
||||||
|
;; "h r r" '((lambda () (interactive) (load-file user-init-file)) :wk "Reload emacs config"))
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"i" '(:ignore t :wk "Insert")
|
||||||
|
"i p" '(org-download-screenshot :wk "Insert screenshot (org)"))
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"t" '(:ignore t :wk "Toggle")
|
||||||
|
"t l" '(display-line-numbers-mode :wk "Toggle line numbers")
|
||||||
|
"t v" '(vterm-toggle :wk "Toggle Vterm")
|
||||||
|
"t i" '(org-toggle-inline-images :wk "Toggle inline images")
|
||||||
|
"t t" '(visual-line-mode :wk "Toggle truncated lines"))
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"s" '(:ignore t :wk "Shell")
|
||||||
|
"s c" '(shell-command :wk "Run a shell command")
|
||||||
|
"s d" '(sh-cd-here :wk "Move current shell to current dir")
|
||||||
|
"s m" '(sh-mode :wk "Shell mode"))
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"c" '(:ignore t :wk "Capitalize")
|
||||||
|
"c w" '(capitalize-word :wk "Capitalize word")
|
||||||
|
"c r" '(capitalize-region :wk "Capitalize region")
|
||||||
|
"c c" '(upcase-char :wk "Upcase char")
|
||||||
|
"c u" '(upcase-region :wk "Upcase region"))
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"l" '(:ignore t :wk "Downcase")
|
||||||
|
"l w" '(downcase-word :wk "Downcase word")
|
||||||
|
"l u" '(downcase-region :wk "Downcase region"))
|
||||||
|
|
||||||
|
;; Evil window bindings
|
||||||
|
(lm/leader-keys
|
||||||
|
"w" '(:ignore t :wk "Window")
|
||||||
|
"w w" '(evil-window-next :wk "Next window")
|
||||||
|
"w h" '(evil-window-left :wk "Move cursor to window left")
|
||||||
|
"w j" '(evil-window-down :wk "Move cursor to window below")
|
||||||
|
"w k" '(evil-window-up :wk "Move cursor to window above")
|
||||||
|
"w l" '(evil-window-right :wk "Move cursor to window right")
|
||||||
|
"w s" '(evil-window-split :wk "Split window horizontally")
|
||||||
|
"w v" '(evil-window-vsplit :wk "Split window vertically")
|
||||||
|
"w H" '(evil-window-move-far-left :wk "Move split to left")
|
||||||
|
"w J" '(evil-window-move-very-bottom :wk "Move split to bottom")
|
||||||
|
"w K" '(evil-window-move-very-top :wk "Move split to top")
|
||||||
|
"w L" '(evil-window-move-far-right :wk "Move split to right")
|
||||||
|
"w c" '(evil-window-delete :wk "Close window")
|
||||||
|
"w o" '(delete-other-windows :wk "Delete other windows")
|
||||||
|
"w =" '(balance-windows :wk "Balance windows")
|
||||||
|
"q k" '(kill-buffer-and-window :wk "Kill buf and window")
|
||||||
|
"q q" '(save-buffers-kill-terminal :wk "Save bufs, kill term"))
|
||||||
|
|
||||||
|
;; (evil-global-set-key 'visual "K" (kbd ":m '<-2 RET gv '< gk"))
|
||||||
|
(evil-global-set-key 'visual "K" 'drag-stuff-up)
|
||||||
|
;; (evil-global-set-key 'visual "J" (kbd ":m '>+1 RET gv '> gj"))
|
||||||
|
(evil-global-set-key 'visual "J" 'drag-stuff-down)
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"p" '(:ignore t :wk "Project")
|
||||||
|
"p o" '(dashboard-open :wk "Return to dashboard")
|
||||||
|
"p f" '(project-find-file :wk "Find project file"))
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
(use-package all-the-icons
|
||||||
|
:ensure t
|
||||||
|
:diminish
|
||||||
|
:if (display-graphic-p))
|
||||||
|
(use-package all-the-icons-dired
|
||||||
|
:hook (dired-mode . (lambda () (all-the-icons-dired-mode t))))
|
||||||
|
|
||||||
|
(setq backup-directory-alist
|
||||||
|
`((".*" . "~/emacs/auto-saves")))
|
||||||
|
(setq auto-save-file-name-transforms
|
||||||
|
`((".*" "~/emacs/auto-saves" t)))
|
||||||
|
|
||||||
|
(use-package company
|
||||||
|
:defer 2
|
||||||
|
:diminish
|
||||||
|
:custom
|
||||||
|
(company-begin-commands '(self-insert-command))
|
||||||
|
(company-idle-delay .1)
|
||||||
|
(company-minimum-prefix-length 2)
|
||||||
|
(company-show-numbers t)
|
||||||
|
(company-tooltip-align-annotations 't)
|
||||||
|
(global-company-mode t))
|
||||||
|
|
||||||
|
(use-package company-box
|
||||||
|
:after company
|
||||||
|
:diminish
|
||||||
|
:hook (company-mode . company-box-mode))
|
||||||
|
|
||||||
|
(use-package dashboard
|
||||||
|
:ensure t
|
||||||
|
:diminish
|
||||||
|
:init
|
||||||
|
(setq initial-buffer-choice 'dashboard-open)
|
||||||
|
(setq dashboard-set-heading-icons t)
|
||||||
|
;; (setq dashboard-set-navigator t)
|
||||||
|
(setq dashboard-set-file-icons t)
|
||||||
|
(setq dashboard-banner-logo-title "Welcome to Emacs!")
|
||||||
|
;; (setq dashboard-startup-banner 'logo) ;; default logo
|
||||||
|
(setq dashboard-startup-banner "~/pictures/smol-penguin.png")
|
||||||
|
(setq dashboard-center-content t)
|
||||||
|
(setq dashboard-items '((recents . 5)
|
||||||
|
(agenda . 5)
|
||||||
|
(bookmarks . 3)
|
||||||
|
;; (registers . 3)
|
||||||
|
(projects . 3)))
|
||||||
|
;; (dashboard-modify-heading-icons '((recents . "file-text")
|
||||||
|
;; (bookmarks . "book")))
|
||||||
|
:config
|
||||||
|
(dashboard-setup-startup-hook))
|
||||||
|
|
||||||
|
(use-package diminish)
|
||||||
|
|
||||||
|
(use-package drag-stuff
|
||||||
|
:diminish
|
||||||
|
:config
|
||||||
|
(drag-stuff-global-mode 1))
|
||||||
|
|
||||||
|
(use-package flycheck
|
||||||
|
:ensure t
|
||||||
|
:defer t
|
||||||
|
:diminish
|
||||||
|
:init (global-flycheck-mode))
|
||||||
|
|
||||||
|
(set-face-attribute 'default nil
|
||||||
|
;; try switch to Source Code Pro
|
||||||
|
:font "FiraCodeNerdFontMono"
|
||||||
|
:height 110
|
||||||
|
:weight 'medium)
|
||||||
|
(set-face-attribute 'variable-pitch nil
|
||||||
|
:font "FiraCodeNerdFontMono"
|
||||||
|
:height 120
|
||||||
|
:weight 'medium)
|
||||||
|
(set-face-attribute 'fixed-pitch nil
|
||||||
|
:font "FiraCodeNerdFontMono"
|
||||||
|
:height 110
|
||||||
|
:weight 'medium)
|
||||||
|
;; Makes commented text and keywords italics.
|
||||||
|
;; This is working in emacsclient but not emacs.
|
||||||
|
;; Your font must have an italic face available.
|
||||||
|
(set-face-attribute 'font-lock-comment-face nil
|
||||||
|
:slant 'italic)
|
||||||
|
(set-face-attribute 'font-lock-keyword-face nil
|
||||||
|
:slant 'italic)
|
||||||
|
|
||||||
|
;; This sets the default font on all graphical frames created after restarting Emacs.
|
||||||
|
;; Does the same thing as 'set-face-attribute default' above, but emacsclient fonts
|
||||||
|
;; are not right unless I also add this method of setting the default font.
|
||||||
|
(add-to-list 'default-frame-alist '(font . "FiraCodeNerdFontMono-14"))
|
||||||
|
|
||||||
|
;; Uncomment the following line if line spacing needs adjusting.
|
||||||
|
;; (setq-default line-spacing 0.12)
|
||||||
|
|
||||||
|
(global-set-key (kbd "C-=") 'text-scale-increase)
|
||||||
|
(global-set-key (kbd "C--") 'text-scale-decrease)
|
||||||
|
(global-set-key (kbd "<C-wheel-up>") 'text-scale-increase)
|
||||||
|
(global-set-key (kbd "<C-wheel-down>") 'text-scale-decrease)
|
||||||
|
|
||||||
|
(use-package gnuplot-mode)
|
||||||
|
;; automatically open files ending with .gp or .gnuplot in gnuplot mode
|
||||||
|
;; (setq auto-mode-alist
|
||||||
|
;; (append '(("\\.\\(gp\\|gnuplot\\)$" . gnuplot-mode)) auto-mode-alist)))
|
||||||
|
|
||||||
|
(use-package image-dired+)
|
||||||
|
|
||||||
|
(setq-default indent-tabs-mode nil)
|
||||||
|
(setq-default tab-width 4)
|
||||||
|
(setq-default indent-line-function 'insert-tab)
|
||||||
|
(setq-default c-default-style "linux"
|
||||||
|
c-basic-offset 4)
|
||||||
|
;; if indent-tabs-mode is off, untabify before saving
|
||||||
|
;;(add-hook 'write-file-hooks
|
||||||
|
;; (lambda () (if (not indent-tabs-mode)
|
||||||
|
;; (untabify (point-min) (point-max)))))
|
||||||
|
|
||||||
|
;; This assumes you've installed the package via MELPA.
|
||||||
|
(use-package ligature
|
||||||
|
:config
|
||||||
|
;; Enable the "www" ligature in every possible major mode
|
||||||
|
(ligature-set-ligatures 't '("www"))
|
||||||
|
;; Enable traditional ligature support in eww-mode, if the
|
||||||
|
;; `variable-pitch' face supports it
|
||||||
|
(ligature-set-ligatures 'eww-mode '("ff" "fi" "ffi"))
|
||||||
|
;; Enable all FiraMonoNerdFont and Fira Code ligatures in programming modes
|
||||||
|
|
||||||
|
(ligature-set-ligatures 'prog-mode
|
||||||
|
'(;; == === ==== => =| =>>=>=|=>==>> ==< =/=//=// =~
|
||||||
|
;; =:= =!=
|
||||||
|
("=" (rx (+ (or ">" "<" "|" "/" "~" ":" "!" "="))))
|
||||||
|
;; ;; ;;;
|
||||||
|
(";" (rx (+ ";")))
|
||||||
|
;; && &&&
|
||||||
|
("&" (rx (+ "&")))
|
||||||
|
;; !! !!! !. !: !!. != !== !~
|
||||||
|
("!" (rx (+ (or "=" "!" "\." ":" "~"))))
|
||||||
|
;; ?? ??? ?: ?= ?.
|
||||||
|
("?" (rx (or ":" "=" "\." (+ "?"))))
|
||||||
|
;; %% %%%
|
||||||
|
("%" (rx (+ "%")))
|
||||||
|
;; |> ||> |||> ||||> |] |} || ||| |-> ||-||
|
||||||
|
;; |->>-||-<<-| |- |== ||=||
|
||||||
|
;; |==>>==<<==<=>==//==/=!==:===>
|
||||||
|
("|" (rx (+ (or ">" "<" "|" "/" ":" "!" "}" "\]"
|
||||||
|
"-" "=" ))))
|
||||||
|
;; \\ \\\ \/
|
||||||
|
("\\" (rx (or "/" (+ "\\"))))
|
||||||
|
;; ++ +++ ++++ +>
|
||||||
|
("+" (rx (or ">" (+ "+"))))
|
||||||
|
;; :: ::: :::: :> :< := :// ::=
|
||||||
|
(":" (rx (or ">" "<" "=" "//" ":=" (+ ":"))))
|
||||||
|
;; // /// //// /\ /* /> /===:===!=//===>>==>==/
|
||||||
|
("/" (rx (+ (or ">" "<" "|" "/" "\\" "\*" ":" "!"
|
||||||
|
"="))))
|
||||||
|
;; .. ... .... .= .- .? ..= ..<
|
||||||
|
("\." (rx (or "=" "-" "\?" "\.=" "\.<" (+ "\."))))
|
||||||
|
;; -- --- ---- -~ -> ->> -| -|->-->>->--<<-|
|
||||||
|
("-" (rx (+ (or ">" "<" "|" "~" "-"))))
|
||||||
|
;; *> */ *) ** *** ****
|
||||||
|
("*" (rx (or ">" "/" ")" (+ "*"))))
|
||||||
|
;; www wwww
|
||||||
|
("w" (rx (+ "w")))
|
||||||
|
;; <> <!-- <|> <: <~ <~> <~~ <+ <* <$ </ <+> <*>
|
||||||
|
;; <$> </> <| <|| <||| <|||| <- <-| <-<<-|-> <->>
|
||||||
|
;; <<-> <= <=> <<==<<==>=|=>==/==//=!==:=>
|
||||||
|
;; << <<< <<<<
|
||||||
|
("<" (rx (+ (or "\+" "\*" "\$" "<" ">" ":" "~" "!"
|
||||||
|
"-" "/" "|" "="))))
|
||||||
|
;; >: >- >>- >--|-> >>-|-> >= >== >>== >=|=:=>>
|
||||||
|
;; >> >>> >>>>
|
||||||
|
(">" (rx (+ (or ">" "<" "|" "/" ":" "=" "-"))))
|
||||||
|
;; #: #= #! #( #? #[ #{ #_ #_( ## ### #####
|
||||||
|
("#" (rx (or ":" "=" "!" "(" "\?" "\[" "{" "_(" "_"
|
||||||
|
(+ "#"))))
|
||||||
|
;; ~~ ~~~ ~= ~- ~@ ~> ~~>
|
||||||
|
("~" (rx (or ">" "=" "-" "@" "~>" (+ "~"))))
|
||||||
|
;; __ ___ ____ _|_ __|____|_
|
||||||
|
("_" (rx (+ (or "_" "|"))))
|
||||||
|
;; Fira code: 0xFF 0x12
|
||||||
|
("0" (rx (and "x" (+ (in "A-F" "a-f" "0-9")))))
|
||||||
|
;; Fira code:
|
||||||
|
"Fl" "Tl" "fi" "fj" "fl" "ft"
|
||||||
|
;; The few not covered by the regexps.
|
||||||
|
"{|" "[|" "]#" "(*" "}#" "$>" "^="))
|
||||||
|
|
||||||
|
;; Enables ligature checks globally in all buffers. You can also do it
|
||||||
|
;; per mode with `ligature-mode'.
|
||||||
|
(global-ligature-mode t))
|
||||||
|
|
||||||
|
(use-package markdown-mode
|
||||||
|
:ensure t
|
||||||
|
:mode ("README\\.md\\'" . gfm-mode)
|
||||||
|
:init (setq markdown-command "multimarkdown"))
|
||||||
|
|
||||||
|
;; inspired by https://zzamboni.org/post/how-to-insert-screenshots-in-org-documents-on-macos/
|
||||||
|
|
||||||
|
(use-package org-download
|
||||||
|
:after org
|
||||||
|
:defer nil
|
||||||
|
:custom
|
||||||
|
(org-download-method 'directory)
|
||||||
|
(org-download-image-dir "~/emacs/")
|
||||||
|
(org-download-heading-lvl 0)
|
||||||
|
(org-download-timestamp "org_%Y%m%d-%H%M%S_")
|
||||||
|
;; (org-image-actual-width 400)
|
||||||
|
(org-download-screenshot-method "wl-paste -t image/png > '%s'")
|
||||||
|
:bind
|
||||||
|
("C-M-y" . org-download-screenshot)
|
||||||
|
:config
|
||||||
|
(require 'org-download))
|
||||||
|
|
||||||
|
(use-package projectile
|
||||||
|
:diminish
|
||||||
|
:config
|
||||||
|
(projectile-mode 1))
|
||||||
|
|
||||||
|
(use-package rainbow-mode
|
||||||
|
:diminish
|
||||||
|
:hook
|
||||||
|
((org-mode prog-mode) . rainbow-mode))
|
||||||
|
|
||||||
|
(defun reload-init-file ()
|
||||||
|
(interactive)
|
||||||
|
(load-file user-init-file)
|
||||||
|
(load-file user-init-file))
|
||||||
|
|
||||||
|
(use-package eshell-syntax-highlighting
|
||||||
|
:after esh-mode
|
||||||
|
:config
|
||||||
|
(eshell-syntax-highlighting-global-mode +1))
|
||||||
|
|
||||||
|
(setq eshell-rc-script (concat user-emacs-directory "eshell/profile")
|
||||||
|
eshell-aliases-file (concat user-emacs-directory "eshell/aliases")
|
||||||
|
eshell-history-size 5000
|
||||||
|
eshell-buffer-maximum-lines 5000
|
||||||
|
eshell-hist-ignoredups t
|
||||||
|
eshell-scroll-to-bottom-on-input t
|
||||||
|
eshell-destroy-buffer-when-process-dies t
|
||||||
|
eshell-visual-commands'("bash" "fish" "htop" "ssh" "top" "zsh"))
|
||||||
|
|
||||||
|
(use-package vterm
|
||||||
|
:config
|
||||||
|
(setq shell-file-name "/run/current-system/sw/bin/bash"
|
||||||
|
vterm-max-scrollback 5000))
|
||||||
|
|
||||||
|
(use-package vterm-toggle
|
||||||
|
:after vterm
|
||||||
|
:config
|
||||||
|
(setq vterm-toggle-fullscreen-p nil)
|
||||||
|
(setq vterm-toggle-scope 'project)
|
||||||
|
(add-to-list 'display-buffer-alist
|
||||||
|
'((lambda (buffer-or-name _)
|
||||||
|
(let ((buffer (get-buffer buffer-or-name)))
|
||||||
|
(with-current-buffer buffer
|
||||||
|
(or (equal major-mode 'vterm-mode)
|
||||||
|
(string-prefix-p vterm-buffer-name (buffer-name buffer))))))
|
||||||
|
(display-buffer-reuse-window display-buffer-at-bottom)
|
||||||
|
;;(display-buffer-reuse-window display-buffer-in-direction)
|
||||||
|
;;display-buffer-in-direction/direction/dedicated is added in emacs27
|
||||||
|
;;(direction . bottom)
|
||||||
|
;;(dedicated . t) ;dedicated is supported in emacs27
|
||||||
|
(reusable-frames . visible)
|
||||||
|
(window-height . 0.3))))
|
||||||
|
|
||||||
|
(use-package sudo-edit
|
||||||
|
:config
|
||||||
|
(lm/leader-keys
|
||||||
|
"fu" '(sudo-edit-find-file :wk "Sudo find file")
|
||||||
|
"fU" '(sudo-edit :wk "Sudo edit file")))
|
||||||
|
|
||||||
|
;;(add-to-list 'custom-theme-load-path "~/.config/emacs/themes")
|
||||||
|
;;(load-theme 'soft-charcoal t)
|
||||||
|
|
||||||
|
(use-package doom-themes
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
;; Global settings (defaults)
|
||||||
|
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
|
||||||
|
doom-themes-enable-italic t) ; if nil, italics is universally disabled
|
||||||
|
(load-theme 'doom-monokai-spectrum t)
|
||||||
|
;; (load-theme 'doom-monokai-machine t)
|
||||||
|
|
||||||
|
;; Enable flashing mode-line on errors
|
||||||
|
(doom-themes-visual-bell-config)
|
||||||
|
;; Enable custom neotree theme (all-the-icons must be installed!)
|
||||||
|
(doom-themes-neotree-config)
|
||||||
|
;; or for treemacs users
|
||||||
|
(setq doom-themes-treemacs-theme "doom-colors") ; use "doom-colors" for less minimal icon theme
|
||||||
|
(doom-themes-treemacs-config)
|
||||||
|
;; Corrects (and improves) org-mode's native fontification.
|
||||||
|
(doom-themes-org-config))
|
||||||
|
|
||||||
|
(add-to-list 'default-frame-alist '(alpha-background . 90)) ;; for all new frames
|
||||||
|
|
||||||
|
(menu-bar-mode -1)
|
||||||
|
(tool-bar-mode -1)
|
||||||
|
(scroll-bar-mode -1)
|
||||||
|
|
||||||
|
(global-display-line-numbers-mode 0)
|
||||||
|
(menu-bar--display-line-numbers-mode-relative)
|
||||||
|
;; (setq display-line-numbers-mode-relative 't)
|
||||||
|
|
||||||
|
(global-visual-line-mode t)
|
||||||
|
|
||||||
|
(use-package counsel
|
||||||
|
:after ivy
|
||||||
|
:diminish
|
||||||
|
:config (counsel-mode))
|
||||||
|
|
||||||
|
(use-package ivy
|
||||||
|
:bind
|
||||||
|
;; ivy-resume resumes the last Ivy-based completion.
|
||||||
|
(("C-c C-r" . ivy-resume)
|
||||||
|
("C-x B" . ivy-switch-buffer-other-window))
|
||||||
|
:diminish
|
||||||
|
:custom
|
||||||
|
(setq ivy-use-virtual-buffers t)
|
||||||
|
(setq ivy-count-format "(%d/%d) ")
|
||||||
|
(setq enable-recursive-minibuffers t)
|
||||||
|
:config
|
||||||
|
(ivy-mode))
|
||||||
|
|
||||||
|
(use-package all-the-icons-ivy-rich
|
||||||
|
:ensure t
|
||||||
|
:diminish
|
||||||
|
:init (all-the-icons-ivy-rich-mode 1))
|
||||||
|
|
||||||
|
(use-package ivy-rich
|
||||||
|
:after ivy
|
||||||
|
:diminish
|
||||||
|
:ensure t
|
||||||
|
:init (ivy-rich-mode 1) ;; this gets us descriptions in M-x.
|
||||||
|
:custom
|
||||||
|
(ivy-virtual-abbreviate 'full
|
||||||
|
ivy-rich-switch-buffer-align-virtual-buffer t
|
||||||
|
ivy-rich-path-style 'abbrev)
|
||||||
|
:config
|
||||||
|
(ivy-set-display-transformer 'ivy-switch-buffer
|
||||||
|
'ivy-rich-switch-buffer-transformer))
|
||||||
|
|
||||||
|
(use-package zig-mode)
|
||||||
|
(use-package nix-mode)
|
||||||
|
;; (use-package jai-mode)
|
||||||
|
(use-package rust-mode)
|
||||||
|
(use-package cargo-mode)
|
||||||
|
(use-package lua-mode)
|
||||||
|
(add-to-list 'load-path "~/.config/emacs/manual-packages")
|
||||||
|
(require 'odin-mode)
|
||||||
|
|
||||||
|
(use-package toc-org
|
||||||
|
:commands toc-org-enable
|
||||||
|
:init (add-hook 'org-mode-hook 'toc-org-enable))
|
||||||
|
|
||||||
|
(add-hook 'org-mode-hook 'org-indent-mode)
|
||||||
|
;;(setq (setq org-return-follows-link t)
|
||||||
|
(use-package org-bullets)
|
||||||
|
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
||||||
|
|
||||||
|
(require 'org-tempo)
|
||||||
|
|
||||||
|
(use-package which-key
|
||||||
|
:init
|
||||||
|
(which-key-mode 1)
|
||||||
|
:diminish
|
||||||
|
:config
|
||||||
|
(setq which-key-side-window-location 'bottom
|
||||||
|
which-key-sort-order #'which-key-key-order-alpha
|
||||||
|
which-key-sort-uppercase-first nil
|
||||||
|
which-key-add-column-padding 1
|
||||||
|
which-key-max-display-columns nil
|
||||||
|
which-key-min-display-lines 6
|
||||||
|
which-key-side-window-slot -10
|
||||||
|
which-key-side-window-max-height 0.25
|
||||||
|
which-key-ide-delay 0.8
|
||||||
|
which-key-max-description-length 25
|
||||||
|
which-key-allow-imprecise-window-fit nil
|
||||||
|
which-key-separator " -> " ))
|
||||||
@@ -0,0 +1,792 @@
|
|||||||
|
#+TITLE:LM's Emacs Config
|
||||||
|
#+Author: Liam Malone (LM)
|
||||||
|
#+DESCRIPTION: LM's personal Emacs config
|
||||||
|
#+STARTUP: showeverything
|
||||||
|
#+OPTIONS: toc:2
|
||||||
|
|
||||||
|
* TABLE OF CONTENTS :toc:
|
||||||
|
- [[#important-programs-to-load-first][IMPORTANT PROGRAMS TO LOAD FIRST]]
|
||||||
|
- [[#elpaca-package-manager][Elpaca Package Manager]]
|
||||||
|
- [[#load-evil-mode][Load Evil Mode]]
|
||||||
|
- [[#general-keybindings][General Keybindings]]
|
||||||
|
- [[#all-the-icons][ALL THE ICONS]]
|
||||||
|
- [[#autosave][AUTOSAVE]]
|
||||||
|
- [[#company][COMPANY]]
|
||||||
|
- [[#dashboard][DASHBOARD]]
|
||||||
|
- [[#diminish][DIMINISH]]
|
||||||
|
- [[#drag-stuff][DRAG-STUFF]]
|
||||||
|
- [[#flycheck][FLYCHECK]]
|
||||||
|
- [[#fonts][FONTS]]
|
||||||
|
- [[#setting-the-font-face][Setting The Font Face]]
|
||||||
|
- [[#zoom-inout][Zoom In/Out]]
|
||||||
|
- [[#gnuplot][GNUPLOT]]
|
||||||
|
- [[#image-dir-ed][IMAGE DIR-ED]]
|
||||||
|
- [[#indentingtabs][INDENTING/TABS]]
|
||||||
|
- [[#ligatures][LIGATURES]]
|
||||||
|
- [[#markdown-mode][MARKDOWN MODE]]
|
||||||
|
- [[#org-download][ORG DOWNLOAD]]
|
||||||
|
- [[#pulse][PULSE]]
|
||||||
|
- [[#pdf-tools][PDF TOOLS]]
|
||||||
|
- [[#projectile][PROJECTILE]]
|
||||||
|
- [[#rainbow-mode][RAINBOW MODE]]
|
||||||
|
- [[#reload-emacs][RELOAD EMACS]]
|
||||||
|
- [[#shells-and-terminals][SHELLS AND TERMINALS]]
|
||||||
|
- [[#eshell][Eshell]]
|
||||||
|
- [[#vterm][Vterm]]
|
||||||
|
- [[#sudo-edit][SUDO EDIT]]
|
||||||
|
- [[#theme][THEME]]
|
||||||
|
- [[#transparency][TRANSPARENCY]]
|
||||||
|
- [[#gui-tweaks][GUI TWEAKS]]
|
||||||
|
- [[#disable-menubar-toolbars-and-scrollbars][Disable Menubar, Toolbars and Scrollbars]]
|
||||||
|
- [[#display-line-numbers-and-truncated-lines][Display Line Numbers and Truncated Lines]]
|
||||||
|
- [[#ivy-counsel][IVY (COUNSEL)]]
|
||||||
|
- [[#language-support][LANGUAGE SUPPORT]]
|
||||||
|
- [[#org-mode][ORG MODE]]
|
||||||
|
- [[#enabling-table-of-contents][Enabling Table of Contents]]
|
||||||
|
- [[#enabling-org-bullets][Enabling Org Bullets]]
|
||||||
|
- [[#source-code-block-tag-expansion][Source Code Block Tag Expansion]]
|
||||||
|
- [[#which-key][WHICH-KEY]]
|
||||||
|
|
||||||
|
* IMPORTANT PROGRAMS TO LOAD FIRST
|
||||||
|
** Elpaca Package Manager
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defvar elpaca-installer-version 0.6)
|
||||||
|
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||||
|
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||||
|
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
||||||
|
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
||||||
|
:ref nil
|
||||||
|
:files (:defaults (:exclude "extensions"))
|
||||||
|
:build (:not elpaca--activate-package)))
|
||||||
|
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
|
||||||
|
(build (expand-file-name "elpaca/" elpaca-builds-directory))
|
||||||
|
(order (cdr elpaca-order))
|
||||||
|
(default-directory repo))
|
||||||
|
(add-to-list 'load-path (if (file-exists-p build) build repo))
|
||||||
|
(unless (file-exists-p repo)
|
||||||
|
(make-directory repo t)
|
||||||
|
(when (< emacs-major-version 28) (require 'subr-x))
|
||||||
|
(condition-case-unless-debug err
|
||||||
|
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
||||||
|
((zerop (call-process "git" nil buffer t "clone"
|
||||||
|
(plist-get order :repo) repo)))
|
||||||
|
((zerop (call-process "git" nil buffer t "checkout"
|
||||||
|
(or (plist-get order :ref) "--"))))
|
||||||
|
(emacs (concat invocation-directory invocation-name))
|
||||||
|
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
|
||||||
|
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
|
||||||
|
((require 'elpaca))
|
||||||
|
((elpaca-generate-autoloads "elpaca" repo)))
|
||||||
|
(kill-buffer buffer)
|
||||||
|
(error "%s" (with-current-buffer buffer (buffer-string))))
|
||||||
|
((error) (warn "%s" err) (delete-directory repo 'recursive))))
|
||||||
|
(unless (require 'elpaca-autoloads nil t)
|
||||||
|
(require 'elpaca)
|
||||||
|
(elpaca-generate-autoloads "elpaca" repo)
|
||||||
|
(load "./elpaca-autoloads")))
|
||||||
|
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||||
|
(elpaca `(,@elpaca-order))
|
||||||
|
|
||||||
|
;; Install use-package support
|
||||||
|
(elpaca elpaca-use-package
|
||||||
|
;; Enable :elpaca use-package keyword.
|
||||||
|
(elpaca-use-package-mode)
|
||||||
|
;; Assume :elpaca t unless otherwise specified.
|
||||||
|
(setq elpaca-use-package-by-default t))
|
||||||
|
|
||||||
|
;; Block until current queue processed.
|
||||||
|
(elpaca-wait)
|
||||||
|
|
||||||
|
;;When installing a package which modifies a form used at the top-level
|
||||||
|
;;(e.g. a package which adds a use-package key word),
|
||||||
|
;;use `elpaca-wait' to block until that package has been installed/configured.
|
||||||
|
;;For example:
|
||||||
|
;;(use-package general :demand t)
|
||||||
|
;;(elpaca-wait)
|
||||||
|
|
||||||
|
;;Turns off elpaca-use-package-mode current declartion
|
||||||
|
;;Note this will cause the declaration to be interpreted immediately (not deferred).
|
||||||
|
;;Useful for configuring built-in emacs features.
|
||||||
|
;;(use-package emacs :elpaca nil :config (setq ring-bell-function #'ignore))
|
||||||
|
|
||||||
|
;; Don't install anything. Defer execution of BODY
|
||||||
|
;;(elpaca nil (message "deferred"))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Load Evil Mode
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
;; Expands to: (elpaca evil (use-package evil :demand t))
|
||||||
|
(use-package evil
|
||||||
|
:bind (:map evil-normal-state-map
|
||||||
|
("<C-u>" . evil-scroll-page-up))
|
||||||
|
:init ;; tweak evil's configuration before loading it
|
||||||
|
(setq evil-want-integration t) ;; This is optional since it's already set to t by default.
|
||||||
|
(setq evil-respect-visual-line-mode t)
|
||||||
|
(setq evil-want-keybinding nil)
|
||||||
|
(setq evil-vsplit-window-right t)
|
||||||
|
(setq evil-split-window-below t)
|
||||||
|
(evil-mode))
|
||||||
|
(use-package evil-collection
|
||||||
|
:after evil
|
||||||
|
:config
|
||||||
|
(setq evil-collection-mode-list '(dashboard dired ibuffer))
|
||||||
|
(evil-collection-init))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
** General Keybindings
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
|
(use-package general
|
||||||
|
:config
|
||||||
|
(general-evil-setup)
|
||||||
|
;; set 'SPC' as global leader key
|
||||||
|
(general-create-definer lm/leader-keys
|
||||||
|
:states '(normal insert visual emacs)
|
||||||
|
:keymaps 'override
|
||||||
|
:prefix "SPC" ;; set leader
|
||||||
|
:global-prefix "M-SPC") ;; access leader in insert mode
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"b" '(:ignore t :wk "buffer")
|
||||||
|
"b b" '(switch-to-buffer :wk "Switch buffer")
|
||||||
|
"b i" '(ibuffer :wk "Ibuffer")
|
||||||
|
"b k" '(kill-this-buffer :wk "Kill this buffer")
|
||||||
|
"b n" '(next-buffer :wk "Next buffer")
|
||||||
|
"b p" '(previous-buffer :wk "Previous buffer")
|
||||||
|
"b r" '(revert-buffer :wk "Reload buffer"))
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"e" '(:ignore t :wk "Eshell/Evaluate")
|
||||||
|
"e b" '(eval-buffer :wk "Evaluate elisp in buffer")
|
||||||
|
"e d" '(eval-defun :wk "Evaluate defun containing or after point")
|
||||||
|
"e e" '(eval-expression :wk "Evaluate an elisp expression")
|
||||||
|
"e l" '(eval-last-sexp :wk "Evaluate elisp expression before point")
|
||||||
|
"e r" '(eval-region :wk "Evaluate elisp in region")
|
||||||
|
"e h" '(counsel-esh-history :wk "Eshell history")
|
||||||
|
"e s" '(eshell :wk "Eshell"))
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"SPC" '(counsel-M-x :wk "Counsel M-x")
|
||||||
|
"." '(find-file :wk "Find file")
|
||||||
|
"f c" '((lambda () (interactive) (find-file "~/nixos/modules/old_configs/emacs/config.org")) :wk "Edit emacs config")
|
||||||
|
"f r" '(counsel-recentf :wk "Find recent files")
|
||||||
|
"TAB TAB" '(comment-line :wk "Comment lines"))
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"h" '(:ignore t :wk "Help")
|
||||||
|
"h f" '(describe-function :wk "Describe function")
|
||||||
|
"h v" '(describe-variable :wk "Describe variable")
|
||||||
|
"h r r" '(reload-init-file :wk "Reload emacs config"))
|
||||||
|
;; "h r r" '((lambda () (interactive) (load-file user-init-file)) :wk "Reload emacs config"))
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"i" '(:ignore t :wk "Insert")
|
||||||
|
"i p" '(org-download-screenshot :wk "Insert screenshot (org)"))
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"t" '(:ignore t :wk "Toggle")
|
||||||
|
"t l" '(display-line-numbers-mode :wk "Toggle line numbers")
|
||||||
|
"t i" '(org-toggle-inline-images :wk "Toggle inline images")
|
||||||
|
"t t" '(visual-line-mode :wk "Toggle truncated lines"))
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"s" '(:ignore t :wk "Shell")
|
||||||
|
"s c" '(shell-command :wk "Run a shell command")
|
||||||
|
"s d" '(sh-cd-here :wk "Move current shell to current dir")
|
||||||
|
"s m" '(sh-mode :wk "Shell mode"))
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"c" '(:ignore t :wk "Capitalize")
|
||||||
|
"c w" '(capitalize-word :wk "Capitalize word")
|
||||||
|
"c r" '(capitalize-region :wk "Capitalize region")
|
||||||
|
"c c" '(upcase-char :wk "Upcase char")
|
||||||
|
"c u" '(upcase-region :wk "Upcase region"))
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"l" '(:ignore t :wk "Downcase")
|
||||||
|
"l w" '(downcase-word :wk "Downcase word")
|
||||||
|
"l u" '(downcase-region :wk "Downcase region"))
|
||||||
|
|
||||||
|
;; Evil window bindings
|
||||||
|
(lm/leader-keys
|
||||||
|
"w" '(:ignore t :wk "Window")
|
||||||
|
"w w" '(evil-window-next :wk "Next window")
|
||||||
|
"w h" '(evil-window-left :wk "Move cursor to window left")
|
||||||
|
"w j" '(evil-window-down :wk "Move cursor to window below")
|
||||||
|
"w k" '(evil-window-up :wk "Move cursor to window above")
|
||||||
|
"w l" '(evil-window-right :wk "Move cursor to window right")
|
||||||
|
"w s" '(evil-window-split :wk "Split window horizontally")
|
||||||
|
"w v" '(evil-window-vsplit :wk "Split window vertically")
|
||||||
|
"w H" '(evil-window-move-far-left :wk "Move split to left")
|
||||||
|
"w J" '(evil-window-move-very-bottom :wk "Move split to bottom")
|
||||||
|
"w K" '(evil-window-move-very-top :wk "Move split to top")
|
||||||
|
"w L" '(evil-window-move-far-right :wk "Move split to right")
|
||||||
|
"w >" '(evil-window-increase-width :wk "Increase window width")
|
||||||
|
"w ." '(evil-window-increase-width :wk "Increase window width")
|
||||||
|
"w <" '(evil-window-decrease-width :wk "Increase window width")
|
||||||
|
"w ," '(evil-window-decrease-width :wk "Increase window width")
|
||||||
|
"w c" '(evil-window-delete :wk "Close window")
|
||||||
|
"w o" '(delete-other-windows :wk "Delete other windows")
|
||||||
|
"w =" '(balance-windows :wk "Balance windows")
|
||||||
|
"q k" '(kill-buffer-and-window :wk "Kill buf and window")
|
||||||
|
"q q" '(save-buffers-kill-terminal :wk "Save bufs, kill term"))
|
||||||
|
|
||||||
|
;; (evil-global-set-key 'visual "K" (kbd ":m '<-2 RET gv '< gk"))
|
||||||
|
(evil-global-set-key 'visual "K" 'drag-stuff-up)
|
||||||
|
;; (evil-global-set-key 'visual "J" (kbd ":m '>+1 RET gv '> gj"))
|
||||||
|
(evil-global-set-key 'visual "J" 'drag-stuff-down)
|
||||||
|
|
||||||
|
(lm/leader-keys
|
||||||
|
"p" '(:ignore t :wk "Project")
|
||||||
|
"p o" '(dashboard-open :wk "Return to dashboard")
|
||||||
|
"p f" '(project-find-file :wk "Find project file"))
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* ALL THE ICONS
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package all-the-icons
|
||||||
|
:ensure t
|
||||||
|
:diminish
|
||||||
|
:if (display-graphic-p))
|
||||||
|
(use-package all-the-icons-dired
|
||||||
|
:hook (dired-mode . (lambda () (all-the-icons-dired-mode t))))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* AUTOSAVE
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(setq backup-directory-alist
|
||||||
|
`((".*" . "~/emacs/auto-saves")))
|
||||||
|
(setq auto-save-file-name-transforms
|
||||||
|
`((".*" "~/emacs/auto-saves" t)))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* COMPANY
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package company
|
||||||
|
:defer 2
|
||||||
|
:diminish
|
||||||
|
:custom
|
||||||
|
(company-begin-commands '(self-insert-command))
|
||||||
|
(company-idle-delay .1)
|
||||||
|
(company-minimum-prefix-length 2)
|
||||||
|
(company-show-numbers t)
|
||||||
|
(company-tooltip-align-annotations 't)
|
||||||
|
(global-company-mode t))
|
||||||
|
|
||||||
|
(use-package company-box
|
||||||
|
:after company
|
||||||
|
:diminish
|
||||||
|
:hook (company-mode . company-box-mode))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* DASHBOARD
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package dashboard
|
||||||
|
:ensure t
|
||||||
|
:diminish
|
||||||
|
:init
|
||||||
|
(setq initial-buffer-choice 'dashboard-open)
|
||||||
|
(setq dashboard-set-heading-icons t)
|
||||||
|
;; (setq dashboard-set-navigator t)
|
||||||
|
(setq dashboard-set-file-icons t)
|
||||||
|
(setq dashboard-banner-logo-title "Welcome to Emacs!")
|
||||||
|
(setq dashboard-startup-banner 'logo) ;; default logo
|
||||||
|
(setq dashboard-center-content t)
|
||||||
|
(setq dashboard-items '((recents . 5)
|
||||||
|
(agenda . 5)
|
||||||
|
(bookmarks . 3)
|
||||||
|
(projects . 3)))
|
||||||
|
:config
|
||||||
|
(dashboard-setup-startup-hook))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* DIMINISH
|
||||||
|
This package implements hiding or abbreviation of the modeline displays (lighters) of minor-modes. With this package installed, you can add ':diminish' to any use-package block to hide that particular mode in the modeline.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package diminish)
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* DRAG-STUFF
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package drag-stuff
|
||||||
|
:diminish
|
||||||
|
:config
|
||||||
|
(drag-stuff-global-mode 1))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* FLYCHECK
|
||||||
|
Install =luacheck= from your Linux distro's repositories for flycheck to work correctly with lua files. Install =python-pylint= for flycheck to work with python files. Haskell works with flycheck as long as =haskell-ghc= or =haskell-stack-ghc= is installed. For more information on language support for flycheck, [[https://www.flycheck.org/en/latest/languages.html][read this]].
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package flycheck
|
||||||
|
:ensure t
|
||||||
|
:defer t
|
||||||
|
:diminish
|
||||||
|
:init (global-flycheck-mode))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* FONTS
|
||||||
|
Defining the various fonts emacs will use
|
||||||
|
|
||||||
|
** Setting The Font Face
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
|
(set-face-attribute 'default nil
|
||||||
|
;; try switch to Source Code Pro
|
||||||
|
:font "FiraCodeNerdFontMono"
|
||||||
|
:height 110
|
||||||
|
:weight 'medium)
|
||||||
|
(set-face-attribute 'variable-pitch nil
|
||||||
|
:font "FiraCodeNerdFontMono"
|
||||||
|
:height 120
|
||||||
|
:weight 'medium)
|
||||||
|
(set-face-attribute 'fixed-pitch nil
|
||||||
|
:font "FiraCodeNerdFontMono"
|
||||||
|
:height 110
|
||||||
|
:weight 'medium)
|
||||||
|
;; Makes commented text and keywords italics.
|
||||||
|
;; This is working in emacsclient but not emacs.
|
||||||
|
;; Your font must have an italic face available.
|
||||||
|
(set-face-attribute 'font-lock-comment-face nil
|
||||||
|
:slant 'italic)
|
||||||
|
(set-face-attribute 'font-lock-keyword-face nil
|
||||||
|
:slant 'italic)
|
||||||
|
|
||||||
|
;; This sets the default font on all graphical frames created after restarting Emacs.
|
||||||
|
;; Does the same thing as 'set-face-attribute default' above, but emacsclient fonts
|
||||||
|
;; are not right unless I also add this method of setting the default font.
|
||||||
|
(add-to-list 'default-frame-alist '(font . "FiraCodeNerdFontMono-14"))
|
||||||
|
|
||||||
|
;; Uncomment the following line if line spacing needs adjusting.
|
||||||
|
;; (setq-default line-spacing 0.12)
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Zoom In/Out
|
||||||
|
Enable zoom in/out with C-=/- and also for C-scrl-up/down
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(global-set-key (kbd "C-=") 'text-scale-increase)
|
||||||
|
(global-set-key (kbd "C--") 'text-scale-decrease)
|
||||||
|
(global-set-key (kbd "<C-wheel-up>") 'text-scale-increase)
|
||||||
|
(global-set-key (kbd "<C-wheel-down>") 'text-scale-decrease)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* GNUPLOT
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package gnuplot-mode)
|
||||||
|
;; automatically open files ending with .gp or .gnuplot in gnuplot mode
|
||||||
|
;; (setq auto-mode-alist
|
||||||
|
;; (append '(("\\.\\(gp\\|gnuplot\\)$" . gnuplot-mode)) auto-mode-alist)))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* IMAGE DIR-ED
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package image-dired+)
|
||||||
|
#+end_src
|
||||||
|
* INDENTING/TABS
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(setq-default indent-tabs-mode nil)
|
||||||
|
(setq-default tab-width 4)
|
||||||
|
(setq-default indent-line-function 'insert-tab)
|
||||||
|
(setq-default c-default-style "linux"
|
||||||
|
c-basic-offset 4)
|
||||||
|
;; if indent-tabs-mode is off, untabify before saving
|
||||||
|
;;(add-hook 'write-file-hooks
|
||||||
|
;; (lambda () (if (not indent-tabs-mode)
|
||||||
|
;; (untabify (point-min) (point-max)))))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* LIGATURES
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
;; This assumes you've installed the package via MELPA.
|
||||||
|
(use-package ligature
|
||||||
|
:config
|
||||||
|
;; Enable the "www" ligature in every possible major mode
|
||||||
|
(ligature-set-ligatures 't '("www"))
|
||||||
|
;; Enable traditional ligature support in eww-mode, if the
|
||||||
|
;; `variable-pitch' face supports it
|
||||||
|
(ligature-set-ligatures 'eww-mode '("ff" "fi" "ffi"))
|
||||||
|
;; Enable all FiraMonoNerdFont and Fira Code ligatures in programming modes
|
||||||
|
|
||||||
|
(ligature-set-ligatures 'prog-mode
|
||||||
|
'(;; == === ==== => =| =>>=>=|=>==>> ==< =/=//=// =~
|
||||||
|
;; =:= =!=
|
||||||
|
("=" (rx (+ (or ">" "<" "|" "/" "~" ":" "!" "="))))
|
||||||
|
;; ;; ;;;
|
||||||
|
(";" (rx (+ ";")))
|
||||||
|
;; && &&&
|
||||||
|
("&" (rx (+ "&")))
|
||||||
|
;; !! !!! !. !: !!. != !== !~
|
||||||
|
("!" (rx (+ (or "=" "!" "\." ":" "~"))))
|
||||||
|
;; ?? ??? ?: ?= ?.
|
||||||
|
("?" (rx (or ":" "=" "\." (+ "?"))))
|
||||||
|
;; %% %%%
|
||||||
|
("%" (rx (+ "%")))
|
||||||
|
;; |> ||> |||> ||||> |] |} || ||| |-> ||-||
|
||||||
|
;; |->>-||-<<-| |- |== ||=||
|
||||||
|
;; |==>>==<<==<=>==//==/=!==:===>
|
||||||
|
("|" (rx (+ (or ">" "<" "|" "/" ":" "!" "}" "\]"
|
||||||
|
"-" "=" ))))
|
||||||
|
;; \\ \\\ \/
|
||||||
|
("\\" (rx (or "/" (+ "\\"))))
|
||||||
|
;; ++ +++ ++++ +>
|
||||||
|
("+" (rx (or ">" (+ "+"))))
|
||||||
|
;; :: ::: :::: :> :< := :// ::=
|
||||||
|
(":" (rx (or ">" "<" "=" "//" ":=" (+ ":"))))
|
||||||
|
;; // /// //// /\ /* /> /===:===!=//===>>==>==/
|
||||||
|
("/" (rx (+ (or ">" "<" "|" "/" "\\" "\*" ":" "!"
|
||||||
|
"="))))
|
||||||
|
;; .. ... .... .= .- .? ..= ..<
|
||||||
|
("\." (rx (or "=" "-" "\?" "\.=" "\.<" (+ "\."))))
|
||||||
|
;; -- --- ---- -~ -> ->> -| -|->-->>->--<<-|
|
||||||
|
("-" (rx (+ (or ">" "<" "|" "~" "-"))))
|
||||||
|
;; *> */ *) ** *** ****
|
||||||
|
("*" (rx (or ">" "/" ")" (+ "*"))))
|
||||||
|
;; www wwww
|
||||||
|
("w" (rx (+ "w")))
|
||||||
|
;; <> <!-- <|> <: <~ <~> <~~ <+ <* <$ </ <+> <*>
|
||||||
|
;; <$> </> <| <|| <||| <|||| <- <-| <-<<-|-> <->>
|
||||||
|
;; <<-> <= <=> <<==<<==>=|=>==/==//=!==:=>
|
||||||
|
;; << <<< <<<<
|
||||||
|
("<" (rx (+ (or "\+" "\*" "\$" "<" ">" ":" "~" "!"
|
||||||
|
"-" "/" "|" "="))))
|
||||||
|
;; >: >- >>- >--|-> >>-|-> >= >== >>== >=|=:=>>
|
||||||
|
;; >> >>> >>>>
|
||||||
|
(">" (rx (+ (or ">" "<" "|" "/" ":" "=" "-"))))
|
||||||
|
;; #: #= #! #( #? #[ #{ #_ #_( ## ### #####
|
||||||
|
("#" (rx (or ":" "=" "!" "(" "\?" "\[" "{" "_(" "_"
|
||||||
|
(+ "#"))))
|
||||||
|
;; ~~ ~~~ ~= ~- ~@ ~> ~~>
|
||||||
|
("~" (rx (or ">" "=" "-" "@" "~>" (+ "~"))))
|
||||||
|
;; __ ___ ____ _|_ __|____|_
|
||||||
|
("_" (rx (+ (or "_" "|"))))
|
||||||
|
;; Fira code: 0xFF 0x12
|
||||||
|
("0" (rx (and "x" (+ (in "A-F" "a-f" "0-9")))))
|
||||||
|
;; Fira code:
|
||||||
|
"Fl" "Tl" "fi" "fj" "fl" "ft"
|
||||||
|
;; The few not covered by the regexps.
|
||||||
|
"{|" "[|" "]#" "(*" "}#" "$>" "^="))
|
||||||
|
|
||||||
|
;; Enables ligature checks globally in all buffers. You can also do it
|
||||||
|
;; per mode with `ligature-mode'.
|
||||||
|
(global-ligature-mode t))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* MARKDOWN MODE
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package markdown-mode
|
||||||
|
:ensure t
|
||||||
|
:mode ("README\\.md\\'" . gfm-mode)
|
||||||
|
:init (setq markdown-command "multimarkdown"))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* ORG DOWNLOAD
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
|
(use-package org-download
|
||||||
|
:after org
|
||||||
|
:defer nil
|
||||||
|
:custom
|
||||||
|
(org-download-method 'directory)
|
||||||
|
(org-download-image-dir "~/emacs/images/")
|
||||||
|
(org-download-heading-lvl 0)
|
||||||
|
(org-download-timestamp "org_%Y%m%d-%H%M%S_")
|
||||||
|
(org-image-actual-width 400)
|
||||||
|
(org-download-screenshot-method "WAYLAND_DISPLAY=wayland-1 wl-paste -t image/png > '%s'.png")
|
||||||
|
:bind
|
||||||
|
("C-M-y" . org-download-screenshot file)
|
||||||
|
:config
|
||||||
|
(require 'org-download))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* PULSE
|
||||||
|
Pulse highlight a line on certain actions
|
||||||
|
|
||||||
|
# #+begin_src emacs-lisp
|
||||||
|
# (use-package pulse
|
||||||
|
# :ensure nil
|
||||||
|
# :defer
|
||||||
|
# :init
|
||||||
|
# (defun pulse-line (&rest _)
|
||||||
|
# "Pulse the current line"
|
||||||
|
# (pulse-momentary-highlight-one-line (point)))
|
||||||
|
|
||||||
|
# (dolist (command '(scroll-up-command
|
||||||
|
# scroll-down-command
|
||||||
|
# windmove-left
|
||||||
|
# windmove-right
|
||||||
|
# windmove-up
|
||||||
|
# windmove-down
|
||||||
|
# move-to-window-line-top-bottom
|
||||||
|
# recenter-top-bottom
|
||||||
|
# other-window))
|
||||||
|
# (advice-add command :after #'pulse-line)))
|
||||||
|
# #+end_src
|
||||||
|
|
||||||
|
* PDF TOOLS
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package pdf-tools)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
* PROJECTILE
|
||||||
|
[[https://github.com/bbatsov/projectile][Projectile]] is a project interaction library for Emacs.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package projectile
|
||||||
|
:diminish
|
||||||
|
:config
|
||||||
|
(projectile-mode 1))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* RAINBOW MODE
|
||||||
|
Display the actual color as a background for any hex color value (ex. #ffffff). The code block below enables rainbow-mode in all programming modes (prog-mode) as well as org-mode, which is why rainbow works in this document.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package rainbow-mode
|
||||||
|
:diminish
|
||||||
|
:hook
|
||||||
|
((org-mode prog-mode) . rainbow-mode))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* RELOAD EMACS
|
||||||
|
This is just an example of how to create a simple function in Emacs. Use this function to reload Emacs after adding changes to the config. Yes, I am loading the user-init-file twice in this function, which is a hack because for some reason, just loading the user-init-file once does not work properly.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun reload-init-file ()
|
||||||
|
(interactive)
|
||||||
|
(load-file user-init-file)
|
||||||
|
(load-file user-init-file))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* SHELLS AND TERMINALS
|
||||||
|
|
||||||
|
** Eshell
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package eshell-syntax-highlighting
|
||||||
|
:after esh-mode
|
||||||
|
:config
|
||||||
|
(eshell-syntax-highlighting-global-mode +1))
|
||||||
|
|
||||||
|
(setq eshell-rc-script (concat user-emacs-directory "eshell/profile")
|
||||||
|
eshell-aliases-file (concat user-emacs-directory "eshell/aliases")
|
||||||
|
eshell-history-size 5000
|
||||||
|
eshell-buffer-maximum-lines 5000
|
||||||
|
eshell-hist-ignoredups t
|
||||||
|
eshell-scroll-to-bottom-on-input t
|
||||||
|
eshell-destroy-buffer-when-process-dies t
|
||||||
|
eshell-visual-commands'("bash" "fish" "htop" "ssh" "top" "zsh"))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Vterm
|
||||||
|
Vterm is a terminal emulator within Emacs. The 'shell-file-name' setting sets the shell to be used in M-x shell, M-x term, M-x ansi-term and M-x vterm. By default, the shell is set to 'fish' but could change it to 'bash' or 'zsh' if you prefer.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package vterm
|
||||||
|
:config
|
||||||
|
(setq shell-file-name "/run/current-system/sw/bin/bash"
|
||||||
|
vterm-max-scrollback 5000))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* SUDO EDIT
|
||||||
|
Enable editing of privileged files
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package sudo-edit
|
||||||
|
:config
|
||||||
|
(lm/leader-keys
|
||||||
|
"fu" '(sudo-edit-find-file :wk "Sudo find file")
|
||||||
|
"fU" '(sudo-edit :wk "Sudo edit file")))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* THEME
|
||||||
|
Set themes dir, load chosen theme - theme made with [[https://emacsfodder.github.io/emacs-theme-editor/][Emacs Theme Editor]].
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
;;(add-to-list 'custom-theme-load-path "~/.config/emacs/themes")
|
||||||
|
;;(load-theme 'soft-charcoal t)
|
||||||
|
|
||||||
|
(use-package doom-themes
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
;; Global settings (defaults)
|
||||||
|
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
|
||||||
|
doom-themes-enable-italic t) ; if nil, italics is universally disabled
|
||||||
|
(load-theme 'doom-monokai-spectrum t)
|
||||||
|
;; (load-theme 'doom-monokai-machine t)
|
||||||
|
|
||||||
|
;; Enable flashing mode-line on errors
|
||||||
|
(doom-themes-visual-bell-config)
|
||||||
|
;; Enable custom neotree theme (all-the-icons must be installed!)
|
||||||
|
(doom-themes-neotree-config)
|
||||||
|
;; or for treemacs users
|
||||||
|
(setq doom-themes-treemacs-theme "doom-colors") ; use "doom-colors" for less minimal icon theme
|
||||||
|
(doom-themes-treemacs-config)
|
||||||
|
;; Corrects (and improves) org-mode's native fontification.
|
||||||
|
(doom-themes-org-config))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* TRANSPARENCY
|
||||||
|
True transparency support as of emacs 29
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(add-to-list 'default-frame-alist '(alpha-background . 90)) ;; for all new frames
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
* GUI TWEAKS
|
||||||
|
Making the UI look nicer
|
||||||
|
|
||||||
|
** Disable Menubar, Toolbars and Scrollbars
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(menu-bar-mode -1)
|
||||||
|
(tool-bar-mode -1)
|
||||||
|
(scroll-bar-mode -1)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Display Line Numbers and Truncated Lines
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(global-display-line-numbers-mode 0)
|
||||||
|
(menu-bar--display-line-numbers-mode-relative)
|
||||||
|
;; (setq display-line-numbers-mode-relative 't)
|
||||||
|
|
||||||
|
(global-visual-line-mode t)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* IVY (COUNSEL)
|
||||||
|
+ Ivy, a generic completion mechanism for Emacs.
|
||||||
|
+ Counsel, a collection of Ivy-enhanced versions of common Emacs commands.
|
||||||
|
+ Ivy-rich allows us to add descriptions alongside the commands in M-x.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package counsel
|
||||||
|
:after ivy
|
||||||
|
:diminish
|
||||||
|
:config (counsel-mode))
|
||||||
|
|
||||||
|
(use-package ivy
|
||||||
|
:bind
|
||||||
|
;; ivy-resume resumes the last Ivy-based completion.
|
||||||
|
(("C-c C-r" . ivy-resume)
|
||||||
|
("C-x B" . ivy-switch-buffer-other-window))
|
||||||
|
:diminish
|
||||||
|
:custom
|
||||||
|
(setq ivy-use-virtual-buffers t)
|
||||||
|
(setq ivy-count-format "(%d/%d) ")
|
||||||
|
(setq enable-recursive-minibuffers t)
|
||||||
|
:config
|
||||||
|
(ivy-mode))
|
||||||
|
|
||||||
|
(use-package all-the-icons-ivy-rich
|
||||||
|
:ensure t
|
||||||
|
:diminish
|
||||||
|
:init (all-the-icons-ivy-rich-mode 1))
|
||||||
|
|
||||||
|
(use-package ivy-rich
|
||||||
|
:after ivy
|
||||||
|
:diminish
|
||||||
|
:ensure t
|
||||||
|
:init (ivy-rich-mode 1) ;; this gets us descriptions in M-x.
|
||||||
|
:custom
|
||||||
|
(ivy-virtual-abbreviate 'full
|
||||||
|
ivy-rich-switch-buffer-align-virtual-buffer t
|
||||||
|
ivy-rich-path-style 'abbrev)
|
||||||
|
:config
|
||||||
|
(ivy-set-display-transformer 'ivy-switch-buffer
|
||||||
|
'ivy-rich-switch-buffer-transformer))
|
||||||
|
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* LANGUAGE SUPPORT
|
||||||
|
Emacs has built-in programming language modes for Lisp, Scheme, DSSSL, Ada, ASM, AWK, C, C++, Fortran, Icon, IDL (CORBA), IDLWAVE, Java, Javascript, M4, Makefiles, Metafont, Modula2, Object Pascal, Objective-C, Octave, Pascal, Perl, Pike, PostScript, Prolog, Python, Ruby, Simula, SQL, Tcl, Verilog, and VHDL. Other languages will require you to install additional modes.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package zig-mode)
|
||||||
|
(use-package nix-mode)
|
||||||
|
;; (use-package jai-mode)
|
||||||
|
(use-package rust-mode)
|
||||||
|
(use-package cargo-mode)
|
||||||
|
(use-package lua-mode)
|
||||||
|
(add-to-list 'load-path "~/.config/emacs/manual-packages")
|
||||||
|
(require 'odin-mode)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
|
* ORG MODE
|
||||||
|
** Enabling Table of Contents
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package toc-org
|
||||||
|
:commands toc-org-enable
|
||||||
|
:init (add-hook 'org-mode-hook 'toc-org-enable))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Enabling Org Bullets
|
||||||
|
Org-bullets give bullet points instead of asterisks
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(add-hook 'org-mode-hook 'org-indent-mode)
|
||||||
|
;;(setq (setq org-return-follows-link t)
|
||||||
|
(use-package org-bullets)
|
||||||
|
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Source Code Block Tag Expansion
|
||||||
|
Org-tempo is not a separate package but a module within org that can be enabled. Org-tempo allows for '<s' followed by TAB to expand to a begin_src tag. Other expansions available include:
|
||||||
|
|
||||||
|
| Typing the below + TAB | Expands to ... |
|
||||||
|
|------------------------+-----------------------------------------|
|
||||||
|
| <a | '#+BEGIN_EXPORT ascii' … '#+END_EXPORT |
|
||||||
|
| <c | '#+BEGIN_CENTER' … '#+END_CENTER' |
|
||||||
|
| <C | '#+BEGIN_COMMENT' … '#+END_COMMENT' |
|
||||||
|
| <e | '#+BEGIN_EXAMPLE' … '#+END_EXAMPLE' |
|
||||||
|
| <E | '#+BEGIN_EXPORT' … '#+END_EXPORT' |
|
||||||
|
| <h | '#+BEGIN_EXPORT html' … '#+END_EXPORT' |
|
||||||
|
| <l | '#+BEGIN_EXPORT latex' … '#+END_EXPORT' |
|
||||||
|
| <q | '#+BEGIN_QUOTE' … '#+END_QUOTE' |
|
||||||
|
| <s | '#+BEGIN_SRC' … '#+END_SRC' |
|
||||||
|
| <v | '#+BEGIN_VERSE' … '#+END_VERSE' |
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(require 'org-tempo)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* WHICH-KEY
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package which-key
|
||||||
|
:init
|
||||||
|
(which-key-mode 1)
|
||||||
|
:diminish
|
||||||
|
:config
|
||||||
|
(setq which-key-side-window-location 'bottom
|
||||||
|
which-key-sort-order #'which-key-key-order-alpha
|
||||||
|
which-key-sort-uppercase-first nil
|
||||||
|
which-key-add-column-padding 1
|
||||||
|
which-key-max-display-columns nil
|
||||||
|
which-key-min-display-lines 6
|
||||||
|
which-key-side-window-slot -10
|
||||||
|
which-key-side-window-max-height 0.25
|
||||||
|
which-key-ide-delay 0.8
|
||||||
|
which-key-max-description-length 25
|
||||||
|
which-key-allow-imprecise-window-fit nil
|
||||||
|
which-key-separator " -> " ))
|
||||||
|
#+end_src
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,447 @@
|
|||||||
|
;;; doom-themes.el --- an opinionated pack of modern color-themes -*- lexical-binding: t; -*-
|
||||||
|
;;
|
||||||
|
;; Copyright (C) 2016-2022 Henrik Lissner
|
||||||
|
;;
|
||||||
|
;; Author: Henrik Lissner <contact@henrik.io>
|
||||||
|
;; Maintainer: Henrik Lissner <contact@henrik.io>
|
||||||
|
;; Maintainer: Emmanuel Bustos Torres <ema2159@gmail.com>
|
||||||
|
;; Created: May 22, 2016
|
||||||
|
;; Version: 2.3.0
|
||||||
|
;; Keywords: themes faces
|
||||||
|
;; Homepage: https://github.com/doomemacs/themes
|
||||||
|
;; Package-Requires: ((emacs "25.1") (cl-lib "0.5"))
|
||||||
|
;;
|
||||||
|
;; This file is not part of GNU Emacs.
|
||||||
|
;;
|
||||||
|
;;; Commentary:
|
||||||
|
;;
|
||||||
|
;; doomemacs/themes is an megapack of popular themes, including aesthetic
|
||||||
|
;; extensions for popular packages.
|
||||||
|
;;
|
||||||
|
;; Themes in this pack:
|
||||||
|
;; - doom-1337 -- ported from VSCode's 1337 theme (ported by @ccmywish)
|
||||||
|
;; - doom-acario-dark -- an original dark theme (ported by @gagbo)
|
||||||
|
;; - doom-acario-light -- an original light theme (ported by @gagbo)
|
||||||
|
;; - doom-ayu-dark -- inspired by Ayu Dark (ported by @ashton)
|
||||||
|
;; - doom-ayu-light -- inspirted by Ayu Light (ported by @LoveSponge)
|
||||||
|
;; - doom-ayu-mirage -- inspired by Ayu Mirage (ported by @LoveSponge)
|
||||||
|
;; - doom-badger -- inspired by cann's Badger colorscheme (ported by @jsoa)
|
||||||
|
;; - doom-challenger-deep -- inspired by Vim's Challenger Deep theme (ported by @fuxialexander)
|
||||||
|
;; - doom-city-lights -- inspired by Atom's City Lights theme (ported by @fuxialexander)
|
||||||
|
;; - doom-dark+ -- ported from equinusocio's VSCode Theme, dark+ (ported by @ema2159)
|
||||||
|
;; - doom-dracula -- inspired by the popular Dracula theme (ported by @fuxialexander)
|
||||||
|
;; - doom-earl-grey -- a gentle color scheme, for code (ported by @JuneKelly)
|
||||||
|
;; - doom-ephemeral -- inspired by the Ephemeral Theme from elenapan's dotfiles (ported by @karetsu)
|
||||||
|
;; - doom-fairy-floss -- a candy colored theme by sailorhg (ported by @ema2159)
|
||||||
|
;; - doom-feather-dark -- a purple-tinted theme, inspired by doom-one (by @Plunne)
|
||||||
|
;; - doom-feather-light -- a light variable of feather-dark, inspired by doom-one (by @Plunne)
|
||||||
|
;; - doom-flatwhite -- inspired by Atom's Flatwhite Syntax theme (ported by @JuneKelly)
|
||||||
|
;; - doom-gruvbox -- inspired by morhetz's Gruvbox (ported by @JongW)
|
||||||
|
;; - doom-gruvbox-light -- inspired by morhetz's Gruvbox (light) (ported by @jsoa)
|
||||||
|
;; - doom-henna -- based on VSCode's Henna theme (ported by @jsoa)
|
||||||
|
;; - doom-homage-black -- a minimalistic, colorless theme inspired by eziam, tao, and jbeans (ported by @mskorzhinskiy)
|
||||||
|
;; - doom-homage-white -- minimal white theme inspired by editors from 2000s (ported by @mskorzhinskiy)
|
||||||
|
;; - doom-horizon -- ported from VSCode Horizon (ported by @karetsu)
|
||||||
|
;; - doom-Iosvkem -- ported from the default dark theme for Adobe Brackets (ported by @neutaaaaan)
|
||||||
|
;; - doom-ir-black -- ported from Vim's ir_black colorscheme (ported by @legendre6891)
|
||||||
|
;; - doom-lantern -- based on Gitleptune's Lantern theme (ported by @paladhammika)
|
||||||
|
;; - doom-laserwave -- a clean synthwave/outrun theme inspired by VSCode's Laserwave (ported by @hyakt)
|
||||||
|
;; - doom-manegarm -- an original autumn-inspired dark theme (ported by @kenranunderscore)
|
||||||
|
;; - doom-material -- adapted from equinusocio's Material themes (ported by @tam5)
|
||||||
|
;; - doom-material-dark -- inspired by Material Theme by xrei (ported by @trev-dev)
|
||||||
|
;; - doom-meltbus -- a dark (mostly) monochromatic theme (ported by @spacefrogg)
|
||||||
|
;; - doom-miramare -- a port of Franbach's Miramare theme; a variant of Grubox (ported by @sagittaros)
|
||||||
|
;; - doom-molokai -- inspired by Tomas Restrepo's Molokai (ported by @hlissner)
|
||||||
|
;; - doom-monokai-classic -- port of Monokai Classic (ported by @ema2159)
|
||||||
|
;; - doom-monokai-machine -- port of Monokai Classic (ported by @minikN)
|
||||||
|
;; - doom-monokai-octagon -- port of Monokai Octagon (ported by @minikN)
|
||||||
|
;; - doom-monokai-pro -- Port of Monokai Pro (ported by @minikN)
|
||||||
|
;; - doom-monokai-ristretto -- Port of Monokai Ristretto (ported by @minikN)
|
||||||
|
;; - doom-monokai-spectrum -- port of Monokai Spectrum (ported by @minikN)
|
||||||
|
;; - doom-moonlight -- inspired by VS code's Moonlight (ported by @Brettm12345)
|
||||||
|
;; - doom-nord -- dark variant of Nord (ported by @fuxialexander)
|
||||||
|
;; - doom-nord-aurora -- a light variant of Nord (ported by @MoskitoHero)
|
||||||
|
;; - doom-nord-light -- light variant of Nord (ported by @fuxialexander)
|
||||||
|
;; - doom-nova -- inspired by Trevord Miller's Nova (ported by @bigardone)
|
||||||
|
;; - doom-oceanic-next -- inspired by Oceanic Next (ported by @juanwolf)
|
||||||
|
;; - doom-oksolar-dark -- an OKLab variant of Solarized dark (ported by @logc)
|
||||||
|
;; - doom-oksolar-light -- an OKLab variant of Solarized light (ported by @logc)
|
||||||
|
;; - doom-old-hope -- inspired by An Old Hope, in a galaxy far far away (ported by @teesloane)
|
||||||
|
;; - doom-one -- inspired by Atom One Dark (ported by @hlissner)
|
||||||
|
;; - doom-one-light -- inspired by Atom One Light (ported by @ztlevi)
|
||||||
|
;; - doom-opera -- an original light theme (ported by @jwintz)
|
||||||
|
;; - doom-opera-light -- an original light theme (ported by @jwintz)
|
||||||
|
;; - doom-outrun-electric -- a high contrast, neon theme inspired by Outrun Electric on VSCode (ported by @ema2159)
|
||||||
|
;; - doom-palenight -- adapted from equinusocio's Material themes (ported by @Brettm12345)
|
||||||
|
;; - doom-peacock -- inspired by daylerees' Peacock (ported by @teesloane)
|
||||||
|
;; - doom-pine -- a green flavor of doom-gruvbox (by @RomanHargrave)
|
||||||
|
;; - doom-plain -- inspired by gko's plain theme for VSCode (ported by @das-s)
|
||||||
|
;; - doom-plain-dark -- inspired by gko's plain theme for VSCode (ported by @das-s)
|
||||||
|
;; - doom-rouge -- ported from VSCode's Rouge Theme (ported by @das-s)
|
||||||
|
;; - doom-shades-of-purple -- a port of VSCode's Shades of Purple (ported by @jwbaldwin)
|
||||||
|
;; - doom-snazzy -- inspired by Hyper Snazzy (ported by @ar1a)
|
||||||
|
;; - doom-solarized-dark -- a dark variant of Solarized (ported by @ema2159)
|
||||||
|
;; - doom-solarized-dark-high-contrast -- a high-contrast variant of Solarized Dark (ported by @jmorag)
|
||||||
|
;; - doom-solarized-light -- a light variant of Solarized (ported by @fuxialexander)
|
||||||
|
;; - doom-sourcerer -- a port of xero's Sourcerer (ported by @fm0xb)
|
||||||
|
;; - doom-spacegrey -- I'm sure you've heard of it (ported by @teesloane)
|
||||||
|
;; - doom-tokyo-night -- inspired by VSCode's Tokyo Night theme (ported by @FosterHangdaan)
|
||||||
|
;; - doom-tomorrow-day -- a light variant of Tomorrow (ported by @emacswatcher)
|
||||||
|
;; - doom-tomorrow-night -- One of the dark variants of Tomorrow (ported by @hlissner)
|
||||||
|
;; - doom-vibrant -- a more vibrant variant of doom-one (ported by @hlissner)
|
||||||
|
;; - doom-wilmersdorf -- port of Ian Pan's Wilmersdorf (ported by @ema2159)
|
||||||
|
;; - doom-xcode -- based off of Apple's Xcode Dark Theme (ported by @kadenbarlow)
|
||||||
|
;; - doom-zenburn -- port of the popular Zenburn theme (ported by @jsoa)
|
||||||
|
;;
|
||||||
|
;; ## Install
|
||||||
|
;;
|
||||||
|
;; `M-x package-install RET doom-themes`
|
||||||
|
;;
|
||||||
|
;; A comprehensive configuration example:
|
||||||
|
;;
|
||||||
|
;; (require 'doom-themes)
|
||||||
|
;;
|
||||||
|
;; ;; Global settings (defaults)
|
||||||
|
;; (setq doom-themes-enable-bold t ; if nil, bold is universally disabled
|
||||||
|
;; doom-themes-enable-italic t) ; if nil, italics is universally disabled
|
||||||
|
;;
|
||||||
|
;; ;; Load the theme (doom-one, doom-molokai, etc); keep in mind that each
|
||||||
|
;; ;; theme may have their own settings.
|
||||||
|
;; (load-theme 'doom-one t)
|
||||||
|
;;
|
||||||
|
;; ;; Enable flashing mode-line on errors
|
||||||
|
;; (doom-themes-visual-bell-config)
|
||||||
|
;;
|
||||||
|
;; ;; Enable custom neotree theme
|
||||||
|
;; (doom-themes-neotree-config) ; all-the-icons fonts must be installed!
|
||||||
|
;;
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(require 'cl-lib)
|
||||||
|
(require 'doom-themes-base)
|
||||||
|
|
||||||
|
(defgroup doom-themes nil
|
||||||
|
"Options for doom-themes."
|
||||||
|
:group 'faces)
|
||||||
|
|
||||||
|
(defcustom doom-themes-padded-modeline nil
|
||||||
|
"Default value for padded-modeline setting for themes that support it."
|
||||||
|
:group 'doom-themes
|
||||||
|
:type '(choice integer boolean))
|
||||||
|
|
||||||
|
;;
|
||||||
|
(defcustom doom-themes-enable-bold t
|
||||||
|
"If nil, bold will be disabled across all faces."
|
||||||
|
:group 'doom-themes
|
||||||
|
:type 'boolean)
|
||||||
|
|
||||||
|
(defcustom doom-themes-enable-italic t
|
||||||
|
"If nil, italics will be disabled across all faces."
|
||||||
|
:group 'doom-themes
|
||||||
|
:type 'boolean)
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;;; API
|
||||||
|
|
||||||
|
(defvar doom-themes--colors nil)
|
||||||
|
(defvar doom--min-colors '(257 256 16))
|
||||||
|
(defvar doom--quoted-p nil)
|
||||||
|
(defvar doom-themes--faces nil)
|
||||||
|
|
||||||
|
(defun doom-themes--colors-p (item)
|
||||||
|
(declare (pure t) (side-effect-free t))
|
||||||
|
(when item
|
||||||
|
(cond ((listp item)
|
||||||
|
(let ((car (car item)))
|
||||||
|
(cond ((memq car '(quote doom-color)) nil)
|
||||||
|
|
||||||
|
((memq car '(backquote \`))
|
||||||
|
(let ((doom--quoted-p t))
|
||||||
|
(doom-themes--colors-p (cdr item))))
|
||||||
|
|
||||||
|
((eq car '\,)
|
||||||
|
(let (doom--quoted-p)
|
||||||
|
(doom-themes--colors-p (cdr item))))
|
||||||
|
|
||||||
|
((or (doom-themes--colors-p car)
|
||||||
|
(doom-themes--colors-p (cdr-safe item)))))))
|
||||||
|
|
||||||
|
((and (symbolp item)
|
||||||
|
(not (keywordp item))
|
||||||
|
(not doom--quoted-p)
|
||||||
|
(not (equal (substring (symbol-name item) 0 1) "-"))
|
||||||
|
(assq item doom-themes--colors))))))
|
||||||
|
|
||||||
|
(defun doom-themes--apply-faces (new-faces &optional default-faces)
|
||||||
|
(declare (pure t) (side-effect-free t))
|
||||||
|
(let ((default-faces (or default-faces doom-themes-base-faces))
|
||||||
|
(faces (make-hash-table :test #'eq :size (+ (length default-faces) (length new-faces))))
|
||||||
|
(directives (make-hash-table :test #'eq)))
|
||||||
|
(dolist (spec (append (mapcar #'copy-sequence default-faces) new-faces))
|
||||||
|
(if (listp (car spec))
|
||||||
|
(cl-destructuring-bind (face action &optional arg) (car spec)
|
||||||
|
(unless (assq face new-faces)
|
||||||
|
(puthash face (list action arg (cdr spec))
|
||||||
|
directives)))
|
||||||
|
(puthash (car spec) (cdr spec) faces)))
|
||||||
|
(cl-loop for face being the hash-keys of directives
|
||||||
|
for (action target spec) = (gethash face directives)
|
||||||
|
unless (memq action '(&inherit &extend &override))
|
||||||
|
do (error "Invalid operation (%s) for '%s' face" action face)
|
||||||
|
if (eq (car spec) 'quote)
|
||||||
|
do (error "Can't extend literal face spec (for '%s')" face)
|
||||||
|
;; TODO Add &all/&light/&dark extension support
|
||||||
|
else if (memq (car spec) '(&all &light &dark))
|
||||||
|
do (error "Can't extend face with &all, &light or &dark specs (for '%s')" face)
|
||||||
|
else do
|
||||||
|
(puthash face
|
||||||
|
(let ((old-spec (gethash (or target face) faces))
|
||||||
|
(plist spec))
|
||||||
|
;; remove duplicates
|
||||||
|
(while (keywordp (car plist))
|
||||||
|
(setq old-spec (plist-put old-spec (car plist) (cadr plist))
|
||||||
|
plist (cddr plist)))
|
||||||
|
old-spec)
|
||||||
|
faces))
|
||||||
|
(let (results)
|
||||||
|
(maphash (lambda (face plist)
|
||||||
|
(when (keywordp (car plist))
|
||||||
|
;; TODO Clean up duplicates in &all/&light/&dark blocks
|
||||||
|
(dolist (prop (append (unless doom-themes-enable-bold '(:weight normal :bold unspecified))
|
||||||
|
(unless doom-themes-enable-italic '(:slant normal :italic unspecified))))
|
||||||
|
(when (and (plist-member plist prop)
|
||||||
|
(not (eq (plist-get plist prop) 'inherit)))
|
||||||
|
(plist-put plist prop
|
||||||
|
(if (memq prop '(:weight :slant))
|
||||||
|
(quote 'normal))))))
|
||||||
|
(push (cons face plist) results))
|
||||||
|
faces)
|
||||||
|
(nreverse results))))
|
||||||
|
|
||||||
|
(defun doom-themes--colorize (item type)
|
||||||
|
(declare (pure t) (side-effect-free t))
|
||||||
|
(when item
|
||||||
|
(let ((doom--quoted-p doom--quoted-p))
|
||||||
|
(cond ((listp item)
|
||||||
|
(cond ((memq (car item) '(quote doom-color))
|
||||||
|
item)
|
||||||
|
((eq (car item) 'doom-ref)
|
||||||
|
(doom-themes--colorize
|
||||||
|
(apply #'doom-ref (cdr item)) type))
|
||||||
|
((let* ((item (append item nil))
|
||||||
|
(car (car item))
|
||||||
|
(doom--quoted-p
|
||||||
|
(cond ((memq car '(backquote \`)) t)
|
||||||
|
((eq car '\,) nil)
|
||||||
|
(t doom--quoted-p))))
|
||||||
|
(cons car
|
||||||
|
(cl-loop
|
||||||
|
for i in (cdr item)
|
||||||
|
collect (doom-themes--colorize i type)))))))
|
||||||
|
|
||||||
|
((and (symbolp item)
|
||||||
|
(not (keywordp item))
|
||||||
|
(not doom--quoted-p)
|
||||||
|
(not (equal (substring (symbol-name item) 0 1) "-"))
|
||||||
|
(assq item doom-themes--colors))
|
||||||
|
`(doom-color ',item ',type))
|
||||||
|
|
||||||
|
(item)))))
|
||||||
|
|
||||||
|
(defun doom-themes--build-face (face)
|
||||||
|
(declare (pure t) (side-effect-free t))
|
||||||
|
`(list
|
||||||
|
',(car face)
|
||||||
|
,(let ((face-body (cdr face)))
|
||||||
|
(cond ((keywordp (car face-body))
|
||||||
|
(let ((real-attrs face-body)
|
||||||
|
defs)
|
||||||
|
(if (doom-themes--colors-p real-attrs)
|
||||||
|
(dolist (cl doom--min-colors `(list ,@(nreverse defs)))
|
||||||
|
(push `(list '((class color) (min-colors ,cl))
|
||||||
|
(list ,@(doom-themes--colorize real-attrs cl)))
|
||||||
|
defs))
|
||||||
|
`(list (list 't (list ,@real-attrs))))))
|
||||||
|
|
||||||
|
((memq (car-safe (car face-body)) '(quote backquote \`))
|
||||||
|
(car face-body))
|
||||||
|
|
||||||
|
((let (all-attrs defs)
|
||||||
|
(dolist (attrs face-body `(list ,@(nreverse defs)))
|
||||||
|
(cond ((eq (car attrs) '&all)
|
||||||
|
(setq all-attrs (append all-attrs (cdr attrs))))
|
||||||
|
|
||||||
|
((memq (car attrs) '(&dark &light))
|
||||||
|
(let ((bg (if (eq (car attrs) '&dark) 'dark 'light))
|
||||||
|
(real-attrs (append all-attrs (cdr attrs) '())))
|
||||||
|
(cond ((doom-themes--colors-p real-attrs)
|
||||||
|
(dolist (cl doom--min-colors)
|
||||||
|
(push `(list '((class color) (min-colors ,cl) (background ,bg))
|
||||||
|
(list ,@(doom-themes--colorize real-attrs cl)))
|
||||||
|
defs)))
|
||||||
|
|
||||||
|
((push `(list '((background ,bg)) (list ,@real-attrs))
|
||||||
|
defs)))))))))))))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;;; Color helper functions
|
||||||
|
|
||||||
|
;; Shamelessly *borrowed* from solarized
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom-name-to-rgb (color)
|
||||||
|
"Retrieves the hexidecimal string repesented the named COLOR (e.g. \"red\")
|
||||||
|
for FRAME (defaults to the current frame)."
|
||||||
|
(cl-loop with div = (float (car (tty-color-standard-values "#ffffff")))
|
||||||
|
for x in (tty-color-standard-values (downcase color))
|
||||||
|
collect (/ x div)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom-blend (color1 color2 alpha)
|
||||||
|
"Blend two colors (hexidecimal strings) together by a coefficient ALPHA (a
|
||||||
|
float between 0 and 1)"
|
||||||
|
(when (and color1 color2)
|
||||||
|
(cond ((and color1 color2 (symbolp color1) (symbolp color2))
|
||||||
|
(doom-blend (doom-color color1) (doom-color color2) alpha))
|
||||||
|
|
||||||
|
((or (listp color1) (listp color2))
|
||||||
|
(cl-loop for x in color1
|
||||||
|
when (if (listp color2) (pop color2) color2)
|
||||||
|
collect (doom-blend x it alpha)))
|
||||||
|
|
||||||
|
((and (string-prefix-p "#" color1) (string-prefix-p "#" color2))
|
||||||
|
(apply (lambda (r g b) (format "#%02x%02x%02x" (* r 255) (* g 255) (* b 255)))
|
||||||
|
(cl-loop for it in (doom-name-to-rgb color1)
|
||||||
|
for other in (doom-name-to-rgb color2)
|
||||||
|
collect (+ (* alpha it) (* other (- 1 alpha))))))
|
||||||
|
|
||||||
|
(color1))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom-darken (color alpha)
|
||||||
|
"Darken a COLOR (a hexidecimal string) by a coefficient ALPHA (a float between
|
||||||
|
0 and 1)."
|
||||||
|
(cond ((and color (symbolp color))
|
||||||
|
(doom-darken (doom-color color) alpha))
|
||||||
|
|
||||||
|
((listp color)
|
||||||
|
(cl-loop for c in color collect (doom-darken c alpha)))
|
||||||
|
|
||||||
|
((doom-blend color "#000000" (- 1 alpha)))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom-lighten (color alpha)
|
||||||
|
"Brighten a COLOR (a hexidecimal string) by a coefficient ALPHA (a float
|
||||||
|
between 0 and 1)."
|
||||||
|
(cond ((and color (symbolp color))
|
||||||
|
(doom-lighten (doom-color color) alpha))
|
||||||
|
|
||||||
|
((listp color)
|
||||||
|
(cl-loop for c in color collect (doom-lighten c alpha)))
|
||||||
|
|
||||||
|
((doom-blend color "#FFFFFF" (- 1 alpha)))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom-color (name &optional type)
|
||||||
|
"Retrieve a specific color named NAME (a symbol) from the current theme."
|
||||||
|
(let ((colors (if (listp name)
|
||||||
|
name
|
||||||
|
(cdr-safe (assq name doom-themes--colors)))))
|
||||||
|
(and colors
|
||||||
|
(cond ((listp colors)
|
||||||
|
(let ((i (or (plist-get '(256 1 16 2 8 3) type) 0)))
|
||||||
|
(if (> i (1- (length colors)))
|
||||||
|
(car (last colors))
|
||||||
|
(nth i colors))))
|
||||||
|
(t colors)))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom-ref (face prop &optional class)
|
||||||
|
"TODO"
|
||||||
|
(let ((spec (or (cdr (assq face doom-themes--faces))
|
||||||
|
(error "Couldn't find the '%s' face" face))))
|
||||||
|
(when (memq (car spec) '(quote backquote \`))
|
||||||
|
(user-error "Can't fetch the literal spec for '%s'" face))
|
||||||
|
(when class
|
||||||
|
(setq spec (cdr (assq class spec)))
|
||||||
|
(unless spec
|
||||||
|
(error "Couldn't find the '%s' class in the '%s' face"
|
||||||
|
class face)))
|
||||||
|
(unless (plist-member spec prop)
|
||||||
|
(error "Couldn't find the '%s' property in the '%s' face%s"
|
||||||
|
prop face (if class (format "'s '%s' class" class) "")))
|
||||||
|
(plist-get spec prop)))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;;; Defining themes
|
||||||
|
|
||||||
|
(defun doom-themes-prepare-facelist (custom-faces)
|
||||||
|
"Return an alist of face definitions for `custom-theme-set-faces'.
|
||||||
|
|
||||||
|
Faces in EXTRA-FACES override the default faces."
|
||||||
|
(declare (pure t) (side-effect-free t))
|
||||||
|
(setq doom-themes--faces (doom-themes--apply-faces custom-faces))
|
||||||
|
(mapcar #'doom-themes--build-face doom-themes--faces))
|
||||||
|
|
||||||
|
(defun doom-themes-prepare-varlist (vars)
|
||||||
|
"Return an alist of variable definitions for `custom-theme-set-variables'.
|
||||||
|
|
||||||
|
Variables in EXTRA-VARS override the default ones."
|
||||||
|
(declare (pure t) (side-effect-free t))
|
||||||
|
(cl-loop for (var val) in (append doom-themes-base-vars vars)
|
||||||
|
collect `(list ',var ,val)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom-themes-set-faces (theme &rest faces)
|
||||||
|
"Customize THEME (a symbol) with FACES.
|
||||||
|
|
||||||
|
If THEME is nil, it applies to all themes you load. FACES is a list of Doom
|
||||||
|
theme face specs. These is a simplified spec. For example:
|
||||||
|
|
||||||
|
(doom-themes-set-faces \\='user
|
||||||
|
\\='(default :background red :foreground blue)
|
||||||
|
\\='(doom-modeline-bar :background (if -modeline-bright modeline-bg highlight))
|
||||||
|
\\='(doom-modeline-buffer-file :inherit \\='mode-line-buffer-id :weight \\='bold)
|
||||||
|
\\='(doom-modeline-buffer-path :inherit \\='mode-line-emphasis :weight \\='bold)
|
||||||
|
\\='(doom-modeline-buffer-project-root :foreground green :weight \\='bold))"
|
||||||
|
(declare (indent defun))
|
||||||
|
(apply #'custom-theme-set-faces
|
||||||
|
(or theme 'user)
|
||||||
|
(eval
|
||||||
|
`(let* ((bold ,doom-themes-enable-bold)
|
||||||
|
(italic ,doom-themes-enable-italic)
|
||||||
|
,@(cl-loop for (var . val) in doom-themes--colors
|
||||||
|
collect `(,var ',val)))
|
||||||
|
(list ,@(mapcar #'doom-themes--build-face faces))))))
|
||||||
|
|
||||||
|
(defmacro def-doom-theme (name docstring defs &optional extra-faces extra-vars)
|
||||||
|
"Define a DOOM theme, named NAME (a symbol)."
|
||||||
|
(declare (doc-string 2))
|
||||||
|
(let ((doom-themes--colors defs))
|
||||||
|
`(let* ((bold doom-themes-enable-bold)
|
||||||
|
(italic doom-themes-enable-italic)
|
||||||
|
,@defs)
|
||||||
|
(setq doom-themes--colors
|
||||||
|
(list ,@(cl-loop for (var val) in defs
|
||||||
|
collect `(cons ',var ,val))))
|
||||||
|
(deftheme ,name ,docstring)
|
||||||
|
(custom-theme-set-faces
|
||||||
|
',name ,@(doom-themes-prepare-facelist extra-faces))
|
||||||
|
(custom-theme-set-variables
|
||||||
|
',name ,@(doom-themes-prepare-varlist extra-vars))
|
||||||
|
(unless bold (set-face-bold 'bold 'unspecified))
|
||||||
|
(unless italic (set-face-italic 'italic 'unspecified))
|
||||||
|
(provide-theme ',name))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(when (and (boundp 'custom-theme-load-path) load-file-name)
|
||||||
|
(let* ((base (file-name-directory load-file-name))
|
||||||
|
(dir (expand-file-name "themes/" base)))
|
||||||
|
(add-to-list 'custom-theme-load-path
|
||||||
|
(or (and (file-directory-p dir) dir)
|
||||||
|
base))))
|
||||||
|
|
||||||
|
(provide 'doom-themes)
|
||||||
|
;;; doom-themes.el ends here
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
(setq package-enable-at-startup nil)
|
||||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,20 @@
|
|||||||
|
# Aliases for emacs commands
|
||||||
|
alias ff find-file $1
|
||||||
|
|
||||||
|
# Aliasing standard shell commands to emacs alternatives
|
||||||
|
alias less view-file $1
|
||||||
|
# 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 -a1 $* | grep "^\." # list hidden files
|
||||||
|
|
||||||
|
# Merge Xresources
|
||||||
|
alias merge xrdb -merge ~/.Xresources
|
||||||
|
|
||||||
|
# Confirm before overwriting something
|
||||||
|
alias cp cp -i $1
|
||||||
|
alias mv mv -i $1
|
||||||
|
alias rm rm -i $1
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ls
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
(org-babel-load-file
|
||||||
|
(expand-file-name
|
||||||
|
"config.org"
|
||||||
|
user-emacs-directory))
|
||||||
|
(put 'upcase-region 'disabled nil)
|
||||||
|
(put 'downcase-region 'disabled nil)
|
||||||
@@ -0,0 +1,191 @@
|
|||||||
|
;;; odin-mode.el --- A major mode for Odin -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; Copyright (C) 2023 Graham Marlow
|
||||||
|
|
||||||
|
;; Author: Graham Marlow
|
||||||
|
;; Keywords: languages
|
||||||
|
;; Url: https://git.sr.ht/~mgmarlow/odin-mode
|
||||||
|
;; Version: 0.1.0
|
||||||
|
;; Package-Requires: ((emacs "28.1"))
|
||||||
|
|
||||||
|
;; 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 of the License, 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. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
|
||||||
|
;; A major mode for the Odin programming language.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(require 'js) ; For indentation
|
||||||
|
(require 'project) ; For build/compile commands
|
||||||
|
|
||||||
|
(defgroup odin nil
|
||||||
|
"Major mode for the Odin programming language."
|
||||||
|
:link '(url-link "https://odin-lang.org")
|
||||||
|
:group 'languages)
|
||||||
|
|
||||||
|
(defconst odin-keywords
|
||||||
|
'("import" "foreign" "package"
|
||||||
|
"where" "when" "if" "else" "for" "switch" "in" "do" "case"
|
||||||
|
"break" "continue" "fallthrough" "defer" "return" "proc"
|
||||||
|
"struct" "union" "enum" "bit_field" "bit_set" "map" "dynamic"
|
||||||
|
"auto_cast" "cast" "transmute" "distinct" "opaque"
|
||||||
|
"using" "inline" "no_inline"
|
||||||
|
"size_of" "align_of" "offset_of" "type_of"
|
||||||
|
"context"))
|
||||||
|
|
||||||
|
(defconst odin-builtins
|
||||||
|
'("len" "cap"
|
||||||
|
"typeid_of" "type_info_of"
|
||||||
|
"swizzle" "complex" "real" "imag" "quaternion" "conj"
|
||||||
|
"jmag" "kmag"
|
||||||
|
"min" "max" "abs" "clamp"
|
||||||
|
"expand_to_tuple"
|
||||||
|
|
||||||
|
"init_global_temporary_allocator"
|
||||||
|
"copy" "pop" "unordered_remove" "ordered_remove" "clear" "reserve"
|
||||||
|
"resize" "new" "new_clone" "free" "free_all" "delete" "make"
|
||||||
|
"clear_map" "reserve_map" "delete_key" "append_elem" "append_elems"
|
||||||
|
"append" "append_string" "clear_dynamic_array" "reserve_dynamic_array"
|
||||||
|
"resize_dynamic_array" "incl_elem" "incl_elems" "incl_bit_set"
|
||||||
|
"excl_elem" "excl_elems" "excl_bit_set" "incl" "excl" "card"
|
||||||
|
"assert" "panic" "unimplemented" "unreachable"))
|
||||||
|
|
||||||
|
(defconst odin-constants
|
||||||
|
'("nil" "true" "false"))
|
||||||
|
|
||||||
|
(defconst odin-typenames
|
||||||
|
'("bool" "b8" "b16" "b32" "b64"
|
||||||
|
|
||||||
|
"int" "i8" "i16" "i32" "i64"
|
||||||
|
"i16le" "i32le" "i64le"
|
||||||
|
"i16be" "i32be" "i64be"
|
||||||
|
"i128" "u128"
|
||||||
|
"i128le" "u128le"
|
||||||
|
"i128be" "u128be"
|
||||||
|
|
||||||
|
"uint" "u8" "u16" "u32" "u64"
|
||||||
|
"u16le" "u32le" "u64le"
|
||||||
|
"u16be" "u32be" "u64be"
|
||||||
|
|
||||||
|
"f32" "f64"
|
||||||
|
"complex64" "complex128"
|
||||||
|
|
||||||
|
"quaternion128" "quaternion256"
|
||||||
|
|
||||||
|
"rune"
|
||||||
|
"string" "cstring"
|
||||||
|
|
||||||
|
"uintptr" "rawptr"
|
||||||
|
"typeid" "any"
|
||||||
|
"byte"))
|
||||||
|
|
||||||
|
(defvar odin-mode-syntax-table
|
||||||
|
(let ((table (make-syntax-table)))
|
||||||
|
;; Operators
|
||||||
|
(dolist (i '(?: ?+ ?- ?* ?= ?< ?> ?& ?| ?^ ?! ??))
|
||||||
|
(modify-syntax-entry i "." table))
|
||||||
|
|
||||||
|
;; Strings
|
||||||
|
(modify-syntax-entry ?\" "\"" table)
|
||||||
|
(modify-syntax-entry ?\\ "\\" table)
|
||||||
|
|
||||||
|
;; Comments
|
||||||
|
(modify-syntax-entry ?/ ". 124b" table)
|
||||||
|
(modify-syntax-entry ?* ". 23n" table)
|
||||||
|
(modify-syntax-entry ?\n "> b" table)
|
||||||
|
(modify-syntax-entry ?\^m "> b" table)
|
||||||
|
|
||||||
|
table))
|
||||||
|
|
||||||
|
(defvar odin-font-lock-keywords
|
||||||
|
`(
|
||||||
|
;; Keywords
|
||||||
|
(,(regexp-opt odin-keywords 'symbols) . font-lock-keyword-face)
|
||||||
|
|
||||||
|
;; Types
|
||||||
|
(,(regexp-opt odin-typenames 'symbols) . font-lock-type-face)
|
||||||
|
|
||||||
|
;; Attributes
|
||||||
|
("^ *@[a-zA-Z]+" . font-lock-preprocessor-face)
|
||||||
|
|
||||||
|
;; Builtins
|
||||||
|
(,(regexp-opt odin-builtins 'symbols) . font-lock-builtin-face)
|
||||||
|
|
||||||
|
;; Constants
|
||||||
|
(,(regexp-opt odin-constants 'symbols) . font-lock-constant-face)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(define-derived-mode odin-mode
|
||||||
|
prog-mode "Odin"
|
||||||
|
"Major mode for the Odin programming language."
|
||||||
|
:group 'odin
|
||||||
|
:syntax-table odin-mode-syntax-table
|
||||||
|
|
||||||
|
(setq-local font-lock-defaults
|
||||||
|
'(odin-font-lock-keywords))
|
||||||
|
|
||||||
|
(setq-local parse-sexp-ignore-comments t)
|
||||||
|
(setq-local comment-start-skip "\\(//+\\|/\\*+\\)\\s *")
|
||||||
|
(setq-local comment-start "/*")
|
||||||
|
(setq-local comment-end "*/")
|
||||||
|
|
||||||
|
(setq-local indent-line-function #'js-indent-line)
|
||||||
|
|
||||||
|
(setq-local electric-indent-chars
|
||||||
|
(append "{}():;," electric-indent-chars)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.odin\\'" . odin-mode))
|
||||||
|
|
||||||
|
(defcustom odin-bin "odin"
|
||||||
|
"Path to odin executable."
|
||||||
|
:type 'string
|
||||||
|
:group 'odin-mode)
|
||||||
|
|
||||||
|
(defun odin--project-cmd (format-string)
|
||||||
|
"Execute odin on current project.
|
||||||
|
|
||||||
|
FORMAT-STRING is the command passed to the odin binary. The
|
||||||
|
current project directory is always passed as the first argument."
|
||||||
|
(unless (project-current)
|
||||||
|
(error "No project found"))
|
||||||
|
(let ((default-directory (project-root (project-current))))
|
||||||
|
(compile (apply #'format
|
||||||
|
(concat "%s " format-string " %s")
|
||||||
|
(list odin-bin default-directory)))))
|
||||||
|
|
||||||
|
(defun odin-build-project ()
|
||||||
|
"Build curent project using `odin build`."
|
||||||
|
(interactive)
|
||||||
|
(odin--project-cmd "build"))
|
||||||
|
|
||||||
|
(defun odin-run-project ()
|
||||||
|
"Run current project using `odin run`."
|
||||||
|
(interactive)
|
||||||
|
(odin--project-cmd "run"))
|
||||||
|
|
||||||
|
(defun odin-check-project ()
|
||||||
|
"Check current project using `odin check`."
|
||||||
|
(interactive)
|
||||||
|
(odin--project-cmd "check"))
|
||||||
|
|
||||||
|
(defun odin-test-project ()
|
||||||
|
"Run procedures marked by the attribute @(test) using `odin test`."
|
||||||
|
(interactive)
|
||||||
|
(odin--project-cmd "test"))
|
||||||
|
|
||||||
|
(provide 'odin-mode)
|
||||||
|
|
||||||
|
;;; odin-mode.el ends here
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
;;; doom-palenight-theme.el --- adapted from equinusocio's Material themes -*- lexical-binding: t; no-byte-compile: t; -*-
|
||||||
|
;;
|
||||||
|
;; Added: August 8, 2019 (7c7e871f2221)
|
||||||
|
;; Author: Brettm12345 <https://github.com/Brettm12345>
|
||||||
|
;; Maintainer:
|
||||||
|
;; Source: https://github.com/equinusocio/vsc-material-theme
|
||||||
|
;;
|
||||||
|
;;; Commentary:
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(require 'doom-themes)
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;;; Variables
|
||||||
|
|
||||||
|
(defgroup doom-palenight-theme nil
|
||||||
|
"Options for the `doom-palenight' theme."
|
||||||
|
:group 'doom-themes)
|
||||||
|
|
||||||
|
(defcustom doom-palenight-padded-modeline doom-themes-padded-modeline
|
||||||
|
"If non-nil, adds a 4px padding to the mode-line.
|
||||||
|
Can be an integer to determine the exact padding."
|
||||||
|
:group 'doom-palenight-theme
|
||||||
|
:type '(choice integer boolean))
|
||||||
|
|
||||||
|
|
||||||
|
;;
|
||||||
|
;;; Theme definition
|
||||||
|
|
||||||
|
(def-doom-theme doom-palenight
|
||||||
|
"A dark theme inspired by Material-Palenight"
|
||||||
|
|
||||||
|
;; name default 256 16
|
||||||
|
((bg '("#292D3E" nil nil))
|
||||||
|
(bg-alt '("#242837" nil nil))
|
||||||
|
(base0 '("#1c1f2b" "black" "black"))
|
||||||
|
(base1 '("#1e212e" "#262626" "brightblack"))
|
||||||
|
(base2 '("#232635" "#303030" "brightblack"))
|
||||||
|
(base3 '("#3C435E" "#3a3a3a" "brightblack"))
|
||||||
|
(base4 '("#4E5579" "#444444" "brightblack"))
|
||||||
|
(base5 '("#676E95" "#585858" "brightblack"))
|
||||||
|
(base6 '("#697098" "#626262" "brightblack"))
|
||||||
|
(base7 '("#717CB4" "#767676" "brightblack"))
|
||||||
|
(base8 '("#A6Accd" "#a8a8a8" "white"))
|
||||||
|
(fg '("#EEFFFF" "#e4e4e4" "brightwhite"))
|
||||||
|
(fg-alt '("#BFC7D5" "#bcbcbc" "white"))
|
||||||
|
|
||||||
|
(grey base5)
|
||||||
|
|
||||||
|
(red '("#ff5370" "#ff0000" "red"))
|
||||||
|
(orange '("#f78c6c" "#ff5f00" "brightred"))
|
||||||
|
(green '("#c3e88d" "#afff00" "green"))
|
||||||
|
(teal '("#44b9b1" "#00d7af" "brightgreen"))
|
||||||
|
(yellow '("#ffcb6b" "#ffd700" "brightyellow"))
|
||||||
|
(blue '("#82aaff" "#5fafff" "brightblue"))
|
||||||
|
(dark-blue '("#7986E7" "#d7ffff" "blue"))
|
||||||
|
(magenta '("#c792ea" "#d787d7" "brightmagenta"))
|
||||||
|
(violet '("#bb80b3" "#d787af" "magenta"))
|
||||||
|
(cyan '("#89DDFF" "#5fd7ff" "brightcyan"))
|
||||||
|
(dark-cyan '("#80cbc4" "#00d7af" "cyan"))
|
||||||
|
|
||||||
|
;; face categories -- required for all themes
|
||||||
|
(highlight magenta)
|
||||||
|
(vertical-bar base2)
|
||||||
|
(selection base4)
|
||||||
|
(builtin blue)
|
||||||
|
(comments base5)
|
||||||
|
(doc-comments (doom-lighten base5 0.25))
|
||||||
|
(constants orange)
|
||||||
|
(functions blue)
|
||||||
|
(keywords cyan)
|
||||||
|
(methods blue)
|
||||||
|
(operators cyan)
|
||||||
|
(type magenta)
|
||||||
|
(strings green)
|
||||||
|
(variables yellow)
|
||||||
|
(numbers orange)
|
||||||
|
(region base3)
|
||||||
|
(error red)
|
||||||
|
(warning yellow)
|
||||||
|
(success green)
|
||||||
|
(vc-modified blue)
|
||||||
|
(vc-added green)
|
||||||
|
(vc-deleted red)
|
||||||
|
|
||||||
|
;; custom categories
|
||||||
|
(modeline-bg base2)
|
||||||
|
(modeline-bg-alt (doom-darken bg 0.01))
|
||||||
|
(modeline-fg base8)
|
||||||
|
(modeline-fg-alt comments)
|
||||||
|
|
||||||
|
(-modeline-pad
|
||||||
|
(when doom-palenight-padded-modeline
|
||||||
|
(if (integerp doom-palenight-padded-modeline) doom-palenight-padded-modeline 4))))
|
||||||
|
|
||||||
|
;;;; Base theme face overrides
|
||||||
|
((lazy-highlight :background base4 :foreground fg :weight 'bold)
|
||||||
|
(mode-line
|
||||||
|
:background modeline-bg :foreground modeline-fg
|
||||||
|
:box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg)))
|
||||||
|
(mode-line-inactive
|
||||||
|
:background modeline-bg-alt :foreground modeline-fg-alt
|
||||||
|
:box (if -modeline-pad `(:line-width ,-modeline-pad :color ,modeline-bg-alt)))
|
||||||
|
(tooltip :background (doom-darken bg-alt 0.2) :foreground fg)
|
||||||
|
|
||||||
|
;;;; css-mode <built-in> / scss-mode
|
||||||
|
(css-proprietary-property :foreground orange)
|
||||||
|
(css-property :foreground green)
|
||||||
|
(css-selector :foreground blue)
|
||||||
|
;;;; dired-k
|
||||||
|
(dired-k-commited :foreground base4)
|
||||||
|
(dired-k-modified :foreground vc-modified)
|
||||||
|
(dired-k-ignored :foreground cyan)
|
||||||
|
(dired-k-added :foreground vc-added)
|
||||||
|
;;;; doom-modeline
|
||||||
|
(doom-modeline-buffer-path :foreground green :weight 'bold)
|
||||||
|
(doom-modeline-buffer-major-mode :inherit 'doom-modeline-buffer-path)
|
||||||
|
;;;; js2-mode
|
||||||
|
(js2-jsdoc-tag :foreground magenta)
|
||||||
|
(js2-object-property :foreground yellow)
|
||||||
|
(js2-object-property-access :foreground cyan)
|
||||||
|
(js2-function-param :foreground violet)
|
||||||
|
(js2-jsdoc-type :foreground base8)
|
||||||
|
(js2-jsdoc-value :foreground cyan)
|
||||||
|
;;;; man <built-in>
|
||||||
|
(Man-overstrike :inherit 'bold :foreground magenta)
|
||||||
|
(Man-underline :inherit 'underline :foreground blue)
|
||||||
|
;;;; org <built-in>
|
||||||
|
((org-block &override) :background base2)
|
||||||
|
((org-block-background &override) :background base2)
|
||||||
|
((org-block-begin-line &override) :background base2)
|
||||||
|
;;;; rainbow-delimiters
|
||||||
|
(rainbow-delimiters-depth-1-face :foreground magenta)
|
||||||
|
(rainbow-delimiters-depth-2-face :foreground orange)
|
||||||
|
(rainbow-delimiters-depth-3-face :foreground green)
|
||||||
|
(rainbow-delimiters-depth-4-face :foreground cyan)
|
||||||
|
(rainbow-delimiters-depth-5-face :foreground violet)
|
||||||
|
(rainbow-delimiters-depth-6-face :foreground yellow)
|
||||||
|
(rainbow-delimiters-depth-7-face :foreground blue)
|
||||||
|
(rainbow-delimiters-depth-8-face :foreground teal)
|
||||||
|
(rainbow-delimiters-depth-9-face :foreground dark-cyan)
|
||||||
|
;;;; rjsx-mode
|
||||||
|
(rjsx-tag :foreground red)
|
||||||
|
(rjsx-attr :foreground yellow :slant 'italic :weight 'medium)))
|
||||||
|
|
||||||
|
;;; doom-palenight-theme.el ends here
|
||||||
@@ -0,0 +1,306 @@
|
|||||||
|
;;; soft-charcoal-theme.el --- Theme
|
||||||
|
|
||||||
|
;; Copyright (C) 2023 ,
|
||||||
|
|
||||||
|
;; Author:
|
||||||
|
;; Version: 0.1
|
||||||
|
;; Package-Requires: ((emacs "24.1"))
|
||||||
|
;; Created with ThemeCreator, https://github.com/mswift42/themecreator.
|
||||||
|
|
||||||
|
;; 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 of the License, 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. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
;; This file is not part of Emacs.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
;;; soft-charcoal theme created by in 2023
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(deftheme soft-charcoal)
|
||||||
|
(let ((class '((class color) (min-colors 89)))
|
||||||
|
(fg1 "#c2c2c2")
|
||||||
|
(fg2 "#b2b2b2")
|
||||||
|
(fg3 "#a3a3a3")
|
||||||
|
(fg4 "#939393")
|
||||||
|
(fg6 "#d1d1d1")
|
||||||
|
(bg1 "#191919")
|
||||||
|
(bg2 "#2b2b2b")
|
||||||
|
(bg3 "#3e3e3e")
|
||||||
|
(bg4 "#505050")
|
||||||
|
(builtin "#54686d")
|
||||||
|
(keyword "#8aa234")
|
||||||
|
(const "#8aa6c1")
|
||||||
|
(comment "#808080")
|
||||||
|
(func "#7a8bbd")
|
||||||
|
(str "#5d90cd")
|
||||||
|
(type "#8aa6c1")
|
||||||
|
(var "#8885b2")
|
||||||
|
(selection "#ff6523")
|
||||||
|
(warning "#ff6523")
|
||||||
|
(warning2 "#ff2370")
|
||||||
|
(unspec (when (>= emacs-major-version 29) 'unspecified)))
|
||||||
|
(custom-theme-set-faces
|
||||||
|
'soft-charcoal
|
||||||
|
`(default ((,class (:background ,bg1 :foreground ,fg1))))
|
||||||
|
`(font-lock-builtin-face ((,class (:foreground ,builtin))))
|
||||||
|
`(font-lock-comment-face ((,class (:foreground ,comment))))
|
||||||
|
`(font-lock-negation-char-face ((,class (:foreground ,const))))
|
||||||
|
`(font-lock-reference-face ((,class (:foreground ,const))))
|
||||||
|
`(font-lock-constant-face ((,class (:foreground ,const))))
|
||||||
|
`(font-lock-doc-face ((,class (:foreground ,comment))))
|
||||||
|
`(font-lock-function-name-face ((,class (:foreground ,func ))))
|
||||||
|
`(font-lock-keyword-face ((,class (:bold ,class :foreground ,keyword))))
|
||||||
|
`(font-lock-string-face ((,class (:foreground ,str))))
|
||||||
|
`(font-lock-type-face ((,class (:foreground ,type ))))
|
||||||
|
`(font-lock-variable-name-face ((,class (:foreground ,var))))
|
||||||
|
`(font-lock-warning-face ((,class (:foreground ,warning :background ,bg2))))
|
||||||
|
`(term-color-black ((,class (:foreground ,fg2 :background ,unspec))))
|
||||||
|
;; `(region ((,class (:background ,fg1 :foreground ,bg1))))
|
||||||
|
`(region ((,class (:background ,selection))))
|
||||||
|
`(highlight ((,class (:foreground ,fg3 :background ,bg3))))
|
||||||
|
`(hl-line ((,class (:background ,bg2))))
|
||||||
|
`(fringe ((,class (:background ,bg2 :foreground ,fg4))))
|
||||||
|
`(cursor ((,class (:background ,fg4))))
|
||||||
|
`(isearch ((,class (:bold t :foreground ,warning :background ,bg3))))
|
||||||
|
`(mode-line ((,class (:box (:line-width 1 :color nil) :bold t :foreground ,fg4 :background ,bg2))))
|
||||||
|
`(mode-line-inactive ((,class (:box (:line-width 1 :color nil :style pressed-button) :foreground ,var :background ,bg1 :weight normal))))
|
||||||
|
`(mode-line-buffer-id ((,class (:bold t :foreground ,func :background ,unspec))))
|
||||||
|
`(mode-line-highlight ((,class (:foreground ,keyword :box nil :weight bold))))
|
||||||
|
`(mode-line-emphasis ((,class (:foreground ,fg1))))
|
||||||
|
`(vertical-border ((,class (:foreground ,fg3))))
|
||||||
|
`(minibuffer-prompt ((,class (:bold t :foreground ,keyword))))
|
||||||
|
`(default-italic ((,class (:italic t))))
|
||||||
|
`(link ((,class (:foreground ,const :underline t))))
|
||||||
|
`(org-code ((,class (:foreground ,fg2))))
|
||||||
|
`(org-hide ((,class (:foreground ,fg4))))
|
||||||
|
`(org-level-1 ((,class (:bold t :foreground ,fg2 :height 1.1))))
|
||||||
|
`(org-level-2 ((,class (:bold nil :foreground ,fg3))))
|
||||||
|
`(org-level-3 ((,class (:bold t :foreground ,fg4))))
|
||||||
|
`(org-level-4 ((,class (:bold nil :foreground ,bg4))))
|
||||||
|
`(org-date ((,class (:underline t :foreground ,var) )))
|
||||||
|
`(org-footnote ((,class (:underline t :foreground ,fg4))))
|
||||||
|
`(org-link ((,class (:underline t :foreground ,type ))))
|
||||||
|
`(org-special-keyword ((,class (:foreground ,func))))
|
||||||
|
`(org-block ((,class (:foreground ,fg3))))
|
||||||
|
`(org-quote ((,class (:inherit org-block :slant italic))))
|
||||||
|
`(org-verse ((,class (:inherit org-block :slant italic))))
|
||||||
|
`(org-todo ((,class (:box (:line-width 1 :color ,fg3) :foreground ,keyword :bold t))))
|
||||||
|
`(org-done ((,class (:box (:line-width 1 :color ,bg3) :bold t :foreground ,bg4))))
|
||||||
|
`(org-warning ((,class (:underline t :foreground ,warning))))
|
||||||
|
`(org-agenda-structure ((,class (:weight bold :foreground ,fg3 :box (:color ,fg4) :background ,bg3))))
|
||||||
|
`(org-agenda-date ((,class (:foreground ,var :height 1.1 ))))
|
||||||
|
`(org-agenda-date-weekend ((,class (:weight normal :foreground ,fg4))))
|
||||||
|
`(org-agenda-date-today ((,class (:weight bold :foreground ,keyword :height 1.4))))
|
||||||
|
`(org-agenda-done ((,class (:foreground ,bg4))))
|
||||||
|
`(org-scheduled ((,class (:foreground ,type))))
|
||||||
|
`(org-scheduled-today ((,class (:foreground ,func :weight bold :height 1.2))))
|
||||||
|
`(org-ellipsis ((,class (:foreground ,builtin))))
|
||||||
|
`(org-verbatim ((,class (:foreground ,fg4))))
|
||||||
|
`(org-document-info-keyword ((,class (:foreground ,func))))
|
||||||
|
`(font-latex-bold-face ((,class (:foreground ,type))))
|
||||||
|
`(font-latex-italic-face ((,class (:foreground ,var :italic t))))
|
||||||
|
`(font-latex-string-face ((,class (:foreground ,str))))
|
||||||
|
`(font-latex-match-reference-keywords ((,class (:foreground ,const))))
|
||||||
|
`(font-latex-match-variable-keywords ((,class (:foreground ,var))))
|
||||||
|
`(ido-only-match ((,class (:foreground ,warning))))
|
||||||
|
`(org-sexp-date ((,class (:foreground ,fg4))))
|
||||||
|
`(ido-first-match ((,class (:foreground ,keyword :bold t))))
|
||||||
|
`(ivy-current-match ((,class (:foreground ,fg3 :inherit highlight :underline t))))
|
||||||
|
`(gnus-header-content ((,class (:foreground ,keyword))))
|
||||||
|
`(gnus-header-from ((,class (:foreground ,var))))
|
||||||
|
`(gnus-header-name ((,class (:foreground ,type))))
|
||||||
|
`(gnus-header-subject ((,class (:foreground ,func :bold t))))
|
||||||
|
`(mu4e-view-url-number-face ((,class (:foreground ,type))))
|
||||||
|
`(mu4e-cited-1-face ((,class (:foreground ,fg2))))
|
||||||
|
`(mu4e-cited-7-face ((,class (:foreground ,fg3))))
|
||||||
|
`(mu4e-header-marks-face ((,class (:foreground ,type))))
|
||||||
|
`(ffap ((,class (:foreground ,fg4))))
|
||||||
|
`(js2-private-function-call ((,class (:foreground ,const))))
|
||||||
|
`(js2-jsdoc-html-tag-delimiter ((,class (:foreground ,str))))
|
||||||
|
`(js2-jsdoc-html-tag-name ((,class (:foreground ,var))))
|
||||||
|
`(js2-external-variable ((,class (:foreground ,type ))))
|
||||||
|
`(js2-function-param ((,class (:foreground ,const))))
|
||||||
|
`(js2-jsdoc-value ((,class (:foreground ,str))))
|
||||||
|
`(js2-private-member ((,class (:foreground ,fg3))))
|
||||||
|
`(js3-warning-face ((,class (:underline ,keyword))))
|
||||||
|
`(js3-error-face ((,class (:underline ,warning))))
|
||||||
|
`(js3-external-variable-face ((,class (:foreground ,var))))
|
||||||
|
`(js3-function-param-face ((,class (:foreground ,fg2))))
|
||||||
|
`(js3-jsdoc-tag-face ((,class (:foreground ,keyword))))
|
||||||
|
`(js3-instance-member-face ((,class (:foreground ,const))))
|
||||||
|
`(warning ((,class (:foreground ,warning))))
|
||||||
|
`(ac-completion-face ((,class (:underline t :foreground ,keyword))))
|
||||||
|
`(info-quoted-name ((,class (:foreground ,builtin))))
|
||||||
|
`(info-string ((,class (:foreground ,str))))
|
||||||
|
`(icompletep-determined ((,class :foreground ,builtin)))
|
||||||
|
`(undo-tree-visualizer-current-face ((,class :foreground ,builtin)))
|
||||||
|
`(undo-tree-visualizer-default-face ((,class :foreground ,fg2)))
|
||||||
|
`(undo-tree-visualizer-unmodified-face ((,class :foreground ,var)))
|
||||||
|
`(undo-tree-visualizer-register-face ((,class :foreground ,type)))
|
||||||
|
`(slime-repl-inputed-output-face ((,class (:foreground ,type))))
|
||||||
|
`(trailing-whitespace ((,class :foreground ,unspec :background ,warning)))
|
||||||
|
`(rainbow-delimiters-depth-1-face ((,class :foreground ,fg1)))
|
||||||
|
`(rainbow-delimiters-depth-2-face ((,class :foreground ,type)))
|
||||||
|
`(rainbow-delimiters-depth-3-face ((,class :foreground ,var)))
|
||||||
|
`(rainbow-delimiters-depth-4-face ((,class :foreground ,const)))
|
||||||
|
`(rainbow-delimiters-depth-5-face ((,class :foreground ,keyword)))
|
||||||
|
`(rainbow-delimiters-depth-6-face ((,class :foreground ,fg1)))
|
||||||
|
`(rainbow-delimiters-depth-7-face ((,class :foreground ,type)))
|
||||||
|
`(rainbow-delimiters-depth-8-face ((,class :foreground ,var)))
|
||||||
|
`(magit-item-highlight ((,class :background ,bg3)))
|
||||||
|
`(magit-section-heading ((,class (:foreground ,keyword :weight bold))))
|
||||||
|
`(magit-hunk-heading ((,class (:background ,bg3))))
|
||||||
|
`(magit-section-highlight ((,class (:background ,bg2))))
|
||||||
|
`(magit-hunk-heading-highlight ((,class (:background ,bg3))))
|
||||||
|
`(magit-diff-context-highlight ((,class (:background ,bg3 :foreground ,fg3))))
|
||||||
|
`(magit-diffstat-added ((,class (:foreground ,type))))
|
||||||
|
`(magit-diffstat-removed ((,class (:foreground ,var))))
|
||||||
|
`(magit-process-ok ((,class (:foreground ,func :weight bold))))
|
||||||
|
`(magit-process-ng ((,class (:foreground ,warning :weight bold))))
|
||||||
|
`(magit-branch ((,class (:foreground ,const :weight bold))))
|
||||||
|
`(magit-log-author ((,class (:foreground ,fg3))))
|
||||||
|
`(magit-hash ((,class (:foreground ,fg2))))
|
||||||
|
`(magit-diff-file-header ((,class (:foreground ,fg2 :background ,bg3))))
|
||||||
|
`(lazy-highlight ((,class (:foreground ,fg2 :background ,bg3))))
|
||||||
|
`(term ((,class (:foreground ,fg1 :background ,bg1))))
|
||||||
|
`(term-color-black ((,class (:foreground ,bg3 :background ,bg3))))
|
||||||
|
`(term-color-blue ((,class (:foreground ,func :background ,func))))
|
||||||
|
`(term-color-red ((,class (:foreground ,keyword :background ,bg3))))
|
||||||
|
`(term-color-green ((,class (:foreground ,type :background ,bg3))))
|
||||||
|
`(term-color-yellow ((,class (:foreground ,var :background ,var))))
|
||||||
|
`(term-color-magenta ((,class (:foreground ,builtin :background ,builtin))))
|
||||||
|
`(term-color-cyan ((,class (:foreground ,str :background ,str))))
|
||||||
|
`(term-color-white ((,class (:foreground ,fg2 :background ,fg2))))
|
||||||
|
`(rainbow-delimiters-unmatched-face ((,class :foreground ,warning)))
|
||||||
|
`(helm-header ((,class (:foreground ,fg2 :background ,bg1 :underline nil :box nil))))
|
||||||
|
`(helm-source-header ((,class (:foreground ,keyword :background ,bg1 :underline nil :weight bold))))
|
||||||
|
`(helm-selection ((,class (:background ,bg2 :underline nil))))
|
||||||
|
`(helm-selection-line ((,class (:background ,bg2))))
|
||||||
|
`(helm-visible-mark ((,class (:foreground ,bg1 :background ,bg3))))
|
||||||
|
`(helm-candidate-number ((,class (:foreground ,bg1 :background ,fg1))))
|
||||||
|
`(helm-separator ((,class (:foreground ,type :background ,bg1))))
|
||||||
|
`(helm-time-zone-current ((,class (:foreground ,builtin :background ,bg1))))
|
||||||
|
`(helm-time-zone-home ((,class (:foreground ,type :background ,bg1))))
|
||||||
|
`(helm-buffer-not-saved ((,class (:foreground ,type :background ,bg1))))
|
||||||
|
`(helm-buffer-process ((,class (:foreground ,builtin :background ,bg1))))
|
||||||
|
`(helm-buffer-saved-out ((,class (:foreground ,fg1 :background ,bg1))))
|
||||||
|
`(helm-buffer-size ((,class (:foreground ,fg1 :background ,bg1))))
|
||||||
|
`(helm-ff-directory ((,class (:foreground ,func :background ,bg1 :weight bold))))
|
||||||
|
`(helm-ff-file ((,class (:foreground ,fg1 :background ,bg1 :weight normal))))
|
||||||
|
`(helm-ff-executable ((,class (:foreground ,var :background ,bg1 :weight normal))))
|
||||||
|
`(helm-ff-invalid-symlink ((,class (:foreground ,warning2 :background ,bg1 :weight bold))))
|
||||||
|
`(helm-ff-symlink ((,class (:foreground ,keyword :background ,bg1 :weight bold))))
|
||||||
|
`(helm-ff-prefix ((,class (:foreground ,bg1 :background ,keyword :weight normal))))
|
||||||
|
`(helm-grep-cmd-line ((,class (:foreground ,fg1 :background ,bg1))))
|
||||||
|
`(helm-grep-file ((,class (:foreground ,fg1 :background ,bg1))))
|
||||||
|
`(helm-grep-finish ((,class (:foreground ,fg2 :background ,bg1))))
|
||||||
|
`(helm-grep-lineno ((,class (:foreground ,fg1 :background ,bg1))))
|
||||||
|
`(helm-grep-match ((,class (:foreground ,unspec :background ,unspec :inherit helm-match))))
|
||||||
|
`(helm-grep-running ((,class (:foreground ,func :background ,bg1))))
|
||||||
|
`(helm-moccur-buffer ((,class (:foreground ,func :background ,bg1))))
|
||||||
|
`(helm-source-go-package-godoc-description ((,class (:foreground ,str))))
|
||||||
|
`(helm-bookmark-w3m ((,class (:foreground ,type))))
|
||||||
|
`(company-echo-common ((,class (:foreground ,bg1 :background ,fg1))))
|
||||||
|
`(company-preview ((,class (:background ,bg1 :foreground ,var))))
|
||||||
|
`(company-preview-common ((,class (:foreground ,bg2 :foreground ,fg3))))
|
||||||
|
`(company-preview-search ((,class (:foreground ,type :background ,bg1))))
|
||||||
|
`(company-scrollbar-bg ((,class (:background ,bg3))))
|
||||||
|
`(company-scrollbar-fg ((,class (:foreground ,keyword))))
|
||||||
|
`(company-tooltip ((,class (:foreground ,fg2 :background ,bg2 :bold t))))
|
||||||
|
`(company-tooltop-annotation ((,class (:foreground ,const))))
|
||||||
|
`(company-tooltip-common ((,class ( :foreground ,fg3))))
|
||||||
|
`(company-tooltip-common-selection ((,class (:foreground ,str))))
|
||||||
|
`(company-tooltip-mouse ((,class (:inherit highlight))))
|
||||||
|
`(company-tooltip-selection ((,class (:background ,bg3 :foreground ,fg3))))
|
||||||
|
`(company-template-field ((,class (:inherit region))))
|
||||||
|
`(web-mode-builtin-face ((,class (:inherit ,font-lock-builtin-face))))
|
||||||
|
`(web-mode-comment-face ((,class (:inherit ,font-lock-comment-face))))
|
||||||
|
`(web-mode-constant-face ((,class (:inherit ,font-lock-constant-face))))
|
||||||
|
`(web-mode-keyword-face ((,class (:foreground ,keyword))))
|
||||||
|
`(web-mode-doctype-face ((,class (:inherit ,font-lock-comment-face))))
|
||||||
|
`(web-mode-function-name-face ((,class (:inherit ,font-lock-function-name-face))))
|
||||||
|
`(web-mode-string-face ((,class (:foreground ,str))))
|
||||||
|
`(web-mode-type-face ((,class (:inherit ,font-lock-type-face))))
|
||||||
|
`(web-mode-html-attr-name-face ((,class (:foreground ,func))))
|
||||||
|
`(web-mode-html-attr-value-face ((,class (:foreground ,keyword))))
|
||||||
|
`(web-mode-warning-face ((,class (:inherit ,font-lock-warning-face))))
|
||||||
|
`(web-mode-html-tag-face ((,class (:foreground ,builtin))))
|
||||||
|
`(jde-java-font-lock-package-face ((t (:foreground ,var))))
|
||||||
|
`(jde-java-font-lock-public-face ((t (:foreground ,keyword))))
|
||||||
|
`(jde-java-font-lock-private-face ((t (:foreground ,keyword))))
|
||||||
|
`(jde-java-font-lock-constant-face ((t (:foreground ,const))))
|
||||||
|
`(jde-java-font-lock-modifier-face ((t (:foreground ,fg2))))
|
||||||
|
`(jde-jave-font-lock-protected-face ((t (:foreground ,keyword))))
|
||||||
|
`(jde-java-font-lock-number-face ((t (:foreground ,var))))
|
||||||
|
`(yas-field-highlight-face ((t (:background ,selection)))))
|
||||||
|
;; Legacy
|
||||||
|
(if (< emacs-major-version 22)
|
||||||
|
(custom-theme-set-faces
|
||||||
|
'soft-charcoal
|
||||||
|
`(show-paren-match-face ((,class (:background ,warning))))) ;; obsoleted in 22.1, removed 2016
|
||||||
|
(custom-theme-set-faces
|
||||||
|
'soft-charcoal
|
||||||
|
`(show-paren-match ((,class (:foreground ,bg1 :background ,str))))
|
||||||
|
`(show-paren-mismatch ((,class (:foreground ,bg1 :background ,warning))))))
|
||||||
|
;; emacs >= 26.1
|
||||||
|
(when (>= emacs-major-version 26)
|
||||||
|
(custom-theme-set-faces
|
||||||
|
'soft-charcoal
|
||||||
|
`(line-number ((t (:inherit fringe))))
|
||||||
|
`(line-number-current-line ((t (:inherit fringe :foreground ,fg6 :weight bold))))))
|
||||||
|
|
||||||
|
;; emacs >= 27.1
|
||||||
|
(when (>= emacs-major-version 27)
|
||||||
|
(custom-theme-set-faces
|
||||||
|
'soft-charcoal
|
||||||
|
`(tab-line ((,class (:background ,bg2 :foreground ,fg4))))
|
||||||
|
`(tab-line-tab ((,class (:inherit tab-line))))
|
||||||
|
`(tab-line-tab-inactive ((,class (:background ,bg2 :foreground ,fg4))))
|
||||||
|
`(tab-line-tab-current ((,class (:background ,bg1 :foreground ,fg1))))
|
||||||
|
`(tab-line-highlight ((,class (:background ,bg1 :foreground ,fg2))))))
|
||||||
|
(when (>= emacs-major-version 28)
|
||||||
|
(custom-theme-set-faces
|
||||||
|
'soft-charcoal
|
||||||
|
`(line-number ((t (:inherit fringe))))
|
||||||
|
`(line-number-current-line ((t (:inherit fringe :foreground ,fg6 :weight bold))))))
|
||||||
|
;; emacs >= 27.1
|
||||||
|
(when (>= emacs-major-version 27)
|
||||||
|
(custom-theme-set-faces
|
||||||
|
'soft-charcoal
|
||||||
|
`(tab-line ((,class (:background ,bg2 :foreground ,fg4))))
|
||||||
|
`(tab-line-tab ((,class (:inherit tab-line))))
|
||||||
|
`(tab-line-tab-inactive ((,class (:background ,bg2 :foreground ,fg4))))
|
||||||
|
`(tab-line-tab-current ((,class (:background ,bg1 :foreground ,fg1))))
|
||||||
|
`(tab-line-highlight ((,class (:background ,bg1 :foreground ,fg2))))))
|
||||||
|
(when (>= emacs-major-version 28)
|
||||||
|
(custom-theme-set-faces
|
||||||
|
'soft-charcoal
|
||||||
|
`(tab-line-tab-modified ((,class (:foreground ,warning2 :weight bold))))))
|
||||||
|
(when (boundp 'font-lock-regexp-face)
|
||||||
|
(custom-theme-set-faces
|
||||||
|
'soft-charcoal
|
||||||
|
`(font-lock-regexp-face ((,class (:inherit font-lock-string-face :underline t)))))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(when load-file-name
|
||||||
|
(add-to-list 'custom-theme-load-path
|
||||||
|
(file-name-as-directory (file-name-directory load-file-name))))
|
||||||
|
|
||||||
|
(provide-theme 'soft-charcoal)
|
||||||
|
|
||||||
|
;; Local Variables:
|
||||||
|
;; no-byte-compile: t
|
||||||
|
;; End:
|
||||||
|
|
||||||
|
;;; soft-charcoal-theme.el ends here
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
# The syntax is "key = value". The whitespace around the equals doesn't matter.
|
||||||
|
|
||||||
|
keybind = ctrl+shift+w=close_surface
|
||||||
|
keybind = ctrl+t=new_tab
|
||||||
|
keybind = ctrl+tab=next_tab
|
||||||
|
keybind = ctrl+shift+tab=previous_tab
|
||||||
|
keybind = ctrl+shift+n=new_window
|
||||||
|
keybind = ctrl+shift+o=ignore
|
||||||
|
|
||||||
|
# Window Stuff
|
||||||
|
background-opacity=0.9
|
||||||
|
confirm-close-surface = false
|
||||||
|
window-theme = dark
|
||||||
|
window-decoration = false
|
||||||
|
|
||||||
|
# Linux Specific
|
||||||
|
gtk-wide-tabs = true
|
||||||
|
|
||||||
|
# MacOS Specific
|
||||||
|
#macos-non-native-fullscreen = true
|
||||||
|
|
||||||
|
# Font
|
||||||
|
font-size = 16
|
||||||
|
font-family = Kelmscott Mono
|
||||||
|
|
||||||
|
# Theme
|
||||||
|
theme = Obsidian
|
||||||
|
# theme = Relaxed
|
||||||
|
|
||||||
|
# Cursor And Mouse
|
||||||
|
cursor-style = block
|
||||||
|
cursor-color = #ffffff
|
||||||
|
mouse-hide-while-typing = true
|
||||||
|
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
general {
|
||||||
|
after_sleep_cmd=hyprctl dispatch dpms on
|
||||||
|
before_sleep_cmd=loginctl lock-session
|
||||||
|
lock_cmd=pidof hyprlock || hyprlock
|
||||||
|
}
|
||||||
|
|
||||||
|
listeners {
|
||||||
|
on-resume=brightnessctl -r
|
||||||
|
on-timeout=brightnessctl -s set 10
|
||||||
|
timeout=120
|
||||||
|
}
|
||||||
|
|
||||||
|
listeners {
|
||||||
|
on-resume=brightnessctl -rd rgb:kbd_backlight
|
||||||
|
on-timeout=brightnessctl -sd rgb:kbd_backlight set 0
|
||||||
|
timeout=120
|
||||||
|
}
|
||||||
|
|
||||||
|
listeners {
|
||||||
|
on-timeout=loginctl lock-session
|
||||||
|
timeout=180
|
||||||
|
}
|
||||||
|
|
||||||
|
listeners {
|
||||||
|
on-resume=hyprctl dispatch dpms on
|
||||||
|
on-timeout=hyprctl dispatch dpms off
|
||||||
|
timeout=300
|
||||||
|
}
|
||||||
|
|
||||||
|
listeners {
|
||||||
|
on-timeout=systemctl suspend
|
||||||
|
timeout=300
|
||||||
|
}
|
||||||
@@ -0,0 +1,309 @@
|
|||||||
|
# Startup
|
||||||
|
exec-once = dbus-update-activation-environment --systemd --all && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target
|
||||||
|
exec-once=wl-clipboard-history -t
|
||||||
|
exec-once=wl-paste -p --watch wl-copy -p ''
|
||||||
|
exec-once=hypridle
|
||||||
|
exec-once=waybar
|
||||||
|
exec-once=nm-applet
|
||||||
|
exec-once=fcitx5 -d
|
||||||
|
exec-once=blueman-applet
|
||||||
|
exec-once=swww-daemon
|
||||||
|
|
||||||
|
# Monitors
|
||||||
|
|
||||||
|
monitor=eDP-1,1920x1080@60,0x0,1
|
||||||
|
monitor=HDMI-A-1,2550x1440@144,auto,1,mirror,eDP-1
|
||||||
|
monitor=,preferred,auto,1,mirror,eDP-1
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
|
||||||
|
env=WLR_NO_HARDWARE_CURSORS,1
|
||||||
|
env=HYPRCURSOR_THEME,Bibata-Modern-Ice
|
||||||
|
env=HYPRCURSOR_SIZE,24
|
||||||
|
env=XDG_CURRENT_DESKTOP,Hyprland
|
||||||
|
env=XDG_SESSION_TYPE,wayland
|
||||||
|
env=XDG_SESSION_DESKTOP,Hyprland
|
||||||
|
env=GTK_THEME,Materia-dark
|
||||||
|
env=QT_QPA_PLATFORM,xcb;Hyprland
|
||||||
|
env=XCURSOR_THEME,Bibata-Modern-Ice
|
||||||
|
env=XCURSOR_SIZE,24
|
||||||
|
|
||||||
|
# Colors
|
||||||
|
$green=rgb(00BB00)
|
||||||
|
$gray=rgb(555555)
|
||||||
|
$purple=rgb(BB00BB)
|
||||||
|
$lavendar=rgb(B39DF3)
|
||||||
|
$orange=rgb(F39660)
|
||||||
|
|
||||||
|
$lightgreen=rgb(93C863)
|
||||||
|
$lightblue=rgb(76CCE0)
|
||||||
|
|
||||||
|
$magenta=rgba(881798FF)
|
||||||
|
$crimson=rgba(471520FF)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
animations {
|
||||||
|
bezier=myBezier, 0.05, 0.9, 0.1, 1.05
|
||||||
|
animation=windows, 1, 7, myBezier
|
||||||
|
animation=windowsOut, 1, 7, default, popin 80%
|
||||||
|
animation=border, 1, 10, default
|
||||||
|
animation=borderangle, 1, 8, default
|
||||||
|
animation=fade, 1, 7, default
|
||||||
|
animation=workspaces, 1, 6, default
|
||||||
|
enabled=true
|
||||||
|
}
|
||||||
|
|
||||||
|
debug {
|
||||||
|
disable_logs=true
|
||||||
|
}
|
||||||
|
|
||||||
|
decoration {
|
||||||
|
blur {
|
||||||
|
enabled=true
|
||||||
|
new_optimizations=on
|
||||||
|
passes=1
|
||||||
|
size=3
|
||||||
|
xray=true
|
||||||
|
}
|
||||||
|
|
||||||
|
shadow {
|
||||||
|
color=rgba(1a1a1aee)
|
||||||
|
enabled=true
|
||||||
|
range=4
|
||||||
|
render_power=3
|
||||||
|
}
|
||||||
|
rounding=10
|
||||||
|
}
|
||||||
|
|
||||||
|
dwindle {
|
||||||
|
preserve_split=true
|
||||||
|
pseudotile=true
|
||||||
|
}
|
||||||
|
|
||||||
|
ecosystem {
|
||||||
|
no_donation_nag=true
|
||||||
|
no_update_news=true
|
||||||
|
}
|
||||||
|
|
||||||
|
experimental {
|
||||||
|
xx_color_management_v4=true
|
||||||
|
}
|
||||||
|
|
||||||
|
general {
|
||||||
|
border_size=2
|
||||||
|
col.active_border=$green
|
||||||
|
col.inactive_border=$gray
|
||||||
|
gaps_in=2
|
||||||
|
gaps_out=4
|
||||||
|
layout=dwindle
|
||||||
|
}
|
||||||
|
|
||||||
|
gestures {
|
||||||
|
workspace_swipe=true
|
||||||
|
workspace_swipe_forever=true
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
touchpad {
|
||||||
|
disable_while_typing=true
|
||||||
|
drag_lock=false
|
||||||
|
middle_button_emulation=true
|
||||||
|
natural_scroll=true
|
||||||
|
scroll_factor=0.500000
|
||||||
|
tap-to-click=true
|
||||||
|
}
|
||||||
|
follow_mouse=1
|
||||||
|
kb_layout=us
|
||||||
|
kb_model=
|
||||||
|
kb_options=
|
||||||
|
kb_rules=
|
||||||
|
kb_variant=
|
||||||
|
numlock_by_default=true
|
||||||
|
sensitivity=0
|
||||||
|
}
|
||||||
|
|
||||||
|
misc {
|
||||||
|
disable_hyprland_logo=false
|
||||||
|
disable_splash_rendering=false
|
||||||
|
key_press_enables_dpms=true
|
||||||
|
mouse_move_enables_dpms=true
|
||||||
|
}
|
||||||
|
|
||||||
|
# Window Rules
|
||||||
|
|
||||||
|
windowrule=idleinhibit fullscreen, class:firefox
|
||||||
|
windowrule=idleinhibit fullscreen, class:floorp
|
||||||
|
windowrule=idleinhibit fullscreen, class:ghostty
|
||||||
|
windowrule=idleinhibit focus, class:firefox
|
||||||
|
windowrule=idleinhibit focus, class:floorp
|
||||||
|
windowrule=idleinhibit focus, class:mpv
|
||||||
|
windowrule=idleinhibit focus, class:^(emacs)$
|
||||||
|
windowrule=idleinhibit focus, class:^(Emacs)$
|
||||||
|
windowrule=idleinhibit focus, class:^(discord)$
|
||||||
|
windowrule=idleinhibit focus, class:^(spotify)$
|
||||||
|
windowrule=idleinhibit focus, class:^(Discord)$
|
||||||
|
windowrule=opacity 0.9 0.9, class:^(Discord|discord)$
|
||||||
|
windowrule=float, class:polkit-kde-authentication-agent-1
|
||||||
|
windowrule=float, class:^(praat)$
|
||||||
|
windowrule=float, class:^(network)$
|
||||||
|
windowrule=float, class:^(nm-)$
|
||||||
|
windowrule=float, class:^(Network)$
|
||||||
|
windowrule=float, class:Rofi
|
||||||
|
windowrule=float, class:Gimp
|
||||||
|
windowrule=float, class:Nautilus
|
||||||
|
windowrule=float, class:notification
|
||||||
|
windowrule=float, class:^(launcher)$
|
||||||
|
windowrule=tile, class:Spotify
|
||||||
|
windowrule=tile, title:Minecraft
|
||||||
|
windowrule=workspace 2, class:KeePassXC
|
||||||
|
windowrule=workspace 3, class:firefox
|
||||||
|
windowrule=workspace 3, class:floorp
|
||||||
|
windowrule=workspace 4, class:Spotify
|
||||||
|
windowrule=workspace 6, class:discord
|
||||||
|
windowrule=workspace 6, class:Signal
|
||||||
|
windowrule=workspace 10, title:Minecraft
|
||||||
|
|
||||||
|
# Binds
|
||||||
|
|
||||||
|
$altMod=ALT
|
||||||
|
$ctrlMod=CTRL
|
||||||
|
$lock=hyprlock
|
||||||
|
$mainMod=SUPER
|
||||||
|
$screenshotarea=hyprctl keyword animation 'fadeOut,0,0,default'; grimblast copy area; hyprctl keyword animation 'fadeOut,1,4,default'
|
||||||
|
|
||||||
|
# Binds :: Programs
|
||||||
|
|
||||||
|
bind=$altMod, Return, exec, ghostty
|
||||||
|
bind=$altMod SHIFT, Return, exec, alacritty
|
||||||
|
bind=$mainMod SHIFT, D, exec, discord --enable-blink-features=MiddleClickAutoscroll
|
||||||
|
bind=$mainMod SHIFT, E, exec, emacsclient -c -a 'emacs'
|
||||||
|
bind=$mainMode SHIFT, F, exec, focus-linux
|
||||||
|
bind=$mainMod, SPACE, exec, pkill wofi || wofi
|
||||||
|
bind=$mainMod, E, exec, nautilus
|
||||||
|
bind=$mainMod, S, exec, spotify
|
||||||
|
bind=$mainMod, P, exec, hyprpicker -a -f hex
|
||||||
|
bind=, Print, exec, $screenshotarea
|
||||||
|
bind=SHIFT, Print, exec, grimblast --cursor copy output
|
||||||
|
bind=$mainMod SHIFT, P, pseudo,
|
||||||
|
bind=$mainMod, C, killactive,
|
||||||
|
bind=$mainMod control, Q, exec, $lock
|
||||||
|
bind=$mainMod, F4, exit,
|
||||||
|
bind=$mainMod, V, togglefloating,
|
||||||
|
bind=$mainMod SHIFT, S, togglesplit,
|
||||||
|
|
||||||
|
# Binds :: Navigation
|
||||||
|
|
||||||
|
bind=$mainMod, F, fullscreen,
|
||||||
|
bind=$mainMod, H, movefocus, l
|
||||||
|
bind=$mainMod, L, movefocus, r
|
||||||
|
bind=$mainMod, K, movefocus, u
|
||||||
|
bind=$mainMod, J, movefocus, d
|
||||||
|
bind=$mainMod, comma, focusmonitor, -1
|
||||||
|
bind=$mainMod, period, focusmonitor, +1
|
||||||
|
bind=$mainMod SHIFT, H, movewindow, l
|
||||||
|
bind=$mainMod SHIFT, L, movewindow, r
|
||||||
|
bind=$mainMod SHIFT, K, movewindow, u
|
||||||
|
bind=$mainMod SHIFT, J, movewindow, d
|
||||||
|
bind=$mainMod SHIFT, comma, movecurrentworkspacetomonitor, -1
|
||||||
|
bind=$mainMod SHIFT, period, movecurrentworkspacetomonitor, +1
|
||||||
|
bind=$mainMod, right, resizeactive, 10 0
|
||||||
|
bind=$mainMod, left, resizeactive, -10 0
|
||||||
|
bind=$mainMod, up, resizeactive, 0 -10
|
||||||
|
bind=$mainMod, down, resizeactive, 0 10
|
||||||
|
bind=$mainMod, 1, workspace, 1
|
||||||
|
bind=$mainMod, 2, workspace, 2
|
||||||
|
bind=$mainMod, 3, workspace, 3
|
||||||
|
bind=$mainMod, 4, workspace, 4
|
||||||
|
bind=$mainMod, 5, workspace, 5
|
||||||
|
bind=$mainMod, 6, workspace, 6
|
||||||
|
bind=$mainMod, 7, workspace, 7
|
||||||
|
bind=$mainMod, 8, workspace, 8
|
||||||
|
bind=$mainMod, 9, workspace, 9
|
||||||
|
bind=$mainMod, 0, workspace, 10
|
||||||
|
bind=$mainMod SHIFT, 1, movetoworkspace, 1
|
||||||
|
bind=$mainMod SHIFT, 2, movetoworkspace, 2
|
||||||
|
bind=$mainMod SHIFT, 3, movetoworkspace, 3
|
||||||
|
bind=$mainMod SHIFT, 4, movetoworkspace, 4
|
||||||
|
bind=$mainMod SHIFT, 5, movetoworkspace, 5
|
||||||
|
bind=$mainMod SHIFT, 6, movetoworkspace, 6
|
||||||
|
bind=$mainMod SHIFT, 7, movetoworkspace, 7
|
||||||
|
bind=$mainMod SHIFT, 8, movetoworkspace, 8
|
||||||
|
bind=$mainMod SHIFT, 9, movetoworkspace, 9
|
||||||
|
bind=$mainMod SHIFT, 0, movetoworkspace, 10
|
||||||
|
bind=$mainMod SHIFT CTRL, right, movetoworkspace, +1
|
||||||
|
bind=$mainMod SHIFT CTRL, left, movetoworkspace, -1
|
||||||
|
bind=$mainMod, mouse_down, workspace, e+1
|
||||||
|
bind=$mainMod, mouse_up, workspace, e-1
|
||||||
|
bind=$mainMod, Tab, workspace, e+1
|
||||||
|
bind=$mainMod SHIFT, Tab, workspace, e-1
|
||||||
|
bind=$mainMod CTRL, right, workspace, +1
|
||||||
|
bind=$mainMod CTRL, left, workspace, -1
|
||||||
|
|
||||||
|
bindm=$mainMod, mouse:272, movewindow
|
||||||
|
bindm=$mainMod, mouse:273, resizewindow
|
||||||
|
|
||||||
|
# Binds :: MultiMedia
|
||||||
|
|
||||||
|
binde=, XF86MonBrightnessDown, exec, brightnessctl set 10%- && $NIX_CONFIG_DIR/scripts/progress-notify.sh brightness
|
||||||
|
binde=, XF86MonBrightnessUp, exec, brightnessctl set 10%+ && $NIX_CONFIG_DIR/scripts/progress-notify.sh brightness
|
||||||
|
bindel=, XF86AudioRaiseVolume, exec, pamixer -i 5 && $NIX_CONFIG_DIR/scripts/progress-notify.sh audio
|
||||||
|
bindel=, XF86AudioLowerVolume, exec, pamixer -d 5 && $NIX_CONFIG_DIR/scripts/progress-notify.sh audio
|
||||||
|
bindel=, XF86AudioMute, exec, pamixer -t && $NIX_CONFIG_DIR/scripts/progress-notify.sh mute
|
||||||
|
bindl=, XF86AudioPlay, exec, playerctl play-pause
|
||||||
|
bindl=, XF86AudioNext, exec, playerctl next
|
||||||
|
bindl=, XF86AudioPrev, exec, playerctl previous
|
||||||
|
|
||||||
|
# Binds :: Submaps
|
||||||
|
|
||||||
|
bind = $mainMod, R, submap, resize
|
||||||
|
submap = resize
|
||||||
|
bind=, escape,submap,reset
|
||||||
|
|
||||||
|
binde=, left, resizeactive, -10 0
|
||||||
|
bindr=, left, submap, reset
|
||||||
|
binde=, right, resizeactive, 10 0
|
||||||
|
bindr=, right, submap, reset
|
||||||
|
binde=, up, resizeactive, 0 10
|
||||||
|
bindr=, up, submap, reset
|
||||||
|
binde=, down, resizeactive, 0 -10
|
||||||
|
bindr=, down, submap, reset
|
||||||
|
|
||||||
|
binde=, H, resizeactive, -10 0
|
||||||
|
bindr=, H, submap, reset
|
||||||
|
binde=, J, resizeactive, 0 -10
|
||||||
|
bindr=, J, submap, reset
|
||||||
|
binde=, K, resizeactive, 0 10
|
||||||
|
bindr=, K, submap, reset
|
||||||
|
binde=, L, resizeactive, 10 0
|
||||||
|
bindr=, L, submap, reset
|
||||||
|
|
||||||
|
submap=reset
|
||||||
|
|
||||||
|
bind = $mainMod, B, submap, browser_select
|
||||||
|
submap = browser_select
|
||||||
|
|
||||||
|
bind =, B, exec, brave
|
||||||
|
bind =, B, submap, reset
|
||||||
|
|
||||||
|
bind = SHIFT, F, exec, firefox
|
||||||
|
bind = SHIFT, F, submap, reset
|
||||||
|
|
||||||
|
bind =, F, exec, floorp
|
||||||
|
bind =, F, submap, reset
|
||||||
|
|
||||||
|
bind =, C, exec, floorp -p limalone -no-remote
|
||||||
|
bind =, C, submap, reset
|
||||||
|
|
||||||
|
bind=, escape,submap,reset
|
||||||
|
submap=reset
|
||||||
|
|
||||||
|
bind = $mainMod SHIFT, V, submap, video_stuff
|
||||||
|
submap = video_stuff
|
||||||
|
bind = , O, exec, obs
|
||||||
|
bind = , O, submap, reset
|
||||||
|
bind = , V, exec , kdenlive
|
||||||
|
bind = , V, submap, reset
|
||||||
|
|
||||||
|
bind=, escape,submap,reset
|
||||||
|
submap = reset
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
background {
|
||||||
|
blur_passes=2
|
||||||
|
blur_size=8
|
||||||
|
path=$HOME/pictures/.wallpapers/bloody_snow.jpg
|
||||||
|
}
|
||||||
|
|
||||||
|
general {
|
||||||
|
disable_loading_bar=true
|
||||||
|
hide_cursor=true
|
||||||
|
no_fade_in=false
|
||||||
|
}
|
||||||
|
|
||||||
|
input-field {
|
||||||
|
monitor=
|
||||||
|
size=200, 30
|
||||||
|
capslock_color=#bb00ee
|
||||||
|
check_color=#0eff0d
|
||||||
|
dots_center=false
|
||||||
|
dots_size=0.330000
|
||||||
|
dots_spacing=0.150000
|
||||||
|
fade_on_empty=true
|
||||||
|
fail_color=#ff009e
|
||||||
|
fail_text=<i>$FAIL <b>($ATTEMPTS)</b></i>
|
||||||
|
font_color=#efefef
|
||||||
|
inner_color=#0c0c0c
|
||||||
|
outer_color=#fe0b00
|
||||||
|
outline_thickness=3
|
||||||
|
placeholder_text=<i>Enter Password...</i>
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
monitor=
|
||||||
|
color=#ffffee
|
||||||
|
font_family=DejaVu Sans
|
||||||
|
font_size=28
|
||||||
|
halign=center
|
||||||
|
position=0, 80
|
||||||
|
text=$TIME
|
||||||
|
text_align=center
|
||||||
|
valign=center
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
monitor=
|
||||||
|
color=#ffffee
|
||||||
|
font_family=DejaVu Sans
|
||||||
|
font_size=18
|
||||||
|
halign=left
|
||||||
|
position=80, 80
|
||||||
|
text=cmd[update:1000] echo " <span foreground='##ffffee'>$(date +'%A, %b %d %Y')</span>"
|
||||||
|
text_align=center
|
||||||
|
valign=bottom
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
monitor=
|
||||||
|
color=#ffffee
|
||||||
|
font_family=DejaVu Sans
|
||||||
|
font_size=18
|
||||||
|
halign=right
|
||||||
|
position=80, 80
|
||||||
|
text=cmd[update:1000] echo "<span foreground='##feffee'>$(cat /sys/class/power_supply/BAT0/capacity)</span>"
|
||||||
|
text_align=center
|
||||||
|
valign=bottom
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
ipc=on
|
||||||
|
preload=$HOME/pictures/.wallpapers/skyline-view.png
|
||||||
|
preload=$HOME/pictures/.wallpapers/iceland-winter-mountains.jpg
|
||||||
|
splash=false
|
||||||
|
wallpaper=eDP-1,$HOME/pictures/.wallpapers/iceland-winter-mountains.jpg
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
# vim:ft=kitty
|
||||||
|
|
||||||
|
## name: Campbell
|
||||||
|
## author: Microsoft
|
||||||
|
## blurb: The default theme of Microsoft's terminals, including Windows Terminal and cmd.
|
||||||
|
|
||||||
|
# The basic colors
|
||||||
|
foreground #cccccc
|
||||||
|
background #0c0c0c
|
||||||
|
selection_background #ffffff
|
||||||
|
|
||||||
|
# Cursor colors
|
||||||
|
cursor #ffffff
|
||||||
|
|
||||||
|
# The basic 16 colors
|
||||||
|
# black
|
||||||
|
color0 #0c0c0c
|
||||||
|
color8 #767676
|
||||||
|
|
||||||
|
# red
|
||||||
|
color1 #c50f1f
|
||||||
|
color9 #e74856
|
||||||
|
|
||||||
|
# green
|
||||||
|
color2 #13a10e
|
||||||
|
color10 #16c60c
|
||||||
|
|
||||||
|
# yellow
|
||||||
|
color3 #f19c00
|
||||||
|
color11 #f9f1a5
|
||||||
|
|
||||||
|
# blue
|
||||||
|
color4 #0037da
|
||||||
|
color12 #3b78ff
|
||||||
|
|
||||||
|
# magenta
|
||||||
|
color5 #881798
|
||||||
|
color13 #b4009e
|
||||||
|
|
||||||
|
# cyan
|
||||||
|
color6 #3a96dd
|
||||||
|
color14 #61d6d6
|
||||||
|
|
||||||
|
# white
|
||||||
|
color7 #cccccc
|
||||||
|
color15 #f2f2f2
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
background_opacity 0.8
|
||||||
|
font_size 14.0
|
||||||
|
|
||||||
|
# BEGIN_KITTY_THEME
|
||||||
|
# Campbell
|
||||||
|
include current-theme.conf
|
||||||
|
# END_KITTY_THEME
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
background_opacity 0.8
|
||||||
|
font_size 14.0
|
||||||
|
|
||||||
|
# BEGIN_KITTY_THEME
|
||||||
|
# Rosé Pine Moon
|
||||||
|
include current-theme.conf
|
||||||
|
# END_KITTY_THEME
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
local default_color = "sonokai"
|
||||||
|
|
||||||
|
function ColorMyTerminal(color)
|
||||||
|
color = color or default_color
|
||||||
|
vim.cmd.colorscheme(color)
|
||||||
|
|
||||||
|
vim.cmd("hi ColorColumn ctermbg=0 guibg=purple")
|
||||||
|
vim.api.nvim_set_hl(0, "Normal", {bg = "none"})
|
||||||
|
vim.api.nvim_set_hl(0, "NormalFloat", {bg = "none"})
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.cmd.colorscheme(default_color)
|
||||||
@@ -0,0 +1,105 @@
|
|||||||
|
local dapui = require('dapui')
|
||||||
|
local dap = require("dap")
|
||||||
|
|
||||||
|
-- DAP UI setup
|
||||||
|
dapui.setup()
|
||||||
|
|
||||||
|
-- Basic DAP UI event listeners
|
||||||
|
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||||
|
dapui.open()
|
||||||
|
end
|
||||||
|
dap.listeners.before.event_terminated["dapui_config"] = function()
|
||||||
|
dapui.close()
|
||||||
|
end
|
||||||
|
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||||
|
dapui.close()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- DAP for C
|
||||||
|
|
||||||
|
dap.adapters.gdb = {
|
||||||
|
type = "executable",
|
||||||
|
command = "gdb",
|
||||||
|
args = { "--interpreter=dap", "--eval-command", "set print pretty on" }
|
||||||
|
}
|
||||||
|
|
||||||
|
dap.adapters.lldb = {
|
||||||
|
type = 'executable',
|
||||||
|
command = 'lldb-dap',
|
||||||
|
name = 'lldb'
|
||||||
|
}
|
||||||
|
|
||||||
|
dap.configurations.c = {
|
||||||
|
{
|
||||||
|
name = "Launch",
|
||||||
|
type = "gdb",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||||
|
end,
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
stopOnEntry = false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "Select and attach to process",
|
||||||
|
type = "gdb",
|
||||||
|
request = "attach",
|
||||||
|
program = function()
|
||||||
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||||
|
end,
|
||||||
|
pid = function()
|
||||||
|
local name = vim.fn.input('Executable name (filter): ')
|
||||||
|
return require("dap.utils").pick_process({ filter = name })
|
||||||
|
end,
|
||||||
|
cwd = '${workspaceFolder}'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = 'Attach to process',
|
||||||
|
type = 'gdb',
|
||||||
|
request = 'attach',
|
||||||
|
pid = function ()
|
||||||
|
return vim.fn.input('Enter PID: ')
|
||||||
|
end,
|
||||||
|
args = {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = 'Attach to gdbserver :1234',
|
||||||
|
type = 'gdb',
|
||||||
|
request = 'attach',
|
||||||
|
target = 'localhost:1234',
|
||||||
|
program = function()
|
||||||
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||||
|
end,
|
||||||
|
cwd = '${workspaceFolder}'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
dap.configurations.zig = {
|
||||||
|
{
|
||||||
|
name = "Debug Zig Executable",
|
||||||
|
type = "lldb",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/zig-out/bin/', 'file')
|
||||||
|
end,
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
args = {},
|
||||||
|
stopOnEntry = false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = 'Attach to Zig Process',
|
||||||
|
type = 'lldb',
|
||||||
|
request = 'attach',
|
||||||
|
pid = require('dap.ui.widgets').hover,
|
||||||
|
args = {},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- DAP Keybinds
|
||||||
|
vim.keymap.set('n', '<F5>', function() dap.continue() end)
|
||||||
|
vim.keymap.set('n', '<F10>', function() dap.step_over() end)
|
||||||
|
vim.keymap.set('n', '<F11>', function() dap.step_into() end)
|
||||||
|
vim.keymap.set('n', '<F12>', function() dap.step_out() end)
|
||||||
|
vim.keymap.set('n', '<Leader>bp', function() dap.toggle_breakpoint() end)
|
||||||
|
vim.keymap.set('n', '<Leader>dr', function() dap.repl.open() end)
|
||||||
|
|
||||||
@@ -0,0 +1,221 @@
|
|||||||
|
-- Eviline config for lualine
|
||||||
|
-- Author: shadmansaleh
|
||||||
|
-- Credit: glepnir
|
||||||
|
local lualine = require('lualine')
|
||||||
|
|
||||||
|
-- Color table for highlights
|
||||||
|
-- stylua: ignore
|
||||||
|
local colors = {
|
||||||
|
bg = '#202328',
|
||||||
|
fg = '#bbc2cf',
|
||||||
|
yellow = '#ECBE7B',
|
||||||
|
cyan = '#008080',
|
||||||
|
darkblue = '#081633',
|
||||||
|
green = '#98be65',
|
||||||
|
orange = '#FF8800',
|
||||||
|
violet = '#a9a1e1',
|
||||||
|
magenta = '#c678dd',
|
||||||
|
blue = '#51afef',
|
||||||
|
red = '#ec5f67',
|
||||||
|
}
|
||||||
|
|
||||||
|
local conditions = {
|
||||||
|
buffer_not_empty = function()
|
||||||
|
return vim.fn.empty(vim.fn.expand('%:t')) ~= 1
|
||||||
|
end,
|
||||||
|
hide_in_width = function()
|
||||||
|
return vim.fn.winwidth(0) > 80
|
||||||
|
end,
|
||||||
|
check_git_workspace = function()
|
||||||
|
local filepath = vim.fn.expand('%:p:h')
|
||||||
|
local gitdir = vim.fn.finddir('.git', filepath .. ';')
|
||||||
|
return gitdir and #gitdir > 0 and #gitdir < #filepath
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Config
|
||||||
|
local config = {
|
||||||
|
options = {
|
||||||
|
-- Disable sections and component separators
|
||||||
|
component_separators = '',
|
||||||
|
section_separators = '',
|
||||||
|
theme = {
|
||||||
|
-- We are going to use lualine_c an lualine_x as left and
|
||||||
|
-- right section. Both are highlighted by c theme . So we
|
||||||
|
-- are just setting default looks o statusline
|
||||||
|
normal = { c = { fg = colors.fg, bg = colors.bg } },
|
||||||
|
inactive = { c = { fg = colors.fg, bg = colors.bg } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
-- these are to remove the defaults
|
||||||
|
lualine_a = {},
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {},
|
||||||
|
-- These will be filled later
|
||||||
|
lualine_c = {},
|
||||||
|
lualine_x = {},
|
||||||
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
-- these are to remove the defaults
|
||||||
|
lualine_a = {},
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {},
|
||||||
|
lualine_c = {},
|
||||||
|
lualine_x = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Inserts a component in lualine_c at left section
|
||||||
|
local function ins_left(component)
|
||||||
|
table.insert(config.sections.lualine_c, component)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Inserts a component in lualine_x at right section
|
||||||
|
local function ins_right(component)
|
||||||
|
table.insert(config.sections.lualine_x, component)
|
||||||
|
end
|
||||||
|
|
||||||
|
ins_left {
|
||||||
|
function()
|
||||||
|
return '▊'
|
||||||
|
end,
|
||||||
|
color = { fg = colors.blue }, -- Sets highlighting of component
|
||||||
|
padding = { left = 0, right = 1 }, -- We don't need space before this
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_left {
|
||||||
|
-- mode component
|
||||||
|
function()
|
||||||
|
return ''
|
||||||
|
end,
|
||||||
|
color = function()
|
||||||
|
-- auto change color according to neovims mode
|
||||||
|
local mode_color = {
|
||||||
|
n = colors.red,
|
||||||
|
i = colors.green,
|
||||||
|
v = colors.blue,
|
||||||
|
[''] = colors.blue,
|
||||||
|
V = colors.blue,
|
||||||
|
c = colors.magenta,
|
||||||
|
no = colors.red,
|
||||||
|
s = colors.orange,
|
||||||
|
S = colors.orange,
|
||||||
|
[''] = colors.orange,
|
||||||
|
ic = colors.yellow,
|
||||||
|
R = colors.violet,
|
||||||
|
Rv = colors.violet,
|
||||||
|
cv = colors.red,
|
||||||
|
ce = colors.red,
|
||||||
|
r = colors.cyan,
|
||||||
|
rm = colors.cyan,
|
||||||
|
['r?'] = colors.cyan,
|
||||||
|
['!'] = colors.red,
|
||||||
|
t = colors.red,
|
||||||
|
}
|
||||||
|
return { fg = mode_color[vim.fn.mode()] }
|
||||||
|
end,
|
||||||
|
padding = { right = 1 },
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_left {
|
||||||
|
-- filesize component
|
||||||
|
'filesize',
|
||||||
|
cond = conditions.buffer_not_empty,
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_left {
|
||||||
|
'filename',
|
||||||
|
cond = conditions.buffer_not_empty,
|
||||||
|
color = { fg = colors.magenta, gui = 'bold' },
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_left { 'location' }
|
||||||
|
|
||||||
|
ins_left { 'progress', color = { fg = colors.fg, gui = 'bold' } }
|
||||||
|
|
||||||
|
ins_left {
|
||||||
|
'diagnostics',
|
||||||
|
sources = { 'nvim_diagnostic' },
|
||||||
|
symbols = { error = ' ', warn = ' ', info = ' ' },
|
||||||
|
diagnostics_color = {
|
||||||
|
color_error = { fg = colors.red },
|
||||||
|
color_warn = { fg = colors.yellow },
|
||||||
|
color_info = { fg = colors.cyan },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Insert mid section. You can make any number of sections in neovim :)
|
||||||
|
-- for lualine it's any number greater then 2
|
||||||
|
ins_left {
|
||||||
|
function()
|
||||||
|
return '%='
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_left {
|
||||||
|
-- Lsp server name .
|
||||||
|
function()
|
||||||
|
local msg = 'No Active Lsp'
|
||||||
|
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
|
||||||
|
local clients = vim.lsp.get_active_clients()
|
||||||
|
if next(clients) == nil then
|
||||||
|
return msg
|
||||||
|
end
|
||||||
|
for _, client in ipairs(clients) do
|
||||||
|
local filetypes = client.config.filetypes
|
||||||
|
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
||||||
|
return client.name
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return msg
|
||||||
|
end,
|
||||||
|
icon = ' LSP:',
|
||||||
|
color = { fg = '#ffffff', gui = 'bold' },
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Add components to right sections
|
||||||
|
ins_right {
|
||||||
|
'o:encoding', -- option component same as &encoding in viml
|
||||||
|
fmt = string.upper, -- I'm not sure why it's upper case either ;)
|
||||||
|
cond = conditions.hide_in_width,
|
||||||
|
color = { fg = colors.green, gui = 'bold' },
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_right {
|
||||||
|
'fileformat',
|
||||||
|
fmt = string.upper,
|
||||||
|
icons_enabled = false, -- I think icons are cool but Eviline doesn't have them. sigh
|
||||||
|
color = { fg = colors.green, gui = 'bold' },
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_right {
|
||||||
|
'branch',
|
||||||
|
icon = '',
|
||||||
|
color = { fg = colors.violet, gui = 'bold' },
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_right {
|
||||||
|
'diff',
|
||||||
|
-- Is it me or the symbol for modified us really weird
|
||||||
|
symbols = { added = ' ', modified = '柳 ', removed = ' ' },
|
||||||
|
diff_color = {
|
||||||
|
added = { fg = colors.green },
|
||||||
|
modified = { fg = colors.orange },
|
||||||
|
removed = { fg = colors.red },
|
||||||
|
},
|
||||||
|
cond = conditions.hide_in_width,
|
||||||
|
}
|
||||||
|
|
||||||
|
ins_right {
|
||||||
|
function()
|
||||||
|
return '▊'
|
||||||
|
end,
|
||||||
|
color = { fg = colors.blue },
|
||||||
|
padding = { left = 1 },
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Now don't forget to initialize lualine
|
||||||
|
lualine.setup(config)
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
|
||||||
|
|
||||||
|
|
||||||
|
vim.keymap.set("n", "gf", "<cmd>diffget //2<CR>")
|
||||||
|
vim.keymap.set("n", "gj", "<cmd>diffget //3<CR>")
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
local mark = require("harpoon.mark")
|
||||||
|
local ui = require("harpoon.ui")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>a", mark.add_file)
|
||||||
|
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
|
||||||
|
vim.keymap.set("n", "<C-j>", function() ui.nav_file(2) end)
|
||||||
|
vim.keymap.set("n", "<C-k>", function() ui.nav_file(3) end)
|
||||||
|
vim.keymap.set("n", "<C-l>", function() ui.nav_file(4) end)
|
||||||
@@ -0,0 +1,135 @@
|
|||||||
|
local lsp_zero = require('lsp-zero')
|
||||||
|
|
||||||
|
local lsp_attach = function(client, bufnr)
|
||||||
|
-- see :help lsp-zero-keybindings
|
||||||
|
-- to learn the available actions
|
||||||
|
-- lsp_zero.default_keymaps({buffer = bufnr})
|
||||||
|
--
|
||||||
|
local opts = {buffer = bufnr, remap = false}
|
||||||
|
|
||||||
|
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||||
|
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||||
|
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
|
||||||
|
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
|
||||||
|
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
|
||||||
|
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
|
||||||
|
end
|
||||||
|
|
||||||
|
lsp_zero.extend_lspconfig({
|
||||||
|
capabilities = require('cmp_nvim_lsp').default_capabilities(),
|
||||||
|
lsp_attach = lsp_attach,
|
||||||
|
float_border = 'rounded',
|
||||||
|
sign_text = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
local lspconfig = require('lspconfig')
|
||||||
|
|
||||||
|
require('mason').setup({})
|
||||||
|
|
||||||
|
require('mason-lspconfig').setup({
|
||||||
|
ensure_installed = {
|
||||||
|
'lua_ls',
|
||||||
|
'jdtls',
|
||||||
|
'clangd',
|
||||||
|
'zls',
|
||||||
|
},
|
||||||
|
handlers = {
|
||||||
|
function(server_name)
|
||||||
|
require('lspconfig')[server_name].setup({})
|
||||||
|
end,
|
||||||
|
|
||||||
|
-- noop is an empty function that doesn't do anything
|
||||||
|
clangd = function()
|
||||||
|
-- lspconfig.clangd.setup({
|
||||||
|
-- cmd = {
|
||||||
|
-- 'clangd',
|
||||||
|
-- '--background-index',
|
||||||
|
-- '--clang-tidy',
|
||||||
|
-- '--log=verbose',
|
||||||
|
-- '--header-interpolation=false', -- clangd doesn't find the files, annoying and unnecessary noise as a result
|
||||||
|
-- },
|
||||||
|
-- init_options = {
|
||||||
|
-- fallbackFlags = {
|
||||||
|
-- '-std=c23',
|
||||||
|
-- '-std=c++20'
|
||||||
|
-- },
|
||||||
|
-- },
|
||||||
|
-- })
|
||||||
|
end,
|
||||||
|
jdtls = function()
|
||||||
|
lspconfig.jdtls.setup{}
|
||||||
|
end,
|
||||||
|
zls = function()
|
||||||
|
lspconfig.zls.setup({})
|
||||||
|
end,
|
||||||
|
lua_ls = function()
|
||||||
|
lspconfig.lua_ls.setup({
|
||||||
|
on_init = function(client)
|
||||||
|
if client.workspace_folders then
|
||||||
|
local path = client.workspace_folders[1].name
|
||||||
|
if vim.uv.fs_stat(path..'/.luarc.json') or vim.uv.fs_stat(path..'/.luarc.jsonc') then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||||
|
runtime = {
|
||||||
|
-- Tell the language server which version of Lua you're using
|
||||||
|
-- (most likely LuaJIT in the case of Neovim)
|
||||||
|
|
||||||
|
version = 'LuaJIT'
|
||||||
|
},
|
||||||
|
-- Make the server aware of Neovim runtime files
|
||||||
|
workspace = {
|
||||||
|
checkThirdParty = false,
|
||||||
|
library = {
|
||||||
|
vim.env.VIMRUNTIME
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
diagnostics = {
|
||||||
|
globals = { 'turtle' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
ols = function()
|
||||||
|
lspconfig.ols.setup({
|
||||||
|
single_file_support = true,
|
||||||
|
on_attach = function (client, buffer)
|
||||||
|
print('reached ols')
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
local cmp = require('cmp')
|
||||||
|
local cmp_select = {behaviour = cmp.SelectBehavior.Select}
|
||||||
|
cmp.setup({
|
||||||
|
sources = {
|
||||||
|
{ name = 'nvim_lsp' },
|
||||||
|
},
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
require('luasnip').lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
||||||
|
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
||||||
|
['<C-y>'] = cmp.mapping.confirm({ select = true }),
|
||||||
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
}),
|
||||||
|
formatting = lsp_zero.cmp_format(),
|
||||||
|
})
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
require('lualine').setup {
|
||||||
|
options = {
|
||||||
|
icons_enabled = true,
|
||||||
|
theme = 'auto',
|
||||||
|
component_separators = { left = '|', right = '|'},
|
||||||
|
section_separators = { left = '', right = ''},
|
||||||
|
disabled_filetypes = {
|
||||||
|
statusline = {},
|
||||||
|
winbar = {},
|
||||||
|
},
|
||||||
|
ignore_focus = {},
|
||||||
|
always_divide_middle = true,
|
||||||
|
globalstatus = false,
|
||||||
|
refresh = {
|
||||||
|
statusline = 75,
|
||||||
|
tabline = 10000,
|
||||||
|
winbar = 10000,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = { 'mode' },
|
||||||
|
lualine_b = {
|
||||||
|
'branch',
|
||||||
|
'diff',
|
||||||
|
{
|
||||||
|
'diagnostics',
|
||||||
|
--sources = 'nvim_diagnostic'
|
||||||
|
sources = { 'nvim_diagnostic' },
|
||||||
|
|
||||||
|
-- Displays diagnostics for the defined severity types
|
||||||
|
sections = { 'error', 'warn', 'info', 'hint' },
|
||||||
|
diagnostics_color = {
|
||||||
|
-- Same values as the general color option can be used here.
|
||||||
|
error = 'DiagnosticError', -- Changes diagnostics' error color.
|
||||||
|
warn = 'DiagnosticWarn', -- Changes diagnostics' warn color.
|
||||||
|
info = 'DiagnosticInfo', -- Changes diagnostics' info color.
|
||||||
|
hint = 'DiagnosticHint', -- Changes diagnostics' hint color.
|
||||||
|
},
|
||||||
|
symbols = { error = ' ', warn = ' ', info = ' ', hint = 'H' },
|
||||||
|
colored = true, -- Displays diagnostics status in color if set to true.
|
||||||
|
update_in_insert = false, -- Update diagnostics in insert mode.
|
||||||
|
always_visible = false, -- Show diagnostics even if there are none.
|
||||||
|
},
|
||||||
|
},
|
||||||
|
lualine_x = {'encoding', 'filetype'},
|
||||||
|
lualine_y = {'progress'},
|
||||||
|
lualine_z = {'location'}
|
||||||
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
lualine_a = {},
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_c = {'filename'},
|
||||||
|
lualine_x = {'location'},
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {}
|
||||||
|
},
|
||||||
|
tabline = {},
|
||||||
|
winbar = {},
|
||||||
|
inactive_winbar = {},
|
||||||
|
extensions = {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
local builtin = require('telescope.builtin')
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<C-p>', builtin.find_files, {})
|
||||||
|
vim.keymap.set('n', '<leader>gf', builtin.git_files, {})
|
||||||
|
vim.keymap.set('n', '<leader>ps', function()
|
||||||
|
builtin.grep_string({ search = vim.fn.input("Grep > ") });
|
||||||
|
end)
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
require'nvim-treesitter.configs'.setup {
|
||||||
|
-- A list of parser names, or "all" (the five listed parsers should always be installed)
|
||||||
|
ensure_installed = { "c", "lua", "vim", "query" },
|
||||||
|
|
||||||
|
-- Install parsers synchronously (only applied to `ensure_installed`)
|
||||||
|
sync_install = false,
|
||||||
|
|
||||||
|
-- Automatically install missing parsers when entering buffer
|
||||||
|
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
||||||
|
auto_install = false,
|
||||||
|
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
additional_vim_regex_highlighting = false,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
require'treesitter-context'.setup{
|
||||||
|
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||||
|
multiwindow = false,
|
||||||
|
max_lines = 4, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||||
|
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
||||||
|
line_numbers = true,
|
||||||
|
multiline_threshold = 10, -- Maximum number of lines to collapse for a single context line
|
||||||
|
trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
||||||
|
mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline'
|
||||||
|
-- Separator between context and content. Should be a single character string, like '-'.
|
||||||
|
-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
|
||||||
|
separator = nil,
|
||||||
|
zindex = 20, -- The Z-index of the context window
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
require("liamm")
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
require("liamm.set")
|
||||||
|
require("liamm.remap")
|
||||||
|
require("liamm.packer")
|
||||||
|
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
local function bind(op, outer_opts)
|
||||||
|
outer_opts = outer_opts or {noremap = true}
|
||||||
|
return function(lhs, rhs, opts)
|
||||||
|
opts = vim.tbl_extend("force",
|
||||||
|
outer_opts,
|
||||||
|
opts or {}
|
||||||
|
)
|
||||||
|
vim.keymap.set(op, lhs, rhs, opts)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
M.nmap = bind("n", {noremap = false})
|
||||||
|
M.nnoremap = bind("n")
|
||||||
|
M.vnoremap = bind("v")
|
||||||
|
M.xnoremap = bind("x")
|
||||||
|
M.inoremap = bind("i")
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
return require('packer').startup(function(use)
|
||||||
|
use 'wbthomason/packer.nvim'
|
||||||
|
|
||||||
|
use({ 'folke/tokyonight.nvim', as = 'tokyonight' })
|
||||||
|
use({ 'karoliskoncevicius/sacredforest-vim', as = 'sacredforest' })
|
||||||
|
use({ 'EdenEast/nightfox.nvim', as = 'nightfox' })
|
||||||
|
use({ 'rebelot/kanagawa.nvim', as = 'kanagawa'})
|
||||||
|
use({ 'sainnhe/sonokai', as = 'sonokai'})
|
||||||
|
use({ 'p00f/alabaster.nvim', as = 'alabaster'})
|
||||||
|
|
||||||
|
use 'nvim-telescope/telescope.nvim'
|
||||||
|
use('nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'})
|
||||||
|
use 'nvim-treesitter/playground'
|
||||||
|
use 'nvim-treesitter/nvim-treesitter-context'
|
||||||
|
use 'nvim-lua/plenary.nvim'
|
||||||
|
use 'mbbill/undotree'
|
||||||
|
use 'theprimeagen/harpoon'
|
||||||
|
use 'nvim-lualine/lualine.nvim'
|
||||||
|
use {
|
||||||
|
'mfussenegger/nvim-dap', -- debugger integration
|
||||||
|
requires = {
|
||||||
|
'rcarriga/nvim-dap-ui',
|
||||||
|
'nvim-neotest/nvim-nio' -- dep of dap-ui
|
||||||
|
}
|
||||||
|
}
|
||||||
|
use 'mfussenegger/nvim-jdtls' -- Java LSP Support
|
||||||
|
|
||||||
|
use 'tpope/vim-fugitive' -- git integration
|
||||||
|
--LSP CONFIG
|
||||||
|
--
|
||||||
|
use {
|
||||||
|
'VonHeikemen/lsp-zero.nvim',
|
||||||
|
branch = 'v4.x',
|
||||||
|
requires = {
|
||||||
|
-- LSP Support
|
||||||
|
{'neovim/nvim-lspconfig'}, -- Required
|
||||||
|
{'williamboman/mason.nvim'}, -- Optional
|
||||||
|
{'williamboman/mason-lspconfig.nvim'}, -- Optional
|
||||||
|
|
||||||
|
-- Autocompletion
|
||||||
|
{'hrsh7th/nvim-cmp'}, -- Required
|
||||||
|
{'hrsh7th/cmp-buffer'},
|
||||||
|
{'hrsh7th/cmp-path'},
|
||||||
|
{'saadparwaiz1/cmp_luasnip'},
|
||||||
|
{'hrsh7th/cmp-nvim-lsp'}, -- Required
|
||||||
|
{'hrsh7th/cmp-nvim-lua'},
|
||||||
|
|
||||||
|
-- Snippets
|
||||||
|
{'L3MON4D3/LuaSnip'}, -- Required
|
||||||
|
{'rafamadriz/friendly-snippets'},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end)
|
||||||
@@ -0,0 +1,123 @@
|
|||||||
|
local nnoremap = require("liamm.keymap").nnoremap
|
||||||
|
|
||||||
|
nnoremap("<leader>pv", "<cmd>Ex<CR>")
|
||||||
|
nnoremap("<leader>tv", "<cmd>ToggleTerm<CR>")
|
||||||
|
nnoremap("<leader>tt", "<cmd>TSContextToggle<CR>")
|
||||||
|
|
||||||
|
vim.keymap.set("v", "<leader>ss", ":CarbonNow<CR>", { silent = true })
|
||||||
|
|
||||||
|
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||||
|
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "J", "mzJ`z")
|
||||||
|
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||||
|
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||||
|
vim.keymap.set("n", "n", "nzzzv")
|
||||||
|
vim.keymap.set("n", "N", "Nzzzv")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>y", "\"+y")
|
||||||
|
vim.keymap.set("v", "<leader>y", "\"+y")
|
||||||
|
vim.keymap.set("n", "<leader>Y", "\"+Y")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", {silent = true})
|
||||||
|
|
||||||
|
-- put to background
|
||||||
|
vim.keymap.set("n", "<leader>bg", "<C-z>")
|
||||||
|
|
||||||
|
-- BUILD SCRIPT INVOKATIONS
|
||||||
|
-- generic build function
|
||||||
|
local function set(list)
|
||||||
|
local _set = {}
|
||||||
|
for _, l in ipairs(list) do
|
||||||
|
_set[l] = true
|
||||||
|
end
|
||||||
|
return _set
|
||||||
|
end
|
||||||
|
|
||||||
|
-- TODO: add support for passing flags
|
||||||
|
function Build()
|
||||||
|
local out_buf = vim.api.nvim_create_buf(false, true)
|
||||||
|
|
||||||
|
local build_scripts = set(vim.fs.find({ "build.sh", "build.zig", "build.bat" }, { upward = true, type = "file", path = "." }))
|
||||||
|
local output = "[No Build Output]"
|
||||||
|
|
||||||
|
if build_scripts['build.zig'] then
|
||||||
|
vim.cmd('echo "Running build.zig"')
|
||||||
|
output = vim.fn.system({ 'zig', 'build' })
|
||||||
|
else
|
||||||
|
if jit.os == 'Windows' and build_scripts['build.bat'] then
|
||||||
|
output = vim.fn.system({ 'build', '' })
|
||||||
|
elseif build_scripts['build.sh'] then
|
||||||
|
output = vim.fn.system({ './build.sh', '' })
|
||||||
|
else
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.api.nvim_buf_set_lines(out_buf, -1, -1, true, {"[ Build Output ]"})
|
||||||
|
vim.api.nvim_buf_set_lines(out_buf, -1, -1, true, vim.split(output, '\n'))
|
||||||
|
|
||||||
|
local window = vim.api.nvim_open_win(out_buf, false, {
|
||||||
|
split = 'right',
|
||||||
|
win = 0,
|
||||||
|
width = math.floor(vim.o.columns * 0.35),
|
||||||
|
style = 'minimal',
|
||||||
|
})
|
||||||
|
vim.api.nvim_set_current_win(window)
|
||||||
|
|
||||||
|
-- Keybind to close the window on pressing Enter
|
||||||
|
vim.api.nvim_buf_set_keymap(out_buf, 'n', '<CR>', '', {
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
|
callback = function()
|
||||||
|
vim.api.nvim_win_close(window, true)
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- TODO: add support for passing flags
|
||||||
|
vim.keymap.set("n", "<leader>bs", ":lua Build()<CR>")
|
||||||
|
|
||||||
|
-- specific build scipt options
|
||||||
|
|
||||||
|
-- `build.sh` script binds
|
||||||
|
-- non-interactive binds
|
||||||
|
vim.keymap.set("n", "<leader>bb" , ":!./build.sh <CR>")
|
||||||
|
vim.keymap.set("n", "<leader>br" , ":!./build.sh run <CR>")
|
||||||
|
vim.keymap.set("n", "<leader>bRb" , ":!./build.sh release <CR>")
|
||||||
|
vim.keymap.set("n", "<leader>bRr" , ":!./build.sh release run <CR>")
|
||||||
|
vim.keymap.set("n", "<leader>bRr" , ":!./build.sh release run <CR>")
|
||||||
|
|
||||||
|
-- interactive binds
|
||||||
|
vim.keymap.set("n", "<leader>bo" , ":!./build.sh ") -- allow for adding extra flags/options
|
||||||
|
vim.keymap.set("n", "<leader>bor" , ":!./build.sh run") -- allow for adding extra flags/options
|
||||||
|
vim.keymap.set("n", "<leader>bRo" , ":!./build.sh release ")
|
||||||
|
vim.keymap.set("n", "<leader>bRor", ":!./build.sh release run ")
|
||||||
|
|
||||||
|
-- `build.zig` script binds
|
||||||
|
-- non-interactive binds
|
||||||
|
vim.keymap.set("n", "<leader>zbb" , ":!zig build <CR>")
|
||||||
|
vim.keymap.set("n", "<leader>zbr" , ":!zig build run <CR>")
|
||||||
|
vim.keymap.set("n", "<leader>zbt" , ":!zig build test <CR>")
|
||||||
|
vim.keymap.set("n", "<leader>zbR" , ":!zig build -Doptimize=ReleaseSafe <CR>")
|
||||||
|
vim.keymap.set("n", "<leader>zbRs" , ":!zig build -Doptimize=ReleaseSmall <CR>")
|
||||||
|
vim.keymap.set("n", "<leader>zbRf" , ":!zig build -Doptimize=ReleaseFast <CR>")
|
||||||
|
vim.keymap.set("n", "<leader>zbRr" , ":!zig build run -Doptimize=ReleaseSafe <CR>")
|
||||||
|
vim.keymap.set("n", "<leader>zbRsr", ":!zig build run -Doptimize=ReleaseSmall <CR>")
|
||||||
|
vim.keymap.set("n", "<leader>zbRfr", ":!zig build run -Doptimize=ReleaseFast <CR>")
|
||||||
|
|
||||||
|
-- interactive binds
|
||||||
|
vim.keymap.set("n", "<leader>zbob" , ":!zig build ")
|
||||||
|
vim.keymap.set("n", "<leader>zbor" , ":!zig build run ")
|
||||||
|
vim.keymap.set("n", "<leader>zbot" , ":!zig build test ")
|
||||||
|
vim.keymap.set("n", "<leader>zboR" , ":!zig build -Doptimize=ReleaseSafe ")
|
||||||
|
vim.keymap.set("n", "<leader>zboRs" , ":!zig build -Doptimize=ReleaseSmall ")
|
||||||
|
vim.keymap.set("n", "<leader>zboRf" , ":!zig build -Doptimize=ReleaseFast ")
|
||||||
|
vim.keymap.set("n", "<leader>zboRr" , ":!zig build run -Doptimize=ReleaseSafe ")
|
||||||
|
vim.keymap.set("n", "<leader>zboRsr", ":!zig build run -Doptimize=ReleaseSmall ")
|
||||||
|
vim.keymap.set("n", "<leader>zboRfr", ":!zig build run -Doptimize=ReleaseFast ")
|
||||||
|
|
||||||
|
-- emacs-inspired binds
|
||||||
|
-- all <C-w> can be done w spacebar-w
|
||||||
|
vim.keymap.set("n", "<leader>w", "<C-w>")
|
||||||
|
vim.keymap.set("n", "<leader>qq", ":x<CR>")
|
||||||
|
nnoremap("<leader>.", ":find ~/")
|
||||||
|
nnoremap("<leader>fc", ":find ~/personal/nixos/modules/old_configs/nvim/lua/liamm/remap.lua<CR>")
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
vim.opt.guicursor = ""
|
||||||
|
|
||||||
|
vim.opt.nu = true
|
||||||
|
vim.opt.rnu = true
|
||||||
|
vim.opt.tabstop = 2
|
||||||
|
vim.opt.softtabstop = 2
|
||||||
|
vim.opt.shiftwidth = 2
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
vim.opt.hlsearch = false
|
||||||
|
vim.opt.incsearch = true
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
vim.opt.splitright = true
|
||||||
|
vim.opt.splitbelow = true
|
||||||
|
|
||||||
|
vim.opt.updatetime = 40
|
||||||
|
|
||||||
|
vim.opt.colorcolumn = ""
|
||||||
|
|
||||||
|
vim.opt.smartindent = true
|
||||||
|
|
||||||
|
vim.opt.wrap = true
|
||||||
|
|
||||||
|
vim.opt.swapfile = false
|
||||||
|
vim.opt.backup = false
|
||||||
|
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
||||||
|
vim.opt.undofile = true
|
||||||
|
|
||||||
|
vim.opt.scrolloff = 8
|
||||||
|
vim.opt.updatetime = 50
|
||||||
|
|
||||||
|
vim.g.netrw_keepdir = 0
|
||||||
|
vim.g.mapleader = " "
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"$schema": "/etc/xdg/swaync/configSchema.json",
|
||||||
|
"positionX": "right",
|
||||||
|
"positionY": "top",
|
||||||
|
"layer": "overlay",
|
||||||
|
"control-center-layer": "top",
|
||||||
|
"layer-shell": true,
|
||||||
|
"cssPriority": "application",
|
||||||
|
"control-center-margin-top": 20,
|
||||||
|
"control-center-margin-bottom": 20,
|
||||||
|
"control-center-margin-right": 20,
|
||||||
|
"control-center-margin-left": 0,
|
||||||
|
"notification-2fa-action": true,
|
||||||
|
"notification-inline-replies": true,
|
||||||
|
"notification-icon-size": 64,
|
||||||
|
"notification-body-image-height": 100,
|
||||||
|
"notification-body-image-width": 200,
|
||||||
|
"timeout": 5,
|
||||||
|
"timeout-low": 5,
|
||||||
|
"timeout-critical": 5,
|
||||||
|
"fit-to-screen": false,
|
||||||
|
"relative-timestamps": true,
|
||||||
|
"control-center-width": 400,
|
||||||
|
"control-center-height": 800,
|
||||||
|
"notification-window-width": 400,
|
||||||
|
"notification-window-height": 800,
|
||||||
|
"keyboard-shortcuts": true,
|
||||||
|
"image-visibility": "when-available",
|
||||||
|
"transition-time": 200,
|
||||||
|
"hide-on-clear": false,
|
||||||
|
"hide-on-action": true,
|
||||||
|
"script-fail-notify": true,
|
||||||
|
"scripts": {},
|
||||||
|
"notification-visibility": {},
|
||||||
|
"widgets": [
|
||||||
|
"mpris",
|
||||||
|
"title",
|
||||||
|
"dnd",
|
||||||
|
"notifications"
|
||||||
|
],
|
||||||
|
"widget-config": {
|
||||||
|
"title": {
|
||||||
|
"text": "Notifications",
|
||||||
|
"clear-all-button": true,
|
||||||
|
"button-text": " Clear"
|
||||||
|
},
|
||||||
|
"dnd": {
|
||||||
|
"text": "Do Not Disturb"
|
||||||
|
},
|
||||||
|
"mpris": {
|
||||||
|
"image-size": 96,
|
||||||
|
"image-radius": 12
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,507 @@
|
|||||||
|
@import "../../.cache/wal/colors-waybar.css";
|
||||||
|
|
||||||
|
@define-color main-color @color13;
|
||||||
|
@define-color cc-bg alpha(@main-color, 0.2);
|
||||||
|
@define-color border alpha(lighter(@foreground), 0.1);
|
||||||
|
@define-color text-color @foreground;
|
||||||
|
@define-color text-color-disabled darker(@text-color);
|
||||||
|
@define-color noti-bg @cc-bg;
|
||||||
|
@define-color noti-bg-hover alpha(darker(@background), 0.2);
|
||||||
|
@define-color noti-close-bg alpha(darker(@background), 0.1);
|
||||||
|
@define-color noti-close-bg-hover alpha(darker(@background), 0.3);
|
||||||
|
|
||||||
|
@define-color noti-bg-opaque rgb(48, 48, 48);
|
||||||
|
@define-color noti-bg-darker rgb(38, 38, 38);
|
||||||
|
@define-color noti-bg-focus rgba(68, 68, 68, 0.6);
|
||||||
|
|
||||||
|
.notification-row {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row:focus, .notification-row:hover {
|
||||||
|
background: @noti-bg-focus;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background {
|
||||||
|
padding: 6px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .close-button {
|
||||||
|
/* The notification Close Button */
|
||||||
|
background: @noti-close-bg;
|
||||||
|
color: @text-color;
|
||||||
|
text-shadow: none;
|
||||||
|
padding: 0;
|
||||||
|
border-radius: 100%;
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
box-shadow: none;
|
||||||
|
border: none;
|
||||||
|
min-width: 24px;
|
||||||
|
min-height: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .close-button:hover {
|
||||||
|
box-shadow: none;
|
||||||
|
background: @noti-close-bg-hover;
|
||||||
|
transition: background 0.15s ease-in-out;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification {
|
||||||
|
/* The actual notification */
|
||||||
|
border-radius: 12px;
|
||||||
|
border: 2px solid @border;
|
||||||
|
padding: 0;
|
||||||
|
transition: background 0.15s ease-in-out;
|
||||||
|
background: @noti-bg;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification.low {
|
||||||
|
/* Low Priority Notification */
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification.normal {
|
||||||
|
/* Normal Priority Notification */
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification.critical {
|
||||||
|
/* Critical Priority Notification */
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-action, .notification-row .notification-background .notification .notification-default-action {
|
||||||
|
padding: 4px;
|
||||||
|
margin: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
color: @text-color;
|
||||||
|
transition: background 0.15s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-action:hover, .notification-row .notification-background .notification .notification-default-action:hover {
|
||||||
|
-gtk-icon-effect: none;
|
||||||
|
background: @noti-bg-hover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-default-action {
|
||||||
|
/* The large action that also displays the notification summary and body */
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-default-action:not(:only-child) {
|
||||||
|
/* When alternative actions are visible */
|
||||||
|
border-bottom-left-radius: 0px;
|
||||||
|
border-bottom-right-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-default-action .notification-content {
|
||||||
|
background: transparent;
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-default-action .notification-content .image {
|
||||||
|
/* Notification Primary Image */
|
||||||
|
-gtk-icon-effect: none;
|
||||||
|
border-radius: 100px;
|
||||||
|
/* Size in px */
|
||||||
|
margin: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-default-action .notification-content .app-icon {
|
||||||
|
/* Notification app icon (only visible when the primary image is set) */
|
||||||
|
-gtk-icon-effect: none;
|
||||||
|
-gtk-icon-shadow: 0 1px 4px black;
|
||||||
|
margin: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-default-action .notification-content .text-box .summary {
|
||||||
|
/* Notification summary/title */
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
background: transparent;
|
||||||
|
color: @text-color;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-default-action .notification-content .text-box .time {
|
||||||
|
/* Notification time-ago */
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
background: transparent;
|
||||||
|
color: @text-color;
|
||||||
|
text-shadow: none;
|
||||||
|
margin-right: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-default-action .notification-content .text-box .body {
|
||||||
|
/* Notification body */
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: normal;
|
||||||
|
background: transparent;
|
||||||
|
color: @text-color;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-default-action .notification-content progressbar {
|
||||||
|
/* The optional notification progress bar */
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-default-action .notification-content .body-image {
|
||||||
|
/* The "extra" optional bottom notification image */
|
||||||
|
margin-top: 4px;
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 12px;
|
||||||
|
-gtk-icon-effect: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply {
|
||||||
|
/* The inline reply section */
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-entry {
|
||||||
|
background: @noti-bg-darker;
|
||||||
|
color: @text-color;
|
||||||
|
caret-color: @text-color;
|
||||||
|
border: 1px solid @border;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button {
|
||||||
|
margin-left: 4px;
|
||||||
|
background: @noti-bg;
|
||||||
|
border: 1px solid @border;
|
||||||
|
border-radius: 12px;
|
||||||
|
color: @text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button:disabled {
|
||||||
|
background: initial;
|
||||||
|
color: @text-color-disabled;
|
||||||
|
border: 1px solid @border;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-default-action .notification-content .inline-reply .inline-reply-button:hover {
|
||||||
|
background: @noti-bg-hover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-action {
|
||||||
|
/* The alternative actions below the default action */
|
||||||
|
border-top: 1px solid @border;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-right: 1px solid @border;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-action:first-child {
|
||||||
|
/* add bottom border radius to eliminate clipping */
|
||||||
|
border-bottom-left-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-row .notification-background .notification .notification-action:last-child {
|
||||||
|
border-bottom-right-radius: 12px;
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-group {
|
||||||
|
/* Styling only for Grouped Notifications */
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-group.low {
|
||||||
|
/* Low Priority Group */
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-group.normal {
|
||||||
|
/* Low Priority Group */
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-group.critical {
|
||||||
|
/* Low Priority Group */
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-group .notification-group-buttons, .notification-group .notification-group-headers {
|
||||||
|
margin: 0 16px;
|
||||||
|
color: @text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-group .notification-group-headers {
|
||||||
|
/* Notification Group Headers */
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-group .notification-group-headers .notification-group-icon {
|
||||||
|
color: @text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-group .notification-group-headers .notification-group-header {
|
||||||
|
color: @text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-group .notification-group-buttons {
|
||||||
|
/* Notification Group Buttons */
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-group.collapsed .notification-row .notification {
|
||||||
|
background-color: @noti-bg-opaque;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-group.collapsed .notification-row:not(:last-child) {
|
||||||
|
/* Top notification in stack */
|
||||||
|
/* Set lower stacked notifications opacity to 0 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-group.collapsed .notification-row:not(:last-child) .notification-action,
|
||||||
|
.notification-group.collapsed .notification-row:not(:last-child) .notification-default-action {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.notification-group.collapsed:hover .notification-row:not(:only-child) .notification {
|
||||||
|
background-color: @noti-bg-hover-opaque;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-center {
|
||||||
|
/* The Control Center which contains the old notifications + widgets */
|
||||||
|
background: @cc-bg;
|
||||||
|
color: @text-color;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 2px solid @border;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-center .control-center-list-placeholder {
|
||||||
|
/* The placeholder when there are no notifications */
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-center .control-center-list {
|
||||||
|
/* List of notifications */
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-center .control-center-list .notification {
|
||||||
|
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7), 0 2px 6px 2px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-center .control-center-list .notification .notification-default-action,
|
||||||
|
.control-center .control-center-list .notification .notification-action {
|
||||||
|
transition: opacity 400ms ease-in-out, background 0.15s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-center .control-center-list .notification .notification-default-action:hover,
|
||||||
|
.control-center .control-center-list .notification .notification-action:hover {
|
||||||
|
background-color: @noti-bg-hover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.blank-window {
|
||||||
|
/* Window behind control center and on all other monitors */
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.floating-notifications {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.floating-notifications .notification {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*** Widgets ***/
|
||||||
|
/* Title widget */
|
||||||
|
.widget-title {
|
||||||
|
color: @text-color;
|
||||||
|
text-shadow: 1px 1px 3px @background;
|
||||||
|
margin: 8px;
|
||||||
|
font-size: 1.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-title > button {
|
||||||
|
font-size: initial;
|
||||||
|
color: @text-color;
|
||||||
|
text-shadow: 1px 1px 3px @background;
|
||||||
|
background: @noti-bg;
|
||||||
|
border: 1px solid @border;
|
||||||
|
box-shadow: none;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-title > button:hover {
|
||||||
|
background: @noti-bg-hover;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* DND widget */
|
||||||
|
.widget-dnd {
|
||||||
|
color: @text-color;
|
||||||
|
text-shadow: 1px 1px 3px @background;
|
||||||
|
margin: 8px;
|
||||||
|
font-size: 1.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-dnd > switch {
|
||||||
|
font-size: initial;
|
||||||
|
border-radius: 12px;
|
||||||
|
background: @noti-bg;
|
||||||
|
border: 1px solid @border;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-dnd > switch:checked {
|
||||||
|
background: @main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-dnd > switch slider {
|
||||||
|
background: @noti-bg-hover;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Label widget */
|
||||||
|
.widget-label {
|
||||||
|
margin: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-label > label {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Mpris widget */
|
||||||
|
@define-color mpris-album-art-overlay rgba(0, 0, 0, 0.55);
|
||||||
|
@define-color mpris-button-hover rgba(0, 0, 0, 0.50);
|
||||||
|
.widget-mpris {
|
||||||
|
/* The parent to all players */
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-mpris .widget-mpris-player {
|
||||||
|
padding: 8px;
|
||||||
|
padding: 16px;
|
||||||
|
margin: 16px 20px;
|
||||||
|
background-color: @mpris-album-art-overlay;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.75);
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-mpris .widget-mpris-player button:hover {
|
||||||
|
/* The media player buttons (play, pause, next, etc...) */
|
||||||
|
background: @noti-bg-hover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-mpris .widget-mpris-player .widget-mpris-album-art {
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.75);
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-mpris .widget-mpris-player .widget-mpris-title {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-mpris .widget-mpris-player .widget-mpris-subtitle {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-mpris .widget-mpris-player > box > button {
|
||||||
|
/* Change player control buttons */
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-mpris .widget-mpris-player > box > button:hover {
|
||||||
|
background-color: @mpris-button-hover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-mpris > box > button {
|
||||||
|
/* Change player side buttons */
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-mpris > box > button:disabled {
|
||||||
|
/* Change player side buttons insensitive */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Buttons widget */
|
||||||
|
.widget-buttons-grid {
|
||||||
|
padding: 8px;
|
||||||
|
margin: 8px;
|
||||||
|
border-radius: 12px;
|
||||||
|
background-color: @noti-bg;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-buttons-grid > flowbox > flowboxchild > button {
|
||||||
|
background: @noti-bg;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-buttons-grid > flowbox > flowboxchild > button.toggle:checked {
|
||||||
|
/* style given to the active toggle button */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Menubar widget */
|
||||||
|
.widget-menubar > box > .menu-button-bar > button {
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* .AnyName { Name defined in config after #
|
||||||
|
background-color: @noti-bg;
|
||||||
|
padding: 8px;
|
||||||
|
margin: 8px;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.AnyName>button {
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.AnyName>button:hover {
|
||||||
|
background-color: @noti-bg-hover;
|
||||||
|
} */
|
||||||
|
.topbar-buttons > button {
|
||||||
|
/* Name defined in config after # */
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Volume widget */
|
||||||
|
.widget-volume {
|
||||||
|
background-color: @noti-bg;
|
||||||
|
padding: 8px;
|
||||||
|
margin: 8px;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-volume > box > button {
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.per-app-volume {
|
||||||
|
background-color: @noti-bg-alt;
|
||||||
|
padding: 4px 8px 8px 8px;
|
||||||
|
margin: 0px 8px 8px 8px;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Backlight widget */
|
||||||
|
.widget-backlight {
|
||||||
|
background-color: @noti-bg;
|
||||||
|
padding: 8px;
|
||||||
|
margin: 8px;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Inhibitors widget */
|
||||||
|
.widget-inhibitors {
|
||||||
|
margin: 8px;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-inhibitors > button {
|
||||||
|
font-size: initial;
|
||||||
|
color: @text-color;
|
||||||
|
text-shadow: none;
|
||||||
|
background: @noti-bg;
|
||||||
|
border: 1px solid @border;
|
||||||
|
box-shadow: none;
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-inhibitors > button:hover {
|
||||||
|
background: @noti-bg-hover;
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# This file is written by xdg-user-dirs-update
|
||||||
|
# If you want to change or add directories, just edit the line you're
|
||||||
|
# interested in. All local changes will be retained on the next run.
|
||||||
|
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
|
||||||
|
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
||||||
|
# absolute path. No other format is supported.
|
||||||
|
#
|
||||||
|
XDG_DESKTOP_DIR="$HOME/"
|
||||||
|
XDG_DOWNLOAD_DIR="$HOME/downloads"
|
||||||
|
XDG_TEMPLATES_DIR="$HOME/"
|
||||||
|
XDG_PUBLICSHARE_DIR="$HOME/"
|
||||||
|
XDG_DOCUMENTS_DIR="$HOME/documents"
|
||||||
|
XDG_MUSIC_DIR="$HOME/music"
|
||||||
|
XDG_PICTURES_DIR="$HOME/pictures"
|
||||||
|
XDG_VIDEOS_DIR="$HOME/videos"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
en_US
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"layer": "bottom",
|
||||||
|
"position": "top",
|
||||||
|
"margin": "0 200 2 200",
|
||||||
|
"fixed-center": true,
|
||||||
|
"reload_style_on_change": true,
|
||||||
|
"include": ["~/.config/waybar/modules.jsonc"],
|
||||||
|
"modules-left": [
|
||||||
|
"hyprland/window",
|
||||||
|
"group/info"
|
||||||
|
],
|
||||||
|
|
||||||
|
"modules-center": [
|
||||||
|
"hyprland/workspaces"
|
||||||
|
],
|
||||||
|
|
||||||
|
"modules-right": [
|
||||||
|
"group/control-center",
|
||||||
|
"group/hub",
|
||||||
|
"group/power"
|
||||||
|
],
|
||||||
|
}
|
||||||
@@ -0,0 +1,287 @@
|
|||||||
|
{
|
||||||
|
"hyprland/window": {
|
||||||
|
"format": "{title}",
|
||||||
|
"max-length": 80,
|
||||||
|
"separate-outputs": false,
|
||||||
|
"rewrite": {
|
||||||
|
"^.*( — Brave|Brave)$": " Brave",
|
||||||
|
"^.*vim.*$": " Neovim",
|
||||||
|
"^.*~$": " Ghostty",
|
||||||
|
"^.*Emacs": " Emacs",
|
||||||
|
"(.*) ": " Empty"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"group/info": {
|
||||||
|
"orientation": "inherit",
|
||||||
|
"drawer": {
|
||||||
|
"transition-duration": 300,
|
||||||
|
"transition-left-to-right": false,
|
||||||
|
},
|
||||||
|
"modules": ["custom/arrow-right", "cpu", "memory", "disk" ],
|
||||||
|
},
|
||||||
|
"custom/arrow-right": {
|
||||||
|
"format": "",
|
||||||
|
"tooltip": false,
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"format": " {usage}",
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"format": " {:2}",
|
||||||
|
},
|
||||||
|
"disk": {
|
||||||
|
"interval": 600,
|
||||||
|
"format": " {percentage_used}",
|
||||||
|
"path": "/home",
|
||||||
|
},
|
||||||
|
"hyprland/workspaces": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"on-click": "activate",
|
||||||
|
"all-outputs": true,
|
||||||
|
"format-icons": {
|
||||||
|
"1": "",
|
||||||
|
"2": "",
|
||||||
|
"3": "",
|
||||||
|
"4": "",
|
||||||
|
"5": "",
|
||||||
|
"6": "",
|
||||||
|
"7": "",
|
||||||
|
"8": "",
|
||||||
|
"9": "",
|
||||||
|
"10": "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"group/control-center": {
|
||||||
|
"orientation": "inherit",
|
||||||
|
"modules": ["hyprland/language", "group/audio", "group/connection"],
|
||||||
|
},
|
||||||
|
"hyprland/language": {
|
||||||
|
"format": "{}",
|
||||||
|
"format-en": "en",
|
||||||
|
"format-ru": "ru",
|
||||||
|
"keyboard-name": "kingston-hyperx-alloy-fps-pro-mechanical-gaming-keyboard-1",
|
||||||
|
// "keyboard-name":"at-translated-set-2-keyboard",
|
||||||
|
"on-click": "hyprctl switchxkblayout kingston-hyperx-alloy-fps-pro-mechanical-gaming-keyboard-1 next",
|
||||||
|
},
|
||||||
|
"group/audio": {
|
||||||
|
"orientation": "inherit",
|
||||||
|
"drawer": {
|
||||||
|
"transition-duration": 300,
|
||||||
|
"transition-left-to-right": false,
|
||||||
|
},
|
||||||
|
"modules": [
|
||||||
|
"pulseaudio"
|
||||||
|
// "pulseaudio#mic"
|
||||||
|
// "pulseaudio/slider"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-bluetooth": "{icon}",
|
||||||
|
"tooltip": false,
|
||||||
|
// "tooltip-format": "{volume}% {icon} | {desc}",
|
||||||
|
"format-muted": "",
|
||||||
|
"format-icons": {
|
||||||
|
"headphones": "",
|
||||||
|
"handsfree": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": " ",
|
||||||
|
"default": ["", "", ""],
|
||||||
|
},
|
||||||
|
|
||||||
|
"on-click": "pamixer -t && exec $NIX_CONFIG_DIR/scripts/progress-notify.sh mute",
|
||||||
|
"on-click-right": "pavucontrol",
|
||||||
|
"on-scroll-down": "pamixer -d 5 && exec $NIX_CONFIG_DIR/scripts/progress-notify.sh audio",
|
||||||
|
"on-scroll-up": "pamixer -i 5 && exec $NIX_CONFIG_DIR/scripts/progress-notify.sh audio",
|
||||||
|
"smooth-scrolling-threshold": 1,
|
||||||
|
},
|
||||||
|
// "pulseaudio#mic": {
|
||||||
|
// "format": "{format_source}",
|
||||||
|
// "format-source": "",
|
||||||
|
// "format-source-muted": "",
|
||||||
|
// "tooltip": false,
|
||||||
|
// // "tooltip-format": "{volume}% {format_source} ",
|
||||||
|
// "on-click": "pactl set-source-mute 0 toggle",
|
||||||
|
// "on-scroll-down": "pactl set-source-volume 0 -1%",
|
||||||
|
// "on-scroll-up": "pactl set-source-volume 0 +1%",
|
||||||
|
// },
|
||||||
|
"pulseaudio/slider": {
|
||||||
|
"min": 0,
|
||||||
|
"max": 100,
|
||||||
|
"orientation": "horizontal",
|
||||||
|
},
|
||||||
|
"group/connection": {
|
||||||
|
"orientation": "inherit",
|
||||||
|
"modules": ["group/network", "group/bluetooth"],
|
||||||
|
},
|
||||||
|
"group/network": {
|
||||||
|
"orientation": "inherit",
|
||||||
|
"drawer": {
|
||||||
|
"transition-duration": 300,
|
||||||
|
"transition-left-to-right": true,
|
||||||
|
},
|
||||||
|
"modules": ["network", "network#speed"],
|
||||||
|
},
|
||||||
|
"group/bluetooth": {
|
||||||
|
"orientation": "inherit",
|
||||||
|
"drawer": {
|
||||||
|
"transition-duration": 300,
|
||||||
|
"transition-left-to-right": true,
|
||||||
|
},
|
||||||
|
"modules": ["bluetooth", "bluetooth#status"],
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"wifi": [""],
|
||||||
|
"ethernet": [""],
|
||||||
|
"disconnected": [""],
|
||||||
|
},
|
||||||
|
"format-wifi": "",
|
||||||
|
"format-ethernet": "",
|
||||||
|
"format-disconnected": "",
|
||||||
|
"format-linked": "",
|
||||||
|
"tooltip": false,
|
||||||
|
"on-click": "pgrep -x wofi &>/dev/null && notify-send wofi || networkmanager_dmenu",
|
||||||
|
},
|
||||||
|
"network#speed": {
|
||||||
|
"format": " {bandwidthDownBits} ",
|
||||||
|
"interval": 5,
|
||||||
|
"tooltip-format": "{ipaddr}",
|
||||||
|
"tooltip-format-wifi": "{essid} ({signalStrength}%) \n{ipaddr} | {frequency} MHz{icon} ",
|
||||||
|
"tooltip-format-ethernet": "{ifname} \n{ipaddr} | {frequency} MHz{icon} ",
|
||||||
|
"tooltip-format-disconnected": "Not Connected to any type of Network",
|
||||||
|
"tooltip": true,
|
||||||
|
"on-click": "pgrep -x wofi &>/dev/null && notify-send wofi || networkmanager_dmenu",
|
||||||
|
},
|
||||||
|
"bluetooth": {
|
||||||
|
"format-on": "",
|
||||||
|
"format-off": "",
|
||||||
|
"format-disabled": "",
|
||||||
|
"format-connected": "",
|
||||||
|
"tooltip": false,
|
||||||
|
"on-click": "overskride"
|
||||||
|
// "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected",
|
||||||
|
// "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
|
||||||
|
// "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
|
||||||
|
// "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%",
|
||||||
|
},
|
||||||
|
"bluetooth#status": {
|
||||||
|
"format-on": "",
|
||||||
|
"format-off": "",
|
||||||
|
"format-disabled": "",
|
||||||
|
"format-connected": "<b>{num_connections}</b>",
|
||||||
|
"format-connected-battery": "<small><b>{device_battery_percentage}%</b></small>",
|
||||||
|
"tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected",
|
||||||
|
"tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
|
||||||
|
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
|
||||||
|
"tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%",
|
||||||
|
"on-click": "wofi-bluetooth -config ~/.config/rofi/menu.d/network.rasi -i",
|
||||||
|
},
|
||||||
|
"group/hub": {
|
||||||
|
"orientation": "inherit",
|
||||||
|
"modules": ["group/utils", "clock"],
|
||||||
|
},
|
||||||
|
"group/utils": {
|
||||||
|
"orientation": "inherit",
|
||||||
|
"drawer": {
|
||||||
|
"transition-duration": 300,
|
||||||
|
"transition-left-to-right": true,
|
||||||
|
},
|
||||||
|
"modules": [ "custom/arrow-left", "custom/notifications", "custom/weather" ],
|
||||||
|
},
|
||||||
|
"custom/arrow-left": {
|
||||||
|
"format": "",
|
||||||
|
"tooltip": false,
|
||||||
|
},
|
||||||
|
"custom/notifications": {
|
||||||
|
"tooltip": false,
|
||||||
|
// I don't know why "{icon} {}" doesn't work
|
||||||
|
"format": "{} {icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"notification": "",
|
||||||
|
"none": "",
|
||||||
|
"dnd-notification": "",
|
||||||
|
"dnd-none": "",
|
||||||
|
"inhibited-notification": "",
|
||||||
|
"inhibited-none": "",
|
||||||
|
"dnd-inhibited-notification": "",
|
||||||
|
"dnd-inhibited-none": ""
|
||||||
|
},
|
||||||
|
"return-type": "json",
|
||||||
|
"exec-if": "which swaync-client",
|
||||||
|
"exec": "swaync-client -swb",
|
||||||
|
"on-click": "swaync-client -t -sw",
|
||||||
|
"on-click-right": "swaync-client -d -sw",
|
||||||
|
"escape": true
|
||||||
|
},
|
||||||
|
"custom/weather": {
|
||||||
|
"format": "{}",
|
||||||
|
"tooltip": false,
|
||||||
|
"interval": 3600,
|
||||||
|
"exec": "wttrbar --custom-indicator '{ICON}{temp_C}°C'",
|
||||||
|
"return-type": "json",
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"format": "{:%H:%M}",
|
||||||
|
"format-alt": "{:%A %d.%m}",
|
||||||
|
"tooltip-format": "<tt><big>{calendar}</big></tt>",
|
||||||
|
"calendar": {
|
||||||
|
"mode": "month",
|
||||||
|
"on-scroll": 1,
|
||||||
|
"format": {
|
||||||
|
"months": "<span color='#ffead3'><b>{}</b></span>",
|
||||||
|
"days": "<span color='#ecc6d9'><b>{}</b></span>",
|
||||||
|
"weeks": "<span color='#99ffdd'><b>W{}</b></span>",
|
||||||
|
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
|
||||||
|
"today": "<span color='#ff6699'><b><u>{}</u></b></span>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"actions": {
|
||||||
|
"on-click-right": "mode",
|
||||||
|
"on-scroll-up": "shift_up",
|
||||||
|
"on-scroll-down": "shift_down",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"group/power": {
|
||||||
|
"orientation": "inherit",
|
||||||
|
"drawer": {
|
||||||
|
"transition-duration": 300,
|
||||||
|
"transition-left-to-right": false,
|
||||||
|
},
|
||||||
|
"modules": ["battery", "power-profiles-daemon"],
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"states": {
|
||||||
|
"good": 95,
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-charging": "<b>{icon} </b>",
|
||||||
|
"format-full": "<span color='#82A55F'><b>{icon}</b></span>",
|
||||||
|
"on-update": "$NIX_CONFIG_DIR/scripts/battery-warn.sh 255",
|
||||||
|
"format-icons": [
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"tooltip-format": "{timeTo} {capacity} % | {power} W"
|
||||||
|
},
|
||||||
|
"power-profiles-daemon": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"tooltip-format": "Power profile: {profile}\nDriver: {driver}",
|
||||||
|
"tooltip": true,
|
||||||
|
"format-icons": {
|
||||||
|
"default": "",
|
||||||
|
"performance": "<span color='#B37F34'><small></small></span>",
|
||||||
|
"balanced": "<span><small> </small></span>",
|
||||||
|
"power-saver": "<span color='#a6e3a1'><small></small></span>"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
@import "../../.cache/wal/colors-waybar.css";
|
||||||
|
|
||||||
|
@define-color main-color @color13;
|
||||||
|
|
||||||
|
* {
|
||||||
|
font: bold 16px "JetBrainsMono Nerd Font Propo";
|
||||||
|
border: none;
|
||||||
|
border-radius: 0px;
|
||||||
|
box-shadow: none;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: alpha(@background, 0.3);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window {
|
||||||
|
padding: 2px 10px;
|
||||||
|
margin: 4px 2px 4px 4px;
|
||||||
|
background: alpha(@background, 0.3);
|
||||||
|
border-radius: 10px;
|
||||||
|
color: lighter(@main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
tooltip {
|
||||||
|
background: alpha(@background, 0.3);
|
||||||
|
border: 2px solid alpha(lighter(@main-color), 0.3);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
tooltip label {
|
||||||
|
color: @foreground;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-arrow-right {
|
||||||
|
color: @main-color;
|
||||||
|
margin: 0px 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#disk {
|
||||||
|
padding: 0px 6px;
|
||||||
|
margin: 8px 4px;
|
||||||
|
background: alpha(darker(@main-color), 0.3);
|
||||||
|
color: @main-color;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces {
|
||||||
|
margin: 4px 4px;
|
||||||
|
background: alpha(@background, 0.5);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0px 4px;
|
||||||
|
margin: 4px 4px;
|
||||||
|
color: alpha(@foreground, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
transition: color 0.5s;
|
||||||
|
color: lighter(@main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent,
|
||||||
|
#workspaces button:hover {
|
||||||
|
color: @color5;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#control-center {
|
||||||
|
padding: 0px 8px;
|
||||||
|
margin: 8px 4px;
|
||||||
|
color: lighter(@main-color);
|
||||||
|
background: alpha(@background, 0.3);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#bluetooth,
|
||||||
|
#network,
|
||||||
|
#pulseaudio {
|
||||||
|
padding: 0px 0 0 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio-slider slider {
|
||||||
|
min-height: 0px;
|
||||||
|
min-width: 0px;
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio-slider {
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio-slider highlight {
|
||||||
|
border-radius: 8px;
|
||||||
|
background-color: lighter(@main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#language {
|
||||||
|
padding: 0px 3px 2px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-arrow-left {
|
||||||
|
color: lighter(@main-color);
|
||||||
|
margin: 0px 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-notifications,
|
||||||
|
#custom-weather,
|
||||||
|
#custom-theme-switcher {
|
||||||
|
padding: 0px 8px;
|
||||||
|
margin: 8px 4px;
|
||||||
|
color: @main-color;
|
||||||
|
background: alpha(darker(@main-color), 0.3);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
padding: 0px 8px;
|
||||||
|
margin: 4px 2px 4px 2px;
|
||||||
|
background: alpha(@background, 0.3);
|
||||||
|
border-radius: 10px;
|
||||||
|
color: lighter(@main-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
#power {
|
||||||
|
background: alpha(@main-color, 0.3);
|
||||||
|
border-radius: 10px;
|
||||||
|
margin: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
padding: 0px 8px;
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
term=ghostty
|
||||||
|
location=center
|
||||||
|
width=26%
|
||||||
|
lines=9
|
||||||
|
|
||||||
|
|
||||||
|
prompt=Search Applications
|
||||||
|
show=drun
|
||||||
|
insensitive=true
|
||||||
|
allow_images=true
|
||||||
|
hide_scroll=true
|
||||||
|
|
||||||
|
always_parse_args=true
|
||||||
|
show_all=true
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
@define-color purple #881798;
|
||||||
|
|
||||||
|
* {
|
||||||
|
transition: 0.2s;
|
||||||
|
color: #aaaaaa;
|
||||||
|
}
|
||||||
|
#window {
|
||||||
|
background-color: #1e1e2e;
|
||||||
|
/* background: linear-gradient(27deg, rgba(249,255,150,1) 0%, rgba(113,181,120,1) 54%, rgba(21,85,165,1) 100%);*/
|
||||||
|
/* background-image: url("file:///home/liamm/pictures/wp-store/dystopian-cyber-city.jpg");*/
|
||||||
|
/* background-position: 50% 30%;*/
|
||||||
|
background-size: auto 200%;
|
||||||
|
border: 2.0px solid;
|
||||||
|
border-color: @purple;
|
||||||
|
border-color: @darkpurple;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#input {
|
||||||
|
border-radius: 20px;
|
||||||
|
margin: 0 20px 20px 20px;
|
||||||
|
padding: 10px 10px;
|
||||||
|
background-color: #292929;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #ffffffff;
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#outer-box {
|
||||||
|
padding: 20px;
|
||||||
|
color: #000000;
|
||||||
|
font-family: 'Source Code Pro';
|
||||||
|
font-weight: 400;
|
||||||
|
|
||||||
|
border: 2px;
|
||||||
|
border-color: #00ffb2ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#expander {
|
||||||
|
background-color: rgba(69, 29, 50, 0.0);
|
||||||
|
color: #292929;
|
||||||
|
}
|
||||||
|
|
||||||
|
#entry {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #ffffffff;
|
||||||
|
margin: 10px 0px;
|
||||||
|
padding: 10px 10px;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#entry:selected{
|
||||||
|
background-color:rgba(255,255,255,0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
#entry:hover {
|
||||||
|
color: #ffaa34;
|
||||||
|
}
|
||||||
+6
-147
@@ -5,16 +5,13 @@
|
|||||||
home.homeDirectory = cfg.homeDirectory;
|
home.homeDirectory = cfg.homeDirectory;
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
# home.file imports
|
./file.nix # config file out-of-store links
|
||||||
./file.nix
|
./pkgs.nix # system pkgs
|
||||||
|
./services.nix # system services
|
||||||
|
|
||||||
# general modules
|
# general modules
|
||||||
../../modules/home-manager/dunst.nix
|
|
||||||
../../modules/home-manager/tmux.nix
|
../../modules/home-manager/tmux.nix
|
||||||
../../modules/home-manager/fastfetch.nix
|
../../modules/home-manager/fastfetch.nix
|
||||||
|
|
||||||
# desktop
|
|
||||||
../../modules/desktop/bluetooth.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# You should not change this value, even if you update Home Manager. If you do
|
# You should not change this value, even if you update Home Manager. If you do
|
||||||
@@ -22,53 +19,11 @@
|
|||||||
# release notes.
|
# release notes.
|
||||||
home.stateVersion = "23.11"; # Please read the comment before changing.
|
home.stateVersion = "23.11"; # Please read the comment before changing.
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
audacity
|
|
||||||
android-studio
|
|
||||||
bat
|
|
||||||
brave
|
|
||||||
brightnessctl
|
|
||||||
btop
|
|
||||||
emacs-all-the-icons-fonts
|
|
||||||
emacsPackages.pdf-tools
|
|
||||||
exfatprogs
|
|
||||||
filezilla
|
|
||||||
floorp
|
|
||||||
genymotion
|
|
||||||
gimp
|
|
||||||
gtk4
|
|
||||||
gvfs
|
|
||||||
grimblast
|
|
||||||
htop
|
|
||||||
hyprpicker
|
|
||||||
imagemagick
|
|
||||||
kdePackages.kdenlive
|
|
||||||
keepassxc
|
|
||||||
libsForQt5.polkit-kde-agent
|
|
||||||
localsend
|
|
||||||
mpv
|
|
||||||
mupdf
|
|
||||||
nautilus
|
|
||||||
networkmanagerapplet
|
|
||||||
nwg-look
|
|
||||||
openvpn
|
|
||||||
pamixer
|
|
||||||
pavucontrol
|
|
||||||
powertop
|
|
||||||
prismlauncher
|
|
||||||
protonvpn-cli
|
|
||||||
qbittorrent
|
|
||||||
signal-desktop
|
|
||||||
swww
|
|
||||||
texliveFull
|
|
||||||
tree
|
|
||||||
wev
|
|
||||||
];
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "emacsclient";
|
EDITOR = "emacsclient";
|
||||||
GIT_EDITOR = "nvim";
|
GIT_EDITOR = "nvim";
|
||||||
NIX_SHELL_PRESERVE_PROMPT = 1;
|
NIX_SHELL_PRESERVE_PROMPT = 1;
|
||||||
|
NIX_CONFIG_DIR = "${cfg.homeDirectory}/personal/nixos";
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.settings.extra-trusted-substituters = [
|
nix.settings.extra-trusted-substituters = [
|
||||||
@@ -76,9 +31,6 @@
|
|||||||
];
|
];
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
|
|
||||||
# THEMING
|
# THEMING
|
||||||
|
|
||||||
## QT SECTION
|
## QT SECTION
|
||||||
@@ -107,8 +59,6 @@
|
|||||||
|
|
||||||
|
|
||||||
# ENV SETTINGS
|
# ENV SETTINGS
|
||||||
|
|
||||||
|
|
||||||
xdg.enable = true;
|
xdg.enable = true;
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"emacs" = {
|
"emacs" = {
|
||||||
@@ -119,98 +69,7 @@
|
|||||||
"user-dirs.locale".source = ../../configs/user-dirs.locale;
|
"user-dirs.locale".source = ../../configs/user-dirs.locale;
|
||||||
};
|
};
|
||||||
|
|
||||||
# BEGIN PROGRAMS
|
|
||||||
programs = {
|
|
||||||
bash = {
|
|
||||||
enable = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
enableVteIntegration = true;
|
|
||||||
initExtra =''
|
|
||||||
if [[ -z $ORIG_SHLVL ]]; then
|
|
||||||
export ORIG_SHLVL=$SHLVL
|
|
||||||
fi;
|
|
||||||
if [[ $SHLVL -gt $ORIG_SHLVL ]]; then
|
|
||||||
export PS1='\[\e[1;m\e[1;33m\e[1;m\] ($(($SHLVL - $ORIG_SHLVL))) \W\[\e[m\e[m\] 🐧 \[\e[1;32m\]~> \[\e[m\e[m\]'
|
|
||||||
else
|
|
||||||
export PS1='\[\e[1;m\e[1;33m\e[1;m\] \W\[\e[m\e[m\] 🐧 \[\e[1;32m\]~> \[\e[m\e[m\]'
|
|
||||||
fi;
|
|
||||||
set -o vi
|
|
||||||
fastfetch
|
|
||||||
'';
|
|
||||||
shellAliases = {
|
|
||||||
build = "./build.sh";
|
|
||||||
emacsd = "emacs --daemon";
|
|
||||||
emacsc = "emacsclient -c -a 'emacs'";
|
|
||||||
gap = "git add -p";
|
|
||||||
gcp = "git commit -p";
|
|
||||||
kpx = "keepassxc-cli open";
|
|
||||||
ls = "ls --color=auto";
|
|
||||||
ll = "ls -l";
|
|
||||||
la = "ls -lA";
|
|
||||||
nixrebuild = "nixos-rebuild build --flake ~/personal/nixos#darp8 && sudo nixos-rebuild switch --flake ~/personal/nixos#darp8";
|
|
||||||
nixbuild = "sudo nixos-rebuild switch --flake";
|
|
||||||
nixtest = "sudo nixos-rebuild test --flake";
|
|
||||||
new = "source $HOME/.bashrc";
|
|
||||||
newbar = "pkill waybar; waybar &disown";
|
|
||||||
ping = "ping -c 5";
|
|
||||||
vi = "\\vim";
|
|
||||||
work = "nix develop --impure";
|
|
||||||
".." = "cd ..";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
emacs = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.emacs-gtk;
|
|
||||||
extraPackages = epkgs: [
|
|
||||||
epkgs.pdf-tools
|
|
||||||
epkgs.org-pdftools
|
|
||||||
];
|
|
||||||
};
|
|
||||||
feh.enable = true;
|
|
||||||
git = {
|
|
||||||
enable = true;
|
|
||||||
lfs.enable = true;
|
|
||||||
diff-so-fancy.enable = true;
|
|
||||||
userEmail = "maloneliam@proton.me";
|
|
||||||
userName = "Liam Malone";
|
|
||||||
};
|
|
||||||
neovim = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.neovim-unwrapped;
|
|
||||||
vimAlias = true;
|
|
||||||
vimdiffAlias = true;
|
|
||||||
};
|
|
||||||
obs-studio = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
wofi.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
# BEGIN SERVICES
|
programs.home-manager.enable = true;
|
||||||
services = {
|
|
||||||
emacs = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.emacs-gtk;
|
|
||||||
client = {
|
|
||||||
enable = true;
|
|
||||||
arguments = [
|
|
||||||
"-c"
|
|
||||||
"-a emacs"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
startWithUserSession = "graphical";
|
|
||||||
};
|
|
||||||
|
|
||||||
gpg-agent = {
|
|
||||||
enable = true;
|
|
||||||
defaultCacheTtl = 1800;
|
|
||||||
enableSshSupport = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
gnome-keyring.enable = true;
|
|
||||||
network-manager-applet.enable = true;
|
|
||||||
nextcloud-client.enable = true;
|
|
||||||
swww.enable = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,122 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
# BEGIN PACKAGES
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
audacity
|
||||||
|
android-studio
|
||||||
|
bat
|
||||||
|
brave
|
||||||
|
brightnessctl
|
||||||
|
btop
|
||||||
|
emacs-all-the-icons-fonts
|
||||||
|
emacsPackages.pdf-tools
|
||||||
|
exfatprogs
|
||||||
|
filezilla
|
||||||
|
floorp
|
||||||
|
genymotion
|
||||||
|
gimp
|
||||||
|
gtk4
|
||||||
|
gvfs
|
||||||
|
grimblast
|
||||||
|
htop
|
||||||
|
hyprpicker
|
||||||
|
imagemagick
|
||||||
|
kdePackages.kdenlive
|
||||||
|
keepassxc
|
||||||
|
libsForQt5.polkit-kde-agent
|
||||||
|
localsend
|
||||||
|
mpv
|
||||||
|
mupdf
|
||||||
|
nautilus
|
||||||
|
networkmanagerapplet
|
||||||
|
networkmanager_dmenu
|
||||||
|
nwg-look
|
||||||
|
openvpn
|
||||||
|
overskride
|
||||||
|
pamixer
|
||||||
|
pavucontrol
|
||||||
|
powertop
|
||||||
|
prismlauncher
|
||||||
|
protonvpn-cli
|
||||||
|
pywal
|
||||||
|
qbittorrent
|
||||||
|
signal-desktop
|
||||||
|
swww
|
||||||
|
texliveFull
|
||||||
|
tree
|
||||||
|
waybar
|
||||||
|
wev
|
||||||
|
];
|
||||||
|
|
||||||
|
# BEGIN PROGRAMS
|
||||||
|
programs = {
|
||||||
|
bash = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
enableVteIntegration = true;
|
||||||
|
initExtra =''
|
||||||
|
if [[ -z $ORIG_SHLVL ]]; then
|
||||||
|
export ORIG_SHLVL=$SHLVL
|
||||||
|
fi;
|
||||||
|
if [[ $SHLVL -gt $ORIG_SHLVL ]]; then
|
||||||
|
export PS1='\[\e[1;m\e[1;33m\e[1;m\] ($(($SHLVL - $ORIG_SHLVL))) \W\[\e[m\e[m\] 🐧 \[\e[1;32m\]~> \[\e[m\e[m\]'
|
||||||
|
else
|
||||||
|
export PS1='\[\e[1;m\e[1;33m\e[1;m\] \W\[\e[m\e[m\] 🐧 \[\e[1;32m\]~> \[\e[m\e[m\]'
|
||||||
|
fi;
|
||||||
|
set -o vi
|
||||||
|
fastfetch
|
||||||
|
'';
|
||||||
|
shellAliases = {
|
||||||
|
build = "./build.sh";
|
||||||
|
emacsd = "emacs --daemon";
|
||||||
|
emacsc = "emacsclient -c -a 'emacs'";
|
||||||
|
gap = "git add -p";
|
||||||
|
gcp = "git commit -p";
|
||||||
|
kpx = "keepassxc-cli open";
|
||||||
|
ls = "ls --color=auto";
|
||||||
|
ll = "ls -l";
|
||||||
|
la = "ls -lA";
|
||||||
|
nixrebuild = "nixos-rebuild build --flake ~/personal/nixos#darp8 && sudo nixos-rebuild switch --flake ~/personal/nixos#darp8";
|
||||||
|
nixbuild = "sudo nixos-rebuild switch --flake";
|
||||||
|
nixtest = "sudo nixos-rebuild test --flake";
|
||||||
|
new = "source $HOME/.bashrc";
|
||||||
|
newbar = "pkill waybar; waybar &disown";
|
||||||
|
ping = "ping -c 5";
|
||||||
|
vi = "\\vim";
|
||||||
|
work = "nix develop --impure";
|
||||||
|
".." = "cd ..";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
emacs = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.emacs-gtk;
|
||||||
|
extraPackages = epkgs: [
|
||||||
|
epkgs.pdf-tools
|
||||||
|
epkgs.org-pdftools
|
||||||
|
];
|
||||||
|
};
|
||||||
|
feh.enable = true;
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
lfs.enable = true;
|
||||||
|
diff-so-fancy.enable = true;
|
||||||
|
userEmail = "maloneliam@proton.me";
|
||||||
|
userName = "Liam Malone";
|
||||||
|
};
|
||||||
|
neovim = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.neovim-unwrapped;
|
||||||
|
vimAlias = true;
|
||||||
|
vimdiffAlias = true;
|
||||||
|
};
|
||||||
|
obs-studio = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
wofi.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services = {
|
||||||
|
emacs = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.emacs-gtk;
|
||||||
|
client = {
|
||||||
|
enable = true;
|
||||||
|
arguments = [
|
||||||
|
"-c"
|
||||||
|
"-a emacs"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
startWithUserSession = "graphical";
|
||||||
|
};
|
||||||
|
|
||||||
|
gpg-agent = {
|
||||||
|
enable = true;
|
||||||
|
defaultCacheTtl = 1800;
|
||||||
|
enableSshSupport = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
gnome-keyring.enable = true;
|
||||||
|
mpris-proxy.enable = true;
|
||||||
|
network-manager-applet.enable = true;
|
||||||
|
nextcloud-client.enable = true;
|
||||||
|
swaync.enable = true;
|
||||||
|
swww.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [ blueman ];
|
|
||||||
services = {
|
|
||||||
mpris-proxy.enable = true;
|
|
||||||
blueman-applet.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
hyprpicker
|
|
||||||
hyprlock
|
|
||||||
hypridle
|
|
||||||
hyprpaper
|
|
||||||
hyprland-protocols
|
|
||||||
inputs.hyprsunset
|
|
||||||
# inputs.hyprsysteminfo
|
|
||||||
# hyprpolkit -- not in nixpkgs yet
|
|
||||||
];
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
./waybar.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
|
||||||
|
|
||||||
xwayland.enable = true;
|
|
||||||
systemd.enable = true;
|
|
||||||
|
|
||||||
# Tell home-manager not to manage the config file
|
|
||||||
extraConfig = "";
|
|
||||||
};
|
|
||||||
|
|
||||||
lib.inputMethod.fcitx5.waylandFrontend = true;
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
hyprlock.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
|
||||||
hyprpaper.enable = true;
|
|
||||||
hypridle.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
notif_id=$1
|
|
||||||
|
|
||||||
bat_alert_lvl=15
|
|
||||||
bat_lvl=$(grep "" /sys/class/power_supply/BAT0/capacity )
|
|
||||||
bat_status=$(grep Discharging /sys/class/power_supply/BAT0/status )
|
|
||||||
|
|
||||||
if (( $bat_lvl < $bat_alert_lvl )) && [ $bat_status == "Discharging" ]; then
|
|
||||||
dunstify -u critical "Low Battery" "Connect Power Adapter" -i /usr/share/icons/Adwaita/symbolic/status/battery-caution-symbolic.svg -r $notif_id -t 60000
|
|
||||||
else
|
|
||||||
hist_check=$(dunstctl history | grep $notif_id)
|
|
||||||
if [[ $hist_check == "" ]]; then
|
|
||||||
dunstctl close
|
|
||||||
fi
|
|
||||||
dunstctl history-rm $notif_id
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
Executable
+10
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
notif_id=$1
|
||||||
|
|
||||||
|
bat_alert_lvl=15
|
||||||
|
bat_lvl=$(grep "" /sys/class/power_supply/BAT0/capacity )
|
||||||
|
bat_status=$(grep Discharging /sys/class/power_supply/BAT0/status )
|
||||||
|
|
||||||
|
if (( $bat_lvl < $bat_alert_lvl )) && [ $bat_status == "Discharging" ]; then
|
||||||
|
notify-send -a low_battery -u critical "Low Battery" "Connect Power Adapter" -i battery-low -r $notif_id -t 60000
|
||||||
|
fi
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
notify='dunstify'
|
notify='notify-send'
|
||||||
|
|
||||||
muteToggleNotify() {
|
muteToggleNotify() {
|
||||||
volume=$(pamixer --get-volume)
|
volume=$(pamixer --get-volume)
|
||||||
@@ -42,11 +42,11 @@ notifyAudio() {
|
|||||||
if [ $volume -eq 0 ]; then
|
if [ $volume -eq 0 ]; then
|
||||||
notifyMuted "$volume"
|
notifyMuted "$volume"
|
||||||
elif [ $volume -le 30 ]; then
|
elif [ $volume -le 30 ]; then
|
||||||
$notify --appname=volume_indicator -h string:x-canonical-private-synchronous:audio "Volume: " -h int:value:"$volume" -t 1500 --icon audio-volume-low
|
$notify -a volume_indicator -h string:x-canonical-private-synchronous:audio "Volume: " -h int:value:"$volume" -t 1500 --icon audio-volume-low
|
||||||
elif [ $volume -le 70 ]; then
|
elif [ $volume -le 70 ]; then
|
||||||
$notify --appname=volume_indicator -h string:x-canonical-private-synchronous:audio "Volume: " -h int:value:"$volume" -t 1500 --icon audio-volume-medium
|
$notify -a volume_indicator -h string:x-canonical-private-synchronous:audio "Volume: " -h int:value:"$volume" -t 1500 --icon audio-volume-medium
|
||||||
else
|
else
|
||||||
$notify --appname=volume_indicator -h string:x-canonical-private-synchronous:audio "Volume: " -h int:value:"$volume" -t 1500 --icon audio-volume-high
|
$notify -a volume_indicator -h string:x-canonical-private-synchronous:audio "Volume: " -h int:value:"$volume" -t 1500 --icon audio-volume-high
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,13 +54,13 @@ notifyBrightness() {
|
|||||||
base_brightness=$(brightnessctl g)
|
base_brightness=$(brightnessctl g)
|
||||||
brightness=$(( $(( $base_brightness * 5 )) + 5 ))
|
brightness=$(( $(( $base_brightness * 5 )) + 5 ))
|
||||||
if [ $brightness -eq 0 ]; then
|
if [ $brightness -eq 0 ]; then
|
||||||
$notify --appname=brightness_indicator -h string:x-canonical-private-synchronous:brightness "Brightness: " -h int:value:"$brightness" -t 1500 --icon display-brightness-symbolic
|
$notify -a brightness_indicator -h string:x-canonical-private-synchronous:brightness "Brightness: " -h int:value:$brightness -t 1500 --icon display-brightness-symbolic
|
||||||
elif [ $brightness -le 30 ]; then
|
elif [ $brightness -le 30 ]; then
|
||||||
$notify --appname=brightness_indicator -h string:x-canonical-private-synchronous:brightness "Brightness: " -h int:value:"$brightness" -t 1500 --icon display-brightness-symbolic
|
$notify -a brightness_indicator -h string:x-canonical-private-synchronous:brightness "Brightness: " -h int:value:$brightness -t 1500 --icon display-brightness-symbolic
|
||||||
elif [ $brightness -le 70 ]; then
|
elif [ $brightness -le 70 ]; then
|
||||||
$notify --appname=brightness_indicator -h string:x-canonical-private-synchronous:brightness "Brightness: " -h int:value:"$brightness" -t 1500 --icon display-brightness-symbolic
|
$notify -a brightness_indicator -h string:x-canonical-private-synchronous:brightness "Brightness: " -h int:value:"$brightness" -t 1500 --icon display-brightness-symbolic
|
||||||
else
|
else
|
||||||
$notify --appname=brightness_indicator -h string:x-canonical-private-synchronous:brightness "Brightness: " -h int:value:"$brightness" -t 1500 --icon display-brightness-symbolic
|
$notify -a brightness_indicator -h string:x-canonical-private-synchronous:brightness "Brightness: " -h int:value:$brightness -t 1500 --icon display-brightness-symbolic
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user