dotfiles/bash/.functions
Andrew R. M 6935843cee Move vim option select to execute logic at alias def time
Using the function would cause problems when trying to perform a `sudo
vim`. The sudo command would run in a root shell which does not have my
shells functions (but does have it's aliases) so then any attempt to
sudo vim would fail with "vim_option_select: command not found"
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"