My configurations for the software I use
at main 1.3 kB view raw
1#!/bin/ksh 2 3# Don't continue if we are not interactive 4[[ $- = *i* ]] || return 5 6# Not having this set to the current terminal can cause issues 7GPG_TTY=$(tty) 8export GPG_TTY 9 10# Setup some shell functionality 11set -o trackall 12set -o bgnice 13set -o braceexpand 14set -o csh-history 15 16# foot shell integration for prompt jumping (OSC 133) 17prompt_marker() { printf '\[\033]133;A\033\\\]'; } 18PS1="$(prompt_marker)" 19 20# Setup prompt based on terminal theme type 21[ "$TERM" = linux ] && { 22 PS1="${PS1}\[\033[1;31m\]\u\[\033[32m\]@\[\033[33m\]\h \[\033[34m\]\W\[\033[m\] " 23 PS2="\[\033[1;36m\]>\[\033[m\] " 24} || { 25 # Try and get OSC-133;A working 26 case $(. "$(<"${XDG_STATE_HOME:-$HOME/.local/state}/thm/current_thm")"; printf '%s' "$theme_type") in 27 dark ) PS1="${PS1}\[\033[1;91m\]\u\[\033[92m\]@\[\033[93m\]\h \[\033[94m\]\W\[\033[m\] " 28 PS2="\[\033[1;96m\]>\[\033[m\] " ;; 29 * ) PS1="${PS1}\[\033[1;31m\]\u\[\033[32m\]@\[\033[33m\]\h \[\033[34m\]\W\[\033[m\] " 30 PS2="\[\033[1;36m\]>\[\033[m\] " ;; 31 esac 32} 33 34[ "$IN_NIX_SHELL" ] && PS1="(nix shell) $PS1" 35 36[ "$DWRAP_WITHIN_SANDBOX" = "true" ] && PS1="($DWRAP_CURRENT_DISTRO) $PS1" 37 38# Source completions 39. "${XDG_CONFIG_HOME:-$HOME/.config}/loksh/completions" 40 41# Source aliases 42. "${XDG_CONFIG_HOME:-$HOME/.config}/loksh/alias"