[+] Get command path in package resource

This commit is contained in:
Azalea (on HyDEV-Daisy)
2022-04-10 04:38:09 -04:00
parent b955a2a4a8
commit 9dce0d9667
2 changed files with 14 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
import os
from subprocess import check_output
import pkg_resources
def get_command_path() -> str:
"""
Get the absolute path of the neofetch command
:return: Command path
"""
return pkg_resources.resource_filename(__name__, 'scripts/neofetch_mod.sh')
+1
View File
@@ -0,0 +1 @@
../../neofetch