mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
Adds dp function
This commit is contained in:
@@ -249,5 +249,6 @@ function use-gpg-agent-for-ssh {
|
||||
export SSH_AUTH_SOCK="$SOCK"
|
||||
fi
|
||||
}
|
||||
|
||||
use-gpg-agent-for-ssh
|
||||
|
||||
eval "$(direnv hook zsh)"
|
||||
|
||||
12
zsh/config/functions/dp
Executable file
12
zsh/config/functions/dp
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/zsh
|
||||
|
||||
function dp() {
|
||||
[ -z "$1" ] && echo "Must supply temperature" && return 1
|
||||
[ -z "$2" ] && echo "Must supply relative humidity" && return 1
|
||||
|
||||
local temperature=$1
|
||||
local humidity=$2
|
||||
|
||||
/opt/homebrew/bin/psychrometrics dew-point --dry-bulb "$temperature" --relative-humidity "$humidity"
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user