From 4e90ebb0d6b3b7d695e1a4cd40e78675836799be Mon Sep 17 00:00:00 2001 From: actionless Date: Mon, 18 Nov 2024 01:06:29 +0100 Subject: [PATCH] fix(widgets: pw-helper): save last used script to permanent DB (while rest of PW-helper stuff saved to session-time DB) --- actionless/widgets/pipewire_helper.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actionless/widgets/pipewire_helper.lua b/actionless/widgets/pipewire_helper.lua index eb1199ec..b68ab093 100644 --- a/actionless/widgets/pipewire_helper.lua +++ b/actionless/widgets/pipewire_helper.lua @@ -76,7 +76,7 @@ function pipewire_helper.init(widget_args) function pipewire_helper.load() pipewire_helper.enabled_scripts = db.session_db().get_or_set(db_ids.enabled, {}) - pipewire_helper.last_script = db.session_db().get_or_set( + pipewire_helper.last_script = db.get_or_set( db_ids.last, pipewire_helper.available_scripts[1].id or pipewire_helper.available_scripts[1].cmd @@ -88,7 +88,7 @@ function pipewire_helper.init(widget_args) db.session_db().set(db_ids.enabled, pipewire_helper.enabled_scripts) local current_script = pipewire_helper.get_current_script() if current_script then - db.session_db().set(db_ids.last, current_script.id) + db.set(db_ids.last, current_script.id) end end -------------------------------------------------------------------------------