2024-01-15 00:32:29 -05:00
|
|
|
{ pkgs, config, ... }:
|
|
|
|
{
|
|
|
|
home.file = {
|
|
|
|
".bash_login" = {
|
|
|
|
enable = true;
|
|
|
|
text = ''
|
|
|
|
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
|
|
|
if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
|
|
|
|
exec river
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
".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'
|
2024-01-15 10:59:03 -05:00
|
|
|
alias ed='ed -p "> "'
|
2024-01-15 00:32:29 -05:00
|
|
|
# Functions
|
|
|
|
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 SYSTEMD_PAGER=
|
2024-01-15 12:29:09 -05:00
|
|
|
export PS1='\n\u@\h:\w (\j)\n$? \$ '
|
2024-01-17 23:29:00 -05:00
|
|
|
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'\
|
2024-01-20 13:40:39 -05:00
|
|
|
--scf '#ff79c6'\
|
|
|
|
--hp '10'\
|
|
|
|
--binding 'vim'\
|
|
|
|
--vim-esc-exits\
|
|
|
|
--ignorecase\
|
|
|
|
--no-overlap"
|
2024-01-15 00:32:29 -05:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|