add dynamic config commands

This commit is contained in:
2026-05-22 18:11:08 +01:00
parent 1bf8e41e0c
commit c3b05c6bcb
8 changed files with 110 additions and 19 deletions

BIN
res/autumn.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

42
res/iloveseason.py Executable file
View File

@@ -0,0 +1,42 @@
#!/usr/bin/env python3
#
# Akbar Rahman <hi@alv.cx>
#
import sys
from datetime import datetime as dt
def get_args():
""" Get command line arguments """
import argparse
parser = argparse.ArgumentParser()
return parser.parse_args()
def main(args):
""" Entry point for script """
now = dt.now()
template = ""
if now.month in [3, 4, 5]:
template = './res/spring.gif'
if now.month in [6, 7, 8]:
template = './res/summer.gif'
if now.month in [9, 10, 11]:
template = './res/autumn.gif'
if now.month in [12, 1, 2]:
template = './res/winter.gif'
print(f'template = "{template}"')
print()
return 0
if __name__ == '__main__':
try:
sys.exit(main(get_args()))
except KeyboardInterrupt:
sys.exit(0)

BIN
res/spring.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
res/summer.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
res/winter.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB