Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import os
- #function by popcnt on stackoverflow
- def clear():
- os.system('cls' if os.name =='nt' else 'clear')
- # thanks to No Spoko on StackOverflow for the original idea, what you see here is modified
- def printLogo():
- f = open('logo.txt', 'r')
- logo = f.read()
- print(logo)
- f.close()
- clear()
- printLogo()
- print('Welcome to Belowdeck! \n')
- #some code ideas from stackoverflow, don't remember the user
- menuItem = {}
- menuItem['1']="Show hidden files and folders"
- menuItem['2']="Hide a file or folder from view"
- menuItem['3']="Download files without a web browser"
- menuItem['4']="List contents of a folder"
- menuItem['5']="View any file's contents"
- menuItem['6']="Change permissions of a file"
- menuItem['7']="Restore a disk image to a device connected to your Mac"
- menuItem['8']="Change the default screenshot location"
- menuItem['9']="Change the default screenshot format"
- menuItem['10']="Stop apps from syncing to iCloud by default"
- menuItem['11']="Check for macOS updates every day instead of every month"
- menuItem['12']="Enable a sound when your Mac connects to a power source"
- menuItem['13']="Make holding down a key repeat characters"
- menuItem['14']="Dull hidden apps in your Dock"
- menuItem['15']="Hide non-active apps in your Dock"
- menuItem['16']="Add a spacer to your Dock"
- menuItem['17']="Change the delay before your Dock slides out"
- menuItem['18']="Change the speed at which your Dock slides out"
- menuItem['19']="Disable auto-restore in the Preview app"
- menuItem['20']="Add a message to the login window"
- menuItem['21']="Get rid of Dashboard"
- menuItem['22']="Rebuild Spotlight"
- menuItem['23']="Destroy your Mac \n"
- options=menuItem.keys()
- sorted(options)
- for entry in options:
- print (entry, menuItem[entry])
- def option1():
- clear()
- print("Show hidden files and folders \n")
- selection1=input("Would you like to proceed with the operation? (y/n): ")
- if selection1 == "y" or selection1 == "Y":
- os.system("defaults write com.apple.finder AppleShowAllFiles -bool TRUE && killall finder")
- else:
- input('Invalid selection! ')
- while True:
- menuSelection=input("Please select your desired action:")
- if menuSelection =='1':
- option1()
- elif menuSelection == '2':
- print ("delete")
- elif menuSelection == '3':
- print ("find")
- elif menuSelection == '4':
- print ('4')
- else:
- print ("Invalid action!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement