mirror of
https://github.com/kuhyx/screen-locker.git
synced 2026-07-04 10:03:38 +02:00
Extracted from testsAndMisc monorepo. Changes: - Rewrote imports from python_pkg.screen_locker.* → screen_locker.* - Vendored python_pkg.shared.log_integrity → screen_locker._log_integrity - Vendored wake_alarm constants (ALARM_DAYS, WAKE_AFTER_HOURS, RTCWAKE_BIN) into _constants.py - Extracted has_workout_skip_today into new screen_locker._wake_state module - Added tests for _wake_state.py (392 tests, 100% branch coverage) - Moved scripts/service files to repo root - Added standalone pyproject.toml, requirements.txt, .pre-commit-config.yaml, .gitignore - Added GitHub Actions CI workflows Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
34 lines
898 B
Bash
Executable File
34 lines
898 B
Bash
Executable File
#!/bin/bash
|
|
# Script to remove screen locker from i3 autostart
|
|
|
|
I3_CONFIG="$HOME/.config/i3/config"
|
|
|
|
# Check if i3 config exists
|
|
if [ ! -f "$I3_CONFIG" ]; then
|
|
echo "Error: i3 config not found at $I3_CONFIG"
|
|
exit 1
|
|
fi
|
|
|
|
# Check if autostart line exists
|
|
if ! grep -q "exec.*screen_lock.py" "$I3_CONFIG"; then
|
|
echo "Screen locker autostart not found in i3 config"
|
|
exit 0
|
|
fi
|
|
|
|
# Show what will be removed
|
|
echo "Found screen locker configuration:"
|
|
grep -B1 "exec.*screen_lock.py" "$I3_CONFIG"
|
|
echo ""
|
|
|
|
read -p "Remove screen locker from autostart? (y/n) " -n 1 -r
|
|
echo
|
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
# Remove the autostart lines
|
|
sed -i '/# Workout screen locker on startup/d' "$I3_CONFIG"
|
|
sed -i '/exec.*screen_lock\.py/d' "$I3_CONFIG"
|
|
echo "✓ Screen locker removed from i3 autostart"
|
|
echo "Changes will take effect on next i3 restart"
|
|
else
|
|
echo "Cancelled"
|
|
fi
|