diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2024-11-20 00:09:12 -0800 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2024-11-20 00:09:12 -0800 |
commit | aade5be94f8fe8cfb9b4348f97ad83ac64908c5f (patch) | |
tree | 26ef890ca3735fb56f5accd1b68afa579b4ba656 /home/root | |
parent | 66c4ed9902fd49f53157db2d0f6b85bf32157850 (diff) | |
download | nix-aade5be94f8fe8cfb9b4348f97ad83ac64908c5f.tar nix-aade5be94f8fe8cfb9b4348f97ad83ac64908c5f.tar.gz nix-aade5be94f8fe8cfb9b4348f97ad83ac64908c5f.tar.bz2 nix-aade5be94f8fe8cfb9b4348f97ad83ac64908c5f.tar.lz nix-aade5be94f8fe8cfb9b4348f97ad83ac64908c5f.tar.xz nix-aade5be94f8fe8cfb9b4348f97ad83ac64908c5f.tar.zst nix-aade5be94f8fe8cfb9b4348f97ad83ac64908c5f.zip |
Add wake function
Diffstat (limited to 'home/root')
-rw-r--r-- | home/root/common/core/zsh/zshrc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/home/root/common/core/zsh/zshrc b/home/root/common/core/zsh/zshrc index 28284f8..1d84aaf 100644 --- a/home/root/common/core/zsh/zshrc +++ b/home/root/common/core/zsh/zshrc @@ -72,6 +72,38 @@ function ntrace { } +function wake { + + if [[ -z ${argv} ]]; then + echo 'you must specify a host to wake!!' >&2 + return 1 + fi + + local host="${1}" + + case "${host}" in + jupiter) + host="8c:8c:aa:4e:e9:8c" + ;; + neptune) + host="38:f3:ab:59:08:10" + ;; + saturn) + host="38:f3:ab:59:06:e0" + ;; + uranus) + host="8c:8c:aa:4e:fc:aa" + ;; + *) + echo 'unknown host specified!' >&2 + return 1 + ;; + esac + + wol -vi 192.168.1.255 "${host}" + +} + # prompt/theme shit function precmd { |