Skip to content

Commit ef36a49

Browse files
authored
Fix enabling monochrome tray icons on NixOS (#1618)
1 parent b759d33 commit ef36a49

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/tauon/t_modules/t_main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17797,6 +17797,10 @@ def set_tray_icons(self, force: bool = False) -> None:
1779717797
def install_tray_icon(src: str, name: str) -> None:
1779817798
alt = user_icon_dir / f"{name}.svg"
1779917799
if not alt.is_file() or force:
17800+
if alt.exists():
17801+
# Remove file first to avoid PermissionError on distributions like NixOS that use 444 for permissions
17802+
# See https://github.com/Taiko2k/Tauon/issues/1615
17803+
alt.unlink()
1780017804
shutil.copy(src, str(alt))
1780117805

1780217806
if not user_icon_dir.is_dir():

0 commit comments

Comments
 (0)