mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 14:12:41 +00:00
Cleaning up some scripts and moving to autoload functions
This commit is contained in:
23
zsh/config/functions/desktop
Executable file
23
zsh/config/functions/desktop
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/zsh
|
||||
|
||||
function desktop() {
|
||||
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
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ -n "$show" ]; then
|
||||
defaults write com.apple.finder CreateDesktop true && killall Finder
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "Please pass in --hide | --show"
|
||||
return 1
|
||||
}
|
||||
Reference in New Issue
Block a user