User Experience Wishlist

binjali
Contributor

I have a list of requirements/desires that have been handed to me from management and I want to make them happen. No clue how, though.

-Set Scrolling to Classic (down is down, up is up)
-Set default to Home Folder, not recent items
-Show Hard Disks on desktop
-Show Connected Servers
-Show filename extensions
-Set Accent Color
-Set Desktop Wallpaper
-Always Show Scrollbars
-Warn before emptying trash
-Dark mode selected by default

Any advice or direction would be appreciated! Thanks!

3 REPLIES 3

mschlosser
Contributor II

This could be accomplished through capturing the username, through this or a similar method:

currentuser=`stat -f "%Su" /dev/console`

And then using a series of default write commands to appropriate preference domains and keys that you'd like to set.

defaults write /Users/$currentuser/<pathtopreferencedomain> <key>

Some of these settings may also be possible to set via a configuration profile that would apply to everyone. That said with apple's focus on privacy and the fact that a lot of these settings are personal preference, seems like a lot of work for minimal gain, could easily turn into IT is setting MY preferences rage. Just because you can, doesn't mean you should, time for new bosses

I don't disagree about the new bosses, but while they are the ones signing my checks, I have to implement as much of their vision as possible, even when I disagree with it.

YanW
Contributor III

Here is what I have. Some of them aren't essential to our org so I don't have the scripts. We don't use all of them, so you'll have test it. 

Warn before emptying trash is on by default I think. 

#!/bin/sh

currentUser=$(ls -l /dev/console | awk '{print $3}')

# Set Scroll Bar To Always Showing
defaults write -g AppleShowScrollBars -string Always

# Show Hard Drive and Connected Servers on Desktop
su "$currentUser" -c "defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true;"
su "$currentUser" -c "defaults write com.apple.finder ShowMountedServersOnDesktop -bool true;"

# Toggle Dark/Light Mode
osascript -e \
'tell application "System Events" to tell appearance preferences to set dark mode to not dark mode'

# Show All Filename Extensions
sudo -u $currentUser /usr/bin/defaults write /Users/$currentUser/Library/Preferences/.GlobalPreferences.plist AppleShowAllExtensions -bool true

sleep 2

killall Finder