Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dukecat0 committed Nov 4, 2021
0 parents commit a9c8685
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# hideicons

Display or hide the desktop icons from the command line.

29 changes: 29 additions & 0 deletions hideicons
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

if ! [[ "$OSTYPE" == "darwin"* ]]; then
echo "isarm only supports macOS."
exit 1
fi

if [ -z "$1" ]
then
result_read="defaults read com.apple.finder CreateDesktop"
if $result_read | grep -q "true"; then
defaults write com.apple.finder CreateDesktop false
killall Finder
echo "Desktop icons are hidden!"
exit 0
elif $result_read | grep -q "false"; then
defaults write com.apple.finder CreateDesktop true
killall Finder
echo "Desktop icons are shown!"
exit 0
fi
fi

case "$1" in
--help|-h) echo "Display or hide the desktop icons from the command line."; exit 0
;;
--version|-v) echo "Version 0.0.1"; exit 0
;;
esac

0 comments on commit a9c8685

Please sign in to comment.