Compare commits

..

No commits in common. "7ced789708b71f8def5dcb6a300ea62baf46c5f0" and "f65f5426b5894a73d9fcefa8fc542e57c0bd21fc" have entirely different histories.

5 changed files with 55 additions and 77 deletions

View file

@ -2,13 +2,7 @@
### MONITORS ### ### MONITORS ###
################ ################
{{- if eq .chezmoi.hostname "wkz-pc" }} monitor=DP-2,3840x2160@160,0x0,1.5
monitor = DP-2, 3840x2160@160, 0x0, 1.5, bitdepth,10
{{- else if eq .chezmoi.hostname "lapdog" }}
monitor = eDP-1, 1920x1080@60, 0x0, 1.33
{{- else }}
monitor = , preferred, auto, 1
{{- end }}
xwayland { xwayland {
force_zero_scaling = true force_zero_scaling = true
@ -37,9 +31,6 @@ exec-once = uwsm app -- hyprpaper
exec-once = uwsm app -- hyprsunset exec-once = uwsm app -- hyprsunset
exec-once = [workspace 1] $terminal exec-once = [workspace 1] $terminal
exec-once = [workspace 2 silent] $browser exec-once = [workspace 2 silent] $browser
{{- if eq .chezmoi.hostname "lapdog" }}
exec-once = uwsm app -- iio-hyprland
{{- end }}
############################# #############################
### ENVIRONMENT VARIABLES ### ### ENVIRONMENT VARIABLES ###
@ -159,11 +150,7 @@ input {
kb_layout = ee kb_layout = ee
kb_variant = kb_variant =
kb_model = kb_model =
{{- if eq .chezmoi.hostname "lapdog" }}
kb_options = caps:swapescape, fkeys:basic_13-24
{{- else }}
kb_options = fkeys:basic_13-24 kb_options = fkeys:basic_13-24
{{- end }}
kb_rules = kb_rules =
follow_mouse = 1 follow_mouse = 1

View file

@ -40,24 +40,18 @@ return {
event = "VeryLazy" event = "VeryLazy"
}, },
{ {
"mason-org/mason-lspconfig.nvim", "williamboman/mason-lspconfig.nvim",
dependencies = { dependencies = {
{ "williamboman/mason.nvim",
"mason-org/mason.nvim",
opts = {
ensure_installed = {
"shfmt",
}
}
},
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
"saghen/blink.cmp" "saghen/blink.cmp"
}, },
event = { "BufReadPre", "BufNewFile" }, event = { "BufReadPre", "BufNewFile" },
config = function() config = function()
require("mason").setup()
require("mason-lspconfig").setup({ require("mason-lspconfig").setup({
automatic_installation = true, automatic_installation = true,
ensure_installed = { "lua_ls", "bashls", "clangd", "rust_analyzer", "pyright", "marksman", "tailwindcss" } ensure_installed = { "lua_ls", "clangd", "rust_analyzer", "pyright", "marksman", "tailwindcss" }
}) })
local blinkCapabilities = require("blink.cmp").get_lsp_capabilities() local blinkCapabilities = require("blink.cmp").get_lsp_capabilities()
vim.lsp.config("lua_ls", { vim.lsp.config("lua_ls", {
@ -76,15 +70,6 @@ return {
}, },
capabilities = blinkCapabilities capabilities = blinkCapabilities
}) })
vim.lsp.config("bashls", {
filetypes = { "bash", "sh", "zsh" },
settings = {
bashIde = {
globPattern = "*@(.sh|.inc|.bash|.command|.zsh)"
}
},
capabilities = blinkCapabilities
})
vim.lsp.config("clangd", { capabilities = blinkCapabilities }) vim.lsp.config("clangd", { capabilities = blinkCapabilities })
vim.lsp.config("rust_analyzer", { capabilities = blinkCapabilities }) vim.lsp.config("rust_analyzer", { capabilities = blinkCapabilities })
vim.lsp.config("pyright", { capabilities = blinkCapabilities }) vim.lsp.config("pyright", { capabilities = blinkCapabilities })
@ -103,7 +88,6 @@ return {
require("conform").setup({ require("conform").setup({
formatters_by_ft = { formatters_by_ft = {
nix = { "nixfmt" }, nix = { "nixfmt" },
zsh = { "shfmt" },
-- TODO: More formatters by filetype -- TODO: More formatters by filetype
}, },
format_on_save = function(bufnr) format_on_save = function(bufnr)

View file

@ -1,9 +1,8 @@
source <(fzf --zsh) source <(fzf --zsh)
source <(rip completions zsh) source <(rip completions zsh | sed "s/'::targets/':targets/")
source <(rbw gen-completions zsh) source <(rbw gen-completions zsh)
eval "$(zoxide init zsh)" eval "$(zoxide init zsh)"
function qmk-completions { function load-completions {
autoload -Uz bashcompinit && bashcompinit source $QMK_LOCATION/util/qmk_tab_complete.sh
source "$(qmk env | grep QMK_HOME | cut -f2 -d '"')"/util/qmk_tab_complete.sh
} }

View file

@ -5,9 +5,9 @@ zshcache_time="$(date +%s%N)"
autoload -Uz add-zsh-hook autoload -Uz add-zsh-hook
rehash_precmd() { rehash_precmd() {
if [[ -e /var/cache/zsh/pacman ]]; then if [[ -a /var/cache/zsh/pacman ]]; then
local paccache_time="$(date -r /var/cache/zsh/pacman +%s%N)" local paccache_time="$(date -r /var/cache/zsh/pacman +%s%N)"
if ((zshcache_time < paccache_time)); then if (( zshcache_time < paccache_time )); then
rehash rehash
zshcache_time="$paccache_time" zshcache_time="$paccache_time"
fi fi

View file

@ -1,4 +1,4 @@
if [[ -n "${ZSH_DEBUG_STARTUP+1}" ]]; then if [ -n "${ZSH_DEBUG_STARTUP+1}" ]; then
zmodload zsh/zprof zmodload zsh/zprof
fi fi
@ -10,39 +10,48 @@ setopt INC_APPEND_HISTORY
export EDITOR=nvim export EDITOR=nvim
export MANPAGER='nvim +Man!' export MANPAGER='nvim +Man!'
setopt PROMPT_SUBST PROMPT="
PROMPT=$'\n%n@%m %~%(?..%F{red}) %%%f ' [%n@%m %~]%(?..%F{red})>%f "
zstyle :compinstall filename '$HOME/.zshrc' zstyle :compinstall filename '/home/wekuz/.zshrc'
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion:*' menu select zstyle ':completion:*' menu select
autoload -Uz compinit autoload -Uz compinit
if [[ ! -f ~/.zcompdump || -f ~/.zcompdump(N.mh+24) ]]; then compinit
compinit autoload -Uz bashcompinit
else bashcompinit
compinit -C
fi export PATH="$PATH:/home/wekuz/.local/bin"
export PATH="$PATH:$HOME/.local/bin"
export PATH="$PATH:$HOME/.cargo/bin" export PATH="$PATH:$HOME/.cargo/bin"
for file in "$XDG_CONFIG_HOME"/zsh/config/*.zsh(N); do QMK_LOCATION="/home/wekuz/qmk"
[ -r "$file" ] && source "$file"
ZSH_CONFIG_FILES=(
fixkeys
options
aliases
completions
autostart
)
for filename in "${ZSH_CONFIG_FILES[@]}"; do
[ -r "$XDG_CONFIG_HOME/zsh/config/$filename.zsh" ] && source "$XDG_CONFIG_HOME/zsh/config/$filename.zsh"
done done
function plugin-compile { function plugin-compile {
ZPLUGINDIR=${ZPLUGINDIR:-"$XDG_CONFIG_HOME"/zsh/plugins} ZPLUGINDIR=${ZPLUGINDIR:-$HOME/.config/zsh/plugins}
autoload -U zrecompile autoload -U zrecompile
local f local f
for f in "$ZPLUGINDIR"/**/*.zsh{,-theme}(N); do for f in $ZPLUGINDIR/**/*.zsh{,-theme}(N); do
zrecompile -pq "$f" zrecompile -pq "$f"
done done
} }
function plugin-clone { function plugin-clone {
ZPLUGINDIR=${ZPLUGINDIR:-"$XDG_CONFIG_HOME"/zsh/plugins}
local repo plugdir initfile initfiles=() local repo plugdir initfile initfiles=()
for repo in "$@"; do ZPLUGINDIR=${ZPLUGINDIR:-${ZDOTDIR:-$HOME/.config/zsh}/plugins}
plugdir="$ZPLUGINDIR"/${repo:t} for repo in $@; do
plugdir=$ZPLUGINDIR/${repo:t}
initfile=$plugdir/${repo:t}.plugin.zsh initfile=$plugdir/${repo:t}.plugin.zsh
if [[ ! -d $plugdir ]]; then if [[ ! -d $plugdir ]]; then
echo "Cloning $repo..." echo "Cloning $repo..."
@ -51,7 +60,7 @@ function plugin-clone {
fi fi
if [[ ! -e $initfile ]]; then if [[ ! -e $initfile ]]; then
initfiles=($plugdir/*.{plugin.zsh,zsh-theme,zsh,sh}(N)) initfiles=($plugdir/*.{plugin.zsh,zsh-theme,zsh,sh}(N))
(($#initfiles)) && ln -sf $initfiles[1] $initfile (( $#initfiles )) && ln -sf $initfiles[1] $initfile
fi fi
done done
plugin-compile plugin-compile
@ -59,19 +68,18 @@ function plugin-clone {
function plugin-source { function plugin-source {
local plugdir local plugdir
ZPLUGINDIR=${ZPLUGINDIR:-"$XDG_CONFIG_HOME"/zsh/plugins} ZPLUGINDIR=${ZPLUGINDIR:-${ZDOTDIR:-$HOME/.config/zsh}/plugins}
for plugdir in "$@"; do for plugdir in $@; do
[[ $plugdir = /* ]] || plugdir="$ZPLUGINDIR"/$plugdir [[ $plugdir = /* ]] || plugdir=$ZPLUGINDIR/$plugdir
fpath+=$plugdir fpath+=$plugdir
local initfile=$plugdir/${plugdir:t}.plugin.zsh local initfile=$plugdir/${plugdir:t}.plugin.zsh
(($+functions[zsh-defer])) && zsh-defer . $initfile || . $initfile (( $+functions[zsh-defer] )) && zsh-defer . $initfile || . $initfile
done done
} }
function plugin-update { function plugin-update {
ZPLUGINDIR=${ZPLUGINDIR:-"$XDG_CONFIG_HOME"/zsh/plugins} ZPLUGINDIR=${ZPLUGINDIR:-$HOME/.config/zsh/plugins}
local d for d in $ZPLUGINDIR/*/.git(/); do
for d in "$ZPLUGINDIR"/*/.git(/); do
echo "Updating ${d:h:t}..." echo "Updating ${d:h:t}..."
command git -C "${d:h}" pull --ff --recurse-submodules --depth 1 --rebase --autostash command git -C "${d:h}" pull --ff --recurse-submodules --depth 1 --rebase --autostash
done done
@ -81,17 +89,17 @@ function plugin-update {
ZSH_PLUGIN_REPOS=( ZSH_PLUGIN_REPOS=(
hlissner/zsh-autopair hlissner/zsh-autopair
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-autosuggestions zsh-users/zsh-autosuggestions
zsh-users/zsh-syntax-highlighting # https://github.com/zsh-users/zsh-syntax-highlighting#why-must-zsh-syntax-highlightingzsh-be-sourced-at-the-end-of-the-zshrc-file )
ZSH_PLUGINS=(
zsh-autopair
zsh-syntax-highlighting
zsh-autosuggestions
) )
# Plugin bootstrap # plugin-clone $ZSH_PLUGIN_REPOS
if [[ ! -d ${ZPLUGINDIR:-"$XDG_CONFIG_HOME"/zsh/plugins} ]]; then plugin-source $ZSH_PLUGINS
echo "Bootstraping plugins..."
plugin-clone "${ZSH_PLUGIN_REPOS[@]}"
fi
plugin-source "${(@)ZSH_PLUGIN_REPOS:t}"
if [ -n "${ZSH_DEBUG_STARTUP+1}" ]; then if [ -n "${ZSH_DEBUG_STARTUP+1}" ]; then
zprof zprof