From 59f193cbbbb4b1d25548e8617cf4e57b3bba8f2a Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 9 Sep 2021 18:29:22 +0300 Subject: feat(rpi): add scripts for Raspberry Pi --- raspberry/.config/tmuxinator/default.yml | 6 ++++++ raspberry/clock.sh | 2 ++ raspberry/spotify.sh | 18 ++++++++++++++++++ raspberry/temp.sh | 4 ++++ 4 files changed, 30 insertions(+) create mode 100644 raspberry/.config/tmuxinator/default.yml create mode 100755 raspberry/clock.sh create mode 100755 raspberry/spotify.sh create mode 100755 raspberry/temp.sh (limited to 'raspberry') diff --git a/raspberry/.config/tmuxinator/default.yml b/raspberry/.config/tmuxinator/default.yml new file mode 100644 index 0000000..7d6dfa0 --- /dev/null +++ b/raspberry/.config/tmuxinator/default.yml @@ -0,0 +1,6 @@ +name: default +root: ~/ + +windows: + - cmatrix: cbonsai --life 40 --time 20 --screensaver + - spotify: sleep 5 && ~/spotify.sh diff --git a/raspberry/clock.sh b/raspberry/clock.sh new file mode 100755 index 0000000..8cd5b4a --- /dev/null +++ b/raspberry/clock.sh @@ -0,0 +1,2 @@ +#!/bin/sh +tty-clock -scnS diff --git a/raspberry/spotify.sh b/raspberry/spotify.sh new file mode 100755 index 0000000..bab2214 --- /dev/null +++ b/raspberry/spotify.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +SPOTIFYD_RELEASE_URL=https://github.com/Spotifyd/spotifyd/releases/download/v0.3.2/spotifyd-linux-armv6-slim.tar.gz + +# Download spotifyd binary +if [ ! -f ~/.local/bin/spotifyd ]; then + echo Spotifyd binary not found. Downloading... + cd /tmp + wget $SPOTIFYD_RELEASE_URL + tar -xvzf spotifyd-*.tar.gz + mv spotifyd ~/.local/bin +fi + +# Start spotifyd with restart behavior +while true; do + spotifyd --no-daemon + echo Restarting... +done diff --git a/raspberry/temp.sh b/raspberry/temp.sh new file mode 100755 index 0000000..d5a928d --- /dev/null +++ b/raspberry/temp.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# Show CPU temperature in a cool way. Requires superuser permissions. + +watch -n 2 --no-title "/opt/vc/bin/vcgencmd measure_temp | sed 's/temp=//' | figlet -W | /usr/games/cowsay -f ghostbusters -n | sed 's/^/ /'" -- cgit v1.2.3