From 2e2d581439427f9d694b82960cdd68f5c68426c7 Mon Sep 17 00:00:00 2001 From: José Juan Loeza Sierra Date: Wed, 11 Jun 2025 06:57:26 -0700 Subject: migration from nix home manager --- alacritty/.config/alacritty/alacritty.toml | 38 ++++ .../.config/alacritty/themes/kanagawa_dragon.toml | 38 ++++ emacs/.emacs.d/config.org | 230 +++++++++++++++++++++ emacs/.emacs.d/init.el | 1 + fish/.config/fish/config.fish | 40 ++++ ghostty/.config/ghostty/config | 44 ++++ ghostty/.config/ghostty/themes/iceberg-dark | 22 ++ git/.config/git/config | 10 + git/.config/git/ignore | 2 + helix/.config/helix/config.toml | 42 ++++ helix/.config/helix/languages.toml | 54 +++++ helix/.config/helix/themes/ayu_darkk.toml | 4 + starship/.config/starship.toml | 31 +++ 13 files changed, 556 insertions(+) create mode 100644 alacritty/.config/alacritty/alacritty.toml create mode 100644 alacritty/.config/alacritty/themes/kanagawa_dragon.toml create mode 100644 emacs/.emacs.d/config.org create mode 100644 emacs/.emacs.d/init.el create mode 100644 fish/.config/fish/config.fish create mode 100644 ghostty/.config/ghostty/config create mode 100644 ghostty/.config/ghostty/themes/iceberg-dark create mode 100644 git/.config/git/config create mode 100644 git/.config/git/ignore create mode 100644 helix/.config/helix/config.toml create mode 100644 helix/.config/helix/languages.toml create mode 100644 helix/.config/helix/themes/ayu_darkk.toml create mode 100644 starship/.config/starship.toml diff --git a/alacritty/.config/alacritty/alacritty.toml b/alacritty/.config/alacritty/alacritty.toml new file mode 100644 index 0000000..090208b --- /dev/null +++ b/alacritty/.config/alacritty/alacritty.toml @@ -0,0 +1,38 @@ +[font] +size = 17 +[font.bold] +style = "Heavy" + +[font.normal] +family = "iosevka nerd font" +style = "Regular" + +[general] +import = ["./themes/kanagawa_dragon.toml"] + +[[keyboard.bindings]] +action = "SpawnNewInstance" +key = "N" +mods = "Command|Shift" + +[[keyboard.bindings]] +action = "None" +key = "W" +mods = "Command" + +[window] +blur = true +decorations = "Full" +decorations_theme_variant = "Dark" +dynamic_title = false +opacity = 0.88 +option_as_alt = "OnlyLeft" +title = "☯︎" + +[window.dimensions] +columns = 99 +lines = 33 + +[window.padding] +x = 20 +y = 20 diff --git a/alacritty/.config/alacritty/themes/kanagawa_dragon.toml b/alacritty/.config/alacritty/themes/kanagawa_dragon.toml new file mode 100644 index 0000000..a3dc784 --- /dev/null +++ b/alacritty/.config/alacritty/themes/kanagawa_dragon.toml @@ -0,0 +1,38 @@ +# Colors (Kanagawa Dragon) +# Source https//github.com/rebelot/kanagawa.nvim + +[colors.primary] +background = '#181616' +foreground = '#c5c9c5' + +[colors.normal] +black = '#0d0c0c' +blue = '#8ba4b0' +cyan = '#8ea4a2' +green = '#8a9a7b' +magenta = '#a292a3' +red = '#c4746e' +white = '#C8C093' +yellow = '#c4b28a' + +[colors.bright] +black = '#a6a69c' +blue = '#7FB4CA' +cyan = '#7AA89F' +green = '#87a987' +magenta = '#938AA9' +red = '#E46876' +white = '#c5c9c5' +yellow = '#E6C384' + +[colors.selection] +background = '#2d4f67' +foreground = '#c8c093' + +[[colors.indexed_colors]] +index = 16 +color = '#ffa066' + +[[colors.indexed_colors]] +index = 17 +color = '#ff5d62' diff --git a/emacs/.emacs.d/config.org b/emacs/.emacs.d/config.org new file mode 100644 index 0000000..2632869 --- /dev/null +++ b/emacs/.emacs.d/config.org @@ -0,0 +1,230 @@ +#+TITLE: Jose's Emacs Config + +Setup property for all code-blocks to tangle by default +#+PROPERTY: header-args:emacs-lisp :tangle yes + +* Init +** Package and sources and init +Add MELPA and the https version of elps to the package sources. + +This should preferrably be done in the init-file, before this file is loaded to allow for byte-compiling. +#+BEGIN_SRC emacs-lisp :tangle no +(require 'package) +(setq-default package-archives + '(("gnu" . "https://elpa.gnu.org/packages/") + ("melpa" . "https://melpa.org/packages/"))) + +(setq-default package-enable-at-startup nil) +(package-initialize) +#+END_SRC + +** Set up use-package and install if missing +This should preferrably be done in the init-file, before this file is loaded to allow for byte-compiling. +#+BEGIN_SRC emacs-lisp :tangle no +(unless (package-installed-p 'use-package) + (progn + (package-refresh-contents) + (package-install 'use-package))) + +(require 'use-package) +#+END_SRC + +* Utils +** Evil +Because I'm a vimmer. +Install the evil package if it is not installed, and call it once it has loaded. +`evil-want-C-i-jump` to 'nil fixes an issue where evil breaks tabs in org-mode src code +Thank you to this article for the fix: https://jeffkreeftmeijer.com/emacs-evil-org-tab/ +#+BEGIN_SRC emacs-lisp +(use-package evil + :ensure t + :init + ;; set this to nil because it breaks tabs in org-mode + (setq evil-want-C-i-jump 'nil) + :config + (evil-mode)) +#+END_SRC + +** pdf-tools +for viewing PDFs in emacs +#+begin_src emacs-lisp +(use-package pdf-tools + :ensure t + :config + (pdf-tools-install)) + +(add-hook 'pdf-view-mode-hook + (lambda () + ;; Disable line numbers for pdfs + (display-line-numbers-mode -1) + ;; Enable midnight mode (dark mode) by default + (pdf-view-midnight-minor-mode 1))) +#+end_src + +* Modes +** markdown +Major mode for editing Markdown files +#+begin_src emacs-lisp +(use-package markdown-mode + :ensure) +#+end_src + +** nov.el +Major mode for reading EPUBs +#+begin_src emacs-lisp +(use-package nov + :ensure) +#+end_src + +* Fixes +** Org Source Code Auto-Indent +By default, src-blocks are auto-indented 2 spaces. This breaks certain languages, as org-mode will continuously add 2 spaces on enter inside of some expressions. +Setting indentation to 0 fixes the issue. +#+BEGIN_SRC emacs-lisp +(setq org-edit-src-content-indentation 0) +#+END_SRC + +** Org Inline Images +By default, Org mode displays inline images according to their actual width. By changing this value to nil, org will try to get the width from an ‘#+ATTR.*’ keyword and fall back on the original width if none is found. +#+begin_src emacs-lisp +(setq org-image-actual-width 'nil) +#+end_src + +By default, inline images are not displayed, and must be toggled on with *C-c C-x C-v (org-toggle-inline-images)*. +With this we ask for inline images to be displayed at startup. +#+begin_src emacs-lisp +(setq org-startup-with-inline-images t) +#+end_src + +** Org Latex Preview +The org latex preview from within org files is too small by default. +#+begin_src emacs-lisp +(setq org-format-latex-options + (plist-put org-format-latex-options + :scale 2)) +#+end_src + +Org latex preview uses 'divpng by default, which is blurry. +Here we switch to 'dvivgm +#+begin_src emacs-lisp +(setq org-latex-create-formula-image-program 'dvisvgm) +#+end_src + +* Looks +** Theme +#+BEGIN_SRC emacs-lisp +(use-package gruvbox-theme + :ensure + :demand) + +(use-package ef-themes + :ensure + :demand) + +;; overrides just to make it a little less purple-y +(setq ef-winter-palette-overrides + '((bg-main "#101010") + (bg-mode-line bg-tab-bar))) + +(use-package modus-themes + :ensure + :demand) + +(setq modus-themes-common-palette-overrides modus-themes-preset-overrides-faint) + +(setq modus-vivendi-palette-overrides + '((bg-main "#1E1E1E") + (fg-main "#DCDCDC") + (fg-heading-1 blue-faint) + (fg-heading-2 magenta-faint) + (fg-heading-3 cyan-faint) + (fg-heading-4 gold) + (fg-heading-5 olive) + (fg-heading-6 slate) + (fg-heading-7 indigo) + (fg-heading-8 pink) + (bg-prose-block-contents "#323232") + (bg-prose-block-delimiter "#323232") + (border-mode-line-active "#000000") + (border-mode-line-inactive "#000000"))) + +(setq modus-themes-bold-constructs t) +(setq modus-themes-italic-constructs t) + +(load-theme 'modus-vivendi) +#+END_SRC + +** Font +#+BEGIN_SRC emacs-lisp +(add-to-list 'default-frame-alist + '(font . "iosevka nerd font-16")) +#+END_SRC + +* UI +** Starutp Screen +Disable the startup screen +#+BEGIN_SRC emacs-lisp +(setq inhibit-startup-screen t) +(setq inhibit-startup-message t) +(setq inhibit-startup-echo-area-message t) +#+END_SRC + +** Bars +Disable the menu bar, tool bar, and scroll bar. +#+BEGIN_SRC emacs-lisp +(menu-bar-mode -1) +(tool-bar-mode -1) +(scroll-bar-mode -1) +#+END_SRC + +** Cursor +Disable the blinking cursor +#+BEGIN_SRC emacs-lisp +(blink-cursor-mode -1) +#+END_SRC + +** Scrolling +Scroll only one line (instead of jumping like it does by default) +#+BEGIN_SRC emacs-lisp +(setq scroll-conservatively most-positive-fixnum) +#+END_SRC + +** Line Numbers +Display line numbers, and let the current line be 0 instead of its actual value +#+BEGIN_SRC emacs-lisp +(setq display-line-numbers-type 'relative + display-line-numbers-current-absolute 'nil) +(global-display-line-numbers-mode t) +#+END_SRC + +** Bell +The bell sound is so annoying to me. Disable it. +Future consideration: visible bell is available, but it is big and ugly. Maybe customize in the future. +#+BEGIN_SRC emacs-lisp +(setq ring-bell-function 'ignore) +#+END_SRC + +* UX +** Org Agenda +Custom org agenda views +#+begin_src emacs-lisp +(setq org-agenda-custom-commands + '(("w" "my weekly" agenda "" + ((org-agenda-span 365) + (org-agenda-time-grid nil) + (org-agenda-repeating-timestamp-show-all t) + (org-agenda-entry-types '(:timestamp :sexp)))) + )) +#+end_src +* Languages +#+BEGIN_SRC emacs-lisp +(org-babel-do-load-languages + 'org-babel-load-languages + '((python . t))) +#+END_SRC + +configure python +#+begin_src emacs-lisp +(setq python-indent-offset 4 + python-indent-guess-indent-offset 'nil) +#+end_src diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el new file mode 100644 index 0000000..f12efca --- /dev/null +++ b/emacs/.emacs.d/init.el @@ -0,0 +1 @@ +(org-babel-load-file (expand-file-name "config.org" user-emacs-directory)) diff --git a/fish/.config/fish/config.fish b/fish/.config/fish/config.fish new file mode 100644 index 0000000..8ff94d3 --- /dev/null +++ b/fish/.config/fish/config.fish @@ -0,0 +1,40 @@ +# Setup Homebrew +# Source of code: https://github.com/orgs/Homebrew/discussions/4412#discussioncomment-8651316 +if test -d /home/linuxbrew/.linuxbrew # Linux + set -gx HOMEBREW_PREFIX "/home/linuxbrew/.linuxbrew" + set -gx HOMEBREW_CELLAR "$HOMEBREW_PREFIX/Cellar" + set -gx HOMEBREW_REPOSITORY "$HOMEBREW_PREFIX/Homebrew" +else if test -d /opt/homebrew # MacOS + set -gx HOMEBREW_PREFIX /opt/homebrew + set -gx HOMEBREW_CELLAR "$HOMEBREW_PREFIX/Cellar" + set -gx HOMEBREW_REPOSITORY "$HOMEBREW_PREFIX/homebrew" + # Add SSH key to ssh-agent and store passphrase + # see https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent + ssh-add --apple-use-keychain ~/.ssh/id_ed25519 +end +fish_add_path -gP "$HOMEBREW_PREFIX/bin" "$HOMEBREW_PREFIX/sbin" +! set -q MANPATH; and set MANPATH '' +set -gx MANPATH "$HOMEBREW_PREFIX/share/man" $MANPATH +! set -q INFOPATH; and set INFOPATH '' +set -gx INFOPATH "$HOMEBREW_PREFIX/share/info" $INFOPATH + +# Hook direnv +# Source: https://direnv.net/docs/hook.html +direnv hook fish | source + +# the reverse of fish_remove_path +# fish doesn't provide this out of the box, so we provide our own +# see https://fishshell.com/docs/current/cmds/fish_add_path.html#index-8 for fish_add_path +# source: https://github.com/fish-shell/fish-shell/issues/8604#issuecomment-1169638533 +function fish_remove_path + if set -l index (contains -i "$argv" $fish_user_paths) + set -e fish_user_paths[$index] + echo "Removed $argv from the path" + end +end + +# Kitty shell alias +alias ks="kitten ssh" + +# Starship +starship init fish | source diff --git a/ghostty/.config/ghostty/config b/ghostty/.config/ghostty/config new file mode 100644 index 0000000..9246382 --- /dev/null +++ b/ghostty/.config/ghostty/config @@ -0,0 +1,44 @@ +# Ghostty config + +font-family = "PragmataPro Mono Liga" + +font-style = Regular +font-style-bold = Bold +font-style-italic = Italic +font-style-bold-italic = Bold Italic + +font-size = 19 + +# theme from https://terminalcolors.com/themes/iceberg/dark/ +theme = "iceberg-dark" +background = #0f1419 +foreground = #c5c9c5 + +title = "󰊠" + +macos-titlebar-style = "tabs" + +window-padding-x = 20 +window-padding-y = 20 + +# Split keybinds +keybind = super+ctrl+h=new_split:left +keybind = super+ctrl+j=new_split:down +keybind = super+ctrl+k=new_split:up +keybind = super+ctrl+l=new_split:right + +keybind = super+shift+h=goto_split:left +keybind = super+shift+j=goto_split:bottom +keybind = super+shift+k=goto_split:top +keybind = super+shift+l=goto_split:right + +keybind = super+alt+h=resize_split:left,10 +keybind = super+alt+j=resize_split:down,10 +keybind = super+alt+k=resize_split:up,10 +keybind = super+alt+l=resize_split:right,10 + +keybind = super+left_bracket=goto_split:previous +keybind = super+right_bracket=goto_split:next + +keybind = super+shift+enter=toggle_split_zoom +keybind = super+alt+equal=equalize_splits diff --git a/ghostty/.config/ghostty/themes/iceberg-dark b/ghostty/.config/ghostty/themes/iceberg-dark new file mode 100644 index 0000000..d2c41d3 --- /dev/null +++ b/ghostty/.config/ghostty/themes/iceberg-dark @@ -0,0 +1,22 @@ +background = #161821 +foreground = #c6c8d1 +selection-background = #272c42 +selection-foreground = #c6c8d1 +cursor-color = #c6c8d1 +cursor-text = #161821 +palette = 0=#1e2132 +palette = 1=#e27878 +palette = 2=#b4be82 +palette = 3=#e2a478 +palette = 4=#84a0c6 +palette = 5=#a093c7 +palette = 6=#89b8c2 +palette = 7=#c6c8d1 +palette = 8=#6b7089 +palette = 9=#e98989 +palette = 10=#c0ca8e +palette = 11=#e9b189 +palette = 12=#91acd1 +palette = 13=#ada0d3 +palette = 14=#95c4ce +palette = 15=#d2d4de diff --git a/git/.config/git/config b/git/.config/git/config new file mode 100644 index 0000000..8387076 --- /dev/null +++ b/git/.config/git/config @@ -0,0 +1,10 @@ + +[core] + editor = "vim" + +[init] + defaultBranch = "main" + +[user] + email = "yo@joseloeza.dev" + name = "José Loeza" diff --git a/git/.config/git/ignore b/git/.config/git/ignore new file mode 100644 index 0000000..143e502 --- /dev/null +++ b/git/.config/git/ignore @@ -0,0 +1,2 @@ +**/.DS_Store +**/._.DS_Store diff --git a/helix/.config/helix/config.toml b/helix/.config/helix/config.toml new file mode 100644 index 0000000..4d08cd8 --- /dev/null +++ b/helix/.config/helix/config.toml @@ -0,0 +1,42 @@ +theme = "ayu_darkk" + +[editor] +"line-number" = "relative" + +[editor.soft-wrap] +enable = true + +[editor.lsp] +"display-messages" = false +"display-inlay-hints" = false + +[keys.normal] +# Use system clipboard +p = "paste_clipboard_after" +P = "paste_clipboard_before" +y = "yank_to_clipboard" +Y = "yank_joined_to_clipboard" +R = "replace_selections_with_clipboard" +d = "delete_selection_noyank" +"A-d" = ["yank_to_clipboard", "delete_selection_noyank"] + +"0" = "goto_line_start" +"C-," = "remove_primary_selection" + +[keys.select] +# Use system clipboard +p = "paste_clipboard_after" +P = "paste_clipboard_before" +y = "yank_to_clipboard" +Y = "yank_joined_to_clipboard" +R = "replace_selections_with_clipboard" +d = "delete_selection_noyank" +"A-d" = ["yank_to_clipboard", "delete_selection_noyank"] + +"0" = "goto_line_start" + +[keys.normal." "] +y = "yank" +p = "paste_after" +P = "paste_before" +R = "replace_with_yanked" diff --git a/helix/.config/helix/languages.toml b/helix/.config/helix/languages.toml new file mode 100644 index 0000000..d0bcab0 --- /dev/null +++ b/helix/.config/helix/languages.toml @@ -0,0 +1,54 @@ +[[language]] +name = "rust" +formatter = { command = "rustfmt" } +rulers = [80, 100] + +[[language]] +name = "nix" +formatter = { command = "nixfmt" } +auto-format = true + +[[language]] +name = "typst" +formatter = { command="typstyle" } +auto-format = true +rulers = [80] + +[[language]] +name = "astro" +language-servers = [ "astro-ls" ] +formatter = { command = "prettier", args = ["--plugin", "prettier-plugin-astro", "--parser", "astro"] } +auto-format = true + +[language-server.astro-ls] +command = "astro-ls" +args = ["--stdio"] +# because astro-ls requires the path to typescript, +# hx must be started within the Astro project root for this to work +# see https://github.com/helix-editor/helix/discussions/4743 +config = { "typescript" = { "tsdk" = "./node_modules/typescript/lib" } } + +[[language]] +name = "html" +formatter = { command="prettier", args = ["--parser", "html"] } +auto-format = true + +[[language]] +name = "css" +formatter = { command="prettier", args = ["--parser", "css"] } +auto-format = true + +[[language]] +name = "javascript" +formatter = { command="prettier", args = ["--parser", "babel"] } +auto-format = true + +[[language]] +name = "typescript" +formatter = { command="prettier", args = ["--parser", "typescript"] } +auto-format = true + +[[language]] +name = "jsx" +formatter = { command="prettier", args = ["--parser", "babel"] } +auto-format = true diff --git a/helix/.config/helix/themes/ayu_darkk.toml b/helix/.config/helix/themes/ayu_darkk.toml new file mode 100644 index 0000000..7a2373c --- /dev/null +++ b/helix/.config/helix/themes/ayu_darkk.toml @@ -0,0 +1,4 @@ +inherits = "ayu_dark" + +# Remove background color +"ui.background" = {} diff --git a/starship/.config/starship.toml b/starship/.config/starship.toml new file mode 100644 index 0000000..8ccb289 --- /dev/null +++ b/starship/.config/starship.toml @@ -0,0 +1,31 @@ +format = "$username$hostname$directory$git_branch$git_commit$git_state$git_status$cmd_duration$line_break$character" +[character] +error_symbol = "[\\$ ](bold red)" +format = "$symbol" +success_symbol = "[\\$ ](bold yellow)" + +[git_branch] +format = "[$symbol$branch(:$remote_branch)]($style) " +only_attached = false +style = "bold green" +symbol = " " + +[git_commit] +format = "[( $hash $tag)]($style) " +style = "bold green" +tag_disabled = false +tag_symbol = " " + +[git_status] +format = "[($all_status$ahead_behind)]($style)" +style = "bold red" + +[hostname] +format = "[$ssh_symbol$hostname]($style) " +ssh_only = false +style = "italic purple" + +[username] +format = "[$user@]($style)" +show_always = true +style_user = "bold purple" -- cgit v1.3