2024-01-25 00:38:01 -05:00
|
|
|
{ pkgs, config, user, ... }:
|
2024-01-15 00:32:29 -05:00
|
|
|
{
|
2024-03-01 22:20:02 -05:00
|
|
|
home.file = {
|
|
|
|
".bash_login" = {
|
|
|
|
enable = true;
|
|
|
|
text = ''
|
|
|
|
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
2024-03-02 12:22:26 -05:00
|
|
|
#if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
|
|
|
|
# exec river
|
|
|
|
#fi
|
2024-03-01 22:20:02 -05:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
".bash_logout" = {
|
|
|
|
enable = true; text = ''
|
|
|
|
if [ "$SHLVL" = 1 ]; then
|
|
|
|
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
".bashrc" = {
|
|
|
|
enable = true;
|
|
|
|
text = ''
|
|
|
|
# Source global definitions
|
|
|
|
if [ -f /etc/bashrc ]; then
|
|
|
|
. /etc/bashrc
|
|
|
|
fi
|
|
|
|
set -o vi
|
|
|
|
unset HISTFILE
|
|
|
|
# Aliases
|
|
|
|
alias mkfoo='. $HOME/.local/bin/mkfoo.sh'
|
|
|
|
alias ed='ed -p "> "'
|
|
|
|
alias info='info --vi-keys'
|
2024-03-02 12:22:26 -05:00
|
|
|
alias matrix="unimatrix -f -l ocCgGkS -s 93"
|
|
|
|
alias ematrix="unimatrix -c yellow -l 'e'"
|
2024-03-01 22:20:02 -05:00
|
|
|
# Functions
|
|
|
|
function ranstr() {
|
|
|
|
COUNT=$1
|
|
|
|
head -c $COUNT /dev/random | base64 | head -c $COUNT
|
|
|
|
}
|
|
|
|
function get-ssh() {
|
|
|
|
if [ ! -f $HOME/.ssh/id_ed25519.pub ]; then
|
|
|
|
ssh-keygen -t ed25519 -C "${user.email}"
|
2024-02-07 23:32:44 -05:00
|
|
|
fi
|
2024-03-01 22:20:02 -05:00
|
|
|
cat $HOME/.ssh/id_ed25519.pub
|
|
|
|
}
|
|
|
|
function home() {
|
|
|
|
cd
|
|
|
|
clear
|
|
|
|
}
|
|
|
|
function search() {
|
|
|
|
surfraw $(surfraw -elvi | fzf | awk '{print $1;}')
|
|
|
|
}
|
|
|
|
function mkcd {
|
|
|
|
mkdir -p $1
|
|
|
|
cd $1
|
|
|
|
}
|
|
|
|
|
|
|
|
# fe [FUZZY PATTERN] - Open the selected file with the default editor
|
|
|
|
# - Bypass fuzzy finder if there's only one match (--select-1)
|
|
|
|
# - Exit if there's no match (--exit-0)
|
|
|
|
function fe() {
|
|
|
|
IFS='
|
|
|
|
'
|
|
|
|
files=$(fzf --query="$1" --multi --select-1 --exit-0)
|
|
|
|
[ -n "$files" ] && "$EDITOR" "$files"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Environmental Variables
|
|
|
|
# Uncomment the following line if you don't like systemctl's auto-paging feature:
|
|
|
|
export PS1="\n\u@\h:\w (\j)\n$? \$ "
|
2024-03-02 12:22:26 -05:00
|
|
|
#export SYSTEMD_PAGER=
|
|
|
|
#export INPUTRC="$XDG_CONFIG_HOME/inputrc"
|
|
|
|
#export LIBSEAT_BACKEND=logind
|
|
|
|
#export BEMENU_OPTS="--fn 'Comic Mono 12'\
|
|
|
|
# --tb '#6272a4'\
|
|
|
|
# --tf '#f8f8f2'\
|
|
|
|
# --fb '#282a36'\
|
|
|
|
# --ff '#f8f8f2'\
|
|
|
|
# --nb '#282a36'\
|
|
|
|
# --nf '#6272a4'\
|
|
|
|
# --hb '#44475a'\
|
|
|
|
# --hf '#50fa7b'\
|
|
|
|
# --sb '#44475a'\
|
|
|
|
# --sf '#50fa7b'\
|
|
|
|
# --scb '#282a36'\
|
|
|
|
# --scf '#ff79c6'\
|
|
|
|
# --hp '10'\
|
|
|
|
# --binding 'vim'\
|
|
|
|
# --vim-esc-exits\
|
|
|
|
# --ignorecase\
|
|
|
|
# --no-overlap"
|
2024-02-21 11:24:20 -05:00
|
|
|
|
2024-03-01 22:20:02 -05:00
|
|
|
eval "$(zoxide init bash)"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
xdg.configFile = {
|
|
|
|
"inputrc" = {
|
|
|
|
enable = true;
|
|
|
|
executable = true;
|
|
|
|
text = ''
|
|
|
|
$include /etc/inputrc
|
|
|
|
set completion-ignore-case on
|
|
|
|
set completion-map-case on
|
|
|
|
set show-all-if-ambiguous on
|
|
|
|
set show-all-if-unmodified on
|
|
|
|
set completion-query-items 0
|
|
|
|
set bell-style none
|
|
|
|
set blink-matching-paren on
|
|
|
|
set colored-completion-prefix on
|
|
|
|
set colored-stats on
|
|
|
|
set completion-prefix-display-length 5
|
|
|
|
set menu-complete-display-prefix on
|
|
|
|
set horizontal-scroll-mode on
|
|
|
|
set mark-directories on
|
|
|
|
set skip-completed-text on
|
|
|
|
set visibile-stats on
|
|
|
|
$if Bash
|
|
|
|
set completion-map-case on
|
|
|
|
$end
|
|
|
|
"\t": menu-complete
|
|
|
|
"\e[Z": menu-complete-backward
|
|
|
|
'';
|
2024-01-15 00:32:29 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|