Final updates to merge chezmoi into main
This commit is contained in:
parent
f43139d032
commit
c1f6f9a630
6 changed files with 12 additions and 171 deletions
|
|
@ -6,3 +6,4 @@
|
||||||
[data]
|
[data]
|
||||||
osid = {{ $osid | quote }}
|
osid = {{ $osid | quote }}
|
||||||
hasGui = {{ promptBoolOnce . "hasGui" "Does this machine needs gui configs/apps?" }}
|
hasGui = {{ promptBoolOnce . "hasGui" "Does this machine needs gui configs/apps?" }}
|
||||||
|
hasWOL = {{ promptBoolOnce . "hasWOL" "Does this machine WOL?" }}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ packages:
|
||||||
cargo:
|
cargo:
|
||||||
- mise
|
- mise
|
||||||
- yazi-fm
|
- yazi-fm
|
||||||
|
- rbw
|
||||||
dnf:
|
dnf:
|
||||||
copr:
|
copr:
|
||||||
- atim/lazygit
|
- atim/lazygit
|
||||||
|
|
|
||||||
6
setup/wol → chezmoi/.chezmoiscripts/run_once_after_setup_wol.sh.tmpl
Executable file → Normal file
6
setup/wol → chezmoi/.chezmoiscripts/run_once_after_setup_wol.sh.tmpl
Executable file → Normal file
|
|
@ -1,7 +1,10 @@
|
||||||
|
{{- if eq .hasWOL true -}}
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
# run as sudo so it ask for the password here and not inside FZF
|
# run as sudo so it ask for the password here and not inside FZF
|
||||||
echo -e "\n${BLD}${SUL}${GRN}Setting up wol...${RST}\n"
|
sudo echo -e "\nSetting up wol...\n"
|
||||||
|
|
||||||
interface="$(
|
interface="$(
|
||||||
nmcli --fields name --terse con show |
|
nmcli --fields name --terse con show |
|
||||||
|
|
@ -17,3 +20,4 @@ if [[ -z "$interface" ]]; then
|
||||||
fi
|
fi
|
||||||
nmcli c modify "$interface" 802-3-ethernet.wake-on-lan magic
|
nmcli c modify "$interface" 802-3-ethernet.wake-on-lan magic
|
||||||
nmcli c modify "$interface" 802-3-ethernet.auto-negotiate yes
|
nmcli c modify "$interface" 802-3-ethernet.auto-negotiate yes
|
||||||
|
{{ end }}
|
||||||
|
|
@ -1,117 +0,0 @@
|
||||||
# Start measuring bottlenecks
|
|
||||||
if [[ "$ZPROF" = true ]]; then
|
|
||||||
zmodload zsh/zprof
|
|
||||||
fi
|
|
||||||
|
|
||||||
#--------------------------------------------------------------------#
|
|
||||||
# ZSH Config #
|
|
||||||
#--------------------------------------------------------------------#
|
|
||||||
|
|
||||||
# Set VIM keybindings
|
|
||||||
bindkey -v
|
|
||||||
export KEYTIMEOUT=1
|
|
||||||
autoload -Uz edit-command-line
|
|
||||||
zle -N edit-command-line
|
|
||||||
bindkey -M vicmd V edit-command-line # Edits files in vim, hit Shift+v in normal mode
|
|
||||||
|
|
||||||
# Add vim text objects
|
|
||||||
autoload -Uz select-bracketed select-quoted
|
|
||||||
zle -N select-quoted
|
|
||||||
zle -N select-bracketed
|
|
||||||
for km in viopp visual; do
|
|
||||||
bindkey -M $km -- '-' vi-up-line-or-history
|
|
||||||
for c in {a,i}${(s..)^:-\'\"\`\|,./:;=+@}; do
|
|
||||||
bindkey -M $km $c select-quoted
|
|
||||||
done
|
|
||||||
for c in {a,i}${(s..)^:-'()[]{}<>bB'}; do
|
|
||||||
bindkey -M $km $c select-bracketed
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
# History
|
|
||||||
export HISTFILE="$HOME/.zsh_history" # History filepath
|
|
||||||
export HISTSIZE=10000 # Maximum events for internal history
|
|
||||||
export SAVEHIST=10000 # Maximum events in history file
|
|
||||||
setopt EXTENDED_HISTORY
|
|
||||||
|
|
||||||
# Navigation
|
|
||||||
setopt AUTO_CD
|
|
||||||
setopt AUTO_PUSHD
|
|
||||||
setopt CDABLE_VARS
|
|
||||||
setopt PUSHD_SILENT
|
|
||||||
|
|
||||||
# Completion
|
|
||||||
setopt AUTO_LIST # Automatically list choices on ambiguous completion.
|
|
||||||
# setopt CORRECT # Turn on spelling correction for command.
|
|
||||||
setopt COMPLETE_IN_WORD # Complete from both ends of a word.
|
|
||||||
setopt GLOB_COMPLETE # Show autocompletion menu with globs
|
|
||||||
setopt MENU_COMPLETE # Automatically highlight first element of completion menu
|
|
||||||
|
|
||||||
fpath+=${ZSH_CUSTOM:-${ZSH:-$XDG_DATA_HOME/oh-my-zsh}/custom}/plugins/zsh-completions/src
|
|
||||||
fpath+=${XDG_CONFIG_HOME:-$DOTS/config}/zsh/completions
|
|
||||||
|
|
||||||
zstyle ':completion:*:descriptions' format '%U%B%d%b%u'
|
|
||||||
zstyle ':completion:*:warnings' format '%F{cyan}%BSorry, no matches for: %d%b%f'
|
|
||||||
zstyle ':completion:*' rehash true
|
|
||||||
zstyle ':completion:*' use-cache on
|
|
||||||
|
|
||||||
# Autocomplete: https://github.com/marlonrichert/zsh-autocomplete/blob/main/.zshrc
|
|
||||||
zstyle ':autocomplete:*' fzf-completion yes
|
|
||||||
zstyle ':autocomplete:*' min-input 1
|
|
||||||
zstyle ':autocomplete:*' widget-style menu-select # Tab select instead of autocomplete
|
|
||||||
|
|
||||||
setopt autocd beep extendedglob notify
|
|
||||||
|
|
||||||
zstyle ':completion:*' group-name ''
|
|
||||||
zstyle :compinstall filename '/home/aleidk/.zshrc'
|
|
||||||
|
|
||||||
zmodload zsh/complist
|
|
||||||
bindkey -M menuselect 'h' vi-backward-char
|
|
||||||
bindkey -M menuselect 'k' vi-up-line-or-history
|
|
||||||
bindkey -M menuselect 'l' vi-forward-char
|
|
||||||
bindkey -M menuselect 'j' vi-down-line-or-history
|
|
||||||
|
|
||||||
# FZF config
|
|
||||||
source /usr/share/fzf/shell/key-bindings.zsh
|
|
||||||
|
|
||||||
autoload -U compinit
|
|
||||||
compinit
|
|
||||||
|
|
||||||
setopt GLOB_DOTS
|
|
||||||
|
|
||||||
# If not running interactively, don't do anything
|
|
||||||
[[ $- != *i* ]] && return
|
|
||||||
|
|
||||||
#--------------------------------------------------------------------#
|
|
||||||
# Start Stuff #
|
|
||||||
#--------------------------------------------------------------------#
|
|
||||||
|
|
||||||
# File directories that are needed to source
|
|
||||||
files=(
|
|
||||||
# zsh
|
|
||||||
$DOTS/config/zsh/**/*.zsh
|
|
||||||
# fzf scripts that need to be sourced
|
|
||||||
$DOTS/scripts/fzf-flatpak
|
|
||||||
# fzf config file
|
|
||||||
$DOOTS/config/fzf/fzfrc
|
|
||||||
)
|
|
||||||
|
|
||||||
for file in $files; do
|
|
||||||
if [[ -f $file ]]; then
|
|
||||||
emulate -L zsh
|
|
||||||
source $file
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ "$ZPROF" = true ]]; then
|
|
||||||
zprof
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval "$(starship init zsh)"
|
|
||||||
# eval "$(zellij setup --generate-auto-start zsh)"
|
|
||||||
eval "$(zoxide init zsh)"
|
|
||||||
eval "$(mise activate zsh)"
|
|
||||||
|
|
||||||
# Load syntax highlight at the end so other configurations can use it
|
|
||||||
# Color scheme for syntax highlighting
|
|
||||||
source ~/.config/zsh/themes/catppuccin_macchiato-zsh-syntax-highlighting.zsh
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
#!/usr/bin/zsh
|
|
||||||
|
|
||||||
update_path() {
|
|
||||||
export PATH="$PATH:$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Set manually
|
|
||||||
export DOTS="$HOME/Repos/Private/dots"
|
|
||||||
export EDITOR=nvim
|
|
||||||
export VISUAL="$EDITOR"
|
|
||||||
export QT_STYLE_OVERRIDE=kvantum
|
|
||||||
export MOZ_ENABLE_WAYLAND=1
|
|
||||||
|
|
||||||
# Dev Stuff
|
|
||||||
export NPM_PACKAGES="$HOME/.npm-packages"
|
|
||||||
export NODE_PATH="$NPM_PACKAGES/lib/node_modules${NODE_PATH:+:$NODE_PATH}"
|
|
||||||
export PNPM_HOME="$HOME/.local/share/pnpm"
|
|
||||||
. "$HOME/.cargo/env"
|
|
||||||
|
|
||||||
# Unset manpath so we can inherit from /etc/manpath via the `manpath`
|
|
||||||
# command
|
|
||||||
unset MANPATH # delete if you already modified MANPATH elsewhere in your config
|
|
||||||
export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"
|
|
||||||
|
|
||||||
# PATH
|
|
||||||
update_path "/usr/local/bin"
|
|
||||||
update_path "$HOME/.local/bin"
|
|
||||||
update_path "$HOME/.cargo/bin/"
|
|
||||||
update_path "$HOME/.spicetify"
|
|
||||||
update_path "$DOTS/scripts"
|
|
||||||
update_path "$HOME/bin"
|
|
||||||
update_path "$NPM_PACKAGES/bin"
|
|
||||||
update_path "$PNPM_HOME"
|
|
||||||
update_path "$HOME/.local/share/rtx/shims"
|
|
||||||
update_path "$HOME/.spicetify"
|
|
||||||
|
|
||||||
|
|
||||||
if [[ -e "$DOTS/config/zsh/zprofile.local" ]]; then
|
|
||||||
source "$DOTS/config/zsh/zprofile.local"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $OSTYPE =~ 'darwin' ]]; then
|
|
||||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
|
||||||
fi
|
|
||||||
|
|
@ -5,11 +5,12 @@ update_path() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set manually
|
# Set manually
|
||||||
export DOTS="$HOME/Repos/Private/dots"
|
export DOTS="$(dirname $(chezmoi source-path))"
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
export VISUAL="$EDITOR"
|
export VISUAL="$EDITOR"
|
||||||
export QT_STYLE_OVERRIDE=kvantum
|
export QT_STYLE_OVERRIDE=kvantum
|
||||||
export MOZ_ENABLE_WAYLAND=1
|
export MOZ_ENABLE_WAYLAND=1
|
||||||
|
export OPENAI_API_KEY="{{ (rbwFields "OpenAI").api_key.value }}"
|
||||||
|
|
||||||
# Dev Stuff
|
# Dev Stuff
|
||||||
export NPM_PACKAGES="$HOME/.npm-packages"
|
export NPM_PACKAGES="$HOME/.npm-packages"
|
||||||
|
|
@ -34,11 +35,6 @@ update_path "$PNPM_HOME"
|
||||||
update_path "$HOME/.local/share/rtx/shims"
|
update_path "$HOME/.local/share/rtx/shims"
|
||||||
update_path "$HOME/.spicetify"
|
update_path "$HOME/.spicetify"
|
||||||
|
|
||||||
|
|
||||||
if [[ -e "$DOTS/config/zsh/zprofile.local" ]]; then
|
|
||||||
source "$DOTS/config/zsh/zprofile.local"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $OSTYPE =~ 'darwin' ]]; then
|
if [[ $OSTYPE =~ 'darwin' ]]; then
|
||||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||||
fi
|
fi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue