Lock any window fullscreen and block all keyboard shortcuts for a set amount of time. Built for students and anyone who struggles to stay focused.
Inspired by Android focus apps — but for Linux.
- 🖱️ Pick any open window with a crosshair picker
- ⏱️ Set a custom duration in minutes (supports decimals like 0.5)
- 🔒 Locks the window fullscreen with no titlebar
- ⌨️ Disables ALL keyboard shortcuts (Alt+F4, Alt+Tab, Super key)
- 🔓 Automatically restores everything when timer ends
⚠️ Warning dialog before locking so you know what you're getting into
yay -S focuslockor
paru -S focuslockgit clone https://github.com/Tamim180/focus_lock.git
cd focus_lock
makepkg -siLaunch from your app menu or run:
focuslock- Enter duration in minutes
- Click "Click to Pick Window" — your cursor becomes a crosshair
- Click the window you want to lock
- Hit "Start Focus Session"
- Confirm the warning dialog
- You're locked in until the timer ends!
If you need to escape before the timer ends:
- Switch to TTY:
Ctrl+Alt+F2 - Login and run:
pkill focuslock - Switch back to desktop:
Ctrl+Alt+F1
This will immediately restore all shortcuts and window decorations.
| Requirement | Notes |
|---|---|
| Arch Linux | AUR package |
| KDE Plasma | Required — uses KWin scripting |
| Wayland | X11 not tested |
| Python 3 | Core language |
| python-gobject | GTK4 bindings |
| gtk4 | UI toolkit |
| qt5-tools | For qdbus |
| kwin | Window manager |
⚠️ This app currently only works on KDE Plasma. Support for other window managers (Hyprland, GNOME, Sway) is planned for future releases.
- KDE Plasma + Wayland support
- Crosshair window picker
- Fractional minutes (e.g. 0.5)
- Emergency restore via SIGTERM
- Timer overlay window
- Hyprland support
- GNOME support
- Sway/i3 support
- System tray indicator
- Flatpak apps running under XWayland may not lose their titlebar correctly
- Only works on KDE Plasma — other DEs/WMs not supported yet
- Emergency exit requires TTY access
Tamim Bhuyan (Omni_king on AUR)
Built in one day with a lot of determination and help from Claude 😄
MIT