Skip to content

FOULAB/foubot9000

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Foubot9000™

Installation

These instructions assume there already is a dedicated user for the display, and that this user has graphical autologin setup.

  1. 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.
  2. Ensure the user running foubot9000 has the required permissions to access the GPIO. On RPi OS, it's thegpio group.

  3. 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.

  4. If wego and/or hwatch have been built from source, place the binaries in ~/foubot/bin/.

  5. Generate an OpenWeatherMap API key.

  6. Run wego once to generate the config, then edit ~/.wegorc to set the awm-api-key, and set location to

    location=45.479600071690385,-73.5896074357722

Building from-source components

wego

These steps are only required if the target OS does not provide a package for wego version 2.3 or above.

  1. Download & extract the source tarball from the latest release of wego.

  2. 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 and GOARM accordingly

  3. Check that the binary is properly built file wego. Output should contain the right architecture, and statically linked.

hwatch

These steps are only required if the target OS does not provide a package for hwatch.

  1. 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.

  2. 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.

  3. 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 the cross-arm-linux-musleabi package.

  4. Clone the hwatch repository or download&extract the source tarball.

  5. 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, and linker= is the ld binary provided by the cross toolchain.

  6. The output binary should be located at target/<triple>/release/hwatch, and file output should contain the right architecture and the words statically linked.

Development

# 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published