1
- export { } ;
1
+ export { }
2
2
3
3
const ExtensionUtils = imports . misc . extensionUtils ;
4
4
// @ts -ignore
@@ -8,23 +8,23 @@ const { Gtk } = imports.gi;
8
8
9
9
const { Settings } = imports . gi . Gio ;
10
10
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' ;
14
14
15
15
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 ,
28
28
}
29
29
30
30
// @ts -ignore
@@ -36,31 +36,31 @@ function settings_dialog_new(): Gtk.Container {
36
36
let ext = new settings . ExtensionSettings ( ) ;
37
37
38
38
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 ) => {
40
40
ext . set_show_title ( state ) ;
41
41
Settings . sync ( ) ;
42
42
} ) ;
43
43
44
44
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 ) => {
46
46
ext . set_snap_to_grid ( state ) ;
47
47
Settings . sync ( ) ;
48
48
} ) ;
49
49
50
50
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 ) => {
52
52
ext . set_smart_gaps ( state ) ;
53
53
Settings . sync ( ) ;
54
54
} ) ;
55
55
56
56
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 ) => {
58
58
ext . set_auto_unstack ( state ) ;
59
59
Settings . sync ( ) ;
60
60
} ) ;
61
61
62
62
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 ) => {
64
64
let parsed = parseInt ( ( widget . get_text ( ) as string ) . trim ( ) ) ;
65
65
if ( ! isNaN ( parsed ) ) {
66
66
ext . set_gap_outer ( parsed ) ;
@@ -69,7 +69,7 @@ function settings_dialog_new(): Gtk.Container {
69
69
} ) ;
70
70
71
71
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 ) => {
73
73
let parsed = parseInt ( ( widget . get_text ( ) as string ) . trim ( ) ) ;
74
74
if ( ! isNaN ( parsed ) ) {
75
75
ext . set_gap_inner ( parsed ) ;
@@ -78,37 +78,35 @@ function settings_dialog_new(): Gtk.Container {
78
78
} ) ;
79
79
80
80
app . log_level . set_active ( ext . log_level ( ) ) ;
81
- app . log_level . connect ( " changed" , ( ) => {
81
+ app . log_level . connect ( ' changed' , ( ) => {
82
82
let active_id = app . log_level . get_active_id ( ) ;
83
83
ext . set_log_level ( active_id ) ;
84
84
} ) ;
85
85
86
86
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 ) => {
88
88
ext . set_show_skiptaskbar ( state ) ;
89
89
Settings . sync ( ) ;
90
90
} ) ;
91
91
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 ( ) ) ;
95
93
app . mouse_cursor_follows_active_window . connect (
96
- " state-set" ,
94
+ ' state-set' ,
97
95
( _widget : any , state : boolean ) => {
98
96
ext . set_mouse_cursor_follows_active_window ( state ) ;
99
97
Settings . sync ( ) ;
100
98
}
101
99
) ;
102
100
103
101
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' , ( ) => {
105
103
let active_id = app . mouse_cursor_focus_position . get_active_id ( ) ;
106
104
ext . set_mouse_cursor_focus_location ( active_id ) ;
107
105
} ) ;
108
106
109
107
app . fullscreen_launcher . set_active ( ext . fullscreen_launcher ( ) ) ;
110
108
app . fullscreen_launcher . connect (
111
- " state-set" ,
109
+ ' state-set' ,
112
110
( _widget : any , state : boolean ) => {
113
111
ext . set_fullscreen_launcher ( state ) ;
114
112
Settings . sync ( ) ;
@@ -117,7 +115,7 @@ function settings_dialog_new(): Gtk.Container {
117
115
118
116
app . stacking_with_mouse . set_active ( ext . stacking_with_mouse ( ) ) ;
119
117
app . stacking_with_mouse . connect (
120
- " state-set" ,
118
+ ' state-set' ,
121
119
( _widget : any , state : boolean ) => {
122
120
ext . set_stacking_with_mouse ( state ) ;
123
121
Settings . sync ( ) ;
@@ -190,16 +188,19 @@ function settings_dialog_view(): [AppWidgets, Gtk.Container] {
190
188
snap_to_grid : new Gtk . Switch ( { halign : Gtk . Align . END } ) ,
191
189
window_titles : new Gtk . Switch ( { halign : Gtk . Align . END } ) ,
192
190
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 , } ) ,
196
192
mouse_cursor_focus_position : build_combo (
197
193
grid ,
198
194
8 ,
199
195
focus . FocusPosition ,
200
196
"Mouse Cursor Focus Position"
201
197
) ,
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
+ ) ,
203
204
} ;
204
205
205
206
grid . attach ( win_label , 0 , 0 , 1 , 1 ) ;
@@ -280,7 +281,7 @@ function build_combo(
280
281
let combo = new Gtk . ComboBoxText ( ) ;
281
282
282
283
for ( const [ index , key ] of Object . keys ( iter_enum ) . entries ( ) ) {
283
- if ( typeof iter_enum [ key ] == " string" ) {
284
+ if ( typeof iter_enum [ key ] == ' string' ) {
284
285
combo . append ( `${ index } ` , iter_enum [ key ] ) ;
285
286
}
286
287
}
0 commit comments