A uLauncher extension that allows you to quickly terminate ports and processes directly from the uLauncher interface.
- 🔍 Port Discovery: Scan and list all active network ports on your system
- 🎯 Process Information: Display port number, protocol (TCP/UDP), process name, and PID
- ⚡ Quick Termination: Kill processes directly from uLauncher
- 🔧 Configurable: Customize keyword, kill method, and system port visibility
- 🚀 Performance Optimized: Smart caching and debouncing for smooth experience
The extensions' directory is located at: $HOME/.local/share/ulauncher/extensions Go to that location, and while being inside, just git clone this repository.
-
Open uLauncher and go to Extensions (or press
Ctrl+,) -
Click "Add extension" and paste this repository URL:
https://github.com/cosmincraciun97/port-killer-ulauncher -
The extension will be automatically downloaded and installed
-
Make sure
psutilis installed (the extension requires it):pip install psutil
-
Configure the extension preferences if needed and start using it!
- Open uLauncher (default:
Ctrl+Space) - Type the keyword
port(configurable) - Browse through active ports and their associated processes
- Press Enter on a port to immediately terminate the process
- See success/failure feedback
port- Show all active portsport 80- Show only port 80port nginx- Show ports used by nginx processesport tcp- Show only TCP ports
Access extension preferences through uLauncher settings:
- Default:
port - Description: The keyword to trigger the port killer
- Example: Change to
killorpkfor shorter commands
- Default: No
- Options: Yes / No
- Description: Include system/privileged ports (< 1024) in results
- Default: Graceful (SIGTERM)
- Options:
- Graceful (SIGTERM) - Allows processes to clean up before terminating
- Force (SIGKILL) - Immediately terminates processes
- Description: Method used to terminate processes
- psutil: Cross-platform library for system and process monitoring
- Python 3.6+: Required for uLauncher extensions
The extension uses multiple methods for port detection:
- Primary:
psutil.net_connections()for cross-platform compatibility - Fallback: System commands (
netstat -tulpn) if psutil fails
- Caching: Port information is cached for 2 seconds to improve responsiveness
- Debouncing: 0.5-second query debounce prevents excessive system calls
- Result Limiting: Maximum 15 results to maintain UI performance
- Permission Handling: Gracefully handles cases where processes cannot be terminated
- Process Validation: Checks if processes exist before attempting termination
- Error Feedback: Clear error messages for failed operations
- Check that
psutilis installed:python -c "import psutil" - Verify file permissions in the extension directory
- Check uLauncher logs for error messages
- Some system processes require elevated privileges to terminate
- The extension will show clear error messages for permission issues
- Consider running processes you want to kill with user permissions
- Verify that processes are actually listening on ports:
netstat -tulpn - Check if "Show System Ports" setting matches your needs
- Try different search terms to ensure filtering isn't hiding results
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and test thoroughly
- Submit a pull request with a clear description
If you encounter issues or have feature requests, please:
- Check the troubleshooting section above
- Review uLauncher logs for error details
- Open an issue with detailed information about your problem