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