mirror of
https://github.com/yeongpin/cursor-free-vip.git
synced 2025-08-02 12:47:34 +08:00

- Translate Chinese comments to English across multiple files - Improve code readability by using consistent, clear comments - Remove redundant comments and simplify language-specific annotations - Maintain existing code structure while enhancing internationalization
32 lines
1.0 KiB
Python
32 lines
1.0 KiB
Python
import os
|
|
import sys
|
|
import platform
|
|
|
|
def get_user_documents_path():
|
|
"""Get user documents path"""
|
|
if platform.system() == "Windows":
|
|
return os.path.expanduser("~\\Documents")
|
|
else:
|
|
return os.path.expanduser("~/Documents")
|
|
|
|
def get_default_chrome_path():
|
|
"""Get default Chrome path"""
|
|
if sys.platform == "win32":
|
|
return r"C:\Program Files\Google\Chrome\Application\chrome.exe"
|
|
elif sys.platform == "darwin":
|
|
return "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
|
|
else:
|
|
return "/usr/bin/google-chrome"
|
|
|
|
def get_linux_cursor_path():
|
|
"""Get Linux Cursor path"""
|
|
possible_paths = [
|
|
"/opt/Cursor/resources/app",
|
|
"/usr/share/cursor/resources/app",
|
|
"/opt/cursor-bin/resources/app",
|
|
"/usr/lib/cursor/resources/app",
|
|
os.path.expanduser("~/.local/share/cursor/resources/app")
|
|
]
|
|
|
|
# return the first path that exists
|
|
return next((path for path in possible_paths if os.path.exists(path)), possible_paths[0]) |