@@ -30,7 +30,7 @@ use gtk::prelude::*;
30
30
use gtk:: {
31
31
/* Libraries */ gio,
32
32
/* Application */ Application , ApplicationWindow ,
33
- /* Widgets */ Button
33
+ /* Widgets */ Button ,
34
34
} ;
35
35
//use std::env;
36
36
//use std::path::Path;
@@ -67,16 +67,16 @@ fn build_ui(app: &Application) {
67
67
. build ( ) ;
68
68
// Connect to "clicked" signal of `button`
69
69
button1. connect_clicked ( move |_| {
70
- println ! ( "Trying to open settings!" ) ; //DEBUG
70
+ println ! ( "Trying to open settings!" ) ; //DEBUG
71
71
72
72
// Ideally we should grab if nvidia-settings 'failed' somehow or exited normally
73
73
match subprocess:: exec_check ( & [ OsStr :: new ( "nvidia-settings" ) ] , None :: < & gio:: Cancellable > ) {
74
74
Ok ( _x) => {
75
- println ! ( "........yay" ) ; //DEBUG
76
- } ,
75
+ println ! ( "........yay" ) ; //DEBUG
76
+ }
77
77
Err ( _y) => {
78
- println ! ( "........fak" ) ; //DEBUG
79
- } ,
78
+ println ! ( "........fak" ) ; //DEBUG
79
+ }
80
80
} ;
81
81
} ) ;
82
82
// Button Child 2
@@ -89,22 +89,25 @@ fn build_ui(app: &Application) {
89
89
. build ( ) ;
90
90
// Connect to "clicked" signal of `button`
91
91
button2. connect_clicked ( move |_| {
92
- println ! ( "Trying to open settings!" ) ; //DEBUG
92
+ println ! ( "Trying to open settings!" ) ; //DEBUG
93
93
94
94
// Ideally we should grab if nvidia-settings 'failed' somehow or exited normally
95
- match subprocess:: exec_communicate ( & [
96
- OsStr :: new ( "nvidia-settings" ) ,
97
- OsStr :: new ( "-q" ) ,
98
- OsStr :: new ( "GpuUUID" ) ,
99
- OsStr :: new ( "-t" ) ,
100
- ] , None ,
101
- None :: < & gio:: Cancellable > ) {
95
+ match subprocess:: exec_communicate (
96
+ & [
97
+ OsStr :: new ( "nvidia-settings" ) ,
98
+ OsStr :: new ( "-q" ) ,
99
+ OsStr :: new ( "GpuUUID" ) ,
100
+ OsStr :: new ( "-t" ) ,
101
+ ] ,
102
+ None ,
103
+ None :: < & gio:: Cancellable > ,
104
+ ) {
102
105
Ok ( _x) => {
103
- println ! ( "........yay" ) ; //DEBUG
104
- } ,
106
+ println ! ( "........yay" ) ; //DEBUG
107
+ }
105
108
Err ( _y) => {
106
- println ! ( "........fak" ) ; //DEBUG
107
- } ,
109
+ println ! ( "........fak" ) ; //DEBUG
110
+ }
108
111
} ;
109
112
} ) ;
110
113
0 commit comments