mirror of
https://codeberg.org/andyscott/dotfiles.git
synced 2024-12-22 09:53:10 -05:00
Compare commits
No commits in common. "30f5ca39b96e34e779d713c2d5aaa1eab6825cad" and "9bc52c33f9e444bc2951f8912c5f18d15a5113c5" have entirely different histories.
30f5ca39b9
...
9bc52c33f9
3 changed files with 32 additions and 55 deletions
|
@ -2,30 +2,29 @@
|
|||
# ~/.bash_profile
|
||||
#
|
||||
|
||||
# Default text editors
|
||||
export EDITOR=nvim
|
||||
export VISUAL=emacs
|
||||
|
||||
# Add ~/.local/bin to $PATH
|
||||
export PATH="${HOME}/.local/bin:${PATH}"
|
||||
|
||||
# XDG Base Directories
|
||||
# Ensure XDG env vars are set
|
||||
export XDG_CACHE_HOME="${HOME}"/.cache
|
||||
export XDG_CONFIG_HOME="${HOME}"/.config
|
||||
export XDG_DATA_HOME="${HOME}"/.local/share
|
||||
export XDG_STATE_HOME="${HOME}"/.local/state
|
||||
|
||||
# Force Java to behave when not using a DE
|
||||
# add .local/bin to $PATH
|
||||
export PATH="${HOME}/.local/bin:${PATH}"
|
||||
|
||||
# make Java behave when not using a DE
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
|
||||
# GPG passphrase prompt
|
||||
# Sometimes needed for gpg passphrase prompt
|
||||
export GPG_TTY=$(tty)
|
||||
|
||||
# Mozilla + Wayland
|
||||
export MOZ_ENABLE_WAYLAND=1
|
||||
|
||||
{{ if eq .chezmoi.hostname "helix" -}}
|
||||
# Scale GTK applicatons
|
||||
# scale GTK applicatons on hidpi screens
|
||||
export GDK_SCALE=2 GDK_DPI_SCALE=0.50
|
||||
{{- end }}
|
||||
|
||||
|
@ -37,13 +36,6 @@ export HISTFILE="${XDG_STATE_HOME}"/bash_history
|
|||
# cargo
|
||||
export CARGO_HOME="${XDG_DATA_HOME}"/cargo
|
||||
|
||||
# dotnet
|
||||
export DOTNET_BUNDLE_EXTRACT_BASE_DIR="${XDG_CACHE_HOME}/dotnet_bundle_extract"
|
||||
export DOTNET_CLI_HOME="${XDG_DATA_HOME}/dotnet/cli"
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=true
|
||||
export DOTNET_TOOLS_PATH="${XDG_DATA_HOME}/dotnet/tools"
|
||||
export PATH="${DOTNET_TOOLS_PATH}:${PATH}"
|
||||
|
||||
# go
|
||||
export GOPATH="${XDG_DATA_HOME}"/go
|
||||
export GOMODCACHE="${XDG_CACHE_HOME}"/go/mod
|
||||
|
@ -76,3 +68,4 @@ export XAUTHORITY="${XDG_RUNTIME_DIR}"/Xauthority
|
|||
|
||||
# start river
|
||||
[[ -z "${DISPLAY}" && "${XDG_VTNR}" -eq 1 ]] && exec dbus-run-session river
|
||||
|
||||
|
|
|
@ -31,22 +31,6 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
;; Relocate emacs-user-directory to XDG_DATA_HOME
|
||||
(setq user-emacs-directory
|
||||
(expand-file-name "emacs/" (or (getenv "XDG_DATA_HOME") "~/.local/share/")))
|
||||
|
||||
;; Set cache directory
|
||||
(setq xdg_cache_home
|
||||
(expand-file-name "emacs/" (or (getenv "XDG_CACHE_HOME") "~/.cache/")))
|
||||
(unless (file-directory-p xdg_cache_home)
|
||||
(make-directory xdg_cache_home))
|
||||
|
||||
;; Move eln-cache to XDG_CACHE_HOME
|
||||
(when (fboundp 'startup-redirect-eln-cache)
|
||||
(if (< emacs-major-version 29)
|
||||
(push (expand-file-name "eln-cache/" xdg_cache_home) native-comp-eln-load-path)
|
||||
(startup-redirect-eln-cache (expand-file-name "eln-cache/" xdg_cache_home))))
|
||||
|
||||
;; Disable package.el
|
||||
(setq package-enable-at-startup nil)
|
||||
|
||||
|
@ -91,9 +75,25 @@
|
|||
{{- end }}
|
||||
|
||||
;; Some GUI options
|
||||
(push '(menu-bar-lines . 0) default-frame-alist)
|
||||
(push '(tool-bar-lines . 0) default-frame-alist)
|
||||
(push '(menu-bar-lines . 0) default-frame-alist)
|
||||
(push '(vertical-scroll-bars) default-frame-alist)
|
||||
|
||||
;; Relocate emacs-user-directory to XDG_DATA_HOME
|
||||
(setq user-emacs-directory
|
||||
(expand-file-name "emacs/" (or (getenv "XDG_DATA_HOME") "~/.local/share/")))
|
||||
|
||||
;; Set cache directory
|
||||
(setq xdg_cache_home
|
||||
(expand-file-name "emacs/" (or (getenv "XDG_CACHE_HOME") "~/.cache/")))
|
||||
(unless (file-directory-p xdg_cache_home)
|
||||
(make-directory xdg_cache_home))
|
||||
|
||||
;; Move eln-cache to XDG_CACHE_HOME
|
||||
(when (fboundp 'startup-redirect-eln-cache)
|
||||
(if (< emacs-major-version 29)
|
||||
(push (expand-file-name "eln-cache/" xdg_cache_home) native-comp-eln-load-path)
|
||||
(startup-redirect-eln-cache (expand-file-name "eln-cache/" xdg_cache_home))))
|
||||
|
||||
(provide 'early-init)
|
||||
;;; early-init.el ends here
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
;;; Commentary:
|
||||
|
||||
;; My Emacs initialization file.
|
||||
;; My personal Emacs configuration.
|
||||
|
||||
;;; License:
|
||||
|
||||
|
@ -39,7 +39,6 @@
|
|||
(float-time
|
||||
(time-subtract (current-time) before-init-time)))
|
||||
gcs-done)))
|
||||
|
||||
;;; Initialize elpaca
|
||||
(defvar elpaca-installer-version 0.6)
|
||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||
|
@ -89,9 +88,6 @@
|
|||
(use-package emacs
|
||||
:elpaca nil
|
||||
:init
|
||||
;; Initial mode
|
||||
(setq initial-major-mode 'fundamental-mode)
|
||||
|
||||
;;; Vertico
|
||||
;; Add prompt to `completing-read-multiple'
|
||||
(defun crm-indicator (args)
|
||||
|
@ -128,7 +124,7 @@
|
|||
scroll-conservatively 1000
|
||||
scroll-preserve-screen-position t)
|
||||
(when (fboundp 'pixel-scroll-precision-mode)
|
||||
(pixel-scroll-precision-mode))
|
||||
(pixel-scroll-precision-mode t))
|
||||
|
||||
;; Cursor
|
||||
(setq-default cursor-type 'bar
|
||||
|
@ -173,8 +169,6 @@
|
|||
:elpaca nil
|
||||
:config
|
||||
(let ((auto_save_directory (concat xdg_cache_home "auto-save-list/")))
|
||||
(unless (file-directory-p auto_save_directory)
|
||||
(make-directory auto_save_directory))
|
||||
(setq backup-directory-alist `((".*" . ,auto_save_directory))
|
||||
auto-save-file-name-transforms `((".*" ,auto_save_directory t))))
|
||||
(setq backup-by-copying t
|
||||
|
@ -189,9 +183,7 @@
|
|||
:elpaca nil
|
||||
:defer 3
|
||||
:hook
|
||||
(((git-commit-mode
|
||||
markdown-mode
|
||||
text-mode) . flyspell-mode)
|
||||
(((git-commit-mode markdown-mode) . flyspell-mode)
|
||||
(lsp-mode . flyspell-prog-mode)))
|
||||
|
||||
(use-package mwheel
|
||||
|
@ -270,7 +262,7 @@
|
|||
(moody_inactive (face-attribute 'mode-line-inactive :background)))
|
||||
(set-face-attribute 'mode-line nil :overline moody_line)
|
||||
(set-face-attribute 'mode-line-inactive nil :overline moody_line)
|
||||
(set-face-attribute 'mode-line-inactive nil :underline moody_inactive)
|
||||
(set-face-attribute 'mode-line-inactive nil :underline moody_line)
|
||||
(set-face-attribute 'mode-line nil :box nil)
|
||||
(set-face-attribute 'mode-line-inactive nil :box nil)
|
||||
(set-face-attribute 'mode-line-inactive nil :background moody_inactive))
|
||||
|
@ -581,7 +573,6 @@
|
|||
:hook
|
||||
(((c-ts-mode
|
||||
c++-ts-mode
|
||||
csharp-ts-mode
|
||||
go-ts-mode
|
||||
python-ts-mode
|
||||
zig-mode) . lsp)
|
||||
|
@ -610,8 +601,7 @@
|
|||
([remap xref-find-apropos] . consult-lsp-symbols)))
|
||||
|
||||
(use-package lsp-treemacs
|
||||
:after (lsp-mode treemacs)
|
||||
:config (lsp-treemacs-sync-mode))
|
||||
:after (lsp-mode treemacs))
|
||||
|
||||
;; Debugging
|
||||
(use-package dap-mode
|
||||
|
@ -694,16 +684,10 @@
|
|||
:custom
|
||||
(web-mode-attribute-indent-offset 2)
|
||||
(web-mode-code-indent-offset 2)
|
||||
(web-mode-css-indent-offset 2)
|
||||
(web-mode-markup-indent-offset 2)
|
||||
(web-mode-enable-front-matter-block t)
|
||||
(web-mode-engines-alist '(("blade" . "\\.blade\\.")
|
||||
("razor" . "\\.cshtml\\'")))
|
||||
(web-mode-markup-indent-offset 2)
|
||||
:mode
|
||||
((("\\.astro\\'"
|
||||
"\\.cshtml\\'"
|
||||
"\\.html?\\'"
|
||||
"\\.razor\\'") . web-mode)))
|
||||
((("\\.astro\\'" "\\.html?\\'") . web-mode)))
|
||||
|
||||
;; Zig
|
||||
(use-package zig-mode
|
||||
|
|
Loading…
Reference in a new issue