Skip to content

Commit fb6d6ed

Browse files
Update prefs.ts
1 parent 1e84233 commit fb6d6ed

File tree

1 file changed

+37
-36
lines changed

1 file changed

+37
-36
lines changed

src/prefs.ts

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export { };
1+
export { }
22

33
const ExtensionUtils = imports.misc.extensionUtils;
44
// @ts-ignore
@@ -8,23 +8,23 @@ const { Gtk } = imports.gi;
88

99
const { Settings } = imports.gi.Gio;
1010

11-
import * as focus from "focus";
12-
import * as log from "log";
13-
import * as settings from "settings";
11+
import * as settings from 'settings';
12+
import * as log from 'log';
13+
import * as focus from 'focus';
1414

1515
interface AppWidgets {
16-
fullscreen_launcher: any;
17-
stacking_with_mouse: any;
18-
inner_gap: any;
19-
mouse_cursor_follows_active_window: any;
20-
outer_gap: any;
21-
show_skip_taskbar: any;
22-
smart_gaps: any;
23-
auto_unstack: any;
24-
snap_to_grid: any;
25-
window_titles: any;
26-
mouse_cursor_focus_position: any;
27-
log_level: any;
16+
fullscreen_launcher: any,
17+
stacking_with_mouse: any,
18+
inner_gap: any,
19+
mouse_cursor_follows_active_window: any,
20+
outer_gap: any,
21+
show_skip_taskbar: any,
22+
smart_gaps: any,
23+
auto_unstack: any,
24+
snap_to_grid: any,
25+
window_titles: any,
26+
mouse_cursor_focus_position: any,
27+
log_level: any,
2828
}
2929

3030
// @ts-ignore
@@ -36,31 +36,31 @@ function settings_dialog_new(): Gtk.Container {
3636
let ext = new settings.ExtensionSettings();
3737

3838
app.window_titles.set_active(ext.show_title());
39-
app.window_titles.connect("state-set", (_widget: any, state: boolean) => {
39+
app.window_titles.connect('state-set', (_widget: any, state: boolean) => {
4040
ext.set_show_title(state);
4141
Settings.sync();
4242
});
4343

4444
app.snap_to_grid.set_active(ext.snap_to_grid());
45-
app.snap_to_grid.connect("state-set", (_widget: any, state: boolean) => {
45+
app.snap_to_grid.connect('state-set', (_widget: any, state: boolean) => {
4646
ext.set_snap_to_grid(state);
4747
Settings.sync();
4848
});
4949

5050
app.smart_gaps.set_active(ext.smart_gaps());
51-
app.smart_gaps.connect("state-set", (_widget: any, state: boolean) => {
51+
app.smart_gaps.connect('state-set', (_widget: any, state: boolean) => {
5252
ext.set_smart_gaps(state);
5353
Settings.sync();
5454
});
5555

5656
app.auto_unstack.set_active(ext.auto_unstack());
57-
app.auto_unstack.connect("state-set", (_widget: any, state: boolean) => {
57+
app.auto_unstack.connect('state-set', (_widget: any, state: boolean) => {
5858
ext.set_auto_unstack(state);
5959
Settings.sync();
6060
});
6161

6262
app.outer_gap.set_text(String(ext.gap_outer()));
63-
app.outer_gap.connect("activate", (widget: any) => {
63+
app.outer_gap.connect('activate', (widget: any) => {
6464
let parsed = parseInt((widget.get_text() as string).trim());
6565
if (!isNaN(parsed)) {
6666
ext.set_gap_outer(parsed);
@@ -69,7 +69,7 @@ function settings_dialog_new(): Gtk.Container {
6969
});
7070

7171
app.inner_gap.set_text(String(ext.gap_inner()));
72-
app.inner_gap.connect("activate", (widget: any) => {
72+
app.inner_gap.connect('activate', (widget: any) => {
7373
let parsed = parseInt((widget.get_text() as string).trim());
7474
if (!isNaN(parsed)) {
7575
ext.set_gap_inner(parsed);
@@ -78,37 +78,35 @@ function settings_dialog_new(): Gtk.Container {
7878
});
7979

8080
app.log_level.set_active(ext.log_level());
81-
app.log_level.connect("changed", () => {
81+
app.log_level.connect('changed', () => {
8282
let active_id = app.log_level.get_active_id();
8383
ext.set_log_level(active_id);
8484
});
8585

8686
app.show_skip_taskbar.set_active(ext.show_skiptaskbar());
87-
app.show_skip_taskbar.connect("state-set", (_widget: any, state: boolean) => {
87+
app.show_skip_taskbar.connect('state-set', (_widget: any, state: boolean) => {
8888
ext.set_show_skiptaskbar(state);
8989
Settings.sync();
9090
});
9191

92-
app.mouse_cursor_follows_active_window.set_active(
93-
ext.mouse_cursor_follows_active_window()
94-
);
92+
app.mouse_cursor_follows_active_window.set_active(ext.mouse_cursor_follows_active_window());
9593
app.mouse_cursor_follows_active_window.connect(
96-
"state-set",
94+
'state-set',
9795
(_widget: any, state: boolean) => {
9896
ext.set_mouse_cursor_follows_active_window(state);
9997
Settings.sync();
10098
}
10199
);
102100

103101
app.mouse_cursor_focus_position.set_active(ext.mouse_cursor_focus_location());
104-
app.mouse_cursor_focus_position.connect("changed", () => {
102+
app.mouse_cursor_focus_position.connect('changed', () => {
105103
let active_id = app.mouse_cursor_focus_position.get_active_id();
106104
ext.set_mouse_cursor_focus_location(active_id);
107105
});
108106

109107
app.fullscreen_launcher.set_active(ext.fullscreen_launcher());
110108
app.fullscreen_launcher.connect(
111-
"state-set",
109+
'state-set',
112110
(_widget: any, state: boolean) => {
113111
ext.set_fullscreen_launcher(state);
114112
Settings.sync();
@@ -117,7 +115,7 @@ function settings_dialog_new(): Gtk.Container {
117115

118116
app.stacking_with_mouse.set_active(ext.stacking_with_mouse());
119117
app.stacking_with_mouse.connect(
120-
"state-set",
118+
'state-set',
121119
(_widget: any, state: boolean) => {
122120
ext.set_stacking_with_mouse(state);
123121
Settings.sync();
@@ -190,16 +188,19 @@ function settings_dialog_view(): [AppWidgets, Gtk.Container] {
190188
snap_to_grid: new Gtk.Switch({ halign: Gtk.Align.END }),
191189
window_titles: new Gtk.Switch({ halign: Gtk.Align.END }),
192190
show_skip_taskbar: new Gtk.Switch({ halign: Gtk.Align.END }),
193-
mouse_cursor_follows_active_window: new Gtk.Switch({
194-
halign: Gtk.Align.END,
195-
}),
191+
mouse_cursor_follows_active_window: new Gtk.Switch({halign: Gtk.Align.END,}),
196192
mouse_cursor_focus_position: build_combo(
197193
grid,
198194
8,
199195
focus.FocusPosition,
200196
"Mouse Cursor Focus Position"
201197
),
202-
log_level: build_combo(grid, 9, log.LOG_LEVELS, "Log Level"),
198+
log_level: build_combo(
199+
grid,
200+
9,
201+
log.LOG_LEVELS,
202+
"Log Level"
203+
),
203204
};
204205

205206
grid.attach(win_label, 0, 0, 1, 1);
@@ -280,7 +281,7 @@ function build_combo(
280281
let combo = new Gtk.ComboBoxText();
281282

282283
for (const [index, key] of Object.keys(iter_enum).entries()) {
283-
if (typeof iter_enum[key] == "string") {
284+
if (typeof iter_enum[key] == 'string') {
284285
combo.append(`${index}`, iter_enum[key]);
285286
}
286287
}

0 commit comments

Comments
 (0)