[api] refactoring: .desktop files are now installed at /usr/share/applications for the root user

This commit is contained in:
Vinicius Moreira
2021-11-25 16:37:31 -03:00
parent 7265c82fe5
commit 243a1fb696
5 changed files with 8 additions and 8 deletions

View File

@@ -7,7 +7,7 @@ from bauh.api import user
CACHE_DIR = f'/var/cache/{__app_name__}' if user.is_root() else f'{Path.home()}/.cache/{__app_name__}'
CONFIG_DIR = f'/etc/{__app_name__}' if user.is_root() else f'{Path.home()}/.config/{__app_name__}'
USER_THEMES_DIR = f'/usr/share/{__app_name__}/themes' if user.is_root() else f'{Path.home()}/.local/share/{__app_name__}/themes'
DESKTOP_ENTRIES_DIR = '{}/.local/share/applications'.format(str(Path.home()))
DESKTOP_ENTRIES_DIR = '/usr/share/applications' if user.is_root() else f'{Path.home()}/.local/share/applications'
TEMP_DIR = f'/tmp/{__app_name__}@{getuser()}'
LOGS_DIR = f'{TEMP_DIR}/logs'
AUTOSTART_DIR = f'/etc/xdg/autostart' if user.is_root() else f'{Path.home()}/.config/autostart'