📜 Built in installer

This commit is contained in:
Maddie H 2022-04-17 14:12:33 +01:00
parent d86bedf15a
commit 70979d58f8
4 changed files with 18 additions and 4 deletions

View File

@ -143,7 +143,7 @@ def prompt(instance, message: str, color: int = 1) -> (list, None):
instance.screen.addstr(instance.height - 1, len(message), input_text)
def press_key_to_continue(instance, message: str, color: int = None):
def press_key_to_continue(instance, message: str, color: int = 1):
# Hide the cursor
cursors.mode("hidden")
@ -151,7 +151,7 @@ def press_key_to_continue(instance, message: str, color: int = None):
clear(instance, instance.height - 1, 0)
# Write the entire message to the screen
instance.screen.addstr(instance.height - 1, 0, message, curses.color_pair(color or 1))
instance.screen.addstr(instance.height - 1, 0, message, curses.color_pair(color))
instance.screen.addstr(instance.height - 1, len(message) + 1, f"(press any key)")
# Wait for a keypress

15
install.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
# Copy lambda to ~/.local/share
rm -rf ~/.local/share/lambda
ln -sf $(pwd) ~/.local/share/lambda
# Copy lambda to ~/.local/share
#mkdir -p ~/.local/share/lambda
#cp -rf . ~/.local/share/lambda
# Copy lambda launcher
chmod +x ./lambda
rm -r ~/.local/bin/lambda
ln -s ~/.local/share/lambda/lambda ~/.local/bin/lambda
chmod +x ~/.local/bin/lambda

2
lambda
View File

@ -1,3 +1,3 @@
#!/bin/sh
python3 ./main.py "$@"
python3 ~/.local/share/lambda/main.py "$@"

View File

@ -80,7 +80,6 @@ class Lambda:
modes.handle_key(self, key)
# Refresh and clear the screen
self.screen.refresh()
self.screen.erase()