Skip to content
dtDhruvPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

psfzf

Interactive process manager using fzf.

Synopsis

psfzf

Description

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.

Dependencies

  • fzf
  • ps
  • awk
  • kill
  • renice
  • xclip or wl-copy (optional, for clipboard support)

Usage

Run psfzf to launch the interactive interface.

Display

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 Bindings

Key Action
Ctrl+P Open action palette for selected process(es)
Alt+R Refresh process list
Tab Toggle selection (multi-select)
Enter Exit

Actions

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 -

Safety

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.

Preview Panel

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

Examples

Kill a runaway process:

  1. Run psfzf
  2. Type to filter (e.g., process name)
  3. Press Tab to select
  4. Press Ctrl+P
  5. Select KILL
  6. Confirm

Pause and resume a process:

  1. Select process, press Ctrl+P, choose STOP
  2. Later: Alt+R to refresh, select same process, Ctrl+P, choose CONT

Copy multiple PIDs:

  1. Select multiple processes with Tab
  2. Press Ctrl+P
  3. Select COPY

Exit Codes

Code Meaning
0 Success
1 Missing dependency

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages