mathiasbynens / dotfiles

:wrench: .files, including ~/.macos — sensible hacker defaults for macOS
https://mths.be/dotfiles
MIT License
30.22k stars 8.74k forks source link

Show ~/Library in Mojave #865

Open seaofclouds opened 5 years ago

seaofclouds commented 5 years ago

The method to show ~/Library in previous versions of macOS no longer works. Is there a terminal and dotfiles friendly way to show the Library in Mojave? The only method I am aware is through the macOS UI: Open User folder > Show View Options > Check "Show Library Folder".

https://github.com/mathiasbynens/dotfiles/blob/1b9145bb402a00a1ab695d7876706bfbbfc888af/.macos#L321

yochem commented 5 years ago

Works fine for me on Mojave v10.14.2 (18C54).

reitermarkus commented 5 years ago

Doesn't work for me either on 10.14.3 (18D109).

tshu-w commented 5 years ago

I have same Issue #824.

yochem commented 5 years ago

When i followed the steps in this comment to reproduce the problem it seems to be broken on my machine too. When using chflags hidden ~/Library the folder gets hidden but the box in $HOME -> view > show view options is still checked.

zzzeyez commented 5 years ago

it works for me on 10.14.5

capyvara commented 5 years ago

We must also delete the FinderInfo extended file attributes: xattr -d com.apple.FinderInfo ~/Library

More info https://discussions.apple.com/thread/5846108

pnodet commented 5 years ago

possible solution from @tiiiecherle ? check : https://github.com/tiiiecherle/osx_install_config/blob/master/11_system_and_app_preferences/11c_macos_preferences_10_14.sh

show the ~/Library folder

if [[ $(xattr -l ~/Library | grep com.apple.FinderInfo) == "" ]]
    then
        :
    else
        xattr -d com.apple.FinderInfo ~/Library
fi

then set folder flag to not hidden

chflags nohidden ~/Library
capyvara commented 5 years ago

Why not just xattr -d com.apple.FinderInfo ~/Library 2>/dev/null, that's what I did in my dotfiles and seems to be working well.