mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
- Supporting flatpak 1.X, 1.2X and 1.4.X - Tray icon - System notifications when new updates are available - Applications management window
21 lines
603 B
Python
21 lines
603 B
Python
# used for AUR installation
|
|
import subprocess
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
desktop_file = """
|
|
[Desktop Entry]
|
|
Type = Application
|
|
Name = fpakman
|
|
Comment = Manage your Flatpak applications
|
|
Exec = /usr/bin/fpakman
|
|
Icon = /usr/lib/python{version}/site-packages/fpakman/resources/img/flathub_45.svg
|
|
""".format(version="{}.{}".format(sys.version_info.major, sys.version_info.minor))
|
|
|
|
file_path = '{}/.local/share/applications/fpakman.desktop'.format(str(Path.home()))
|
|
|
|
with open(file_path, 'w+') as f:
|
|
f.write(desktop_file)
|
|
|
|
subprocess.run('desktop-file-install {}'.format(file_path), shell=True)
|