- Add Autoconnect settings to settings.conf

- Add run_as Bash script and open_gitea.py python script
- Add Tooltip disable/enable
- Rename settings to settings.conf for theme, updates and tooltip enable in one file
This commit is contained in:
2024-10-28 07:13:44 +01:00
parent 18e042400c
commit 9d44e7ab42
9 changed files with 211 additions and 122 deletions

View File

@ -2,11 +2,13 @@
from subprocess import check_call
from pathlib import Path
path_to_file = Path('/etc/wire_py/wg_py')
path_to_file = Path('/etc/wire_py/settings.conf')
if Path.exists(path_to_file):
a_con = Path.read_text(path_to_file)
check_call(['nmcli', 'connection', 'up', a_con])
else:
pass
with open(path_to_file, 'r') as a_con:
lines = a_con.readlines()
a_con = lines[7].strip()
if a_con != 'off':
check_call(['nmcli', 'connection', 'up', a_con])
else:
pass