dotfiles/bash/.functions
Andrew R. M fd08d4ed13 Alias cat to always add a newline
Sometimes if a file doesn't have a newline cat will not do one, causing
prompt strangeness
2025-04-05 16:38:28 -04:00

24 lines
414 B
Plaintext

#{- ~/.functions -}#
# Enables or disables kwm hotkeys
hotkeys()
{
case "$1" in
"on") kwmc config hotkeys on; echo "Hotkeys enabled." ;;
"off") kwmc config hotkeys off; echo "Hotkeys disabled." ;;
*) printf "hotkeys: usage: hotkeys {on|off}\n" ;;
esac
}
# Passes basic arithmetic to bc
maths()
{
bc -l <<< "scale=2; $*"
}
cat_with_newline()
{
cat "$@" && echo
}
alias cat="cat_with_newline"