don't overwrite icon with every start
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import textwrap
|
||||
from pathlib import Path
|
||||
@@ -46,11 +48,16 @@ def _linux_install_icon():
|
||||
local_share = Path.home().joinpath(".local").joinpath("share")
|
||||
if local_share.is_dir():
|
||||
icon_dir = local_share / "icons" / "hicolor" / "scalable" / "apps"
|
||||
icon_dir.mkdir(parents=True, exist_ok=True)
|
||||
_linux_install_icon_to_path(icon_dir / "krowlog.svg")
|
||||
|
||||
|
||||
def _linux_install_icon_to_path(path: Path):
|
||||
if path.exists():
|
||||
return
|
||||
|
||||
if not path.parent.exists():
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
svg = textwrap.dedent("""<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64" viewBox="0 0 128 128" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||
<defs>
|
||||
|
||||
Reference in New Issue
Block a user