kill and refresh for ps
part of darcs patch Sat Sep 17 19:47:08 EEST 2005 Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
This commit is contained in:
parent
60776a8c1d
commit
44bfb8f118
|
@ -142,7 +142,7 @@
|
||||||
|
|
||||||
(define-structure process-viewer
|
(define-structure process-viewer
|
||||||
(export)
|
(export)
|
||||||
(open scheme
|
(open scheme-with-scsh
|
||||||
define-record-types
|
define-record-types
|
||||||
srfi-1
|
srfi-1
|
||||||
srfi-13
|
srfi-13
|
||||||
|
|
|
@ -49,6 +49,8 @@
|
||||||
(define-option 'ps 'sort-pid-down-key (char->ascii #\P))
|
(define-option 'ps 'sort-pid-down-key (char->ascii #\P))
|
||||||
(define-option 'ps 'sort-time-up-key (char->ascii #\t))
|
(define-option 'ps 'sort-time-up-key (char->ascii #\t))
|
||||||
(define-option 'ps 'sort-time-down-key (char->ascii #\T))
|
(define-option 'ps 'sort-time-down-key (char->ascii #\T))
|
||||||
|
(define-option 'ps 'kill-key (char->ascii #\k))
|
||||||
|
(define-option 'ps 'refresh-key (char->ascii #\g))
|
||||||
|
|
||||||
(define (make-pps-viewer processes buffer)
|
(define (make-pps-viewer processes buffer)
|
||||||
(let ((processes processes)
|
(let ((processes processes)
|
||||||
|
@ -125,6 +127,16 @@
|
||||||
(compare (select p1) (select p2)))
|
(compare (select p1) (select p2)))
|
||||||
processes))
|
processes))
|
||||||
self))
|
self))
|
||||||
|
((= key (config 'ps 'kill-key))
|
||||||
|
(let ((infos
|
||||||
|
(select-list-get-selection select-list)))
|
||||||
|
(for-each
|
||||||
|
(cut signal-process <> signal/term)
|
||||||
|
(map process-info-pid infos)))
|
||||||
|
self)
|
||||||
|
((= key (config 'ps 'refresh-key))
|
||||||
|
(set-processes! (pps))
|
||||||
|
self)
|
||||||
(else
|
(else
|
||||||
(set! select-list
|
(set! select-list
|
||||||
(select-list-handle-key-press select-list key))
|
(select-list-handle-key-press select-list key))
|
||||||
|
|
Loading…
Reference in New Issue