Skip to content

Instantly share code, notes, and snippets.

@naranyala
Last active September 6, 2023 07:29
Show Gist options
  • Save naranyala/17ba4422dda454d686d638b75459c3ed to your computer and use it in GitHub Desktop.
Save naranyala/17ba4422dda454d686d638b75459c3ed to your computer and use it in GitHub Desktop.
kill running app with rofi launcher
#!/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