From ea73642a3c82b5e58f6f7f42878bc695e7189efe Mon Sep 17 00:00:00 2001 From: Nate Cox Date: Wed, 13 May 2026 11:25:07 -0700 Subject: Initial commit --- .bash_aliases | 2 + .bash_profile | 5 + .bashrc | 10 ++ .config/kanata/kanata.kbd | 40 ++++++ .config/niri/cfg/animation.kdl | 32 +++++ .config/niri/cfg/autostart.kdl | 4 + .config/niri/cfg/display.kdl | 9 ++ .config/niri/cfg/input.kdl | 32 +++++ .config/niri/cfg/keybinds.kdl | 137 +++++++++++++++++++++ .config/niri/cfg/layout.kdl | 14 +++ .config/niri/cfg/misc.kdl | 25 ++++ .config/niri/cfg/rules.kdl | 42 +++++++ .config/niri/config.kdl | 10 ++ .config/niri/noctalia.kdl | 35 ++++++ .config/nvim/init.lua | 107 ++++++++++++++++ .../user/default.target.wants/kanata.service | 1 + .config/systemd/user/kanata.service | 12 ++ .emacs.d/.#init.el | 1 + .emacs.d/early-init.el | 13 ++ .emacs.d/init.el | 113 +++++++++++++++++ .gitconfig | 8 ++ .zshenv | 0 .zshrc | 1 + 23 files changed, 653 insertions(+) create mode 100644 .bash_aliases create mode 100644 .bash_profile create mode 100644 .bashrc create mode 100644 .config/kanata/kanata.kbd create mode 100644 .config/niri/cfg/animation.kdl create mode 100644 .config/niri/cfg/autostart.kdl create mode 100644 .config/niri/cfg/display.kdl create mode 100644 .config/niri/cfg/input.kdl create mode 100644 .config/niri/cfg/keybinds.kdl create mode 100644 .config/niri/cfg/layout.kdl create mode 100644 .config/niri/cfg/misc.kdl create mode 100644 .config/niri/cfg/rules.kdl create mode 100644 .config/niri/config.kdl create mode 100644 .config/niri/noctalia.kdl create mode 100644 .config/nvim/init.lua create mode 120000 .config/systemd/user/default.target.wants/kanata.service create mode 100644 .config/systemd/user/kanata.service create mode 120000 .emacs.d/.#init.el create mode 100644 .emacs.d/early-init.el create mode 100644 .emacs.d/init.el create mode 100644 .gitconfig create mode 100644 .zshenv create mode 100644 .zshrc diff --git a/.bash_aliases b/.bash_aliases new file mode 100644 index 0000000..75cd834 --- /dev/null +++ b/.bash_aliases @@ -0,0 +1,2 @@ +alias cd="z" +alias cat="bat" diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..5545f00 --- /dev/null +++ b/.bash_profile @@ -0,0 +1,5 @@ +# +# ~/.bash_profile +# + +[[ -f ~/.bashrc ]] && . ~/.bashrc diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..9283825 --- /dev/null +++ b/.bashrc @@ -0,0 +1,10 @@ +# +# ~/.bashrc +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +alias ls='ls --color=auto' +alias grep='grep --color=auto' +PS1='[\u@\h \W]\$ ' diff --git a/.config/kanata/kanata.kbd b/.config/kanata/kanata.kbd new file mode 100644 index 0000000..345768f --- /dev/null +++ b/.config/kanata/kanata.kbd @@ -0,0 +1,40 @@ +(defcfg + linux-dev-names-include ("AT Translated Set 2 keyboard") + process-unmapped-keys yes + log-layer-changes no) + +(defvar + tt 200 ;; tap time + ht 250 ;; hold time + ) + +(deflocalkeys-linux + a 65 + r 82 + s 83 + t 84 + n 78 + e 69 + i 73 + o 79 + v 86) + +(defalias + a (tap-hold $tt $ht a lmet) + r (tap-hold $tt $ht r lalt) + s (tap-hold $tt $ht s lctl) + t (tap-hold $tt $ht t lsft) + n (tap-hold $tt $ht n rsft) + e (tap-hold $tt $ht e rctl) + i (tap-hold $tt $ht i ralt) + o (tap-hold $tt $ht o rmet) + v (tap-hold $tt $ht v (layer-toggle arrows))) + +(defsrc + a r s t n e i o) + +(deflayer default + @a @r @s @t @n @e @i @o) + +(deflayer arrows + _ _ _ _ left up rght down) diff --git a/.config/niri/cfg/animation.kdl b/.config/niri/cfg/animation.kdl new file mode 100644 index 0000000..4c9a913 --- /dev/null +++ b/.config/niri/cfg/animation.kdl @@ -0,0 +1,32 @@ + animations { + workspace-switch { + spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001 + } + window-open { + duration-ms 200 + curve "ease-out-quad" + } + window-close { + duration-ms 200 + curve "ease-out-cubic" + } + horizontal-view-movement { + spring damping-ratio=1.0 stiffness=900 epsilon=0.0001 + } + window-movement { + spring damping-ratio=1.0 stiffness=800 epsilon=0.0001 + } + window-resize { + spring damping-ratio=1.0 stiffness=1000 epsilon=0.0001 + } + config-notification-open-close { + spring damping-ratio=0.6 stiffness=1200 epsilon=0.001 + } + screenshot-ui-open { + duration-ms 300 + curve "ease-out-quad" + } + overview-open-close { + spring damping-ratio=1.0 stiffness=900 epsilon=0.0001 + } + } diff --git a/.config/niri/cfg/autostart.kdl b/.config/niri/cfg/autostart.kdl new file mode 100644 index 0000000..f6f0187 --- /dev/null +++ b/.config/niri/cfg/autostart.kdl @@ -0,0 +1,4 @@ +// ────────────── Startup Applications ────────────── +// https://github.com/YaLTeR/niri/wiki/Configuration:-Miscellaneous#spawn-sh-at-startup + + spawn-sh-at-startup "qs -c noctalia-shell" diff --git a/.config/niri/cfg/display.kdl b/.config/niri/cfg/display.kdl new file mode 100644 index 0000000..89f338b --- /dev/null +++ b/.config/niri/cfg/display.kdl @@ -0,0 +1,9 @@ +// ────────────── Output Configuration ────────────── +// You can run `niri msg outputs` to get the correct name for your displays. +// You will have to remove "/-" and edit it before it takes effect. +// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs + +/- output "DP-1" { + mode "2560x1440@359.979" // Set resolution and refresh rate + scale 1 // No scaling (use 2 for HiDPI) +} \ No newline at end of file diff --git a/.config/niri/cfg/input.kdl b/.config/niri/cfg/input.kdl new file mode 100644 index 0000000..b897a22 --- /dev/null +++ b/.config/niri/cfg/input.kdl @@ -0,0 +1,32 @@ +// ────────────── Input Configuration ────────────── +// https://github.com/YaLTeR/niri/wiki/Configuration:-Input + +input { + keyboard { + xkb { + //If you want to overwrite your keyboard layout, + // uncomment the line below and change the layout accordingly. + layout "us,us" + variant "colemak_dh_iso," + options "grp:win_space_toggle" + } + numlock // Enable numlock on startup + } + + touchpad { + // tap // Enable tap-to-click + dwt // disable while typing + click-method "clickfinger" + natural-scroll // Enable natural (macOS-style) scrolling + } + + mouse { + // If you want to disable Mouse Acceleration, + // uncomment the lines below. + //accel-profile "flat" + //accel-speed 0.0 + } + + focus-follows-mouse // Automatically focus windows under the mouse pointer + workspace-auto-back-and-forth // Enable workspace back & forth switching +} diff --git a/.config/niri/cfg/keybinds.kdl b/.config/niri/cfg/keybinds.kdl new file mode 100644 index 0000000..21563cd --- /dev/null +++ b/.config/niri/cfg/keybinds.kdl @@ -0,0 +1,137 @@ +binds { + + // ────────────── Keybindings ────────────── + // https://github.com/YaLTeR/niri/wiki/Configuration:-Key-Bindings + + // ─── noctalia-shell keybinds ─── + // https://docs.noctalia.dev/getting-started/keybinds/ + + Mod+Shift+ESCAPE { show-hotkey-overlay; } + + // ─── Applications ─── + Mod+Return hotkey-overlay-title="Open Terminal: Foot" { spawn "foot"; } + Mod+CTRL+Return hotkey-overlay-title="Open App Launcher: noctalia launcher" { spawn-sh "qs -c noctalia-shell ipc call launcher toggle"; } + Mod+B hotkey-overlay-title="Open Browser: Helium" { spawn "helium-browser"; } + Mod+ALT+L hotkey-overlay-title="Lock Screen: noctalia lock" { spawn-sh "qs -c noctalia-shell ipc call lockScreen lock"; } + Mod+Shift+Q hotkey-overlay-title="Session Menu: noctalia sessionMenu" { spawn-sh "qs -c noctalia-shell ipc call sessionMenu toggle"; } + + // Please choose your own file manager. + Mod+E hotkey-overlay-title="File Manager: Nautilus" { spawn "nautilus"; } + + // ─── Media Controls ─── + XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume increase"; } + XF86AudioLowerVolume allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume decrease"; } + XF86AudioMute allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume muteOutput"; } + XF86AudioMicMute allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call volume muteInput"; } + XF86AudioNext allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media next"; } + XF86AudioPrev allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media previous"; } + XF86AudioPlay allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media playPause"; } + XF86AudioPause allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call media playPause"; } + + // ─── Brightness Controls ─── + XF86MonBrightnessUp allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call brightness increase"; } + XF86MonBrightnessDown allow-when-locked=true { spawn-sh "qs -c noctalia-shell ipc call brightness decrease"; } + + // ─── Window Movement and Focus ─── + Mod+Q { close-window; } + + Mod+Left { focus-column-left; } + Mod+H { focus-column-left; } + Mod+Right { focus-column-right; } + Mod+L { focus-column-right; } + Mod+Up { focus-window-up; } + Mod+K { focus-window-up; } + Mod+Down { focus-window-down; } + Mod+J { focus-window-down; } + + Mod+CTRL+Left { move-column-left; } + Mod+CTRL+H { move-column-left; } + Mod+CTRL+Right { move-column-right; } + Mod+CTRL+L { move-column-right; } + Mod+CTRL+UP { move-window-up; } + Mod+CTRL+K { move-window-up; } + Mod+CTRL+Down { move-window-down; } + Mod+CTRL+J { move-window-down; } + + Mod+Home { focus-column-first; } + Mod+End { focus-column-last; } + Mod+CTRL+Home { move-column-to-first; } + Mod+CTRL+End { move-column-to-last; } + + Mod+Shift+Left { focus-monitor-left; } + Mod+Shift+Right { focus-monitor-right; } + Mod+Shift+UP { focus-monitor-up; } + Mod+Shift+Down { focus-monitor-down; } + + Mod+Shift+CTRL+Left { move-column-to-monitor-left; } + Mod+Shift+CTRL+Right { move-column-to-monitor-right; } + Mod+Shift+CTRL+UP { move-column-to-monitor-up; } + Mod+Shift+CTRL+Down { move-column-to-monitor-down; } + + // ─── Workspace Switching ─── + Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } + Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } + Mod+CTRL+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; } + Mod+CTRL+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; } + + Mod+WheelScrollRight { focus-column-right; } + Mod+WheelScrollLeft { focus-column-left; } + Mod+CTRL+WheelScrollRight { move-column-right; } + Mod+CTRL+WheelScrollLeft { move-column-left; } + + Mod+Shift+WheelScrollDown { focus-column-right; } + Mod+Shift+WheelScrollUp { focus-column-left; } + Mod+CTRL+Shift+WheelScrollDown { move-column-right; } + Mod+CTRL+Shift+WheelScrollUp { move-column-left; } + + Mod+1 { focus-workspace 1; } + Mod+2 { focus-workspace 2; } + Mod+3 { focus-workspace 3; } + Mod+4 { focus-workspace 4; } + Mod+5 { focus-workspace 5; } + Mod+6 { focus-workspace 6; } + Mod+7 { focus-workspace 7; } + Mod+8 { focus-workspace 8; } + Mod+9 { focus-workspace 9; } + + Mod+CTRL+1 { move-column-to-workspace 1; } + Mod+CTRL+2 { move-column-to-workspace 2; } + Mod+CTRL+3 { move-column-to-workspace 3; } + Mod+CTRL+4 { move-column-to-workspace 4; } + Mod+CTRL+5 { move-column-to-workspace 5; } + Mod+CTRL+6 { move-column-to-workspace 6; } + Mod+CTRL+7 { move-column-to-workspace 7; } + Mod+CTRL+8 { move-column-to-workspace 8; } + Mod+CTRL+9 { move-column-to-workspace 9; } + + Mod+TAB { focus-workspace-previous; } + + // ─── Layout Controls ─── + Mod+CTRL+F { expand-column-to-available-width; } + Mod+C { center-column; } + Mod+CTRL+C { center-visible-columns; } + Mod+Minus { set-column-width "-10%"; } + Mod+Equal { set-column-width "+10%"; } + Mod+Shift+Minus { set-window-height "-10%"; } + Mod+Shift+Equal { set-window-height "+10%"; } + + // ─── Modes ─── + Mod+T { toggle-window-floating; } + Mod+F { fullscreen-window; } + Mod+W { toggle-column-tabbed-display; } + + // ─── Screenshots ─── + CTRL+Shift+1 { screenshot; } + CTRL+Shift+2 { screenshot-screen; } + CTRL+Shift+3 { screenshot-window; } + + // ─── Emergency Escape Key ─── + // Use this when a fullscreen app blocks your keybinds. + // It disables any active keyboard shortcut inhibitor, restoring control. + Mod+ESCAPE allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } + + // ─── Exit / Power ─── + CTRL+ALT+Delete { quit; } // Also quits Niri + Mod+Shift+P { power-off-monitors; } // Turn off screens (useful for OLED or privacy) + Mod+O repeat=false { toggle-overview; } +} diff --git a/.config/niri/cfg/layout.kdl b/.config/niri/cfg/layout.kdl new file mode 100644 index 0000000..30144c2 --- /dev/null +++ b/.config/niri/cfg/layout.kdl @@ -0,0 +1,14 @@ + layout { + gaps 10 // Gap between windows + center-focused-column "never" // Don’t auto-center focused column + + background-color "transparent" // <- needed for noctalia-shell to set wallpaper + + preset-column-widths { + proportion 0.33333 + proportion 0.5 + proportion 0.66667 + } + + struts {} + } diff --git a/.config/niri/cfg/misc.kdl b/.config/niri/cfg/misc.kdl new file mode 100644 index 0000000..d29d093 --- /dev/null +++ b/.config/niri/cfg/misc.kdl @@ -0,0 +1,25 @@ + prefer-no-csd + screenshot-path null + + environment { + ELECTRON_OZONE_PLATFORM_HINT "auto" + QT_QPA_PLATFORM "wayland" + QT_QPA_PLATFORMTHEME "gtk3" + QT_WAYLAND_DISABLE_WINDOWDECORATION "1" + XDG_CURRENT_DESKTOP "niri" + XDG_SESSION_TYPE "wayland" + } + + cursor { + xcursor-theme "BreezeX-RosePine-Linux" + xcursor-size 24 + } + + debug { + // Allows notification actions and window activation from Noctalia. + honor-xdg-activation-with-invalid-serial + } + + hotkey-overlay { + skip-at-startup + } diff --git a/.config/niri/cfg/rules.kdl b/.config/niri/cfg/rules.kdl new file mode 100644 index 0000000..61f9280 --- /dev/null +++ b/.config/niri/cfg/rules.kdl @@ -0,0 +1,42 @@ + window-rule { + open-maximized true + geometry-corner-radius 12 + clip-to-geometry true + } + + // if you use steam you will probably like these + window-rule { + match app-id="steam" + exclude title=r#"^[Ss]team$"# + open-floating true + } + + window-rule { + match app-id="steam" title=r#"^notificationtoasts_\d+_desktop$"# + default-floating-position x=10 y=10 relative-to="bottom-right" + open-focused false + } + + workspace "web" + + window-rule { + match app-id="helium-browser" + open-on-workspace "web" + } + + workspace "term" + + window-rule { + match app-id="kitty" + open-on-workspace "term" + } + + window-rule { + match app-id="foot" + open-on-workspace "term" + } + + layer-rule { + match namespace="^noctalia-wallpaper*" + place-within-backdrop true + } diff --git a/.config/niri/config.kdl b/.config/niri/config.kdl new file mode 100644 index 0000000..7241809 --- /dev/null +++ b/.config/niri/config.kdl @@ -0,0 +1,10 @@ +include "./cfg/animation.kdl" +include "./cfg/autostart.kdl" +include "./cfg/keybinds.kdl" +include "./cfg/input.kdl" +include "./cfg/display.kdl" +include "./cfg/layout.kdl" +include "./cfg/rules.kdl" +include "./cfg/misc.kdl" +include "./noctalia.kdl" + diff --git a/.config/niri/noctalia.kdl b/.config/niri/noctalia.kdl new file mode 100644 index 0000000..adbf355 --- /dev/null +++ b/.config/niri/noctalia.kdl @@ -0,0 +1,35 @@ +layout { + + focus-ring { + active-color "#67b8e4" + inactive-color "#1c1f21" + urgent-color "#fd4663" + } + + border { + active-color "#67b8e4" + inactive-color "#1c1f21" + urgent-color "#fd4663" + } + + shadow { + color "#1c1f2170" + } + + tab-indicator { + active-color "#67b8e4" + inactive-color "#0c5f8d" + urgent-color "#fd4663" + } + + insert-hint { + color "#67b8e480" + } +} + +recent-windows { + highlight { + active-color "#67b8e4" + urgent-color "#fd4663" + } +} diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..9388c7f --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,107 @@ +-- Setup defaults +vim.g.mapleader = " " +vim.g.maplocalleader = " " +vim.g.have_nerd_font = true + +vim.o.number = true +vim.o.relativenumber = true +vim.o.ignorecase = true +vim.o.smartcase = true +vim.o.scrolloff = 10 +vim.o.confirm = true + +-- Use tabs, display as two spaces +vim.o.expandtab = false +vim.o.tabstop = 2 +vim.o.softtabstop = 2 +vim.o.shiftwidth = 0 + +vim.o.complete = ".,o" -- use buffer and omnifunc +vim.o.completeopt = "fuzzy,menuone,noselect" -- add 'popup' for docs (sometimes) +vim.o.autocomplete = true +vim.o.pumheight = 7 + +-- Plugin configuration +vim.pack.add({ + "https://github.com/nvim-lua/plenary.nvim", + "https://github.com/nvim-telescope/telescope.nvim", + "https://github.com/NeogitOrg/neogit", + "https://github.com/neovim/nvim-lspconfig", + -- 'https://github.com/rose-pine/neovim', + "https://github.com/RRethy/base16-nvim", + "https://github.com/stevearc/conform.nvim", +}) + +require("matugen").setup() + +local telescope = require("telescope") +telescope.setup({ + defaults = { + sorting_strategy = "ascending", + layout_config = { + prompt_position = "top", + }, + }, + pickers = { + find_files = { + hidden = true, + }, + }, +}) + +local builtin = require("telescope.builtin") +vim.keymap.set("n", "ff", builtin.find_files, { desc = "Telescope find files" }) +vim.keymap.set("n", "fg", builtin.live_grep, { desc = "Telescope live grep" }) +vim.keymap.set("n", "fb", builtin.buffers, { desc = "Telescope buffers" }) +vim.keymap.set("n", "fh", builtin.help_tags, { desc = "Telescope help tags" }) +vim.keymap.set("n", "fd", builtin.diagnostics, { desc = "Telescope diagnostics" }) + +vim.cmd("packadd nvim.undotree") +vim.keymap.set("n", "u", require("undotree").open) + +local neogit = require("neogit") +neogit.setup({ + graph_style = "unicode", +}) + +vim.keymap.set("n", "gg", function() + neogit.open({ kind = "split" }) +end, { desc = "Open Neogit UI" }) + +local rocks_config = { + rocks_path = vim.env.HOME .. "/.local/share/nvim/rocks", +} + +vim.g.rocks_nvim = rocks_config + +local luarocks_path = { + vim.fs.joinpath(rocks_config.rocks_path, "share", "lua", "5.1", "?.lua"), + vim.fs.joinpath(rocks_config.rocks_path, "share", "lua", "5.1", "?", "init.lua"), +} +package.path = package.path .. ";" .. table.concat(luarocks_path, ";") + +local luarocks_cpath = { + vim.fs.joinpath(rocks_config.rocks_path, "lib", "lua", "5.1", "?.so"), + vim.fs.joinpath(rocks_config.rocks_path, "lib64", "lua", "5.1", "?.so"), + -- Remove the dylib and dll paths if you do not need macos or windows support + vim.fs.joinpath(rocks_config.rocks_path, "lib", "lua", "5.1", "?.dylib"), + vim.fs.joinpath(rocks_config.rocks_path, "lib64", "lua", "5.1", "?.dylib"), + vim.fs.joinpath(rocks_config.rocks_path, "lib", "lua", "5.1", "?.dll"), + vim.fs.joinpath(rocks_config.rocks_path, "lib64", "lua", "5.1", "?.dll"), +} +package.cpath = package.cpath .. ";" .. table.concat(luarocks_cpath, ";") + +vim.opt.runtimepath:append(vim.fs.joinpath(rocks_config.rocks_path, "lib", "luarocks", "rocks-5.1", "rocks.nvim", "*")) + +vim.lsp.enable("rust_analyzer") + +require("conform").setup({ + format_on_save = { + timeout_ms = 500, + lsp_format = "fallback", + }, + formatters_by_ft = { + lua = { "stylua" }, + rust = { "rustfmt", lsp_format = "fallback" }, + }, +}) diff --git a/.config/systemd/user/default.target.wants/kanata.service b/.config/systemd/user/default.target.wants/kanata.service new file mode 120000 index 0000000..f1cba55 --- /dev/null +++ b/.config/systemd/user/default.target.wants/kanata.service @@ -0,0 +1 @@ +/home/natecox/.config/systemd/user/kanata.service \ No newline at end of file diff --git a/.config/systemd/user/kanata.service b/.config/systemd/user/kanata.service new file mode 100644 index 0000000..8d18e8f --- /dev/null +++ b/.config/systemd/user/kanata.service @@ -0,0 +1,12 @@ +[Unit] +Description=Kanata keyboard remapper +Documentation=https://github.com/jtroo/kanata + +[Service] +Type=simple +ExecStart=kanata +Restart=no + +[Install] +WantedBy=default.target + diff --git a/.emacs.d/.#init.el b/.emacs.d/.#init.el new file mode 120000 index 0000000..518dd98 --- /dev/null +++ b/.emacs.d/.#init.el @@ -0,0 +1 @@ +natecox@framework.121557:1778527978 \ No newline at end of file diff --git a/.emacs.d/early-init.el b/.emacs.d/early-init.el new file mode 100644 index 0000000..3b52cf2 --- /dev/null +++ b/.emacs.d/early-init.el @@ -0,0 +1,13 @@ +(setq gc-cons-threshold 10000000) +(setq default-frame-alist + '((ns-appearance . dark) + (ns-transparent-titlebar . t))) +(setopt frame-inhibit-implied-resize t) +(setopt frame-resize-pixelwise t) +(setq byte-compile-warnings '(not obsolete)) +(setq warning-suppress-log-types '((comp) (bytecomp))) +(setq native-comp-async-report-warnings-errors 'silent) + +(tool-bar-mode -1) +(menu-bar-mode t) + diff --git a/.emacs.d/init.el b/.emacs.d/init.el new file mode 100644 index 0000000..7dbcae0 --- /dev/null +++ b/.emacs.d/init.el @@ -0,0 +1,113 @@ +(require 'package) +(add-to-list 'package-archives + '("melpa" . "https://melpa.org/packages/") t) + +(setopt line-number-mode t) +(setq display-line-numbers 'relative) + +(set-frame-font "Maple Mono NF CN-11:style=Regular" nil t) + +(use-package which-key + :ensure t + :config (which-key-mode)) + +(use-package emacs + :config + (setq major-mode-remap-alist + '((yaml-mode . yaml-ts-mode) + (toml-mode . toml-ts-mode) + (bash-mode . bash-ts-mode) + (json-mode . json-ts-mode) + (css-mode . css-ts-mode))) + + ;; for emacs-macport, use alt as meta instead of command + (setq mac-command-modifier 'super + ns-command-modifier 'super + mac-option-modifier 'meta + ns-option-modifier 'meta + mac-right-option-modifier 'none + ns-right-option-modifier 'none) + :hook + ;; Auto parenthesis matching + ((prog-mode . electric-pair-mode) + (compilation-filter . ansi-color-compilation-filter))) + +(use-package project + :custom + (when (>= emacs-major-version 30) + (project-mode-line t))) + +(use-package eat + :ensure t + :config + (eat-eshell-mode) + (eat-eshell-visual-command-mode)) + +(use-package direnv + :ensure t + :custom (direnv-always-show-summary nil) + :config (direnv-mode)) + +(use-package eglot + :ensure t) + +(use-package paredit + :ensure t + :mode (("\\.asm" . paredit-mode) + ("\\.el" . paredit-mode))) + +(use-package web-mode + :ensure t + :mode + (("\\.HTML\\'" . web-mode) + ("\\.css\\'" . web-mode) + ("\\.svelte" . web-mode)) + :custom + (web-mode-markup-indent-offset 2) + (web-mode-css-indent-offset 2) + (web-mode-code-indent-offset 2)) + +(use-package emmet-mode + :ensure t + :hook ((web-mode . emmet-mode))) + +(use-package magit + :ensure t) + +(use-package rust-mode + :ensure t + :hook (rust-mode . eglot-ensure)) + +(use-package hl-line-mode + ;; use the builtin current-line highlighter + :hook ((prog-mode) (text-mode) (org-agenda-mode))) + +(use-package flyspell-mode + ;; https://www.emacswiki.org/emacs/FlySpell + :hook ((text-mode . flyspell-mode) + (prog-mode . flyspell-prog-mode))) + +(use-package emacs + :hook ((before-save . delete-trailing-whitespace)) + + :bind (("s-SPC" . cycle-spacing)) + + :custom + (use-short-answers t) + (dired-listing-switches "-AL --group-directories-first") + (tab-width 2) + (custom-file (concat user-emacs-directory "custom.el")) + (display-line-numbers 'relative) + (backup-directory-alist '(("." . "~/.ema:Cs.d/backups"))) + (auto-save-default nil) + + :config + (when (file-exists-p custom-file) + (load custom-file)) + (set-scroll-bar-mode nil) + (setq-default indent-tabs-mode t) + (load-theme 'noctalia t) + (electric-indent-mode +1) + (setq ido-enable-flex-matching t) + (setq ido-everywhere t) + (fido-vertical-mode)) diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..0a7c091 --- /dev/null +++ b/.gitconfig @@ -0,0 +1,8 @@ +[user] + name = Nate Cox + email = nate@natecox.dev + signingKey = A7E9F186 +[commit] + gpgSign = true +[init] + defaultBranch = main diff --git a/.zshenv b/.zshenv new file mode 100644 index 0000000..e69de29 diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..5c34b2c --- /dev/null +++ b/.zshrc @@ -0,0 +1 @@ +source /usr/share/cachyos-zsh-config/cachyos-config.zsh -- cgit v1.3.1