File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -158,11 +158,31 @@ battery:
158
158
levels = if current_battery_state {
159
159
if self . enable_notifications {
160
160
println ! ( "Switching to Battery mode" ) ;
161
+ let _ = std:: process:: Command :: new ( "notify-send" )
162
+ . args ( [
163
+ "-i" ,
164
+ "/path/to/nonexistent/icon" ,
165
+ "Hypraway" ,
166
+ "-t" ,
167
+ "2100" ,
168
+ "Switched to Battery Power Mode"
169
+ ] )
170
+ . spawn ( ) ;
161
171
}
162
172
& self . battery
163
173
} else {
164
174
if self . enable_notifications {
165
175
println ! ( "Switching to AC power mode" ) ;
176
+ let _ = std:: process:: Command :: new ( "notify-send" )
177
+ . args ( [
178
+ "-i" ,
179
+ "/path/to/nonexistent/icon" ,
180
+ "Hypraway" ,
181
+ "-t" ,
182
+ "2100" ,
183
+ "Switched to AC Power Mode"
184
+ ] )
185
+ . spawn ( ) ;
166
186
}
167
187
& self . ac
168
188
} ;
You can’t perform that action at this time.
0 commit comments