mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-01 22:47:48 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 42706adf0b | |||
| fef9398a86 | |||
| c37df72f12 | |||
|
|
45a2330425 |
BIN
.github/screenshots/tmux-astronvim-130x40.png
vendored
Normal file
BIN
.github/screenshots/tmux-astronvim-130x40.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 154 KiB |
BIN
.github/screenshots/tmux-powerlevel10k-130x20.png
vendored
Normal file
BIN
.github/screenshots/tmux-powerlevel10k-130x20.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
5
.ignore
Normal file
5
.ignore
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
config/cheat/cheatsheets/community/**
|
||||||
|
config/tmux/**
|
||||||
|
config/nvim/**
|
||||||
|
tools/**
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
config/cheat/cheatsheets/community/
|
|
||||||
config/tmux/
|
|
||||||
config/nvim/
|
|
||||||
tools/
|
|
||||||
|
|
||||||
2
Brewfile
2
Brewfile
@@ -240,8 +240,6 @@ brew "rust"
|
|||||||
brew "shellcheck"
|
brew "shellcheck"
|
||||||
# Autoformat shell script source code
|
# Autoformat shell script source code
|
||||||
brew "shfmt"
|
brew "shfmt"
|
||||||
# Cross-shell prompt for astronauts
|
|
||||||
brew "starship"
|
|
||||||
# Version control system designed to be a better CVS
|
# Version control system designed to be a better CVS
|
||||||
brew "subversion"
|
brew "subversion"
|
||||||
# Feature-rich console based todo list manager
|
# Feature-rich console based todo list manager
|
||||||
|
|||||||
18
README.md
18
README.md
@@ -23,13 +23,13 @@ fork or download the repo as a zip and go from there with your own configs.
|
|||||||
|
|
||||||
## The looks
|
## The looks
|
||||||
|
|
||||||
## tmux with starship, the default view
|
## tmux with powerlevel10k, the default view
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## tmux + nvim (astronvim) editing this repository
|
## tmux + nvim (astronvim) editing this repository
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Interesting files and locations
|
## Interesting files and locations
|
||||||
|
|
||||||
@@ -61,12 +61,12 @@ The folder structure follows [XDG Base Directory Specification][xdg] where possi
|
|||||||
|
|
||||||
### XDG Variables
|
### XDG Variables
|
||||||
|
|
||||||
| Env | Default |
|
| Env | Default | Short description |
|
||||||
|--------------------|----------------------|
|
|--------------------|----------------------|------------------------------------------------|
|
||||||
| `$XDG_BIN_HOME` | `$HOME/.local/bin` |
|
| `$XDG_BIN_HOME` | `$HOME/.local/bin` | Local binaries |
|
||||||
| `$XDG_CONFIG_HOME` | `$HOME/.config` |
|
| `$XDG_CONFIG_HOME` | `$HOME/.config` | User-specific configs |
|
||||||
| `$XDG_DATA_HOME` | `$HOME/.local/share` |
|
| `$XDG_DATA_HOME` | `$HOME/.local/share` | User-specific data files |
|
||||||
| `$XDG_STATE_HOME` | `$HOME/.local/state` |
|
| `$XDG_STATE_HOME` | `$HOME/.local/state` | App state that should persist between restarts |
|
||||||
|
|
||||||
- `$XDG_BIN_HOME` defines directory that contains local binaries.
|
- `$XDG_BIN_HOME` defines directory that contains local binaries.
|
||||||
- `$XDG_DATA_HOME` defines the base directory relative to which user-specific data
|
- `$XDG_DATA_HOME` defines the base directory relative to which user-specific data
|
||||||
|
|||||||
20
base/bashrc
20
base/bashrc
@@ -1,8 +1,10 @@
|
|||||||
# Fig pre block. Keep at the top of this file.
|
|
||||||
[[ -f "$HOME/.fig/shell/bashrc.pre.bash" ]] && builtin source "$HOME/.fig/shell/bashrc.pre.bash"
|
|
||||||
# this is my bashrc config. there are many like it, but this one is mine.
|
# this is my bashrc config. there are many like it, but this one is mine.
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
# Fig pre block. Keep at the top of this file.
|
||||||
|
[[ -f "$HOME/.fig/shell/bashrc.pre.bash" ]] \
|
||||||
|
&& builtin source "$HOME/.fig/shell/bashrc.pre.bash"
|
||||||
|
|
||||||
# Defaults
|
# Defaults
|
||||||
export DOTFILES="$HOME/.dotfiles"
|
export DOTFILES="$HOME/.dotfiles"
|
||||||
|
|
||||||
@@ -11,10 +13,10 @@ function x-load-configs()
|
|||||||
{
|
{
|
||||||
# Load the shell dotfiles, and then some:
|
# Load the shell dotfiles, and then some:
|
||||||
for file in $DOTFILES/config/{exports,alias,functions}; do
|
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||||
[ -r "$file" ] && [ -f "$file" ] && source "$file"
|
[ -r "$file" ] && source "$file"
|
||||||
[ -r "$file-secret" ] && [ -f "$file-secret" ] && source "$file-secret"
|
[ -r "$file-secret" ] && source "$file-secret"
|
||||||
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
[ -r "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
||||||
[ -r "$file-$HOSTNAME-secret" ] && [ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
[ -r "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
x-load-configs
|
x-load-configs
|
||||||
@@ -22,7 +24,9 @@ x-load-configs
|
|||||||
# Import ssh keys in keychain
|
# Import ssh keys in keychain
|
||||||
ssh-add -A 2>/dev/null;
|
ssh-add -A 2>/dev/null;
|
||||||
|
|
||||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash ] && source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.bash
|
[ -f "${DOTFILES}/config/fzf/fzf.bash" ] \
|
||||||
|
&& source "${DOTFILES}/config/fzf/fzf.bash"
|
||||||
|
|
||||||
# Fig post block. Keep at the bottom of this file.
|
# Fig post block. Keep at the bottom of this file.
|
||||||
[[ -f "$HOME/.fig/shell/bashrc.post.bash" ]] && builtin source "$HOME/.fig/shell/bashrc.post.bash"
|
[[ -f "$HOME/.fig/shell/bashrc.post.bash" ]] \
|
||||||
|
&& builtin source "$HOME/.fig/shell/bashrc.post.bash"
|
||||||
|
|||||||
1713
base/p10k.zsh
Normal file
1713
base/p10k.zsh
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
|||||||
ZDOTDIR=~/.config/zsh
|
|
||||||
70
base/zshrc
70
base/zshrc
@@ -1,10 +1,70 @@
|
|||||||
# Fig pre block. Keep at the top of this file.
|
|
||||||
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.pre.zsh"
|
|
||||||
# this is my zsh config. there are many like it, but this one is mine.
|
# this is my zsh config. there are many like it, but this one is mine.
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
export ZDOTDIR="$HOME/.config/zsh/"
|
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||||
mkdir -p "$ZDOTDIR"
|
# Initialization code that may require console input (password prompts, [y/n]
|
||||||
|
# confirmations, etc.) must go above this block; everything else may go below.
|
||||||
|
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||||
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fig pre block. Keep at the top of this file.
|
||||||
|
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] \
|
||||||
|
&& builtin source "$HOME/.fig/shell/zshrc.pre.zsh"
|
||||||
|
|
||||||
|
# Defaults
|
||||||
|
export DOTFILES="$HOME/.dotfiles"
|
||||||
|
# shellcheck source=shared.sh
|
||||||
|
source "$DOTFILES/scripts/shared.sh"
|
||||||
|
|
||||||
|
autoload -U colors zsh/terminfo
|
||||||
|
colors
|
||||||
|
setopt correct
|
||||||
|
|
||||||
|
# Add completion scripts to zsh path
|
||||||
|
FPATH="~/.config/zsh/completion:$FPATH"
|
||||||
|
autoload -Uz compinit && compinit -i
|
||||||
|
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
|
||||||
|
|
||||||
|
# Run x-load-configs in your terminal to reload the files.
|
||||||
|
function x-load-configs()
|
||||||
|
{
|
||||||
|
# Load the shell dotfiles, and then some:
|
||||||
|
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||||
|
[ -r "$file" ] && source "$file"
|
||||||
|
[ -r "$file-secret" ] && source "$file-secret"
|
||||||
|
[ -r "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
||||||
|
[ -r "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
x-load-configs
|
||||||
|
|
||||||
|
# Import ssh keys in keychain
|
||||||
|
ssh-add -A 2>/dev/null;
|
||||||
|
|
||||||
|
# Try to load antigen, if present
|
||||||
|
ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
|
||||||
|
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
|
||||||
|
|
||||||
|
# antigen is present
|
||||||
|
have antigen && {
|
||||||
|
antigen use oh-my-zsh
|
||||||
|
|
||||||
|
# config/functions
|
||||||
|
x-default-antigen-bundles
|
||||||
|
|
||||||
|
antigen apply
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -f "${DOTFILES}/config/fzf/fzf.zsh" ] \
|
||||||
|
&& source "${DOTFILES}/config/fzf/fzf.zsh"
|
||||||
|
|
||||||
|
export LESSHISTFILE="$XDG_CACHE_HOME"/less_history
|
||||||
|
|
||||||
# Fig post block. Keep at the bottom of this file.
|
# Fig post block. Keep at the bottom of this file.
|
||||||
[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.post.zsh"
|
[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] \
|
||||||
|
&& builtin source "$HOME/.fig/shell/zshrc.post.zsh"
|
||||||
|
|
||||||
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||||
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,11 @@ if [[ $(uname) == 'Darwin' ]]; then
|
|||||||
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
|
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# tmux: automatically attach or create session with name 'main'
|
||||||
|
alias tmux='tmux new-session -A -s main'
|
||||||
|
# tmux: attach or create new session
|
||||||
|
alias ta='tmux attach || tmux'
|
||||||
|
|
||||||
# watch with: differences, precise, beep and color
|
# watch with: differences, precise, beep and color
|
||||||
alias watchx='watch -dpbc'
|
alias watchx='watch -dpbc'
|
||||||
# delete .DS_Store files
|
# delete .DS_Store files
|
||||||
|
|||||||
@@ -84,6 +84,9 @@ ask()
|
|||||||
# Defines default antigen bundles
|
# Defines default antigen bundles
|
||||||
x-default-antigen-bundles()
|
x-default-antigen-bundles()
|
||||||
{
|
{
|
||||||
|
# the theme to use
|
||||||
|
antigen theme romkatv/powerlevel10k
|
||||||
|
|
||||||
# these should be always available
|
# these should be always available
|
||||||
antigen bundle colored-man-pages
|
antigen bundle colored-man-pages
|
||||||
antigen bundle command-not-found
|
antigen bundle command-not-found
|
||||||
|
|||||||
Submodule config/nvim updated: 382b8989f5...ffaa3877f0
@@ -1,37 +0,0 @@
|
|||||||
# Get editor completions based on the config schema
|
|
||||||
"$schema" = 'https://starship.rs/config-schema.json'
|
|
||||||
|
|
||||||
# Inserts a blank line between shell prompts
|
|
||||||
add_newline = true
|
|
||||||
|
|
||||||
# Timeout for commands executed by starship (in milliseconds).
|
|
||||||
command_timeout = 1000
|
|
||||||
|
|
||||||
# Replace the '❯' symbol in the prompt with '➜'
|
|
||||||
[character] # The name of the module we are configuring is 'character'
|
|
||||||
success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green'
|
|
||||||
|
|
||||||
[cmd_duration]
|
|
||||||
disabled = true
|
|
||||||
|
|
||||||
[git_branch]
|
|
||||||
symbol = '🌱 '
|
|
||||||
truncation_length = 20
|
|
||||||
truncation_symbol = '…'
|
|
||||||
ignore_branches = ['master', 'main']
|
|
||||||
|
|
||||||
[git_status]
|
|
||||||
up_to_date = '✓'
|
|
||||||
staged = '[++\($count\)](green)'
|
|
||||||
|
|
||||||
[package]
|
|
||||||
format = '[$symbol($version )]($style)'
|
|
||||||
version_format = '${major}.${minor}'
|
|
||||||
|
|
||||||
[php]
|
|
||||||
format = '[$symbol($version )]($style)'
|
|
||||||
version_format = '${major}.${minor}'
|
|
||||||
|
|
||||||
[nodejs]
|
|
||||||
format = '[$symbol($version )]($style)'
|
|
||||||
version_format = '${major}.${minor}'
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
autoload -U colors zsh/terminfo
|
|
||||||
colors
|
|
||||||
setopt correct
|
|
||||||
|
|
||||||
# Add completion scripts to zsh path
|
|
||||||
FPATH="~/.config/zsh/completion:$FPATH"
|
|
||||||
autoload -Uz compinit && compinit -i
|
|
||||||
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
|
|
||||||
|
|
||||||
# Defaults
|
|
||||||
export DOTFILES="$HOME/.dotfiles"
|
|
||||||
# shellcheck source=shared.sh
|
|
||||||
source "$DOTFILES/scripts/shared.sh"
|
|
||||||
|
|
||||||
# Run x-load-configs in your terminal to reload the files.
|
|
||||||
function x-load-configs()
|
|
||||||
{
|
|
||||||
# Load the shell dotfiles, and then some:
|
|
||||||
for file in $DOTFILES/config/{exports,alias,functions}; do
|
|
||||||
[ -f "$file" ] && source "$file"
|
|
||||||
[ -f "$file-secret" ] && source "$file-secret"
|
|
||||||
[ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
|
||||||
[ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
x-load-configs
|
|
||||||
|
|
||||||
# Import ssh keys in keychain
|
|
||||||
ssh-add -A 2>/dev/null;
|
|
||||||
|
|
||||||
# Try to load antigen, if present
|
|
||||||
ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
|
|
||||||
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
|
|
||||||
|
|
||||||
# antigen is present
|
|
||||||
have antigen && {
|
|
||||||
antigen use oh-my-zsh
|
|
||||||
|
|
||||||
# config/functions
|
|
||||||
x-default-antigen-bundles
|
|
||||||
|
|
||||||
antigen apply
|
|
||||||
}
|
|
||||||
|
|
||||||
# starship is present
|
|
||||||
have starship && eval "$(starship init zsh)"
|
|
||||||
|
|
||||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] \
|
|
||||||
&& source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh
|
|
||||||
|
|
||||||
export LESSHISTFILE="$XDG_CACHE_HOME"/less_history
|
|
||||||
|
|
||||||
@@ -47,7 +47,6 @@ function section_install
|
|||||||
all)
|
all)
|
||||||
$0 install macos
|
$0 install macos
|
||||||
$0 install antigen
|
$0 install antigen
|
||||||
$0 install starship
|
|
||||||
$0 brew install
|
$0 brew install
|
||||||
$0 install composer
|
$0 install composer
|
||||||
$0 install dotenv
|
$0 install dotenv
|
||||||
|
|||||||
Reference in New Issue
Block a user