#!/bin/sh -e # Creates a breathing clock in a tmux session (9-16) # or fixed brightness tmux new-session -d -s ledmatrix \; \ send-keys 'retry inputmodule-control led-matrix --clock' C-m \; \ split-window -v \; \ send-keys "while test $(expr 12 - $(date +%H) | tr -d -) -lt 4; do inputmodule-control led-matrix --breathing; done autolight" C-m