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

View file

@ -40,24 +40,18 @@ return {
event = "VeryLazy"
},
{
"mason-org/mason-lspconfig.nvim",
"williamboman/mason-lspconfig.nvim",
dependencies = {
{
"mason-org/mason.nvim",
opts = {
ensure_installed = {
"shfmt",
}
}
},
"williamboman/mason.nvim",
"neovim/nvim-lspconfig",
"saghen/blink.cmp"
},
event = { "BufReadPre", "BufNewFile" },
config = function()
require("mason").setup()
require("mason-lspconfig").setup({
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()
vim.lsp.config("lua_ls", {
@ -76,15 +70,6 @@ return {
},
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("rust_analyzer", { capabilities = blinkCapabilities })
vim.lsp.config("pyright", { capabilities = blinkCapabilities })
@ -103,7 +88,6 @@ return {
require("conform").setup({
formatters_by_ft = {
nix = { "nixfmt" },
zsh = { "shfmt" },
-- TODO: More formatters by filetype
},
format_on_save = function(bufnr)

View file

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

View file

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

View file

@ -1,4 +1,4 @@
if [[ -n "${ZSH_DEBUG_STARTUP+1}" ]]; then
if [ -n "${ZSH_DEBUG_STARTUP+1}" ]; then
zmodload zsh/zprof
fi
@ -10,39 +10,48 @@ setopt INC_APPEND_HISTORY
export EDITOR=nvim
export MANPAGER='nvim +Man!'
setopt PROMPT_SUBST
PROMPT=$'\n%n@%m %~%(?..%F{red}) %%%f '
PROMPT="
[%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:*' menu select
autoload -Uz compinit
if [[ ! -f ~/.zcompdump || -f ~/.zcompdump(N.mh+24) ]]; then
compinit
else
compinit -C
fi
export PATH="$PATH:$HOME/.local/bin"
compinit
autoload -Uz bashcompinit
bashcompinit
export PATH="$PATH:/home/wekuz/.local/bin"
export PATH="$PATH:$HOME/.cargo/bin"
for file in "$XDG_CONFIG_HOME"/zsh/config/*.zsh(N); do
[ -r "$file" ] && source "$file"
QMK_LOCATION="/home/wekuz/qmk"
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
function plugin-compile {
ZPLUGINDIR=${ZPLUGINDIR:-"$XDG_CONFIG_HOME"/zsh/plugins}
ZPLUGINDIR=${ZPLUGINDIR:-$HOME/.config/zsh/plugins}
autoload -U zrecompile
local f
for f in "$ZPLUGINDIR"/**/*.zsh{,-theme}(N); do
for f in $ZPLUGINDIR/**/*.zsh{,-theme}(N); do
zrecompile -pq "$f"
done
}
function plugin-clone {
ZPLUGINDIR=${ZPLUGINDIR:-"$XDG_CONFIG_HOME"/zsh/plugins}
local repo plugdir initfile initfiles=()
for repo in "$@"; do
plugdir="$ZPLUGINDIR"/${repo:t}
ZPLUGINDIR=${ZPLUGINDIR:-${ZDOTDIR:-$HOME/.config/zsh}/plugins}
for repo in $@; do
plugdir=$ZPLUGINDIR/${repo:t}
initfile=$plugdir/${repo:t}.plugin.zsh
if [[ ! -d $plugdir ]]; then
echo "Cloning $repo..."
@ -51,7 +60,7 @@ function plugin-clone {
fi
if [[ ! -e $initfile ]]; then
initfiles=($plugdir/*.{plugin.zsh,zsh-theme,zsh,sh}(N))
(($#initfiles)) && ln -sf $initfiles[1] $initfile
(( $#initfiles )) && ln -sf $initfiles[1] $initfile
fi
done
plugin-compile
@ -59,19 +68,18 @@ function plugin-clone {
function plugin-source {
local plugdir
ZPLUGINDIR=${ZPLUGINDIR:-"$XDG_CONFIG_HOME"/zsh/plugins}
for plugdir in "$@"; do
[[ $plugdir = /* ]] || plugdir="$ZPLUGINDIR"/$plugdir
ZPLUGINDIR=${ZPLUGINDIR:-${ZDOTDIR:-$HOME/.config/zsh}/plugins}
for plugdir in $@; do
[[ $plugdir = /* ]] || plugdir=$ZPLUGINDIR/$plugdir
fpath+=$plugdir
local initfile=$plugdir/${plugdir:t}.plugin.zsh
(($+functions[zsh-defer])) && zsh-defer . $initfile || . $initfile
(( $+functions[zsh-defer] )) && zsh-defer . $initfile || . $initfile
done
}
function plugin-update {
ZPLUGINDIR=${ZPLUGINDIR:-"$XDG_CONFIG_HOME"/zsh/plugins}
local d
for d in "$ZPLUGINDIR"/*/.git(/); do
ZPLUGINDIR=${ZPLUGINDIR:-$HOME/.config/zsh/plugins}
for d in $ZPLUGINDIR/*/.git(/); do
echo "Updating ${d:h:t}..."
command git -C "${d:h}" pull --ff --recurse-submodules --depth 1 --rebase --autostash
done
@ -81,17 +89,17 @@ function plugin-update {
ZSH_PLUGIN_REPOS=(
hlissner/zsh-autopair
zsh-users/zsh-syntax-highlighting
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
if [[ ! -d ${ZPLUGINDIR:-"$XDG_CONFIG_HOME"/zsh/plugins} ]]; then
echo "Bootstraping plugins..."
plugin-clone "${ZSH_PLUGIN_REPOS[@]}"
fi
plugin-source "${(@)ZSH_PLUGIN_REPOS:t}"
# plugin-clone $ZSH_PLUGIN_REPOS
plugin-source $ZSH_PLUGINS
if [ -n "${ZSH_DEBUG_STARTUP+1}" ]; then
zprof