mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-26 03:04:06 +00:00
feat(zsh): now using romkatv/powerlevel10k theme
This commit is contained in:
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"
|
||||
# Autoformat shell script source code
|
||||
brew "shfmt"
|
||||
# Cross-shell prompt for astronauts
|
||||
brew "starship"
|
||||
# Version control system designed to be a better CVS
|
||||
brew "subversion"
|
||||
# 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
|
||||
|
||||
## tmux with starship, the default view
|
||||
## tmux with powerlevel10k, the default view
|
||||
|
||||

|
||||

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

|
||||

|
||||
|
||||
## Interesting files and locations
|
||||
|
||||
@@ -61,12 +61,12 @@ The folder structure follows [XDG Base Directory Specification][xdg] where possi
|
||||
|
||||
### XDG Variables
|
||||
|
||||
| Env | Default |
|
||||
|--------------------|----------------------|
|
||||
| `$XDG_BIN_HOME` | `$HOME/.local/bin` |
|
||||
| `$XDG_CONFIG_HOME` | `$HOME/.config` |
|
||||
| `$XDG_DATA_HOME` | `$HOME/.local/share` |
|
||||
| `$XDG_STATE_HOME` | `$HOME/.local/state` |
|
||||
| Env | Default | Short description |
|
||||
|--------------------|----------------------|------------------------------------------------|
|
||||
| `$XDG_BIN_HOME` | `$HOME/.local/bin` | Local binaries |
|
||||
| `$XDG_CONFIG_HOME` | `$HOME/.config` | User-specific configs |
|
||||
| `$XDG_DATA_HOME` | `$HOME/.local/share` | User-specific data files |
|
||||
| `$XDG_STATE_HOME` | `$HOME/.local/state` | App state that should persist between restarts |
|
||||
|
||||
- `$XDG_BIN_HOME` defines directory that contains local binaries.
|
||||
- `$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.
|
||||
# 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
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
|
||||
@@ -11,10 +13,10 @@ function x-load-configs()
|
||||
{
|
||||
# Load the shell dotfiles, and then some:
|
||||
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||
[ -r "$file" ] && [ -f "$file" ] && source "$file"
|
||||
[ -r "$file-secret" ] && [ -f "$file-secret" ] && source "$file-secret"
|
||||
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
||||
[ -r "$file-$HOSTNAME-secret" ] && [ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
||||
[ -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
|
||||
@@ -22,7 +24,9 @@ x-load-configs
|
||||
# Import ssh keys in keychain
|
||||
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.
|
||||
[[ -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
42
base/zshrc
42
base/zshrc
@@ -1,8 +1,21 @@
|
||||
# this is my zsh config. there are many like it, but this one is mine.
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# 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"
|
||||
[[ -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
|
||||
@@ -13,20 +26,15 @@ 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"
|
||||
[ -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
|
||||
@@ -48,13 +56,15 @@ have antigen && {
|
||||
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
|
||||
[ -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.
|
||||
[[ -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
|
||||
|
||||
|
||||
@@ -84,6 +84,9 @@ ask()
|
||||
# Defines default antigen bundles
|
||||
x-default-antigen-bundles()
|
||||
{
|
||||
# the theme to use
|
||||
antigen theme romkatv/powerlevel10k
|
||||
|
||||
# these should be always available
|
||||
antigen bundle colored-man-pages
|
||||
antigen bundle command-not-found
|
||||
|
||||
@@ -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}'
|
||||
@@ -47,7 +47,6 @@ function section_install
|
||||
all)
|
||||
$0 install macos
|
||||
$0 install antigen
|
||||
$0 install starship
|
||||
$0 brew install
|
||||
$0 install composer
|
||||
$0 install dotenv
|
||||
|
||||
Reference in New Issue
Block a user