Initial commit
This commit is contained in:
3
zsh/.profile.d/dotfiles.sh
Executable file
3
zsh/.profile.d/dotfiles.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#/usr/bin/env bash
|
||||
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
3
zsh/.profile.d/editor.sh
Executable file
3
zsh/.profile.d/editor.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export EDITOR=vim
|
||||
38
zsh/.profile.d/fzf.sh
Executable file
38
zsh/.profile.d/fzf.sh
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
is_debian_based() {
|
||||
# Checking /etc/os-release
|
||||
if [[ -f /etc/os-release ]]; then
|
||||
. /etc/os-release
|
||||
if [[ "$ID_LIKE" == *"debian"* ]] || [[ "$ID" == "debian" ]]; then
|
||||
return 0 # OK: Debian-based
|
||||
fi
|
||||
fi
|
||||
|
||||
# Alternative check: /etc/debian_version
|
||||
if [[ -f /etc/debian_version ]]; then
|
||||
return 0 # OK: Debian-based
|
||||
fi
|
||||
|
||||
return 1 # NO Debian-based
|
||||
}
|
||||
|
||||
# Add fzf keybindings and enhancements
|
||||
if is_debian_based; then
|
||||
export FZF_CTRL_T_COMMAND="fdfind --type f"
|
||||
export FZF_ALT_C_COMMAND="fdfind --type d"
|
||||
else
|
||||
export FZF_CTRL_T_COMMAND="fd --type f"
|
||||
export FZF_ALT_C_COMMAND="fd --type d"
|
||||
fi
|
||||
|
||||
export FZF_CTRL_R_OPTS="--preview 'echo {}'"
|
||||
|
||||
# Export Catppuccin Mocha theme for FZF
|
||||
export FZF_DEFAULT_OPTS=" \
|
||||
--height 60% --layout=reverse --border \
|
||||
--color=bg+:#313244,bg:#1E1E2E,spinner:#F5E0DC,hl:#F38BA8 \
|
||||
--color=fg:#CDD6F4,header:#F38BA8,info:#CBA6F7,pointer:#F5E0DC \
|
||||
--color=marker:#B4BEFE,fg+:#CDD6F4,prompt:#CBA6F7,hl+:#F38BA8 \
|
||||
--color=selected-bg:#45475A \
|
||||
--color=border:#313244,label:#CDD6F4"
|
||||
3
zsh/.profile.d/ghcup.sh
Executable file
3
zsh/.profile.d/ghcup.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
[ -f "$HOME/.ghcup/env" ] && . "$HOME/.ghcup/env"
|
||||
12
zsh/.profile.d/go.sh
Executable file
12
zsh/.profile.d/go.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
case $(uname -s) in
|
||||
"Linux")
|
||||
export GOPATH="$HOME/.local/share/Go";;
|
||||
"Darwin")
|
||||
export GOPATH="$HOME/Library/Go";;
|
||||
*)
|
||||
echo "Operating System unknown";;
|
||||
esac
|
||||
|
||||
export GOBIN=$GOPATH/bin
|
||||
3
zsh/.profile.d/graalvm.sh
Executable file
3
zsh/.profile.d/graalvm.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export GRAALVM_HOME="${HOME}/.local/share/mise/installs/java/graalvm-community-23.0.1"
|
||||
5
zsh/.profile.d/help.sh
Executable file
5
zsh/.profile.d/help.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ $SHELL == "zsh" ]]; then
|
||||
export HELPDIR=/usr/share/zsh/"${ZSH_VERSION}"/help
|
||||
fi
|
||||
3
zsh/.profile.d/homebrew.sh
Executable file
3
zsh/.profile.d/homebrew.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
3
zsh/.profile.d/java.sh
Executable file
3
zsh/.profile.d/java.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export JAVA_HOME="${HOME}/.local/share/mise/installs/java/23.0.1"
|
||||
4
zsh/.profile.d/jmeter.sh
Executable file
4
zsh/.profile.d/jmeter.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
JMETER_HOME="$(which jmeter)"
|
||||
export JMETER_HOME
|
||||
5
zsh/.profile.d/rust.sh
Executable file
5
zsh/.profile.d/rust.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -e "$HOME/.cargo" ]; then
|
||||
source "$HOME/.cargo/env"
|
||||
fi
|
||||
41
zsh/.profile.d/ssh-agent.sh
Executable file
41
zsh/.profile.d/ssh-agent.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
# This script sets up ssh-agent and gpg-agent differently for WSL and Linux Mint.
|
||||
# On WSL, it uses keychain to start agents.
|
||||
# On Linux Mint (or other Linux), it assumes gnome-keyring manages agents automatically.
|
||||
|
||||
# Detect if running inside WSL by checking /proc/version for "Microsoft"
|
||||
if grep -qi microsoft /proc/version; then
|
||||
IS_WSL=true
|
||||
else
|
||||
IS_WSL=false
|
||||
fi
|
||||
|
||||
if [ "$IS_WSL" = true ]; then
|
||||
# We are in WSL - start keychain for ssh and gpg agents
|
||||
# Adjust these variables to your actual SSH and GPG key names
|
||||
SSH_KEY="$HOME/.ssh/id_rsa_deadalus"
|
||||
#GPG_KEY=9DDD59AD62494FB2
|
||||
|
||||
# Check if keychain is installed
|
||||
if command -v keychain >/dev/null 2>&1; then
|
||||
SHORT_HOST=${SHORT_HOST:-${(%):-%m}}
|
||||
|
||||
# Start keychain quietly with no GUI prompts for ssh agents
|
||||
eval "$(keychain --quiet --nogui --agents ssh $SSH_KEY)"
|
||||
|
||||
# Get the filenames to store/lookup the environment from
|
||||
_keychain_env_sh="$HOME/.keychain/$SHORT_HOST-sh"
|
||||
_keychain_env_sh_gpg="$HOME/.keychain/$SHORT_HOST-sh-gpg"
|
||||
|
||||
# Source environment settings.
|
||||
[ -f "$_keychain_env_sh" ] && . "$_keychain_env_sh"
|
||||
[ -f "$_keychain_env_sh_gpg" ] && . "$_keychain_env_sh_gpg"
|
||||
else
|
||||
echo "Warning: keychain is not installed. Please install keychain to manage ssh/gpg agents."
|
||||
fi
|
||||
else
|
||||
# Not WSL - assume gnome-keyring handles ssh-agent and gpg-agent
|
||||
# Do nothing here to avoid conflicts with gnome-keyring
|
||||
fi
|
||||
|
||||
9
zsh/.profile.d/sway-startup.sh
Executable file
9
zsh/.profile.d/sway-startup.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||
if [ -n "$DBUS_SESSION_BUS_ADDRESS" ]; then
|
||||
exec sway
|
||||
else
|
||||
exec dbus-launch --exit-with-session sway
|
||||
fi
|
||||
fi
|
||||
3
zsh/.profile.d/venv.sh
Executable file
3
zsh/.profile.d/venv.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#/usr/bin/env bash
|
||||
|
||||
export VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||
Reference in New Issue
Block a user