#!/bin/sh # # SPDX-FileCopyrightText: 2023 Daniel Kalak # SPDX-License-Identifier: Apache-2.0 # # how to install: # move this file to ~/.xinitrc # # dependencies: # my setroot script # dwm shutdown -P "06:00" while : do setroot seconds="$(date +%S)" # If you don't strip away a leading 0, the shell will interpret # the number as octal and quit the loop for "08" and "09". The # check against 59 is needed to prevent a "sleep 0" loop during # a leap second (where the second reads "60"). sleep "$(( ${seconds#0} > 59 ? 1 : 60 - ${seconds#0} ))" done & exec dwm