These instructions assume there already is a dedicated user for the display, and that this user has graphical autologin setup.
-
Install required packages programs
- runit
- i3 (just the window manager and the bar, avoid the metapackages)
- xdotool
- urxvt/rxvt-unicode, must have the 256color mode enabled, like the Debian package.
- weechat
- wego version 2.3 or above, build from source if not avaialble from the distro.
- hwatch, build from source if not available from the distro.
-
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.
-
If wego and/or hwatch have been built from source, place the binaries in
~/foubot/bin/
. -
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 only required if the target OS does not provide a package for wego version 2.3 or above.
-
Download & extract the source tarball from the latest release of wego.
-
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