@@ -7,6 +7,7 @@ import { globalStore } from "@/app/store/jotaiStore";
77import { TabRpcClient } from "@/app/store/wshrpcutil" ;
88import { MetaKeyAtomFnType , WaveEnv , WaveEnvSubset } from "@/app/waveenv/waveenv" ;
99import * as keyutil from "@/util/keyutil" ;
10+ import { isMacOS } from "@/util/platformutil" ;
1011import { isBlank , makeConnRoute } from "@/util/util" ;
1112import * as jotai from "jotai" ;
1213import * as React from "react" ;
@@ -240,6 +241,10 @@ export class ProcessViewerViewModel implements ViewModel {
240241 this . openSearch ( ) ;
241242 return true ;
242243 }
244+ if ( keyutil . checkKeyPressed ( waveEvent , "Space" ) && ! globalStore . get ( this . searchOpenAtom ) ) {
245+ this . setPaused ( ! globalStore . get ( this . pausedAtom ) ) ;
246+ return true ;
247+ }
243248 return false ;
244249 }
245250
@@ -524,6 +529,7 @@ type StatusBarProps = {
524529} ;
525530
526531const StatusBar = React . memo ( function StatusBar ( { model, data, loading, error, wide } : StatusBarProps ) {
532+ const searchOpen = jotai . useAtomValue ( model . searchOpenAtom ) ;
527533 const totalCount = data ?. totalcount ?? 0 ;
528534 const filteredCount = data ?. filteredcount ?? 0 ;
529535 const summary = data ?. summary ;
@@ -549,6 +555,8 @@ const StatusBar = React.memo(function StatusBar({ model, data, loading, error, w
549555 const hasSummaryMem = summary != null && memUsedFmt != null ;
550556 const hasSummaryCpu = summary != null && cpuPct != null ;
551557
558+ const searchTooltip = isMacOS ( ) ? "Search (Cmd-F)" : "Search (Alt-F)" ;
559+
552560 if ( wide ) {
553561 return (
554562 < div className = "shrink-0 text-xs text-secondary border-b border-white/10 bg-panel flex items-center gap-2 px-2 py-1" >
@@ -588,6 +596,14 @@ const StatusBar = React.memo(function StatusBar({ model, data, loading, error, w
588596 < span className = "ml-auto whitespace-pre" >
589597 Procs < span className = "font-mono text-[11px]" > { procCountValue } </ span >
590598 </ span >
599+ < Tooltip content = { searchTooltip } placement = "bottom" >
600+ < button
601+ className = { `shrink-0 flex items-center justify-center w-4 h-4 rounded hover:bg-white/10 transition-colors cursor-pointer hover:text-primary ${ searchOpen ? "text-primary" : "text-secondary" } ` }
602+ onClick = { ( ) => ( searchOpen ? model . closeSearch ( ) : model . openSearch ( ) ) }
603+ >
604+ < i className = "fa-sharp fa-solid fa-magnifying-glass text-[10px]" />
605+ </ button >
606+ </ Tooltip >
591607 </ div >
592608 ) ;
593609 }
@@ -598,7 +614,7 @@ const StatusBar = React.memo(function StatusBar({ model, data, loading, error, w
598614 < StatusIndicator model = { model } />
599615 </ div >
600616 < div className = "flex-1 max-w-3" />
601- < div className = "flex flex-row flex-1 min-w-0" >
617+ < div className = "flex flex-row flex-1 min-w-0 items-center " >
602618 { hasSummaryLoad && (
603619 < div className = "flex flex-col shrink-0 w-[100px] mr-1" >
604620 < div > Load</ div >
@@ -633,6 +649,14 @@ const StatusBar = React.memo(function StatusBar({ model, data, loading, error, w
633649 < div > Procs</ div >
634650 < div className = "font-mono text-[11px] whitespace-pre" > { procCountValue } </ div >
635651 </ div >
652+ < Tooltip content = { searchTooltip } placement = "bottom" >
653+ < button
654+ className = { `shrink-0 ml-1 flex items-center justify-center w-4 h-4 rounded hover:bg-white/10 transition-colors cursor-pointer hover:text-primary ${ searchOpen ? "text-primary" : "text-secondary" } ` }
655+ onClick = { ( ) => ( searchOpen ? model . closeSearch ( ) : model . openSearch ( ) ) }
656+ >
657+ < i className = "fa-sharp fa-solid fa-magnifying-glass text-[10px]" />
658+ </ button >
659+ </ Tooltip >
636660 </ div >
637661 </ div >
638662 ) ;
0 commit comments