I honestly was challenged by the open ended nature of the CatHacks hackathon, I feel in its purest form a hackathon should be like a game jam for people invested in technology and learning about new and interesting parts of the computer science world. So the lack of any recommended technology or constraint beyond suggesting to make hacks "festive" was in fact a very difficult prompt to work with!

I ended up searching around online for prompt generators for the first little bit, before I stumbled on the Wolfram Hackathon Project Generator which gave me the idea of doing something with the weather. This was my primary inspiration.

What it does

Weatherbuddy is a utility to simplify the process of integrating weather feedback into a linux desktop environment. It was built with the primary user being me, of course, due to the wide variety of different kinds of users and possible configurations that might be possible. However I have attempted to make it general enough that it can be used by anyone who might wish to, with minor hacking on the code needed for custom changes.

How I built it

The core of weatherbuddy is a cleaned up programmatic interface for working with the weather api provided by the US site, at its interface.

It uses this to parse out current and future forecast weather information, and make desktop configuration decisions. It applies these configuration decisions through using the python utility pywal which is designed for helping set a consistent color theme across all parts of a linux environment, with specific focus on desktop environments common to the linux ricing community, such as i3, polybar, rofi, drun and more.

Challenges I ran into

The biggest challenge that I ran into was actually the application of the new color theming. I had originally expected that I might be able to dynamically set the color of i3 at runtime with the i3-msg ipc helper, or otherwise learn how to use the /dev/ endpoint for ipc. However while there are a lot of features in i3 that are able to be modified through the ipc, the color configuration is not one of them.

This originally left me very worried, however I decided on continuing with my weather parsing script in hopes I could find a use for it anyways.

After finding pywal however I was able to keep my original intent, as it handles reloading all relevant programs. I had to keep from reloading my polybar instance however, as it causes severe window geometry resizes any time it reloads which is very disorienting.

Accomplishments that I'm proud of

I am able to dynamically change my computer's theming on the fly with absolutely no difficulties now. And have been able to integrate this system with all parts of my desktop environment.

What I learned

I think the thing I learned the most here was in studying the linux Inter-Process-Communication protocol, even if I did not end up using it for my project at the end of the day. I had looked into it a significant amount before realizing the the utility I wanted it for did not exist in i3.

What's next for Weatherbuddy

I want to add more ease of use interface options, as well as fix my currently broken caching system.

Built With

Share this project: