summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/hierarchy.el
diff options
context:
space:
mode:
authorLaurence Warne <laurencewarne@gmail.com>2022-11-16 14:32:44 +0000
committerEli Zaretskii <eliz@gnu.org>2022-12-01 19:46:30 +0200
commit0c1495574a14b9131a0c0a8ef126976393a00e3d (patch)
tree1d5dc2e786e7eb98b9292194002da36fd2c57728 /lisp/emacs-lisp/hierarchy.el
parent91dba5b06688b1c4d891aa8ca4d2b321a52069ee (diff)
downloademacs-0c1495574a14b9131a0c0a8ef126976393a00e3d.tar.gz
emacs-0c1495574a14b9131a0c0a8ef126976393a00e3d.tar.bz2
emacs-0c1495574a14b9131a0c0a8ef126976393a00e3d.zip
Add colors to Proced (bug#59407)
Add a new custom variable proced-enable-color-flag which when set to a non-nil value (defaults to nil), will prompt some format functions to furnish their respective process attributes with colors and effects in order to make them easier to distinguish and highlight possible issues (e.g. high memory usage), in a manner similar to htop. In particular, the current Emacs process id is highlighted purple in both the process id and parent process id columns, session leaders have their process ids underlined, larger memory sizes for rss are highlighted in darker shades of orange, and the first word in the args property (the executable) is highlighted in blue. * lisp/proced.el (proced-grammar-alist): Update to use the new format functions. (proced-low-memory-usage-threshold): New custom variable to determine whether a value represents 'low' memory usage, used only in proced-format-memory for coloring. (proced-medium-memory-usage-threshold): New custom variable to determine whether a value represents 'medium' memory usage, used only in proced-format-memory for coloring. (proced-enable-color-flag): New custom variable to toggle coloring. (proced-run-status-code, proced-interruptible-sleep-status-code) (proced-uninterruptible-sleep-status-code, proced-executable) (proced-executable, proced-memory-gb, proced-memory-mb) (proced-memory-default, proced-pid, proced-ppid, proced-pgrp) (proced-sess, proced-cpu, proced-mem, proced-user, proced-time-colon): New faces. (proced-format-time): Edit function to color colons using proced-time-colon. (proced-format-args): Edit function to color executables using proced-executable. (proced-format-state): New function to color states. (proced-format-pid): New function to color process ids. (proced-format-ppid): New function to color parent process ids. (proced-format-pgrp): New function to color process group ids. (proced-format-sess): New function to color process session leader ids. (proced-format-cpu): New function to color cpu utilization. (proced-format-mem): New function to color memory utilization. (proced-format-user): New function to color the user a process belongs to.
Diffstat (limited to 'lisp/emacs-lisp/hierarchy.el')
0 files changed, 0 insertions, 0 deletions