Skip to content

Commit

Permalink
Prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmaranan committed Jun 14, 2024
1 parent fe6176f commit 466ca3c
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion lib/css/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ export class Compiler {
return indent + s;
})
.join(",\n"),
node.position,
node.position
) +
this.emit(" {\n") +
this.emit(this.indent(1)) +
Expand Down
16 changes: 8 additions & 8 deletions lib/extension/indicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/extension/keybindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class Keybindings extends GObject.Object {
this.kbdSettings,
Meta.KeyBindingFlags.NONE,
Shell.ActionMode.NORMAL,
keybindings[key],
keybindings[key]
);
}

Expand Down
10 changes: 5 additions & 5 deletions lib/extension/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()}`;
Expand Down Expand Up @@ -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) => {
Expand Down Expand Up @@ -1651,7 +1651,7 @@ export class Tree extends Node {
Logger.debug(
`${spacing}${rootSpacing}${dashes} ${node.nodeType}#${
node.index !== null ? node.index : "-"
} @${attributes}`,
} @${attributes}`
);
}

Expand Down
22 changes: 11 additions & 11 deletions lib/extension/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
});
Expand All @@ -413,7 +413,7 @@ export class WindowManager extends GObject.Object {
this.updateMetaWorkspaceMonitor(
"window-added",
metaWindow.get_monitor(),
metaWindow,
metaWindow
);
this._wsWindowAddSrcId = 0;
return false;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -798,7 +798,7 @@ export class WindowManager extends GObject.Object {
}
},
},
50,
50
);
}

Expand Down Expand Up @@ -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) => {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -1573,7 +1573,7 @@ export class WindowManager extends GObject.Object {
this.updateMetaWorkspaceMonitor(
"track-current-windows",
metaWindow.get_monitor(),
metaWindow,
metaWindow
);
}
this.updateDecorationLayout();
Expand Down Expand Up @@ -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) => {
Expand Down Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions lib/prefs/appearance.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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()
);
}
};
Expand All @@ -179,7 +179,7 @@ export class AppearancePage extends PreferencesPage {
borderColorRow.colorButton.set_rgba(rgba);
}
},
}),
})
);

row.add_row(borderColorRow);
Expand Down
10 changes: 5 additions & 5 deletions lib/prefs/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class KeyboardPage extends PreferencesPage {
const description = `${_("Syntax")}: &lt;Super&gt;h, &lt;Shift&gt;g, &lt;Shift&gt;&lt;Super&gt;h
${_("Legend")}: &lt;Super&gt; - ${_("Windows key")}, &lt;Primary&gt; - ${_("Control key")}
${_("Delete text to unset. Press Return key to accept. Focus out to ignore.")} <i>${_(
"Resets",
"Resets"
)}</i> ${_("to previous value when invalid")}`;

this.add_group({
Expand All @@ -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: `<i>${_(
"Change the modifier for <b>tiling</b> windows via mouse/drag-drop",
"Change the modifier for <b>tiling</b> windows via mouse/drag-drop"
)}</i> ${_("Select <i>None</i> to <u>always tile immediately</u> by default")}`,
children: [
new RadioRow({
Expand Down Expand Up @@ -87,8 +87,8 @@ export class KeyboardPage extends PreferencesPage {
}
},
},
}),
),
})
)
);
return expander;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/prefs/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
_("<b>CAUTION</b>: Enabling this setting can lead to bugs or cause the shell to crash"),
_("<b>CAUTION</b>: Enabling this setting can lead to bugs or cause the shell to crash")
);
this.add_suffix(icon);
}
Expand Down Expand Up @@ -254,7 +254,7 @@ export class EntryRow extends Adw.EntryRow {
onReset: () => {
this.set_text((map ? map.from(settings, bind) : settings.get_string(bind)) ?? "");
},
}),
})
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/prefs/workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export class ConfigManager extends GObject.Object {
null,
false,
Gio.FileCreateFlags.REPLACE_DESTINATION,
null,
null
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/shared/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export class ThemeManagerBase extends GObject.Object {
null,
false,
Gio.FileCreateFlags.REPLACE_DESTINATION,
null,
null
);
if (success) {
this.reloadStylesheet();
Expand Down

0 comments on commit 466ca3c

Please sign in to comment.