File tree Expand file tree Collapse file tree 5 files changed +71
-0
lines changed Expand file tree Collapse file tree 5 files changed +71
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # Mac OS X Finderの「このアプリケーションで開く」の重複削除
3
+ /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain system -domain local -domain user
4
+ killall Finder
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ usage_exit () {
4
+ echo " usage: open_finder.sh [-h] [DIR]" 1>&2
5
+ exit 1
6
+ }
7
+
8
+ while getopts h OPT
9
+ do
10
+ case $OPT in
11
+ h) usage_exit
12
+ ;;
13
+ esac
14
+ done
15
+
16
+ if [ $# -eq 0 ]; then
17
+ DIR=` pwd`
18
+ else
19
+ DIR=$1
20
+ fi
21
+
22
+ FINDER=/System/Library/CoreServices/Finder.app
23
+ echo " open $DIR "
24
+ open $FINDER $DIR
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ if [ $# -ne 1 ]; then
4
+ echo " usage: restart_network.sh [interface]" 1>&2
5
+ exit 1
6
+ else
7
+ ifconfig $1 down
8
+ echo $1 down
9
+ ifconfig $1 up
10
+ echo $1 up
11
+ fi
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ if [ $# -ne 1 ]; then
4
+ echo " usage: ./save_new_documents_to.sh [local|cloud]" 1>&2
5
+ exit 1
6
+ fi
7
+
8
+ if [ $1 = " local" ]; then
9
+ defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
10
+ killall Dock
11
+ echo " Save new documents to Local"
12
+ elif [ $1 = " cloud" ]; then
13
+ defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool true
14
+ killall Dock
15
+ echo " Save new documents to iCloud"
16
+ fi
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ if [ $# -ne 1 ]; then
4
+ echo " usage: ./show_dotfile.sh [show|hide]" 1>&2
5
+ exit 1
6
+ fi
7
+
8
+ if [ $1 = " show" ]; then
9
+ defaults write com.apple.finder AppleShowAllFiles -boolean true
10
+ killall Finder
11
+ echo " show dotfiles"
12
+ elif [ $1 = " hide" ]; then
13
+ defaults write com.apple.finder AppleShowAllFiles -boolean false
14
+ killall Finder
15
+ echo " hide dotfiles"
16
+ fi
You can’t perform that action at this time.
0 commit comments