Last active
September 6, 2023 07:29
-
-
Save naranyala/17ba4422dda454d686d638b75459c3ed to your computer and use it in GitHub Desktop.
kill running app with rofi launcher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Use Rofi to list running processes and select one to kill | |
selected_process=$(ps axh -o comm | sort -u | rofi -dmenu -p "Kill Process:") | |
# Check if a process was selected | |
if [ -n "$selected_process" ]; then | |
# Kill the selected process | |
pkill "$selected_process" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment