Wednesday, October 4, 2023

5 useful terminal tips for Mac users

Must read

[ad_1]

defaults write com.apple.finder AppleShowAllFiles -bool TRUE

Then, for these changes to take effect, restart Finder by running:

Killall Finder

You can also combine these two commands with ampersands:

defaults write com.apple.finder AppleShowAllFiles -bool TRUE && killall Finder

(For the sake of simplicity, I’ll do this for the rest of the commands on this list that require restarting a service.)

To hide your own folder or file, you can run:

hidden chflags ~ / Dekstop / MySecrets && killall Finder

… By replacing ~ / Dekstop / MySecrets with the path to your own folder or secret file. (The ~ stands for your home directory, also found in / home /[yourusername].) To make hidden files and folders invisible again, just run the original command with FALSE instead of TRUE.

Customize the Dock

The Dock is an important part of the macOS interface: you store your most used shortcuts there, you use it to switch between windows and hide minimized apps that you don’t need at the moment. . And while you’ll find some useful changes in the Settings> Dock menu in macOS, you can customize it even more with a few terminal commands.

For example, do you want to add a blank spacer to help organize your apps into groups? Run:

defaults write com.apple.Dock persistent-apps -array-add ‘{“tile-type” = “spacer-tile”;}’ && killall Dock

Or, if you’d rather keep the dock as minimalistic as possible, you can hide any apps that aren’t currently working with:

defaults write com.apple.Dock static only -bool TRUE && killall Dock

If you use Command + H to ‘hide’ apps on a regular basis, you can even dim their icons in the dock, so you know they’re hidden:

defaults write com.apple.Dock showhidden -bool TRUE && killall Dock

Finally, if you want to automatically show and hide the Dock, you’ve probably noticed that there is a one-second delay for this animation – that is, when you hover the mouse over the bottom of your screen , it takes about a second before the Dock. slips. To remove this delay, run:

defaults write com.apple.Dock autohide-delay -float 0 && killall Dock

You can also change this 0 to a higher number to increase the delay. To revert to the default auto-hide settings, run:

defaults to remove com.apple.Dock autohide-delay && killall Dock

Change the way your Mac takes screenshots

Taking a screenshot on a Mac is very easy – just press Command + Shift + 4 to grab a window or part of the screen. Unfortunately, you don’t have much control over how these screenshots are stored, at least from the onscreen menus. You can, however, customize the elements from the terminal.

If you want to change where screenshots are stored, for example, you can run:

defaults write com.apple.screencapture location ~ / Pictures && killall SystemUIServer

Replace ~ / Pictures with the folder you want to use. If you want to restore the default behavior, just change this path to ~ / Desktop.

Then you can remove the drop shadows around the screenshots with:

defaults write com.apple.screencapture disable-shadow -bool TRUE && killall SystemUIServer

You can bring them back by running this command again with FALSE instead of TRUE.

Additionally, you can change the file type of these screenshots (which is PNG by default) to something else with:

defaults write com.apple.screencapture type JPG && killall SystemUIServer

You can replace JPG with a few types of files, like PDF, if you want.

Finally, you can change the default name of the screenshot files with:

defaults write com.apple.screencapture name “mycapture” && killall SystemUIServer

You can replace mycapture with whatever you want the filename to be. With those few commands, you should be able to get your Mac to take screenshots exactly the way you want without any additional programs.

look Star wars (Yes really)

Long ago, in a terminal far, far away, enterprising people recreated the entirety of New hope in ASCII. It’s still available in Terminals today, and on current versions of macOS, you can run:

nc towel.blinkenlights.nl 23

To watch the story unfold in text form. Enjoy.


More WIRED stories

[ad_2]

- Advertisement -spot_img

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -spot_img

Latest article