File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,23 @@ local function worker(user_args)
203
203
border_color = calendar_themes [theme ].border ,
204
204
widget = cal
205
205
}
206
+
207
+ local auto_hide_timer = gears .timer ({
208
+ timeout = user_args .timeout or 2 ,
209
+ single_shot = true ,
210
+ callback = function ()
211
+ calendar_widget .toggle ()
212
+ end ,
213
+ })
214
+
215
+ popup :connect_signal (" mouse::leave" , function ()
216
+ if user_args .auto_hide then
217
+ auto_hide_timer :again ()
218
+ end
219
+ end )
220
+ popup :connect_signal (" mouse::enter" , function ()
221
+ auto_hide_timer :stop ()
222
+ end )
206
223
207
224
popup :buttons (
208
225
awful .util .table .join (
@@ -250,6 +267,10 @@ local function worker(user_args)
250
267
end
251
268
252
269
popup .visible = true
270
+ if user_args .auto_hide then
271
+ auto_hide_timer :start ()
272
+ end
273
+
253
274
254
275
end
255
276
end
You can’t perform that action at this time.
0 commit comments