Compare commits

...

5 commits

Author SHA1 Message Date
Lockszmith (VAST@MacBook)
20c365d7f4 optimize pager and cat alias setup for bat+ov, ov, bat or moar 2025-04-30 12:37:51 -04:00
Lockszmith (VAST@MacBook)
5f12d8650e fix cz-reset-home 2025-04-30 12:36:12 -04:00
Lockszmith (VAST@MacBook)
08e00b05f6 fix: zellij cleanup when TMPDIR is used 2025-04-30 10:07:53 -04:00
Lockszmith (VAST@MacBook)
2af30b88c0 safer atuin daemon init (was breaking on MacOS) 2025-04-30 10:06:30 -04:00
Lockszmith (VAST@MacBook)
5535792e42 starship updates 2025-04-30 10:05:55 -04:00
8 changed files with 152 additions and 18 deletions

View file

@ -0,0 +1 @@
../../_home/private_dot_config/starship.toml.tmpl

View file

@ -0,0 +1 @@
../../../_home/private_dot_config/sz.env/991_pager.env

View file

@ -10,7 +10,7 @@ if is_cmd atuin; then
# communicate with the running daemon rather than attempting direct database access.
# The setup-atuin-daemon.sh script should be run on ZFS systems to create and
# start the systemd service for the daemon.
if pgrep -f "atuin daemon" > /dev/null; then
if pgrep -f "atuin daemon" > /dev/null && [ -d "$HOME/.config/atuin/with-daemon" ]; then
export ATUIN_CONFIG_DIR="$HOME/.config/atuin/with-daemon"
fi

View file

@ -52,7 +52,7 @@ if is_cmd 'chezmoi'; then
alias czu="czg pull && cz init --verbose && cz apply --verbose && _r"
alias czxu="cz upgrade && czg pull && cz init --verbose && czx apply --verbose && _r"
alias cz-reset-home="(czgcd && cd chezmoi.roots && RESET=reset SRC_DIR=_src.all ./symclone _home && RESET=reset ./symclone.sh _home.macos)"
alias cz-reset-home="(czgcd && cd chezmoi.roots && RESET=reset SRC_DIR=_src.all ./symclone.sh _home && RESET=reset ./symclone.sh _home.macos)"
fi
# vim: set ft=sh sw=4 sts=4 et:

View file

@ -17,18 +17,6 @@ alias lu='l -U '
alias sudo='sudo '
is_cmd ov \
&& alias less="ov --wrap=false " \
&& export PAGER="ov --wrap=false "
if is_cmd bat; then
alias less='bat --wrap=never --style=plain '
alias cat='bat --wrap=never '
elif is_cmd moar; then
alias less="moar " \
&& export PAGER=moar
fi
is_cmd nvim \
&& export VISUAL="nvim" EDITOR="nvim" \
|| export VISUAL="vim" EDITOR="vim"

View file

@ -0,0 +1,22 @@
#!/usr/bin/env -S bash -c 'echo "Not a user script. source(aka .) only"'
if is_cmd moar; then
alias less="moar "
export PAGER=moar
alias cat='moar -quit-if-one-screen '
fi
if is_cmd ov; then
. <( ov completion "${SHELL##*/}" )
alias less="ov --wrap=false "
export PAGER="ov --wrap=false "
BAT_CAT_PAGER="${PAGER} --quit-if-one-screen"
fi
alias cat="${BAT_CAT_PAGER:-${PAGER}} "
if is_cmd bat; then
alias less='bat --wrap=never --style=plain '
alias cat="bat --wrap=never --paging=auto --pager='${BAT_CAT_PAGER:-${PAGER}}' "
fi
# vim: set ft=sh expandtab tabstop=4 shiftwidth=4:

View file

@ -20,7 +20,7 @@ if is_sourced; then
&& ${SUDO:-} rm -fR "$HOME/.cache/zellij"
[[ -d "$HOME/Library/Caches/org.Zellij-Contributors.Zellij" ]] \
&& ${SUDO:-} rm -fR "$HOME/Library/Caches/org.Zellij-Contributors.Zellij"
find /tmp -maxdepth 1 -mindepth 1 -type d -name 'zellij*' -print0 | ${SUDO:-} xargs -r0t rm -fR
find ${TMPDIR:-/tmp} -maxdepth 1 -mindepth 1 -type d -name 'zellij*' -print0 | ${SUDO:-} xargs -r0t rm -fR
if [[ -d "$HOME/.cache/zellij" || -d "$HOME/Library/Caches/org.Zellij-Contributors.Zellij" ]]; then
printf 'Zellij cleanup failed to remove the cache directory, you might still have a zellij session active.\n'
else
@ -33,10 +33,10 @@ ${SET_X-:} -x
local bin_path=~/.local/bin/zellij
local cached_path=~/.cache/chezmoi/tmp/zellij
if [ -z "$(command -v zellij)" ] && [ -x "${cached_path}" ]; then
printf "Grabbing zellij from the web!\n"
printf "Grabbing zellij from the cache!\n"
cp "${cached_path}" "${bin_path}"
fi
local cached_path=/tmp/zellij/bootstrap/zellij
local cached_path=${TMPDIR:-/tmp}/zellij/bootstrap/zellij
if [ -z "$(env which zellij)" ] && ! [ -x "${bin_path}" ]; then
if [[ ! -r "${cached_path}" ]]; then
printf "Grabbing zellij from the web!\n"
@ -44,7 +44,7 @@ ${SET_X-:} -x
fi
if [[ -r "${cached_path}" ]]; then
mv "${cached_path}" "${bin_path}"
rm -fR /tmp/zellij
rm -fR ${TMPDIR:-/tmp}/zellij
fi
fi
refresh-zellij() { :; }

View file

@ -0,0 +1,122 @@
# Customized, based on tokyo-night
# {{/* pallette definition */}}
# {{- $theme := dict }}
# {{- with $_ := set $theme "gradient_a" "#090c0c" }}{{ end -}}
# {{- with $_ := set $theme "gradient_b" "#a3aed2" }}{{ end -}}
# {{- with $_ := set $theme "gradient_c" "#769ff0" }}{{ end -}}
# {{- with $_ := set $theme "gradient_d" "#e3e5e5" }}{{ end -}}
# {{- with $_ := set $theme "gradient_e" "# " }}{{ end -}}
# {{- with $_ := set $theme "gradient_f" "#394260" }}{{ end -}}
# {{- with $_ := set $theme "gradient_g" "#212736" }}{{ end -}}
# {{- with $_ := set $theme "gradient_h" "#1d2230" }}{{ end -}}
# {{- with $_ := set $theme "gradient_i" "# " }}{{ end -}}
# global prompt configuration ( https://starship.rs/config/#prompt )
format = """
[](#a3aed2)\
$os\
[](bg:#769ff0 fg:#a3aed2)\
$directory\
[](fg:#769ff0 bg:#394260)\
$git_branch\
$git_status\
[](fg:#394260 bg:#212736)\
$nodejs\
$rust\
$golang\
[](fg:#212736 bg:#1d2230)\
$time\
[](fg:#212736 bg:#1d2230)\
$cmd_duration\
$status\
[ ](fg:#1d2230)\
$line_break$character"""
command_timeout = 1500 # milliseconds; default is 500
[profiles]
transient = """
$time\
[](fg:#212736 bg:#1d2230)\
$character"""
[os]
style = "bg:#a3aed2 fg:#090c0c"
disabled = false
# Without NerdFont
#[os.symbols]
#Windows = " Win"
# NerdFont - see https://www.nerdfonts.com/cheat-sheet
[os.symbols]
Windows = " "
[directory]
style = "fg:#e3e5e5 bg:#769ff0"
format = "[ $path ]($style)"
truncation_length = 3
truncation_symbol = "…/"
[directory.substitutions]
"Documents" = "󰈙 "
"Downloads" = " "
"Music" = " "
"Pictures" = " "
[custom.chezmoi]
symbol = "🏠"
style = "bg:#394260"
command = "chezmoi status | wc -l"
when = true
format = '[[ $output $symbol ](fg:#769ff0 bg:#394260)]($style)'
[git_branch]
symbol = ""
style = "bg:#394260"
format = '[[ $symbol $branch ](fg:#769ff0 bg:#394260)]($style)'
[git_status]
style = "bg:#394260"
format = '[[($all_status$ahead_behind )](fg:#769ff0 bg:#394260)]($style)'
[nodejs]
symbol = ""
style = "bg:#212736"
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'
[rust]
symbol = ""
style = "bg:#212736"
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'
[golang]
symbol = ""
style = "bg:#212736"
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'
[time]
disabled = false
time_format = "%R" # Hour:Minute Format
style = "bg:#1d2230"
format = '[[  $time ](fg:#a0a9cb bg:#1d2230)]($style)'
[cmd_duration]
min_time = 500 # milliseconds
# nerd font version:
format = 'prev: [[  $duration ](fg:#a0a9cb bg:#1d2230)]($style)'
# General UNICODE font version:
# format = '[[ ⧗ $duration ](fg:#a0a9cb bg:#1d2230)]($style)'
# Emoji version:
# format = '[[ ⌛ $duration ](fg:#a0a9cb bg:#1d2230)]($style)'
[status]
disabled = false
[character]
disabled = false
# vim: set ft=toml expandtab tabstop=2 shiftwidth=2: