nixos-config/modules/workspace/i3blocks/scripts/weather.nix

11 lines
275 B
Nix
Raw Normal View History

2020-02-17 17:00:59 +04:00
{ bash, config, curl, iconfont, ... }: ''
#!${bash}/bin/bash
WTTR=$(curl wttr.in/?format=1)
echo "<span font=\"Roboto Mono 11\">$WTTR</span>"
if [[ $BLOCK_BUTTON == 1 ]]
then
${config.defaultApplications.term.cmd} --hold -e "${curl}/bin/curl wttr.in"
fi
''