Skip to content

Commit d689e20

Browse files
authored
Merge pull request #11 from WardsParadox/recentsfix
Add show-recents ONLY if macOS >=10.14
2 parents bb179ce + 592f445 commit d689e20

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • payload/Library/Python/2.7/site-packages

payload/Library/Python/2.7/site-packages/docklib.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
import os
77
import subprocess
8-
8+
from platform import mac_ver
9+
from distutils.version import LooseVersion
910
# pylint: disable=E0611
1011
from Foundation import NSURL
1112
from Foundation import CFPreferencesAppSynchronize
@@ -29,10 +30,13 @@ class Dock:
2930
_DOCK_LAUNCHAGENT_ID = "com.apple.Dock.agent"
3031
_DOCK_LAUNCHAGENT_FILE = "/System/Library/LaunchAgents/com.apple.Dock.plist"
3132
_SECTIONS = ["persistent-apps", "persistent-others"]
32-
_MUTABLE_KEYS = ["autohide", "orientation", "show-recents", "tilesize"]
33+
_MUTABLE_KEYS = ["autohide", "orientation", "tilesize"]
3334
_IMMUTABLE_KEYS = ["mod-count"]
3435
items = {}
3536

37+
if LooseVersion(mac_ver()[0]) >= LooseVersion("10.14"):
38+
_MUTABLE_KEYS.append("show-recents")
39+
3640
def __init__(self):
3741
for key in self._SECTIONS:
3842
try:

0 commit comments

Comments
 (0)