mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-05 04:49:00 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dc76fa8914 | |||
| 3413365d41 | |||
| 37299f4893 | |||
| 71a78c6e0c | |||
| 3f8a4deb05 | |||
| ffe288aba3 |
5
.luarc.json
Normal file
5
.luarc.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"diagnostics.globals": [
|
||||||
|
"vim"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
1password-cli 2.29.0
|
1password-cli 2.29.0
|
||||||
age 1.2.0
|
age 1.2.0
|
||||||
asdf-plugin-manager 1.3.1
|
asdf-plugin-manager 1.3.1
|
||||||
bottom 0.9.6
|
bottom 0.9.7
|
||||||
dotenv-linter 3.3.0
|
dotenv-linter 3.3.0
|
||||||
editorconfig-checker 2.8.0
|
editorconfig-checker 2.8.0
|
||||||
eza 0.18.22
|
eza 0.18.23
|
||||||
fd 10.1.0
|
fd 10.1.0
|
||||||
github-cli 2.53.0
|
github-cli 2.53.0
|
||||||
golang 1.22.5
|
golang 1.22.5
|
||||||
@@ -12,7 +12,7 @@ hadolint 2.12.0
|
|||||||
kubectl 1.30.3
|
kubectl 1.30.3
|
||||||
lazygit 0.43.1
|
lazygit 0.43.1
|
||||||
neovim system
|
neovim system
|
||||||
nodejs 22.4.1
|
nodejs 22.5.1
|
||||||
pipx 1.6.0
|
pipx 1.6.0
|
||||||
pre-commit 3.7.1
|
pre-commit 3.7.1
|
||||||
ripgrep 14.1.0
|
ripgrep 14.1.0
|
||||||
@@ -22,7 +22,7 @@ shellcheck 0.10.0
|
|||||||
shfmt 3.8.0
|
shfmt 3.8.0
|
||||||
terraform-ls 0.33.3
|
terraform-ls 0.33.3
|
||||||
terraform-lsp 0.0.12
|
terraform-lsp 0.0.12
|
||||||
terragrunt 0.63.3
|
terragrunt 0.64.0
|
||||||
tf-summarize 0.3.10
|
tf-summarize 0.3.10
|
||||||
vault 1.17.2+ent
|
vault 1.17.2+ent
|
||||||
yamllint 1.35.1
|
yamllint 1.35.1
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
# if DOTFILES is not set, set it to the default location
|
# if DOTFILES is not set, set it to the default location
|
||||||
[ -z "$DOTFILES" ] && export DOTFILES="$HOME/.dotfiles"
|
[ -z "$DOTFILES" ] && export DOTFILES="$HOME/.dotfiles"
|
||||||
|
|
||||||
|
export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$XDG_DATA_HOME/bob/nvim-bin:$XDG_DATA_HOME/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
|
||||||
|
|
||||||
if ! command -v msg &> /dev/null; then
|
if ! command -v msg &> /dev/null; then
|
||||||
# Function to print messages if VERBOSE is enabled
|
# Function to print messages if VERBOSE is enabled
|
||||||
# $1 - message (string)
|
# $1 - message (string)
|
||||||
@@ -69,10 +71,11 @@ darknotify_alacritty()
|
|||||||
x-have dark-notify && {
|
x-have dark-notify && {
|
||||||
# subprocess is used to prevent the command from showing it was backgrounded
|
# subprocess is used to prevent the command from showing it was backgrounded
|
||||||
(
|
(
|
||||||
flock /tmp/dark-notify-alacritty.lock dark-notify \
|
silent flock /tmp/dark-notify-alacritty.lock dark-notify \
|
||||||
-c "$HOME/.dotfiles/local/bin/x-change-alacritty-theme" &
|
-c "$HOME/.dotfiles/local/bin/x-change-alacritty-theme" &
|
||||||
) &> /dev/null
|
) &> /dev/null
|
||||||
}
|
}
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
darknotify_alacritty
|
darknotify_alacritty
|
||||||
|
|
||||||
@@ -98,14 +101,14 @@ have_brew()
|
|||||||
# Alacritty preexec hook to update dynamic title
|
# Alacritty preexec hook to update dynamic title
|
||||||
preexec()
|
preexec()
|
||||||
{
|
{
|
||||||
print -Pn "\e]0;$1%~\a"
|
print -n -P "\e]0;$1%~\a"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Update dotfiles
|
# Update dotfiles
|
||||||
dfu()
|
dfu()
|
||||||
{
|
{
|
||||||
(
|
(
|
||||||
cd "$DOTFILES" && git pull --ff-only && ./install -q
|
cd "$DOTFILES" && git pull --ff-only && ./install
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,17 +367,6 @@ msg "Setting up Go configuration"
|
|||||||
export GOPATH="$XDG_DATA_HOME/go"
|
export GOPATH="$XDG_DATA_HOME/go"
|
||||||
export GOBIN="$XDG_BIN_HOME"
|
export GOBIN="$XDG_BIN_HOME"
|
||||||
|
|
||||||
# Herd, herd.laravel.com
|
|
||||||
# Herd injected PHP binary.
|
|
||||||
msg "Setting up Herd configuration"
|
|
||||||
export PATH="$HOME/Library/Application\ Support/Herd/bin/":$PATH
|
|
||||||
x-have herd && {
|
|
||||||
# Herd injected PHP 8.3 configuration.
|
|
||||||
export HERD_PHP_83_INI_SCAN_DIR="$HOME/Library/Application\ Support/Herd/config/php/83/"
|
|
||||||
# Herd injected PHP 7.4 configuration.
|
|
||||||
export HERD_PHP_74_INI_SCAN_DIR="$HOME/Library/Application\ Support/Herd/config/php/74/"
|
|
||||||
}
|
|
||||||
|
|
||||||
# nb, https://xwmx.github.io/nb/
|
# nb, https://xwmx.github.io/nb/
|
||||||
msg "Setting up nb configuration"
|
msg "Setting up nb configuration"
|
||||||
export NBRC_PATH="$XDG_CONFIG_HOME/nbrc"
|
export NBRC_PATH="$XDG_CONFIG_HOME/nbrc"
|
||||||
@@ -461,3 +453,4 @@ x-dc "$WAKATIME_HOME"
|
|||||||
msg "Setting up miscellaneous configuration"
|
msg "Setting up miscellaneous configuration"
|
||||||
export CHEAT_USE_FZF=true
|
export CHEAT_USE_FZF=true
|
||||||
export SQLITE_HISTORY="${XDG_CACHE_HOME}/sqlite_history"
|
export SQLITE_HISTORY="${XDG_CACHE_HOME}/sqlite_history"
|
||||||
|
|
||||||
|
|||||||
Submodule config/nvim-kickstart updated: 122c6938c1...1c129627e8
@@ -6,13 +6,6 @@
|
|||||||
# Set verbosity with VERBOSE=1
|
# Set verbosity with VERBOSE=1
|
||||||
VERBOSE="${VERBOSE:-0}"
|
VERBOSE="${VERBOSE:-0}"
|
||||||
|
|
||||||
# Function to print usage information
|
|
||||||
usage()
|
|
||||||
{
|
|
||||||
echo "Usage: $0 <dir>"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to print messages if VERBOSE is enabled
|
# Function to print messages if VERBOSE is enabled
|
||||||
# $1 - message (string)
|
# $1 - message (string)
|
||||||
msg()
|
msg()
|
||||||
@@ -20,48 +13,28 @@ msg()
|
|||||||
[[ "$VERBOSE" -eq 1 ]] && echo "$1"
|
[[ "$VERBOSE" -eq 1 ]] && echo "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to remove a directory from PATH
|
if [ "$#" -ne 1 ]; then
|
||||||
# $1 - directory to remove (string)
|
echo "Usage: $0 <dir>"
|
||||||
remove_from_path()
|
exit 1
|
||||||
{
|
fi
|
||||||
local dir=$1
|
|
||||||
|
|
||||||
if echo "$PATH" | grep -qE "(^|:)$dir($|:)"; then
|
dir="$1"
|
||||||
export PATH=$(echo -n "$PATH" | awk -v RS=: -v ORS=: "\$0 != \"$dir\"" | sed 's/:$//')
|
|
||||||
msg "Directory $dir has been removed from PATH"
|
|
||||||
else
|
|
||||||
msg "Directory $dir is not in PATH"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to append a directory to PATH
|
if echo "$PATH" | grep -qE "(^|:)$dir($|:)"; then
|
||||||
# $1 - directory to append (string)
|
export PATH=$(echo -n "$PATH" | awk -v RS=: -v ORS=: "\$0 != \"$dir\"" | sed 's/:$//')
|
||||||
append_to_path()
|
msg "Directory $dir has been removed from PATH"
|
||||||
{
|
else
|
||||||
local dir=$1
|
msg "Directory $dir is not in PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d "$dir" ]; then
|
if [ ! -d "$dir" ]; then
|
||||||
msg "(?) Directory $dir does not exist"
|
msg "(?) Directory $dir does not exist"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if echo "$PATH" | grep -qE "(^|:)$dir($|:)"; then
|
if echo "$PATH" | grep -qE "(^|:)$dir($|:)"; then
|
||||||
msg "(!) Directory $dir is already in PATH"
|
msg "(!) Directory $dir is already in PATH"
|
||||||
else
|
else
|
||||||
export PATH="${PATH:+"$PATH:"}$dir"
|
export PATH="${PATH:+"$PATH:"}$dir"
|
||||||
msg "(!) Directory $dir has been added to the end of PATH"
|
msg "(!) Directory $dir has been added to the end of PATH"
|
||||||
fi
|
fi
|
||||||
}
|
|
||||||
|
|
||||||
# Main function
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
if [ "$#" -ne 1 ]; then
|
|
||||||
usage
|
|
||||||
fi
|
|
||||||
|
|
||||||
remove_from_path "$1"
|
|
||||||
append_to_path "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
|
|||||||
@@ -6,13 +6,6 @@
|
|||||||
# Set verbosity with VERBOSE=1
|
# Set verbosity with VERBOSE=1
|
||||||
VERBOSE="${VERBOSE:-0}"
|
VERBOSE="${VERBOSE:-0}"
|
||||||
|
|
||||||
# Function to print usage information
|
|
||||||
usage()
|
|
||||||
{
|
|
||||||
echo "Usage: $0 <dir>"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to print messages if VERBOSE is enabled
|
# Function to print messages if VERBOSE is enabled
|
||||||
# $1 - message (string)
|
# $1 - message (string)
|
||||||
msg()
|
msg()
|
||||||
@@ -20,33 +13,21 @@ msg()
|
|||||||
[[ "$VERBOSE" -eq 1 ]] && echo "$1"
|
[[ "$VERBOSE" -eq 1 ]] && echo "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to add a directory to the front of PATH
|
if [ "$#" -ne 1 ]; then
|
||||||
# $1 - directory to add (string)
|
echo "Usage: $0 <dir>"
|
||||||
prepend_to_path()
|
exit 1
|
||||||
{
|
fi
|
||||||
local dir=$1
|
|
||||||
|
|
||||||
if [ ! -d "$dir" ]; then
|
dir="$1"
|
||||||
msg "(?) Directory $dir does not exist"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if echo "$PATH" | grep -qE "(^|:)$dir($|:)"; then
|
if [ ! -d "$dir" ]; then
|
||||||
msg "(!) Directory $dir is already in PATH"
|
msg "(?) Directory $dir does not exist"
|
||||||
else
|
exit 0
|
||||||
export PATH="$dir${PATH:+":$PATH"}"
|
fi
|
||||||
msg "(!) Directory $dir has been added to the front of PATH"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Main function
|
if echo "$PATH" | grep -qE "(^|:)$dir($|:)"; then
|
||||||
main()
|
msg "(!) Directory $dir is already in PATH"
|
||||||
{
|
else
|
||||||
if [ "$#" -ne 1 ]; then
|
export PATH="$dir${PATH:+":$PATH"}"
|
||||||
usage
|
msg "(!) Directory $dir has been added to the front of PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
prepend_to_path "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
|
|||||||
@@ -6,13 +6,6 @@
|
|||||||
# Set verbosity with VERBOSE=1
|
# Set verbosity with VERBOSE=1
|
||||||
VERBOSE="${VERBOSE:-0}"
|
VERBOSE="${VERBOSE:-0}"
|
||||||
|
|
||||||
# Function to print usage information
|
|
||||||
usage()
|
|
||||||
{
|
|
||||||
echo "Usage: $0 <dir>"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Function to print messages if VERBOSE is enabled
|
# Function to print messages if VERBOSE is enabled
|
||||||
# $1 - message (string)
|
# $1 - message (string)
|
||||||
msg()
|
msg()
|
||||||
@@ -20,29 +13,17 @@ msg()
|
|||||||
[[ "$VERBOSE" -eq 1 ]] && echo "$1"
|
[[ "$VERBOSE" -eq 1 ]] && echo "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to remove a directory from PATH
|
if [ "$#" -ne 1 ]; then
|
||||||
# $1 - directory to remove (string)
|
echo "Usage: $0 <dir>"
|
||||||
remove_from_path()
|
exit 1
|
||||||
{
|
fi
|
||||||
local dir=$1
|
|
||||||
|
|
||||||
if ! echo "$PATH" | grep -qE "(^|:)$dir($|:)"; then
|
dir="$1"
|
||||||
msg "(?) Directory $dir is not in PATH"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
export PATH=$(echo -n "$PATH" | awk -v RS=: -v ORS=: "\$0 != \"$dir\"" | sed 's/:$//')
|
if ! echo "$PATH" | grep -qE "(^|:)$dir($|:)"; then
|
||||||
msg "(!) Directory $dir has been removed from PATH"
|
msg "(?) Directory $dir is not in PATH"
|
||||||
}
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Main function
|
export PATH=$(echo -n "$PATH" | awk -v RS=: -v ORS=: "\$0 != \"$dir\"" | sed 's/:$//')
|
||||||
main()
|
msg "(!) Directory $dir has been removed from PATH"
|
||||||
{
|
|
||||||
if [ "$#" -ne 1 ]; then
|
|
||||||
usage
|
|
||||||
fi
|
|
||||||
|
|
||||||
remove_from_path "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user