chore: drop unused code

This commit is contained in:
aclist committed 2026-05-03 02:42:43 +09:00
1 parent 9bfa39c17e
commit 139b226959
4 files changed
+3 -31

No files matched your search

+1 -24
View File
@@ -1,7 +1,7 @@
import shutil
import textwrap
from pathlib import Path
def write_desktop_file(share_path: Path) -> None:
template = f"""\
[Desktop Entry]
@@ -16,26 +16,3 @@ def write_desktop_file(share_path: Path) -> None:
file = share_path / "dzgui.desktop"
file.write_text(textwrap.dedent(template))
def write_shim_file(share_path: Path) -> None:
# FIXME: expects sys.prefix to be a venv
file = share_path / "launch.sh"
template=f"""\
source {venv}/bin/activate
python3.13 dzgui
"""
try:
file.write_text(textwrap.dedent(template))
file.chmod(file.stat().st_mode | stat.S_IEXEC)
except OSError as e:
logger.critical(e)
return
clear_old_path()
write_desktop_file(share_path)
def clear_old_path() -> None:
home = Path.home()
path = home / ".local/share/dzgui"
shutil.rmtree(path)