From 7b3bca7c78569fe836ac40013799e540cf084ef1 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Fri, 2 Jan 2026 19:11:54 +0100 Subject: [PATCH] fix: worklout screen lkocker --- screen_locker/install_autostart.sh | 8 ++++---- screen_locker/install_systemd.sh | 4 ++-- screen_locker/workout-locker.service | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/screen_locker/install_autostart.sh b/screen_locker/install_autostart.sh index 0a5b5ca..47ec378 100755 --- a/screen_locker/install_autostart.sh +++ b/screen_locker/install_autostart.sh @@ -40,13 +40,13 @@ fi # Add autostart line to i3 config echo "" >> "$I3_CONFIG" -echo "# Workout screen locker on startup (demo mode)" >> "$I3_CONFIG" -echo "exec --no-startup-id python3 $SCREEN_LOCK_PATH" >> "$I3_CONFIG" +echo "# Workout screen locker on startup (production mode)" >> "$I3_CONFIG" +echo "exec --no-startup-id python3 $SCREEN_LOCK_PATH --production" >> "$I3_CONFIG" -echo "✓ Screen locker added to i3 autostart (demo mode)" +echo "✓ Screen locker added to i3 autostart (production mode)" echo "✓ Configuration added to: $I3_CONFIG" echo "" echo "The screen locker will run on next i3 restart/login" echo "" echo "To test now, run: i3-msg restart" -echo "To switch to production mode later, edit $I3_CONFIG and add --production flag" +echo "To run in demo mode, remove --production flag from $I3_CONFIG" diff --git a/screen_locker/install_systemd.sh b/screen_locker/install_systemd.sh index ac8d973..1ce90e9 100755 --- a/screen_locker/install_systemd.sh +++ b/screen_locker/install_systemd.sh @@ -12,8 +12,8 @@ mkdir -p "$USER_SERVICE_DIR" # Copy service file to user systemd directory cp "$SERVICE_FILE" "$USER_SERVICE_DIR/$SERVICE_NAME" -# Update the ExecStart path in the service file to use absolute path -sed -i "s|ExecStart=/usr/bin/python3.*|ExecStart=/usr/bin/python3 $SCRIPT_DIR/screen_lock.py|" "$USER_SERVICE_DIR/$SERVICE_NAME" +# Update the ExecStart path in the service file to use absolute path with production flag +sed -i "s|ExecStart=/usr/bin/python3.*|ExecStart=/usr/bin/python3 $SCRIPT_DIR/screen_lock.py --production|" "$USER_SERVICE_DIR/$SERVICE_NAME" # Reload systemd daemon systemctl --user daemon-reload diff --git a/screen_locker/workout-locker.service b/screen_locker/workout-locker.service index f44732e..c3da588 100644 --- a/screen_locker/workout-locker.service +++ b/screen_locker/workout-locker.service @@ -6,7 +6,7 @@ After=graphical-session.target Type=simple Environment=DISPLAY=:0 ExecStartPre=/bin/sleep 3 -ExecStart=/usr/bin/python3 /home/kuhy/testsAndMisc/PYTHON/screen_locker/screen_lock.py +ExecStart=/usr/bin/python3 /home/kuhy/testsAndMisc/python_pkg/screen_locker/screen_lock.py --production Restart=no User=%u