Advertisement
Guest User

Untitled

a guest
Aug 7th, 2022
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.46 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. import os
  4.  
  5. #function by popcnt on stackoverflow
  6. def clear():
  7.     os.system('cls' if os.name =='nt' else 'clear')
  8.  
  9. # thanks to No Spoko on StackOverflow for the original idea, what you see here is modified
  10. def printLogo():
  11.     f = open('logo.txt', 'r')
  12.     logo = f.read()
  13.     print(logo)
  14.     f.close()
  15.  
  16. clear()
  17.  
  18. printLogo()
  19.  
  20. print('Welcome to Belowdeck! \n')
  21.  
  22. #some code ideas from stackoverflow, don't remember the user
  23. menuItem = {}
  24.  
  25. menuItem['1']="Show hidden files and folders"
  26. menuItem['2']="Hide a file or folder from view"
  27. menuItem['3']="Download files without a web browser"
  28. menuItem['4']="List contents of a folder"
  29. menuItem['5']="View any file's contents"
  30. menuItem['6']="Change permissions of a file"
  31. menuItem['7']="Restore a disk image to a device connected to your Mac"
  32. menuItem['8']="Change the default screenshot location"
  33. menuItem['9']="Change the default screenshot format"
  34. menuItem['10']="Stop apps from syncing to iCloud by default"
  35. menuItem['11']="Check for macOS updates every day instead of every month"
  36. menuItem['12']="Enable a sound when your Mac connects to a power source"
  37. menuItem['13']="Make holding down a key repeat characters"
  38. menuItem['14']="Dull hidden apps in your Dock"
  39. menuItem['15']="Hide non-active apps in your Dock"
  40. menuItem['16']="Add a spacer to your Dock"
  41. menuItem['17']="Change the delay before your Dock slides out"
  42. menuItem['18']="Change the speed at which your Dock slides out"
  43. menuItem['19']="Disable auto-restore in the Preview app"
  44. menuItem['20']="Add a message to the login window"
  45. menuItem['21']="Get rid of Dashboard"
  46. menuItem['22']="Rebuild Spotlight"
  47. menuItem['23']="Destroy your Mac \n"
  48.  
  49. options=menuItem.keys()
  50. sorted(options)
  51. for entry in options:
  52.   print (entry, menuItem[entry])
  53.  
  54. def option1():
  55.     clear()
  56.     print("Show hidden files and folders \n")
  57.     selection1=input("Would you like to proceed with the operation? (y/n): ")
  58.     if selection1 == "y" or selection1 == "Y":
  59.         os.system("defaults write com.apple.finder AppleShowAllFiles -bool TRUE && killall finder")
  60.     else:
  61.         input('Invalid selection! ')
  62. while True:        
  63.     menuSelection=input("Please select your desired action:")
  64.     if menuSelection =='1':
  65.         option1()
  66.     elif menuSelection == '2':
  67.         print ("delete")
  68.     elif menuSelection == '3':
  69.         print ("find")
  70.     elif menuSelection == '4':
  71.         print ('4')
  72.     else:
  73.         print ("Invalid action!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement