Interactive process manager using fzf.
psfzf
psfzf provides an interactive interface for viewing and managing system processes. It displays a color-coded process list sorted by CPU usage, with a preview panel showing detailed process information. Multiple processes can be selected and acted upon simultaneously.
- fzf
- ps
- awk
- kill
- renice
- xclip or wl-copy (optional, for clipboard support)
Run psfzf to launch the interactive interface.
Processes are color-coded by resource usage:
| Color | Condition |
|---|---|
| Red | CPU or MEM >= 50% |
| Yellow | CPU or MEM >= 20% |
| Green | CPU or MEM >= 5% |
| Dim | CPU and MEM < 5% |
Columns displayed: PID, USER, CPU%, MEM%, STAT, TIME, COMMAND
| Key | Action |
|---|---|
Ctrl+P |
Open action palette for selected process(es) |
Alt+R |
Refresh process list |
Tab |
Toggle selection (multi-select) |
Enter |
Exit |
When Ctrl+P is pressed, an action palette appears with the following options:
| Action | Description | Signal |
|---|---|---|
| TERM | Graceful stop | SIGTERM |
| KILL | Force kill (requires confirm) | SIGKILL |
| STOP | Pause process | SIGSTOP |
| CONT | Resume paused process | SIGCONT |
| NICE+5 | Lower priority (increase nice) | - |
| NICE-5 | Raise priority (decrease nice) | - |
| COPY | Copy PIDs to clipboard | - |
Processes with PID < 200 are protected by default to prevent accidental termination of critical system processes. To override this protection:
PSFZF_UNSAFE=1 psfzf
The KILL action always requires confirmation via a dialog.
The right-hand preview panel shows detailed information for the highlighted process:
- PID and PPID
- User and nice value
- Status and elapsed time
- CPU and memory usage
- Full command line
- Working directory
- Thread and file descriptor count
Kill a runaway process:
- Run
psfzf - Type to filter (e.g., process name)
- Press
Tabto select - Press
Ctrl+P - Select
KILL - Confirm
Pause and resume a process:
- Select process, press
Ctrl+P, chooseSTOP - Later:
Alt+Rto refresh, select same process,Ctrl+P, chooseCONT
Copy multiple PIDs:
- Select multiple processes with
Tab - Press
Ctrl+P - Select
COPY
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Missing dependency |