Compare commits
3 Commits
672a062233
...
f523507e7a
Author | SHA1 | Date | |
---|---|---|---|
f523507e7a | |||
5973641c21 | |||
b5c7789e6e |
@ -23,6 +23,10 @@ alias xxd = tinyxxd
|
||||
$env.config = {
|
||||
show_banner: false
|
||||
|
||||
color_config: {
|
||||
shape_external_resolved: { fg: "grey", attr: "b" }
|
||||
}
|
||||
|
||||
ls: {
|
||||
use_ls_colors: true # use the LS_COLORS environment variable to colorize output
|
||||
clickable_links: true # enable or disable clickable links. Your terminal has to support links.
|
||||
|
@ -6,16 +6,22 @@ def create_left_prompt [] {
|
||||
let user_color = ansi grey
|
||||
let path_color = ansi cyan
|
||||
let separator_color = ansi grey
|
||||
let status_color = ansi dark_gray
|
||||
let status_color = ansi dark_gray
|
||||
let uniq_color = [(whoami), (sys host).hostname] | str join
|
||||
| hash md5
|
||||
| str substring 0..5
|
||||
| ansi {fg: $'#($in)'}
|
||||
|
||||
let host = (sys host).hostname | str substring ..2
|
||||
let user = whoami | str substring ..4
|
||||
let userstr = $'($user_color)($user)@($host) '
|
||||
let uniq_indicator = $'($user_color)[($uniq_color)○($user_color)] '
|
||||
|
||||
let host = (sys host).hostname | str substring ..2
|
||||
let user = whoami | str substring ..4
|
||||
let userstr = $'($user_color)($user)@($host) '
|
||||
|
||||
let last_exit_code = if ($env.LAST_EXIT_CODE != 0) {([
|
||||
$status_color
|
||||
$env.LAST_EXIT_CODE
|
||||
" "
|
||||
" "
|
||||
] | str join)
|
||||
|
||||
} else { "" }
|
||||
@ -27,7 +33,7 @@ def create_left_prompt [] {
|
||||
}
|
||||
let path_segment = $"($path_color)($dir)"
|
||||
|
||||
[$last_exit_code $userstr ($path_segment | str replace --all (char path_sep) $"($separator_color)(char path_sep)($path_color)")] | str join
|
||||
[$uniq_indicator $userstr $last_exit_code $path_segment] | str join
|
||||
}
|
||||
|
||||
# Use nushell functions to define your right and left prompt
|
||||
|
@ -5,6 +5,9 @@ if [ -n "$VARS_SET" ]; then
|
||||
fi
|
||||
export VARS_SET=1
|
||||
|
||||
# by default chmod o-rwx
|
||||
umask 007
|
||||
|
||||
# Set XDG directories
|
||||
export XDG_CONFIG_HOME="$HOME"/.config
|
||||
export XDG_CACHE_HOME="$HOME"/.cache
|
||||
|
@ -21,11 +21,14 @@ sub_help() {
|
||||
echo " add append new entry"
|
||||
echo ' edit open reminder file in $EDITOR'
|
||||
echo
|
||||
echo 'Set $REM_FILE' "(currently $REM_FILE)"
|
||||
echo 'Saves to $REM_FILE' "(currently $REM_FILE)."
|
||||
echo
|
||||
echo "rem.sh ignores all contents before the '----' marker in your file."
|
||||
echo "You can use this to archive your reminders."
|
||||
}
|
||||
|
||||
sub_show() {
|
||||
REMS="$(cat "$REM_FILE" | sed -z 's/^\n$//g')"
|
||||
REMS="$(cat "$REM_FILE" | sed "1,/^----$/d" | sed -z 's/^\n$//g')"
|
||||
if [ ! -z "$REMS" ]; then
|
||||
printf "reminders:\n\n%s\n\n" "$REMS"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user