diff --git a/autostart.desktop b/autostart.desktop deleted file mode 100644 index 8d9ee0a..0000000 --- a/autostart.desktop +++ /dev/null @@ -1,5 +0,0 @@ -[Desktop Entry] -Type=Application -Name=Quotes -Exec=alacritty -e ~/quotes_display/start.sh -Hidden=true diff --git a/quotes.py b/quotes.py index 537daaa..a34ba02 100644 --- a/quotes.py +++ b/quotes.py @@ -59,10 +59,15 @@ with Live( ) as live: first_it = True while True: - quotes = refresh_quotes() - for _ in range(500): - for q in render_quote(random.choice(quotes) if not first_it else quotes[-1]): - live.update(q) - time.sleep(0.05) - time.sleep(30) - first_it = False + try: + quotes = refresh_quotes() + for _ in range(500): + for q in render_quote(random.choice(quotes) if not first_it else quotes[-1]): + live.update(q) + time.sleep(0.05) + time.sleep(30) + first_it = False + except KeyboardInterrupt: + # Ctrl-C reloads, kill me with Ctrl-\ + first_it = True + pass diff --git a/restart.sh b/restart.sh deleted file mode 100755 index 23203b2..0000000 --- a/restart.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -pkill i3 -kill -HUP $(pgrep -t tty1 bash)