snakeware

Python-based Linux distro for x86-64 and RPi
git clone git://squid-tech.com/snakeware.git
Log | Files | Refs | README

commit 9738947bc69f62920c4c70adf829880360dd8062
parent adf56335447bb21d8016b2909129e0b7e7c588a0
Author: Josh Moore <jxm5210@g.rit.edu>
Date:   Tue,  2 Jun 2020 18:00:49 -0400

Merge pull request #45 from GarbageHamburger/master

Add "snakewm" command to the shell
Diffstat:
Msnakeware/overlay/etc/init.d/S30startpy | 2+-
Asnakeware/overlay/usr/share/snakeware/startup.py | 19+++++++++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/snakeware/overlay/etc/init.d/S30startpy b/snakeware/overlay/etc/init.d/S30startpy @@ -11,5 +11,5 @@ while [ 1 ] do clear printf "SNAKEWARE READY.\n\n" - /usr/bin/python3 + PYTHONSTARTUP=/usr/share/snakeware/startup.py /usr/bin/python3 done diff --git a/snakeware/overlay/usr/share/snakeware/startup.py b/snakeware/overlay/usr/share/snakeware/startup.py @@ -0,0 +1,19 @@ +class Command: + """Defines a command which is run when repr(self) is evaluated.""" + + def run(self): + raise NotImplementedError + + def __repr__(self): + """Execute the command.""" + return self.run() + + +class SnakeWMCommand(Command): + def run(self): + """Start SnakeWM.""" + from snakewm.wm import SnakeWM + return SnakeWM().run() + + +snakewm = SnakeWMCommand()