Compare commits

...

2 commits

Author SHA1 Message Date
3751fdf3da
prettifying emacs a bit 2025-07-27 16:42:46 -07:00
ce39e84b90
back on GNOME 2025-07-27 16:42:15 -07:00
6 changed files with 214 additions and 107 deletions

View file

@ -92,44 +92,23 @@
:config :config
(setq fontaine-presets (setq fontaine-presets
'((regular '((regular
:default-height 150) :default-height 130)
(small (small
:default-height 110) :default-height 80)
(large (large
:default-weight semilight :default-weight semilight
:default-height 180 :default-height 150
:bold-weight extrabold) :bold-weight extrabold)
(extra-large (extra-large
:default-weight semilight :default-weight semilight
:default-height 210 :default-height 180
:bold-weight extrabold) :bold-weight extrabold)
(t (t
:default-family "Iosevka Nerd Font" :default-family "AdwaitaMono Nerd Font"
:default-weight normal :default-weight normal
:variable-pitch-family "Inter"))) :variable-pitch-family "Adwaita Sans")))
(fontaine-set-preset 'regular)) (fontaine-set-preset 'regular))
#+end_src #+end_src
** Ligatures
#+begin_src emacs-lisp
(use-package ligature
:config
(ligature-set-ligatures 't '("www"))
(ligature-set-ligatures 'eww-mode '("ff" "fi" "ffi"))
(ligature-set-ligatures 'prog-mode '("|||>" "<|||" "<==>" "<!--" "####" "~~>" "***" "||=" "||>"
":::" "::=" "=:=" "===" "==>" "=!=" "=>>" "=<<" "=/=" "!=="
"!!." ">=>" ">>=" ">>>" ">>-" ">->" "->>" "-->" "---" "-<<"
"<~~" "<~>" "<*>" "<||" "<|>" "<$>" "<==" "<=>" "<=<" "<->"
"<--" "<-<" "<<=" "<<-" "<<<" "<+>" "</>" "###" "#_(" "..<"
"..." "+++" "/==" "///" "_|_" "www" "&&" "^=" "~~" "~@" "~="
"~>" "~-" "**" "*>" "*/" "||" "|}" "|]" "|=" "|>" "|-" "{|"
"[|" "]#" "::" ":=" ":>" ":<" "$>" "==" "=>" "!=" "!!" ">:"
">=" ">>" ">-" "-~" "-|" "->" "--" "-<" "<~" "<*" "<|" "<:"
"<$" "<=" "<>" "<-" "<<" "<+" "</" "#{" "#[" "#:" "#=" "#!"
"##" "#(" "#?" "#_" "%%" ".=" ".-" ".." ".?" "+>" "++" "?:"
"?=" "?." "??" ";;" "/*" "/=" "/>" "//" "__" "~~" "(*" "*)"
"\\\\" "://"))
(global-ligature-mode t))
#+end_src
** Which key ** Which key
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package which-key (use-package which-key
@ -140,12 +119,6 @@
(setq which-key-idle-delay 0.3)) (setq which-key-idle-delay 0.3))
#+end_src #+end_src
** Theme ** Theme
*** Catppuccin
#+begin_src emacs-lisp
(use-package catppuccin-theme
:config
(load-theme 'catppuccin :no-confirm))
#+end_src
*** Modus Themes *** Modus Themes
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package emacs (use-package emacs
@ -153,11 +126,52 @@
(require-theme 'modus-themes) (require-theme 'modus-themes)
(setq modus-themes-italic-constructs t (setq modus-themes-italic-constructs t
modus-themes-bold-constructs t modus-themes-bold-constructs t
modus-themes-links '(no-underline background faint) modus-themes-links '(no-underline background faint)
modus-themes-prompts '(bold intense) modus-themes-prompts '(bold intense)
modus-themes-mode-line '(borderless accented moody) modus-themes-mode-line '(borderless accented moody)
modus-themes-org-blocks 'gray-background modus-themes-org-blocks 'gray-background
modus-themes-region '(bg-only no-extend))) modus-themes-region '(bg-only no-extend)))
;; (load-theme 'modus-vivendi :no-confirm))
#+end_src
*** Doom Themes
#+begin_src emacs-lisp
(use-package doom-themes
:custom
(doom-themes-enable-bold t)
(doom-themes-enable-italic t)
:config
(load-theme 'doom-gruvbox t)
(doom-themes-visual-bell-config)
(doom-themes-org-config))
#+end_src
*** Italic keywords
#+begin_src emacs-lisp
(advice-add #'load-theme :after (lambda (&rest _) (set-face-italic 'font-lock-keyword-face t)))
#+end_src
** Line Numbers
#+begin_src emacs-lisp
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
#+end_src
** Modeline
#+begin_src emacs-lisp
(use-package doom-modeline
:init (doom-modeline-mode 1))
#+end_src
** Smooth Scroll
#+begin_src emacs-lisp
(use-package ultra-scroll
:init
(setq scroll-conservatively 3
scroll-margin 0)
:config
(ultra-scroll-mode 1))
#+end_src
* Functionality
** Navigation
*** Ace-Window
#+begin_src emacs-lisp
(use-package ace-window
:bind (("M-o" . ace-window)))
#+end_src #+end_src
* Completion * Completion
** Vertico ** Vertico
@ -284,8 +298,8 @@
* Languages * Languages
** Agda ** Agda
#+begin_src emacs-lisp #+begin_src emacs-lisp
; (load-file (let ((coding-system-for-read 'utf-8)) (load-file (let ((coding-system-for-read 'utf-8))
; (shell-command-to-string "agda-mode locate"))) (shell-command-to-string "agda-mode locate")))
#+end_src #+end_src
** PG ** PG
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -293,24 +307,24 @@
#+end_src #+end_src
** Idris ** Idris
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package idris2-mode (use-package idris-mode
:straight (:type git
:host github
:repo "idris-community/idris2-mode"))
#+end_src
** C
#+begin_src emacs-lisp
(use-package emacs
:hook
(c-mode . electric-pair-mode)
:custom :custom
(c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "linux")))) (idris-interpreter-path "idris2"))
#+end_src #+end_src
** Prolog
** Haskell
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package ediprolog (use-package haskell-mode)
:bind (("C-c C-e" . ediprolog-dwim)))
#+end_src #+end_src
** Rust
#+begin_src emacs-lisp
(use-package rust-mode
:init
(setq rust-mode-treesitter-derive t)
:hook
(rust-mode-hook . eglot-ensure))
#+end_src
* Latex * Latex
** Auctex ** Auctex
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -407,31 +421,6 @@
I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/][here]] in order to have much better LaTeX previews. This is eventually supposed to be merged into emacs proper, which would be nice. I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/][here]] in order to have much better LaTeX previews. This is eventually supposed to be merged into emacs proper, which would be nice.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package org (use-package org
:defer
:straight `(org
:fork (:host nil
:repo "https://git.tecosaur.net/tec/org-mode.git"
:branch "dev"
:remote "tecosaur")
:files (:defaults "etc")
:build t
:pre-build
(with-temp-file "org-version.el"
(require 'lisp-mnt)
(let ((version
(with-temp-buffer
(insert-file-contents "lisp/org.el")
(lm-header "version")))
(git-version
(string-trim
(with-temp-buffer
(call-process "git" nil t nil "rev-parse" "--short" "HEAD")
(buffer-string)))))
(insert
(format "(defun org-release () \"The release version of Org.\" %S)\n" version)
(format "(defun org-git-version () \"The truncate git commit hash of Org mode.\" %S)\n" git-version)
"(provide 'org-version)\n")))
:pin nil)
:init :init
(setq org-list-allow-alphabetical t) (setq org-list-allow-alphabetical t)
:custom :custom
@ -440,7 +429,6 @@ I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/
(org-startup-with-inline-images t) (org-startup-with-inline-images t)
(org-image-actual-width '(300)) (org-image-actual-width '(300))
(org-export-with-smart-quotes t) (org-export-with-smart-quotes t)
(org-latex-preview-live t)
(org-directory "~/Nextcloud/org") (org-directory "~/Nextcloud/org")
(org-cite-global-bibliography '("~/Nextcloud/library.bib")) (org-cite-global-bibliography '("~/Nextcloud/library.bib"))
(org-agenda-files `(,org-directory)) (org-agenda-files `(,org-directory))
@ -448,13 +436,31 @@ I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/
'("/todo.org" "/done.org"))) '("/todo.org" "/done.org")))
:after ox-latex :after ox-latex
:config :config
(setq org-format-latex-options (plist-put org-format-latex-options :scale 0.6))
(add-to-list 'org-latex-classes '("myreport" "\\documentclass[11pt]{report}" (add-to-list 'org-latex-classes '("myreport" "\\documentclass[11pt]{report}"
("\\chapter{%s}" . "\\chapter*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}") ("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))) ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
(require 'org-tempo) (require 'org-tempo)
(add-to-list 'org-src-lang-modes '("latex-macros" . latex))
(defvar org-babel-default-header-args:latex-macros
'((:results . "raw")
(:exports . "results")))
(defun prefix-all-lines (pre body)
(with-temp-buffer
(insert body)
(string-insert-rectangle (point-min) (point-max) pre)
(buffer-string)))
(defun org-babel-execute:latex-macros (body _params)
(concat
(prefix-all-lines "#+LATEX_HEADER: " body)
"\n#+HTML_HEAD_EXTRA: <div style=\"display: none\"> \\(\n"
(prefix-all-lines "#+HTML_HEAD_EXTRA: " body)
"\n#+HTML_HEAD_EXTRA: \\)</div>\n"))
:bind (("C-c c" . org-capture) :bind (("C-c c" . org-capture)
("C-c l" . org-store-link) ("C-c l" . org-store-link)
("C-c a" . org-agenda)) ("C-c a" . org-agenda))
@ -476,6 +482,99 @@ I'm using the fork as described [[https://abode.karthinks.com/org-latex-preview/
(require 'oc-natbib) (require 'oc-natbib)
(require 'oc-biblatex) (require 'oc-biblatex)
#+end_src #+end_src
** Org Roam
#+begin_src emacs-lisp
(use-package org-roam
:ensure t
:custom
(org-roam-directory (file-truename "~/Nextcloud/org/roam"))
(org-roam-completion-everywhere t)
:bind (("C-c n f" . org-roam-node-find)
("C-c n i" . org-roam-node-insert)
("C-c n c" . org-roam-capture))
:config
(org-roam-setup)
(setq org-roam-capture-templates
'(("d" "Definition"
plain "%?"
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+filetags: :definition:%^{Additional tag (e.g. set_theory, model_theory, computability): }:\n")
:unnarrowed t)
("c" "Chess"
plain "%?"
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+filetags: :chess:%^{Additional tag (e.g. set_theory, model_theory, computability): }:\n")
:unnarrowed t)
("t" "Theorem"
plain "%?"
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
"#+title: ${title}\n#+filetags: :theorem:%^{Additional tag (e.g. set_theory, model_theory, computability): }:\n")
:unnarrowed t))))
#+end_src
#+begin_src emacs-lisp
(use-package consult-org-roam
:ensure t
:after org-roam
:init
(require 'consult-org-roam)
(consult-org-roam-mode 1)
:custom
(consult-org-roam-grep-func #'consult-ripgrep)
(consult-org-roam-buffer-narrow-key ?r)
(consult-org-roam-buffer-after-buffers t)
:config
(consult-customize
consult-org-roam-forward-links
:preview-key "M-.")
:bind
("C-c n e" . consult-org-roam-file-find)
("C-c n b" . consult-org-roam-backlinks)
("C-c n B" . consult-org-roam-backlinks-recursive)
("C-c n l" . consult-org-roam-forward-links)
("C-c n r" . consult-org-roam-search))
#+end_src
#+begin_src emacs-lisp
(use-package org-roam-ui
:straight
(:host github :repo "org-roam/org-roam-ui" :branch "main" :files ("*.el" "out"))
:after org-roam
:config
(setq org-roam-ui-sync-theme t
org-roam-ui-follow t
org-roam-ui-update-on-save t
org-roam-ui-open-on-start t))
#+end_src
** Org Bloggy stuff
#+begin_src emacs-lisp
(defconst my-blog-org-dir "~/Documents/test/blog/org/")
(defconst my-blog-public-dir "~/Documents/test/blog/html")
(setq org-publish-project-alist
`(("my-logic-blog"
:base-directory ,my-blog-org-dir
:publishing-directory ,my-blog-public-dir
:base-extension "org"
:recursive t
:publishing-function org-html-publish-to-html
:auto-sitemap t
:sitemap-filename "index.org"
:sitemap-title "William's Blog"
:sitemap-style list
:html-head "<link rel=\"stylesheet\" href=\"/style.css\" type=\"text/css\"/>"
:html-preamble t
:html-preamble-format (("en" "<div class=\"blog-header\"><a href=\"index.html\">&larr; Back to Blog Index</a></div>"))
)
("my-logic-blog-static"
:base-directory ,my-blog-org-dir
:publishing-directory ,my-blog-public-dir
:base-extension "css\\|js\\|png\\|jpg\\|jpeg\\|gif\\|svg\\|ico\\|mp4"
:recursive t
:publishing-function org-publish-attachment
:exclude ".*\\.org$"
)))
#+end_src
* Pdfs * Pdfs
** Pdf tools ** Pdf tools
#+begin_src emacs-lisp #+begin_src emacs-lisp

View file

@ -3,28 +3,28 @@ return {
'norcalli/nvim-colorizer.lua', 'norcalli/nvim-colorizer.lua',
config = true config = true
}, },
{
'catppuccin/nvim',
name = 'catppuccin',
priority = 1000,
config = function()
require('catppuccin').setup({
transparent_background = true,
})
vim.cmd.colorscheme([[catppuccin-mocha]])
end
},
-- { -- {
-- "Mofiqul/adwaita.nvim", -- 'catppuccin/nvim',
-- lazy = false, -- name = 'catppuccin',
-- priority = 1000, -- priority = 1000,
--
-- -- configure and set on startup
-- config = function() -- config = function()
-- -- vim.g.adwaita_darker = true -- for darker version -- require('catppuccin').setup({
-- -- vim.g.adwaita_disable_cursorline = true -- to disable cursorline -- transparent_background = true,
-- vim.g.adwaita_transparent = true -- makes the background transparent -- })
-- vim.cmd('colorscheme adwaita') -- vim.cmd.colorscheme([[catppuccin-mocha]])
-- end -- end
-- } -- },
{
"Mofiqul/adwaita.nvim",
lazy = false,
priority = 1000,
-- configure and set on startup
config = function()
vim.g.adwaita_darker = true -- for darker version
-- vim.g.adwaita_disable_cursorline = true -- to disable cursorline
vim.g.adwaita_transparent = true -- makes the background transparent
vim.cmd('colorscheme adwaita')
end
}
} }

View file

@ -1,8 +1,10 @@
#!/bin/sh #!/bin/sh
prefix=$HOME/Nextcloud/Books/ prefix=$HOME/Nextcloud/Books/
dmenu="bemenu -p books --center --list 20 down --width-factor 0.5 --border 2 --bdr #f6c2e7" dmenu="pipemenu --title Books"
pdf=zathura # dmenu="bemenu -p books --center --list 20 down --width-factor 0.5 --border 2 --bdr #f6c2e7"
# pdf=zathura
pdf="flatpak run org.gnome.Papers"
choice=$(find $prefix -type f | sed "s|$prefix||;s/_/ /g" | $dmenu) choice=$(find $prefix -type f | sed "s|$prefix||;s/_/ /g" | $dmenu)

View file

@ -1,8 +1,10 @@
#!/bin/sh #!/bin/sh
prefix=$HOME/Nextcloud/Papers/ prefix=$HOME/Nextcloud/Papers/
dmenu="bemenu -p papers --center --list 20 down --width-factor 0.5 --border 2 --bdr #f6c2e7" dmenu="pipemenu --title Papers"
pdf=zathura # dmenu="bemenu -p papers --center --list 20 down --width-factor 0.5 --border 2 --bdr #f6c2e7"
# pdf=zathura
pdf="flatpak run org.gnome.Papers"
choice=$(find $prefix -type f | sed "s|$prefix||;s/_/ /g" | $dmenu) choice=$(find $prefix -type f | sed "s|$prefix||;s/_/ /g" | $dmenu)

View file

@ -41,8 +41,8 @@ zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
# plugins # plugins
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# zoxide # zoxide
eval "$(zoxide init zsh)" eval "$(zoxide init zsh)"

View file

@ -1,2 +1,6 @@
export XDG_CONFIG_HOME="$HOME/.config" export XDG_CONFIG_HOME="$HOME/.config"
export ZDOTDIR="$XDG_CONFIG_HOME/zsh" export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
. "/home/wball/.local/share/cargo/env"
if [ -e /home/wball/.nix-profile/etc/profile.d/nix.sh ]; then . /home/wball/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
[[ ! -r '/home/wball/.local/share/opam/opam-init/init.zsh' ]] || source '/home/wball/.local/share/opam/opam-init/init.zsh' > /dev/null 2> /dev/null