mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
Compare commits
12 Commits
24440f845b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
0a59fef11c
|
|||
|
fdf1ba6fb0
|
|||
|
17d83c347d
|
|||
|
c4faef634a
|
|||
|
2795a86441
|
|||
|
03244bd272
|
|||
|
37b97b00f5
|
|||
|
5d6cb3a843
|
|||
|
5561f3ccaf
|
|||
|
3a82ae15df
|
|||
|
d26ca008c0
|
|||
|
d29876b367
|
76
devcontainer-env
Executable file
76
devcontainer-env
Executable file
@@ -0,0 +1,76 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
# Intsalls appropriate dotfiles inside a devcontainer context.
|
||||
|
||||
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"}
|
||||
DEV_ENV=${DEV_ENV:-$(dirname "${BASH_SOURCE[0]}")}
|
||||
|
||||
if [ ! -d "$DEV_ENV" ]; then
|
||||
echo "[ERROR]: DEV_ENV variable does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
log() {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
copy_dir() {
|
||||
local dir=${1:-""}
|
||||
local path="${DEV_ENV}/${dir}"
|
||||
|
||||
if [ -z "$dir" ] || [ ! -d "$path" ]; then
|
||||
log "[ERROR]: Directory does not exist: $dir"
|
||||
exit 1
|
||||
else
|
||||
log "Copying dir: $dir"
|
||||
cp -R "$path" "$XDG_CONFIG_HOME"
|
||||
fi
|
||||
}
|
||||
|
||||
copy_file() {
|
||||
local file=${1:-""}
|
||||
|
||||
if [[ -z "$file" ]] || [[ ! -f "$file" ]]; then
|
||||
log "[ERROR]: file does not exist: $file"
|
||||
exit 1
|
||||
else
|
||||
log "Copying file: $file"
|
||||
cp "$DEV_ENV/$file" "$HOME"
|
||||
fi
|
||||
}
|
||||
|
||||
# MAIN
|
||||
dirs=(
|
||||
env/.config/eza
|
||||
env/.config/git
|
||||
env/.config/ripgrep
|
||||
env/.config/starship
|
||||
env/.config/yazi
|
||||
env/.config/zsh
|
||||
)
|
||||
|
||||
files=(
|
||||
env/.markdownlint.jsonc
|
||||
env/.prettierrc
|
||||
env/.tmux.conf
|
||||
env/.zshenv
|
||||
)
|
||||
|
||||
for dir in "${dirs[@]}"; do
|
||||
copy_dir "$dir"
|
||||
done
|
||||
|
||||
for file in "${files[@]}"; do
|
||||
copy_file "$file"
|
||||
done
|
||||
|
||||
# Install neovim config
|
||||
git submodule update --init --remote env/.config/nvim
|
||||
source env/.config/nvim/install.sh
|
||||
|
||||
# Install my scripts
|
||||
cp -R env/.local/scripts "$HOME/.local"
|
||||
9
env/.config/hypr/hyprpaper.conf
vendored
9
env/.config/hypr/hyprpaper.conf
vendored
@@ -1,3 +1,6 @@
|
||||
preload = /home/michael/wallpapers/wall1.png
|
||||
wallpaper = ,/home/michael/wallpapers/wall1.png
|
||||
splash = true
|
||||
wallpaper {
|
||||
monitor =
|
||||
path = /home/michael/wallpapers/wall1.png
|
||||
fit_mode = cover
|
||||
}
|
||||
|
||||
|
||||
12
env/.config/starship/starship.toml
vendored
12
env/.config/starship/starship.toml
vendored
@@ -7,7 +7,9 @@ format = """
|
||||
$os\
|
||||
$username\
|
||||
$hostname\
|
||||
[](bg:color_pink fg:color_orange)\
|
||||
[](bg:color_lavender fg:color_orange)\
|
||||
${custom.devpod}\
|
||||
[](bg:color_pink fg:color_lavender)\
|
||||
$directory\
|
||||
[](fg:color_pink bg:color_bg1)\
|
||||
$git_branch\
|
||||
@@ -33,6 +35,14 @@ color_maroon = '#eba0ac'
|
||||
color_pink = '#f5c2e7'
|
||||
color_text = '#585b70'
|
||||
|
||||
[custom.devpod]
|
||||
description = "Displays the active Devpod workspace"
|
||||
command = "echo $(echo $DEVPOD_WORKSPACE_ID | sed 's/.*://')"
|
||||
when = "[[ -n $DEVPOD_WORKSPACE_ID ]]"
|
||||
style = "bold bg:color_lavender fg:color_text"
|
||||
format = "[ 📦 $output ]($style)"
|
||||
disabled = false
|
||||
|
||||
[os]
|
||||
disabled = false
|
||||
style = "bold bg:color_orange fg:color_fg0"
|
||||
|
||||
7
env/.config/zsh/.zshrc
vendored
7
env/.config/zsh/.zshrc
vendored
@@ -175,7 +175,8 @@ alias pass='PASSWORD_STORE_DIR=/home/michael/.local/share/gopass/stores/root gop
|
||||
alias pc='gopass show --clip' # get an attribute of a password file and copy to the clipboard.
|
||||
alias reload='exec zsh -l' # reload the shell, useful when making changes.
|
||||
alias s='swift' # shorthand to access swift commands
|
||||
alias st='swift test' # swift test
|
||||
alias st='swift test' # swift test
|
||||
alias ste='swift test --enable-code-coverage' # swift test with code coverage enabled.
|
||||
alias sb='swift build' # swift build
|
||||
alias syu='yay -Syu' # Update packages.
|
||||
alias t='tmux' # access tmux quickly
|
||||
@@ -238,3 +239,7 @@ use-gpg-agent-for-ssh
|
||||
|
||||
command -v direnv >/dev/null 2>&1 && eval "$(direnv hook zsh)"
|
||||
command -v zoxide >/dev/null 2>&1 && eval "$(zoxide init --cmd cd zsh)"
|
||||
|
||||
if [[ -n "$DEVPOD_WORKSPACE_ID" ]]; then
|
||||
export TERM=xterm-256color
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user