mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
Added desktop script
This commit is contained in:
21
scripts/scripts/desktop
Executable file
21
scripts/scripts/desktop
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/zsh
|
||||
|
||||
declare hide
|
||||
declare show
|
||||
|
||||
zparseopts -D -E -K -- \
|
||||
{h,-hide}=hide \
|
||||
{s,-show}=show
|
||||
|
||||
if [ -n "$hide" ]; then
|
||||
defaults write com.apple.finder CreateDesktop false && killall Finder
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -n "$show" ]; then
|
||||
defaults write com.apple.finder CreateDesktop true && killall Finder
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Please pass in --hide | --show"
|
||||
exit 1
|
||||
Reference in New Issue
Block a user