From 466ca3c19233b39ea45f18654d371a63f26893a0 Mon Sep 17 00:00:00 2001 From: Jose Maranan Date: Thu, 13 Jun 2024 20:28:34 -0400 Subject: [PATCH] Prettier formatting --- lib/css/index.js | 2 +- lib/extension/indicator.js | 16 ++++++++-------- lib/extension/keybindings.js | 2 +- lib/extension/tree.js | 10 +++++----- lib/extension/window.js | 22 +++++++++++----------- lib/prefs/appearance.js | 12 ++++++------ lib/prefs/keyboard.js | 10 +++++----- lib/prefs/widgets.js | 4 ++-- lib/prefs/workspace.js | 2 +- lib/shared/settings.js | 2 +- lib/shared/theme.js | 2 +- 11 files changed, 42 insertions(+), 42 deletions(-) diff --git a/lib/css/index.js b/lib/css/index.js index 7023e51..81d5890 100644 --- a/lib/css/index.js +++ b/lib/css/index.js @@ -829,7 +829,7 @@ export class Compiler { return indent + s; }) .join(",\n"), - node.position, + node.position ) + this.emit(" {\n") + this.emit(this.indent(1)) + diff --git a/lib/extension/indicator.js b/lib/extension/indicator.js index 2525b45..309dcf2 100644 --- a/lib/extension/indicator.js +++ b/lib/extension/indicator.js @@ -54,13 +54,13 @@ export class FeatureMenuToggle extends QuickMenuToggle { "tiling-mode-enabled", this, "checked", - Gio.SettingsBindFlags.DEFAULT, + Gio.SettingsBindFlags.DEFAULT ); this.extension.settings.bind( "quick-settings-enabled", this, "visible", - Gio.SettingsBindFlags.DEFAULT, + Gio.SettingsBindFlags.DEFAULT ); this.menu.setHeader(iconName, _("Forge"), _("Tiling Window Management")); @@ -69,24 +69,24 @@ export class FeatureMenuToggle extends QuickMenuToggle { (this._singleSwitch = new SettingsPopupSwitch( _("Gaps Hidden when Single"), this.extension, - "window-gap-hidden-on-single", - )), + "window-gap-hidden-on-single" + )) ); this.menu.addMenuItem( (this._focusHintSwitch = new SettingsPopupSwitch( _("Show Focus Hint Border"), this.extension, - "focus-border-toggle", - )), + "focus-border-toggle" + )) ); this.menu.addMenuItem( (this._focusMovePointer = new SettingsPopupSwitch( _("Move Pointer with the Focus"), this.extension, - "move-pointer-focus-enabled", - )), + "move-pointer-focus-enabled" + )) ); // Add an entry-point for more settings diff --git a/lib/extension/keybindings.js b/lib/extension/keybindings.js index 646894a..cd5dba0 100644 --- a/lib/extension/keybindings.js +++ b/lib/extension/keybindings.js @@ -74,7 +74,7 @@ export class Keybindings extends GObject.Object { this.kbdSettings, Meta.KeyBindingFlags.NONE, Shell.ActionMode.NORMAL, - keybindings[key], + keybindings[key] ); } diff --git a/lib/extension/tree.js b/lib/extension/tree.js index c956878..0fa2981 100644 --- a/lib/extension/tree.js +++ b/lib/extension/tree.js @@ -646,7 +646,7 @@ export class Tree extends Node { let monitorWsNode = this.createNode( `ws${wsIndex}`, NODE_TYPES.MONITOR, - `mo${mi}ws${wsIndex}`, + `mo${mi}ws${wsIndex}` ); monitorWsNode.layout = this.extWm.determineSplitLayout(); monitorWsNode.actorBin = new St.Bin(); @@ -724,7 +724,7 @@ export class Tree extends Node { const grandParentNode = parentNode.parentNode; grandParentNode.insertBefore(child, parentNode.nextSibling); Logger.debug( - `Parent is a window, attaching to this window's parent ${grandParentNode.nodeType}`, + `Parent is a window, attaching to this window's parent ${grandParentNode.nodeType}` ); } else { // Append as the last item of the container @@ -1037,7 +1037,7 @@ export class Tree extends Node { let targetMonitor = -1; targetMonitor = global.display.get_monitor_neighbor_index( nodeWindow.nodeValue.get_monitor(), - monitorDirection, + monitorDirection ); if (targetMonitor < 0) return targetMonitor; let monWs = `mo${targetMonitor}ws${nodeWindow.nodeValue.get_workspace().index()}`; @@ -1305,7 +1305,7 @@ export class Tree extends Node { // [con[con[con[con[window]]]]] --> [con[window]] // TODO: help :) const grandParentCons = this.getNodeByType(NODE_TYPES.CON).filter( - (c) => c.childNodes.length === 1 && c.childNodes[0].nodeType === NODE_TYPES.CON, + (c) => c.childNodes.length === 1 && c.childNodes[0].nodeType === NODE_TYPES.CON ); grandParentCons.forEach((c) => { @@ -1651,7 +1651,7 @@ export class Tree extends Node { Logger.debug( `${spacing}${rootSpacing}${dashes} ${node.nodeType}#${ node.index !== null ? node.index : "-" - } @${attributes}`, + } @${attributes}` ); } diff --git a/lib/extension/window.js b/lib/extension/window.js index 9368fbd..b5e60d5 100644 --- a/lib/extension/window.js +++ b/lib/extension/window.js @@ -106,7 +106,7 @@ export class WindowManager extends GObject.Object { // rules with a Title are written by the user and peristent !override.wmTitle && (!withWmId || override.wmId === wmId) - ), + ) ); this.windowProps.overrides = overrides; @@ -394,7 +394,7 @@ export class WindowManager extends GObject.Object { w.nodeValue !== metaWindow && // The searched window should be on the same monitor workspace // This ensures that Forge already updated the workspace node tree: - currentMonWs === activeMetaMonWs, + currentMonWs === activeMetaMonWs ) .map((w) => w.nodeValue); }); @@ -413,7 +413,7 @@ export class WindowManager extends GObject.Object { this.updateMetaWorkspaceMonitor( "window-added", metaWindow.get_monitor(), - metaWindow, + metaWindow ); this._wsWindowAddSrcId = 0; return false; @@ -668,7 +668,7 @@ export class WindowManager extends GObject.Object { Meta.TabList.NORMAL, global.display.get_workspace_manager().get_active_workspace(), focusNodeWindow.nodeValue, - false, + false ); let lastActiveNodeWindow = this.tree.findNode(lastActiveWindow); this.tree.swapPairs(lastActiveNodeWindow, focusNodeWindow); @@ -798,7 +798,7 @@ export class WindowManager extends GObject.Object { } }, }, - 50, + 50 ); } @@ -851,7 +851,7 @@ export class WindowManager extends GObject.Object { for (let i = 0; i < wsManager.get_n_workspaces(); i++) { Array.prototype.push.apply( windowsAll, - global.display.get_tab_list(Meta.TabList.NORMAL_ALL, wsManager.get_workspace_by_index(i)), + global.display.get_tab_list(Meta.TabList.NORMAL_ALL, wsManager.get_workspace_by_index(i)) ); } windowsAll.sort((w1, w2) => { @@ -1393,7 +1393,7 @@ export class WindowManager extends GObject.Object { attachTarget.nodeValue, NODE_TYPES.WINDOW, metaWindow, - WINDOW_MODES.FLOAT, + WINDOW_MODES.FLOAT ); metaWindow.firstRender = true; @@ -1472,7 +1472,7 @@ export class WindowManager extends GObject.Object { this.renderTree("window-create", true); }, }, - 200, + 200 ); let childNodes = this.tree.getTiledChildren(nodeWindow.parentNode.childNodes); @@ -1573,7 +1573,7 @@ export class WindowManager extends GObject.Object { this.updateMetaWorkspaceMonitor( "track-current-windows", metaWindow.get_monitor(), - metaWindow, + metaWindow ); } this.updateDecorationLayout(); @@ -1744,7 +1744,7 @@ export class WindowManager extends GObject.Object { // Show it below the focused window global.window_group.insert_child_below( con.decoration, - this.focusMetaWindow.get_compositor_private(), + this.focusMetaWindow.get_compositor_private() ); } con.childNodes.forEach((cn) => { @@ -2112,7 +2112,7 @@ export class WindowManager extends GObject.Object { if (childNode.createCon) { const numWin = parentNodeTarget.childNodes.filter( - (c) => c.nodeType === NODE_TYPES.WINDOW, + (c) => c.nodeType === NODE_TYPES.WINDOW ).length; const numChild = parentNodeTarget.childNodes.length; const sameNumChild = numWin === numChild; diff --git a/lib/prefs/appearance.js b/lib/prefs/appearance.js index bbe8341..fa34343 100644 --- a/lib/prefs/appearance.js +++ b/lib/prefs/appearance.js @@ -114,7 +114,7 @@ export class AppearancePage extends PreferencesPage { theme.setCssProperty(selector, "border-width", theme.addPx(borderDefault)); borderSizeRow.activatable_widget.value = borderDefault; }, - }), + }) ); const updateCssColors = (rgbaString) => { @@ -141,24 +141,24 @@ export class AppearancePage extends PreferencesPage { theme.setCssProperty( `.window-${colorScheme}-tab`, "border-color", - tabBorderRgba.to_string(), + tabBorderRgba.to_string() ); theme.setCssProperty( `.window-${colorScheme}-tab-active`, "background-color", - tabActiveBackgroundRgba.to_string(), + tabActiveBackgroundRgba.to_string() ); } // And then finally the preview when doing drag/drop tiling: theme.setCssProperty( `.window-tilepreview-${colorScheme}`, "border-color", - previewBorderRgba.to_string(), + previewBorderRgba.to_string() ); theme.setCssProperty( `.window-tilepreview-${colorScheme}`, "background-color", - previewBackgroundRgba.to_string(), + previewBackgroundRgba.to_string() ); } }; @@ -179,7 +179,7 @@ export class AppearancePage extends PreferencesPage { borderColorRow.colorButton.set_rgba(rgba); } }, - }), + }) ); row.add_row(borderColorRow); diff --git a/lib/prefs/keyboard.js b/lib/prefs/keyboard.js index d319148..1f99609 100644 --- a/lib/prefs/keyboard.js +++ b/lib/prefs/keyboard.js @@ -21,7 +21,7 @@ export class KeyboardPage extends PreferencesPage { const description = `${_("Syntax")}: <Super>h, <Shift>g, <Shift><Super>h ${_("Legend")}: <Super> - ${_("Windows key")}, <Primary> - ${_("Control key")} ${_("Delete text to unset. Press Return key to accept. Focus out to ignore.")} ${_( - "Resets", + "Resets" )} ${_("to previous value when invalid")}`; this.add_group({ @@ -34,14 +34,14 @@ export class KeyboardPage extends PreferencesPage { focus: "Focus Shortcuts", prefs: "Other Shortcuts", }).map(([prefix, gettextKey]) => - KeyboardPage.makeKeygroupExpander(prefix, gettextKey, kbdSettings), + KeyboardPage.makeKeygroupExpander(prefix, gettextKey, kbdSettings) ), }); this.add_group({ title: _("Drag-Drop Tiling Modifier Key Options"), description: `${_( - "Change the modifier for tiling windows via mouse/drag-drop", + "Change the modifier for tiling windows via mouse/drag-drop" )} ${_("Select None to always tile immediately by default")}`, children: [ new RadioRow({ @@ -87,8 +87,8 @@ export class KeyboardPage extends PreferencesPage { } }, }, - }), - ), + }) + ) ); return expander; } diff --git a/lib/prefs/widgets.js b/lib/prefs/widgets.js index ff6fd4f..7801789 100644 --- a/lib/prefs/widgets.js +++ b/lib/prefs/widgets.js @@ -40,7 +40,7 @@ export class SwitchRow extends Adw.ActionRow { if (experimental) { const icon = new Gtk.Image({ icon_name: "bug-symbolic" }); icon.set_tooltip_markup( - _("CAUTION: Enabling this setting can lead to bugs or cause the shell to crash"), + _("CAUTION: Enabling this setting can lead to bugs or cause the shell to crash") ); this.add_suffix(icon); } @@ -254,7 +254,7 @@ export class EntryRow extends Adw.EntryRow { onReset: () => { this.set_text((map ? map.from(settings, bind) : settings.get_string(bind)) ?? ""); }, - }), + }) ); } } diff --git a/lib/prefs/workspace.js b/lib/prefs/workspace.js index a22545b..0adaa55 100644 --- a/lib/prefs/workspace.js +++ b/lib/prefs/workspace.js @@ -15,7 +15,7 @@ export class WorkspacePage extends PreferencesPage { this.add_group({ title: _("Update Workspace Settings"), description: _( - "Provide workspace indices to skip. E.g. 0,1. Empty text to disable. Enter to accept", + "Provide workspace indices to skip. E.g. 0,1. Empty text to disable. Enter to accept" ), children: [ new EntryRow({ diff --git a/lib/shared/settings.js b/lib/shared/settings.js index ee55d5a..e92ae35 100644 --- a/lib/shared/settings.js +++ b/lib/shared/settings.js @@ -148,7 +148,7 @@ export class ConfigManager extends GObject.Object { null, false, Gio.FileCreateFlags.REPLACE_DESTINATION, - null, + null ); } } diff --git a/lib/shared/theme.js b/lib/shared/theme.js index 10efefe..ae14422 100644 --- a/lib/shared/theme.js +++ b/lib/shared/theme.js @@ -177,7 +177,7 @@ export class ThemeManagerBase extends GObject.Object { null, false, Gio.FileCreateFlags.REPLACE_DESTINATION, - null, + null ); if (success) { this.reloadStylesheet();