These instructions assume there already is a dedicated user for the display, and that this user has graphical autologin setup.
-
Install runit, i3, xdotool, urxvt/rxvt-unicode, and weechat. If provided by the distro, additionally install hwatch.
Urxvt must have the 256color mode enabled, like the Debian package. -
Ensure the user running foubot9000 has the required permissions to access the GPIO. On RPi OS, it's the
gpio
group. -
As the foubot9000 user, run
install.py
.[!CAUTION] Executing this on your computer outside of a chroot will override your configs for i3, WeeChat, and Xresources. It will also pollute your home directory.
-
In
~/foubot/bin/
, provide a wego binary patched for broken functionality, along with a build of hwatch if not already installed via package manager. -
Generate an OpenWeatherMap API key.
-
Run wego once to generate the config, then edit
~/.wegorc
to set theawm-api-key
, and setlocation
tolocation=45.479600071690385,-73.5896074357722
These steps are required for as long as the fix for wego isn't merged and hasn't reached the packaged version on the target OS.
-
Clone the wego repo, and checkout the PR - OR - apply the PR as a patch
-
With go installed on the system, run
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -o wego
For another architecture than the original RPi1, adjust
GOARCH
andGOARM
accordingly -
Check that the binary is properly built
file wego
. Output should contain the right architecture, andstatically linked
.
These steps are only required if the target OS does not provide a package for hwatch.
-
Identify the right rust target triple. For the RPi1, it's
arm-unknown-linux-musleabi
.
It's important to pick the target triple for the musl libc, as that is essentially required to statically build a rust program. -
Install a rust toolchain for the target triple. This can be done a number of ways, but rustup is recommended. Using rustup,
rustup target add arm-unknown-linux-musleabi
shoudl be enough to install the toolchain. -
Install the correct C crossbuilding toolchain. It must be for the right architecture and for the musl libc.
This is often packaged by distros, for example on Void Linux the correct one for a RPi1 is provided by thecross-arm-linux-musleabi
package. -
Clone the hwatch repository or download&extract the source tarball.
-
Build hwatch with cargo:
RUSTFLAGS='-C linker=/usr/bin/arm-linux-musleabi-ld' cargo build --locked --release --target arm-unknown-linux-musleabi
Where
--target
is the triple from step 0, andlinker=
is theld
binary provided by the cross toolchain. -
The output binary should be located at
target/<triple>/release/hwatch
, andfile
output should contain the right architecture and the wordsstatically linked
.
# Spawn a windowed X server at "display" :1, with the same screen size as foubot9000
Xephyr -br -ac -noreset -screen 1280x1024 -dpi 96 :1
# Run i3 on :1
DISPLAY=:1 i3