diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index ec098dc..40e434d 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,9 +4,9 @@
-
+
-
+
@@ -501,7 +501,15 @@
1727015078922
-
+
+
+ 1727018233930
+
+
+
+ 1727018233930
+
+
@@ -542,7 +550,6 @@
-
@@ -567,7 +574,8 @@
-
+
+
diff --git a/wg_main.py b/wg_main.py
index 7837dbc..8f4160a 100755
--- a/wg_main.py
+++ b/wg_main.py
@@ -219,11 +219,17 @@ class FrameWidgets(ttk.Frame):
self.l_box.delete(self.select_tunnel[0])
self.l_box.insert("end", self.lb_rename.get())
self.l_box.update()
+ new_a_connect = self.lb_rename.get()
self.lb_rename.delete(0, tk.END)
if self.a != '' and self.a == select_tl:
self.a = TunnelActiv.active()
self.StrVar.set(value=self.a)
-
+ if Path.is_file(Path('/etc/wire_py/wg_py')):
+ path_to_file = Path('/etc/wire_py') / 'wg_py'
+ a_con = Path.read_text(path_to_file)
+ if select_tl == a_con:
+ self.autoconnect_var.set(value=new_a_connect)
+ Path.write_text(path_to_file, new_a_connect)
return select_tl
except IndexError:
pass
@@ -291,6 +297,9 @@ class FrameWidgets(ttk.Frame):
if __name__ == '__main__':
window = MainWindow()
+ """
+ the hidden files are hidden in Filedialog
+ """
try:
window.tk.call('tk_getOpenFile', '-foobarbaz')
except TclError: