Skip to content

Commit

Permalink
Merge pull request #11 from WardsParadox/recentsfix
Browse files Browse the repository at this point in the history
Add show-recents ONLY if macOS >=10.14
  • Loading branch information
homebysix committed Apr 3, 2019
2 parents bb179ce + 592f445 commit d689e20
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions payload/Library/Python/2.7/site-packages/docklib.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

import os
import subprocess

from platform import mac_ver
from distutils.version import LooseVersion
# pylint: disable=E0611
from Foundation import NSURL
from Foundation import CFPreferencesAppSynchronize
Expand All @@ -29,10 +30,13 @@ class Dock:
_DOCK_LAUNCHAGENT_ID = "com.apple.Dock.agent"
_DOCK_LAUNCHAGENT_FILE = "/System/Library/LaunchAgents/com.apple.Dock.plist"
_SECTIONS = ["persistent-apps", "persistent-others"]
_MUTABLE_KEYS = ["autohide", "orientation", "show-recents", "tilesize"]
_MUTABLE_KEYS = ["autohide", "orientation", "tilesize"]
_IMMUTABLE_KEYS = ["mod-count"]
items = {}

if LooseVersion(mac_ver()[0]) >= LooseVersion("10.14"):
_MUTABLE_KEYS.append("show-recents")

def __init__(self):
for key in self._SECTIONS:
try:
Expand Down

0 comments on commit d689e20

Please sign in to comment.