diff --git a/core/utils.py b/core/utils.py index 0d3546e..f7553f5 100644 --- a/core/utils.py +++ b/core/utils.py @@ -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 diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..0dffb35 --- /dev/null +++ b/install.sh @@ -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 \ No newline at end of file diff --git a/lambda b/lambda index 54580fd..7c1d1e5 100755 --- a/lambda +++ b/lambda @@ -1,3 +1,3 @@ #!/bin/sh -python3 ./main.py "$@" +python3 ~/.local/share/lambda/main.py "$@" diff --git a/main.py b/main.py index 1818697..cc49725 100644 --- a/main.py +++ b/main.py @@ -80,7 +80,6 @@ class Lambda: modes.handle_key(self, key) # Refresh and clear the screen - self.screen.refresh() self.screen.erase()