dotfiles
1

Configure Feed

Select the types of activity you want to include in your feed.

Replace Tide with Starship

Juan Nunez-Iglesias (Jun 20, 2026, 3:28 PM +0200) 943ea410 9bf3adb7

+629 -1
+1
dots
··· 39 39 "cosmic/custom-shortcuts": HOME / ".config" / "cosmic" / "com.system76.CosmicSettings.Shortcuts" / "v1" / "custom", 40 40 "cosmic/system-actions": HOME / ".config" / "cosmic" / "com.system76.CosmicSettings.Shortcuts" / "v1" / "system_actions", 41 41 "sway": HOME / ".config" / "sway", 42 + "starship/starship.toml": HOME / ".config" / "starship.toml" 42 43 } 43 44 44 45 REPO_DIR = Path(__file__).resolve().parent
+2
fish/config.fish
··· 29 29 alias pbpaste wl-paste 30 30 31 31 fish_add_path /home/jni/.local/bin 32 + 33 + starship init fish | source
-1
fish/fish_plugins
··· 1 1 jorgebucaran/fisher 2 2 vitallium/tokyonight-fish 3 3 patrickf1/fzf.fish 4 - ilancosman/tide
+554
starship-install.sh
··· 1 + #!/usr/bin/env sh 2 + 3 + set -eu 4 + printf '\n' 5 + 6 + BOLD="$(tput bold 2>/dev/null || printf '')" 7 + GREY="$(tput setaf 0 2>/dev/null || printf '')" 8 + UNDERLINE="$(tput smul 2>/dev/null || printf '')" 9 + RED="$(tput setaf 1 2>/dev/null || printf '')" 10 + GREEN="$(tput setaf 2 2>/dev/null || printf '')" 11 + YELLOW="$(tput setaf 3 2>/dev/null || printf '')" 12 + BLUE="$(tput setaf 4 2>/dev/null || printf '')" 13 + MAGENTA="$(tput setaf 5 2>/dev/null || printf '')" 14 + NO_COLOR="$(tput sgr0 2>/dev/null || printf '')" 15 + 16 + SUPPORTED_TARGETS="x86_64-unknown-linux-gnu x86_64-unknown-linux-musl \ 17 + i686-unknown-linux-musl aarch64-unknown-linux-musl \ 18 + arm-unknown-linux-musleabihf x86_64-apple-darwin \ 19 + aarch64-apple-darwin x86_64-pc-windows-msvc \ 20 + i686-pc-windows-msvc aarch64-pc-windows-msvc \ 21 + x86_64-unknown-freebsd \ 22 + riscv64gc-unknown-linux-musl" 23 + 24 + info() { 25 + printf '%s\n' "${BOLD}${GREY}>${NO_COLOR} $*" 26 + } 27 + 28 + warn() { 29 + printf '%s\n' "${YELLOW}! $*${NO_COLOR}" 30 + } 31 + 32 + error() { 33 + printf '%s\n' "${RED}x $*${NO_COLOR}" >&2 34 + } 35 + 36 + completed() { 37 + printf '%s\n' "${GREEN}✓${NO_COLOR} $*" 38 + } 39 + 40 + has() { 41 + command -v "$1" 1>/dev/null 2>&1 42 + } 43 + 44 + curl_is_snap() { 45 + curl_path="$(command -v curl)" 46 + case "$curl_path" in 47 + /snap/*) return 0 ;; 48 + *) return 1 ;; 49 + esac 50 + } 51 + 52 + # Make sure user is not using zsh or non-POSIX-mode bash, which can cause issues 53 + verify_shell_is_posix_or_exit() { 54 + if [ -n "${ZSH_VERSION+x}" ]; then 55 + error "Running installation script with \`zsh\` is known to cause errors." 56 + error "Please use \`sh\` instead." 57 + exit 1 58 + elif [ -n "${BASH_VERSION+x}" ] && [ -z "${POSIXLY_CORRECT+x}" ]; then 59 + error "Running installation script with non-POSIX \`bash\` may cause errors." 60 + error "Please use \`sh\` instead." 61 + exit 1 62 + else 63 + true # No-op: no issues detected 64 + fi 65 + } 66 + 67 + get_tmpfile() { 68 + suffix="$1" 69 + if has mktemp; then 70 + printf "%s.%s" "$(mktemp)" "${suffix}" 71 + else 72 + # No really good options here--let's pick a default + hope 73 + printf "/tmp/starship.%s" "${suffix}" 74 + fi 75 + } 76 + 77 + # Test if a location is writable by trying to write to it. Windows does not let 78 + # you test writeability other than by writing: https://stackoverflow.com/q/1999988 79 + test_writable() { 80 + path="${1:-}/test.txt" 81 + if touch "${path}" 2>/dev/null; then 82 + rm "${path}" 83 + return 0 84 + else 85 + return 1 86 + fi 87 + } 88 + 89 + download() { 90 + file="$1" 91 + url="$2" 92 + 93 + if has curl && curl_is_snap; then 94 + warn "curl installed through snap cannot download starship." 95 + warn "See https://github.com/starship/starship/issues/5403 for details." 96 + warn "Searching for other HTTP download programs..." 97 + fi 98 + 99 + if has curl && ! curl_is_snap; then 100 + cmd="curl --fail --silent --location --output $file $url" 101 + elif has wget; then 102 + cmd="wget --quiet --output-document=$file $url" 103 + elif has fetch; then 104 + cmd="fetch --quiet --output=$file $url" 105 + else 106 + error "No HTTP download program (curl, wget, fetch) found, exiting…" 107 + return 1 108 + fi 109 + 110 + $cmd && return 0 || rc=$? 111 + 112 + error "Command failed (exit code $rc): ${BLUE}${cmd}${NO_COLOR}" 113 + printf "\n" >&2 114 + case "${VERSION}" in 115 + latest) ;; 116 + v*) ;; 117 + *) 118 + info "Note: Release tags include the 'v' prefix (e.g., 'v1.2.3')." 119 + info "You specified '${VERSION}'. Did you mean 'v${VERSION}'?" 120 + printf "\n" >&2 121 + ;; 122 + esac 123 + info "This is likely due to Starship not yet supporting your configuration." 124 + info "If you would like to see a build for your configuration," 125 + info "please create an issue requesting a build for ${MAGENTA}${TARGET}${NO_COLOR}:" 126 + info "${BOLD}${UNDERLINE}https://github.com/starship/starship/issues/new/${NO_COLOR}" 127 + return $rc 128 + } 129 + 130 + unpack() { 131 + archive=$1 132 + bin_dir=$2 133 + sudo=${3-} 134 + 135 + case "$archive" in 136 + *.tar.gz) 137 + flags=$(test -n "${VERBOSE-}" && echo "-xzvof" || echo "-xzof") 138 + ${sudo} tar "${flags}" "${archive}" -C "${bin_dir}" 139 + return 0 140 + ;; 141 + *.zip) 142 + flags=$(test -z "${VERBOSE-}" && echo "-qqo" || echo "-o") 143 + UNZIP="${flags}" ${sudo} unzip "${archive}" -d "${bin_dir}" 144 + return 0 145 + ;; 146 + esac 147 + 148 + error "Unknown package extension." 149 + printf "\n" 150 + info "This almost certainly results from a bug in this script--please file a" 151 + info "bug report at https://github.com/starship/starship/issues" 152 + return 1 153 + } 154 + 155 + usage() { 156 + printf "%s\n" \ 157 + "install.sh [option]" \ 158 + "" \ 159 + "Fetch and install the latest version of starship, if starship is already" \ 160 + "installed it will be updated to the latest version." 161 + 162 + printf "\n%s\n" "Options" 163 + printf "\t%s\n\t\t%s\n\n" \ 164 + "-V, --verbose" "Enable verbose output for the installer" \ 165 + "-f, -y, --force, --yes" "Skip the confirmation prompt during installation" \ 166 + "-p, --platform" "Override the platform identified by the installer [default: ${PLATFORM}]" \ 167 + "-b, --bin-dir" "Override the bin installation directory [default: ${BIN_DIR}]" \ 168 + "-a, --arch" "Override the architecture identified by the installer [default: ${ARCH}]" \ 169 + "-B, --base-url" "Override the base URL used for downloading releases [default: ${BASE_URL}]" \ 170 + "-v, --version" "Install a specific version of starship (e.g. v1.2.3) [default: ${VERSION}]" \ 171 + "-h, --help" "Display this help message" 172 + } 173 + 174 + elevate_priv() { 175 + if ! has sudo; then 176 + error 'Could not find the command "sudo", needed to get permissions for install.' 177 + info "If you are on Windows, please run your shell as an administrator, then" 178 + info "rerun this script. Otherwise, please run this script as root, or install" 179 + info "sudo." 180 + exit 1 181 + fi 182 + if ! sudo -v; then 183 + error "Superuser not granted, aborting installation" 184 + exit 1 185 + fi 186 + } 187 + 188 + install() { 189 + ext="$1" 190 + 191 + if test_writable "${BIN_DIR}"; then 192 + sudo="" 193 + msg="Installing Starship, please wait…" 194 + else 195 + warn "Escalated permissions are required to install to ${BIN_DIR}" 196 + elevate_priv 197 + sudo="sudo" 198 + msg="Installing Starship as root, please wait…" 199 + fi 200 + info "$msg" 201 + 202 + archive=$(get_tmpfile "$ext") 203 + 204 + # download to the temp file 205 + download "${archive}" "${URL}" 206 + 207 + # unpack the temp file to the bin dir, using sudo if required 208 + unpack "${archive}" "${BIN_DIR}" "${sudo}" 209 + } 210 + 211 + # Currently supporting: 212 + # - win (Git Bash) 213 + # - darwin 214 + # - linux 215 + # - linux_musl (Alpine) 216 + # - freebsd 217 + detect_platform() { 218 + platform="$(uname -s | tr '[:upper:]' '[:lower:]')" 219 + 220 + case "${platform}" in 221 + msys_nt*) platform="pc-windows-msvc" ;; 222 + cygwin_nt*) platform="pc-windows-msvc" ;; 223 + # mingw is Git-Bash 224 + mingw*) platform="pc-windows-msvc" ;; 225 + # use the statically compiled musl bins on linux to avoid linking issues. 226 + linux) platform="unknown-linux-musl" ;; 227 + darwin) platform="apple-darwin" ;; 228 + freebsd) platform="unknown-freebsd" ;; 229 + esac 230 + 231 + printf '%s' "${platform}" 232 + } 233 + 234 + # Currently supporting: 235 + # - x86_64 236 + # - i386 237 + # - arm 238 + # - arm64 239 + detect_arch() { 240 + arch="$(uname -m | tr '[:upper:]' '[:lower:]')" 241 + 242 + case "${arch}" in 243 + amd64) arch="x86_64" ;; 244 + armv*) arch="arm" ;; 245 + arm64) arch="aarch64" ;; 246 + riscv64) arch="riscv64gc" ;; 247 + esac 248 + 249 + # `uname -m` in some cases mis-reports 32-bit OS as 64-bit, so double check 250 + if [ "${arch}" = "x86_64" ] && [ "$(getconf LONG_BIT)" -eq 32 ]; then 251 + arch=i686 252 + elif [ "${arch}" = "aarch64" ] && [ "$(getconf LONG_BIT)" -eq 32 ]; then 253 + arch=arm 254 + fi 255 + 256 + printf '%s' "${arch}" 257 + } 258 + 259 + detect_target() { 260 + arch="$1" 261 + platform="$2" 262 + target="$arch-$platform" 263 + 264 + if [ "${target}" = "arm-unknown-linux-musl" ]; then 265 + target="${target}eabihf" 266 + fi 267 + 268 + printf '%s' "${target}" 269 + } 270 + 271 + confirm() { 272 + if [ -z "${FORCE-}" ]; then 273 + printf "%s " "${MAGENTA}?${NO_COLOR} $* ${BOLD}[y/N]${NO_COLOR}" 274 + set +e 275 + read -r yn </dev/tty 276 + rc=$? 277 + set -e 278 + if [ $rc -ne 0 ]; then 279 + error "Error reading from prompt (please re-run with the '--yes' option)" 280 + exit 1 281 + fi 282 + if [ "$yn" != "y" ] && [ "$yn" != "yes" ]; then 283 + error 'Aborting (please answer "yes" to continue)' 284 + exit 1 285 + fi 286 + fi 287 + } 288 + 289 + check_bin_dir() { 290 + bin_dir="${1%/}" 291 + 292 + if [ ! -d "$BIN_DIR" ]; then 293 + error "Installation location $BIN_DIR does not appear to be a directory" 294 + info "Make sure the location exists and is a directory, then try again." 295 + usage 296 + exit 1 297 + fi 298 + 299 + # https://stackoverflow.com/a/11655875 300 + good=$( 301 + IFS=: 302 + for path in $PATH; do 303 + if [ "${path%/}" = "${bin_dir}" ]; then 304 + printf 1 305 + break 306 + fi 307 + done 308 + ) 309 + 310 + if [ "${good}" != "1" ]; then 311 + warn "Bin directory ${bin_dir} is not in your \$PATH" 312 + fi 313 + } 314 + 315 + print_install() { 316 + # if the shell does not fit the default case change the config file 317 + # and or the config cmd variable 318 + for s in "bash" "zsh" "ion" "tcsh" "xonsh" "fish"; do 319 + # shellcheck disable=SC2088 320 + # we don't want these '~' expanding 321 + config_file="~/.${s}rc" 322 + config_cmd="eval \"\$(starship init ${s})\"" 323 + 324 + case ${s} in 325 + ion) 326 + # shellcheck disable=SC2088 327 + config_file="~/.config/ion/initrc" 328 + config_cmd="eval \$(starship init ${s})" 329 + ;; 330 + fish) 331 + # shellcheck disable=SC2088 332 + config_file="~/.config/fish/config.fish" 333 + config_cmd="starship init fish | source" 334 + ;; 335 + tcsh) 336 + config_cmd="eval \`starship init ${s}\`" 337 + ;; 338 + xonsh) 339 + config_cmd="execx(\$(starship init xonsh))" 340 + ;; 341 + esac 342 + 343 + printf " %s\n Add the following to the end of %s:\n\n\t%s\n\n" \ 344 + "${BOLD}${UNDERLINE}${s}${NO_COLOR}" \ 345 + "${BOLD}${config_file}${NO_COLOR}" \ 346 + "${config_cmd}" 347 + done 348 + 349 + for s in "elvish" "nushell"; do 350 + 351 + warning="${BOLD}Warning${NO_COLOR}" 352 + case ${s} in 353 + elvish) 354 + # shellcheck disable=SC2088 355 + config_file="~/.config/elvish/rc.elv" 356 + config_cmd="eval (starship init elvish)" 357 + warning="${warning} Only elvish v0.17 or higher is supported." 358 + ;; 359 + nushell) 360 + # shellcheck disable=SC2088 361 + config_file="${BOLD}your nu config file${NO_COLOR} (find it by running ${BOLD}\$nu.config-path${NO_COLOR} in Nushell)" 362 + config_cmd="mkdir (\$nu.data-dir | path join \"vendor/autoload\") 363 + starship init nu | save -f (\$nu.data-dir | path join \"vendor/autoload/starship.nu\")" 364 + warning="${warning} This will change in the future. 365 + Only Nushell v0.96 or higher is supported." 366 + ;; 367 + esac 368 + printf " %s\n %s\n And add the following to the end of %s:\n\n\t%s\n\n" \ 369 + "${BOLD}${UNDERLINE}${s}${NO_COLOR}" \ 370 + "${warning}" \ 371 + "${config_file}" \ 372 + "${config_cmd}" 373 + done 374 + 375 + printf " %s\n Add the following to the end of %s:\n %s\n\n\t%s\n\n" \ 376 + "${BOLD}${UNDERLINE}PowerShell${NO_COLOR}" \ 377 + "${BOLD}Microsoft.PowerShell_profile.ps1${NO_COLOR}" \ 378 + "You can check the location of this file by querying the \$PROFILE variable in PowerShell. 379 + Typically the path is ~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 or ~/.config/powershell/Microsoft.PowerShell_profile.ps1 on -Nix." \ 380 + "Invoke-Expression (&starship init powershell)" 381 + 382 + printf " %s\n You need to use Clink (v1.2.30+) with Cmd. Add the following to a file %s and place this file in Clink scripts directory:\n\n\t%s\n\n" \ 383 + "${BOLD}${UNDERLINE}Cmd${NO_COLOR}" \ 384 + "${BOLD}starship.lua${NO_COLOR}" \ 385 + "load(io.popen('starship init cmd'):read(\"*a\"))()" 386 + 387 + printf "\n" 388 + } 389 + 390 + is_build_available() { 391 + arch="$1" 392 + platform="$2" 393 + target="$3" 394 + 395 + good=$( 396 + IFS=" " 397 + for t in $SUPPORTED_TARGETS; do 398 + if [ "${t}" = "${target}" ]; then 399 + printf 1 400 + break 401 + fi 402 + done 403 + ) 404 + 405 + if [ "${good}" != "1" ]; then 406 + error "${arch} builds for ${platform} are not yet available for Starship" 407 + printf "\n" >&2 408 + info "If you would like to see a build for your configuration," 409 + info "please create an issue requesting a build for ${MAGENTA}${target}${NO_COLOR}:" 410 + info "${BOLD}${UNDERLINE}https://github.com/starship/starship/issues/new/${NO_COLOR}" 411 + printf "\n" 412 + exit 1 413 + fi 414 + } 415 + 416 + # defaults 417 + if [ -z "${PLATFORM-}" ]; then 418 + PLATFORM="$(detect_platform)" 419 + fi 420 + 421 + if [ -z "${BIN_DIR-}" ]; then 422 + BIN_DIR=/usr/local/bin 423 + fi 424 + 425 + if [ -z "${ARCH-}" ]; then 426 + ARCH="$(detect_arch)" 427 + fi 428 + 429 + if [ -z "${BASE_URL-}" ]; then 430 + BASE_URL="https://github.com/starship/starship/releases" 431 + fi 432 + 433 + if [ -z "${VERSION-}" ]; then 434 + VERSION="latest" 435 + fi 436 + 437 + # Non-POSIX shells can break once executing code due to semantic differences 438 + verify_shell_is_posix_or_exit 439 + 440 + # parse argv variables 441 + while [ "$#" -gt 0 ]; do 442 + case "$1" in 443 + -p | --platform) 444 + PLATFORM="$2" 445 + shift 2 446 + ;; 447 + -b | --bin-dir) 448 + BIN_DIR="$2" 449 + shift 2 450 + ;; 451 + -a | --arch) 452 + ARCH="$2" 453 + shift 2 454 + ;; 455 + -B | --base-url) 456 + BASE_URL="$2" 457 + shift 2 458 + ;; 459 + -v | --version) 460 + VERSION="$2" 461 + shift 2 462 + ;; 463 + 464 + -V | --verbose) 465 + VERBOSE=1 466 + shift 1 467 + ;; 468 + -f | -y | --force | --yes) 469 + FORCE=1 470 + shift 1 471 + ;; 472 + -h | --help) 473 + usage 474 + exit 475 + ;; 476 + 477 + -p=* | --platform=*) 478 + PLATFORM="${1#*=}" 479 + shift 1 480 + ;; 481 + -b=* | --bin-dir=*) 482 + BIN_DIR="${1#*=}" 483 + shift 1 484 + ;; 485 + -a=* | --arch=*) 486 + ARCH="${1#*=}" 487 + shift 1 488 + ;; 489 + -B=* | --base-url=*) 490 + BASE_URL="${1#*=}" 491 + shift 1 492 + ;; 493 + -v=* | --version=*) 494 + VERSION="${1#*=}" 495 + shift 1 496 + ;; 497 + -V=* | --verbose=*) 498 + VERBOSE="${1#*=}" 499 + shift 1 500 + ;; 501 + -f=* | -y=* | --force=* | --yes=*) 502 + FORCE="${1#*=}" 503 + shift 1 504 + ;; 505 + 506 + *) 507 + error "Unknown option: $1" 508 + usage 509 + exit 1 510 + ;; 511 + esac 512 + done 513 + 514 + TARGET="$(detect_target "${ARCH}" "${PLATFORM}")" 515 + 516 + is_build_available "${ARCH}" "${PLATFORM}" "${TARGET}" 517 + 518 + printf " %s\n" "${UNDERLINE}Configuration${NO_COLOR}" 519 + info "${BOLD}Bin directory${NO_COLOR}: ${GREEN}${BIN_DIR}${NO_COLOR}" 520 + info "${BOLD}Platform${NO_COLOR}: ${GREEN}${PLATFORM}${NO_COLOR}" 521 + info "${BOLD}Arch${NO_COLOR}: ${GREEN}${ARCH}${NO_COLOR}" 522 + 523 + # non-empty VERBOSE enables verbose untarring 524 + if [ -n "${VERBOSE-}" ]; then 525 + VERBOSE=v 526 + info "${BOLD}Verbose${NO_COLOR}: yes" 527 + else 528 + VERBOSE= 529 + fi 530 + 531 + printf '\n' 532 + 533 + EXT=tar.gz 534 + if [ "${PLATFORM}" = "pc-windows-msvc" ]; then 535 + EXT=zip 536 + fi 537 + 538 + if [ "${VERSION}" != "latest" ]; then 539 + URL="${BASE_URL}/download/${VERSION}/starship-${TARGET}.${EXT}" 540 + else 541 + URL="${BASE_URL}/latest/download/starship-${TARGET}.${EXT}" 542 + fi 543 + 544 + info "Tarball URL: ${UNDERLINE}${BLUE}${URL}${NO_COLOR}" 545 + confirm "Install Starship ${GREEN}${VERSION}${NO_COLOR} to ${BOLD}${GREEN}${BIN_DIR}${NO_COLOR}?" 546 + check_bin_dir "${BIN_DIR}" 547 + 548 + install "${EXT}" 549 + completed "Starship ${VERSION} installed" 550 + 551 + printf '\n' 552 + info "Please follow the steps for your shell to complete the installation:" 553 + 554 + print_install
+72
starship/starship.toml
··· 1 + "$schema" = 'https://starship.rs/config-schema.json' 2 + 3 + format = """ 4 + [░▒▓](#a3aed2)\ 5 + [  ](bg:#a3aed2 fg:#090c0c)\ 6 + [](bg:#769ff0 fg:#a3aed2)\ 7 + $directory\ 8 + [](fg:#769ff0 bg:#394260)\ 9 + $git_branch\ 10 + $git_status\ 11 + [](fg:#394260 bg:#212736)\ 12 + $nodejs\ 13 + $bun\ 14 + $rust\ 15 + $golang\ 16 + $php\ 17 + [](fg:#212736 bg:#1d2230)\ 18 + $time\ 19 + [ ](fg:#1d2230)\ 20 + \n$character""" 21 + 22 + [directory] 23 + style = "fg:#e3e5e5 bg:#769ff0" 24 + format = "[ $path ]($style)" 25 + truncation_length = 3 26 + truncation_symbol = "…/" 27 + 28 + [directory.substitutions] 29 + "Documents" = "󰈙 " 30 + "Downloads" = " " 31 + "Music" = " " 32 + "Pictures" = " " 33 + 34 + [git_branch] 35 + symbol = "" 36 + style = "bg:#394260" 37 + format = '[[ $symbol $branch ](fg:#769ff0 bg:#394260)]($style)' 38 + 39 + [git_status] 40 + style = "bg:#394260" 41 + format = '[[($all_status$ahead_behind )](fg:#769ff0 bg:#394260)]($style)' 42 + 43 + [nodejs] 44 + symbol = "" 45 + style = "bg:#212736" 46 + format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' 47 + 48 + [bun] 49 + symbol = "" 50 + style = "bg:#212736" 51 + format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' 52 + 53 + [rust] 54 + symbol = "" 55 + style = "bg:#212736" 56 + format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' 57 + 58 + [golang] 59 + symbol = "" 60 + style = "bg:#212736" 61 + format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' 62 + 63 + [php] 64 + symbol = "" 65 + style = "bg:#212736" 66 + format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' 67 + 68 + [time] 69 + disabled = false 70 + time_format = "%R" # Hour:Minute Format 71 + style = "bg:#1d2230" 72 + format = '[[  $time ](fg:#a0a9cb bg:#1d2230)]($style)'