diff --git a/lib/components/data/cpu.jsx b/lib/components/data/cpu.jsx index 33a366ef..c1e776d6 100644 --- a/lib/components/data/cpu.jsx +++ b/lib/components/data/cpu.jsx @@ -19,7 +19,8 @@ export const Widget = React.memo(() => { const { displayIndex, settings } = useSimpleBarContext(); const { widgets, cpuWidgetOptions } = settings; const { cpuWidget } = widgets; - const { refreshFrequency, showOnDisplay, displayAsGraph, cpuMonitorApp } = cpuWidgetOptions; + const { refreshFrequency, showOnDisplay, displayAsGraph, cpuMonitorApp } = + cpuWidgetOptions; const visible = Utils.isVisibleOnDisplay(displayIndex, showOnDisplay) && cpuWidget; @@ -65,14 +66,21 @@ export const Widget = React.memo(() => { const { usage } = state; - const onClick = cpuMonitorApp === "None" ? undefined : (e) => { - Utils.clickEffect(e); - openCpuUsageApp(cpuMonitorApp); - }; + const onClick = + cpuMonitorApp === "None" + ? undefined + : (e) => { + Utils.clickEffect(e); + openCpuUsageApp(cpuMonitorApp); + }; if (displayAsGraph) { return ( - <DataWidget.Widget classes="cpu cpu--graph" onClick={onClick} disableSlider> + <DataWidget.Widget + classes="cpu cpu--graph" + onClick={onClick} + disableSlider + > <Graph className="cpu__graph" caption={{ @@ -104,8 +112,8 @@ function openCpuUsageApp(cpuUsageApp) { case "Activity Monitor": Uebersicht.run(`open -a "Activity Monitor"`); break; - case "Top": - Utils.runInUserTerminal('top') + case "Top": + Utils.runInUserTerminal("top"); break; } } diff --git a/lib/settings.js b/lib/settings.js index 037a171c..d677cdf4 100644 --- a/lib/settings.js +++ b/lib/settings.js @@ -603,7 +603,7 @@ export const defaultSettings = { refreshFrequency: 2000, showOnDisplay: "", displayAsGraph: false, - cpuMonitorApp: "Top" + cpuMonitorApp: "Top", }, batteryWidgetOptions: { refreshFrequency: 10000, diff --git a/lib/utils.js b/lib/utils.js index f4659615..cd7956f4 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -430,19 +430,19 @@ export function runInUserTerminal(command) { const settings = Settings.get(); const { terminal } = settings.global; switch (terminal) { - case "Terminal": + case "Terminal": Uebersicht.run( `osascript ./simple-bar/lib/scripts/run-command-in-terminal.applescript` + ` "${command}"` - ) + ); break; case "iTerm2": Uebersicht.run( `osascript ./simple-bar/lib/scripts/run-command-in-iterm2.applescript` + ` "${command}"` - ) + ); break; default: break; - } -} \ No newline at end of file + } +}