Skip to content

Commit 2c68ca4

Browse files
committed
Whitespace and EOF cleanups
Signed-off-by: Joe Block <[email protected]>
1 parent e141032 commit 2c68ca4

36 files changed

+44
-42
lines changed

Contributing.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
88
## Table of Contents
99

10-
- [Contributing to tumult](#contributing-to-tumult)
11-
- [Contribution Guidelines](#contribution-guidelines)
12-
- [To add a helper script](#to-add-a-helper-script)
13-
- [To remove a script](#to-remove-a-script)
14-
- [Scripts are preferred over aliases and functions](#scripts-are-preferred-over-aliases-and-functions)
15-
- [Update the ReadMe with your contribution](#update-the-readme-with-your-contribution)
10+
- [Contribution Guidelines](#contribution-guidelines)
11+
- [To add a helper script](#to-add-a-helper-script)
12+
- [To remove a script](#to-remove-a-script)
13+
- [Scripts are preferred over aliases and functions](#scripts-are-preferred-over-aliases-and-functions)
14+
- [Update the ReadMe with your contribution](#update-the-readme-with-your-contribution)
1615

1716
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
1817

LICENSE

-1
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,3 @@
199199
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200200
See the License for the specific language governing permissions and
201201
limitations under the License.
202-

bin/battery-percentage

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ fi
2222

2323
# Print battery percentage
2424
pmset -g batt | grep -E "([0-9]+\%).*" -o --colour=auto | cut -f1 -d';'
25-
exit $?
25+
exit $?

bin/battery-time

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ fi
2222

2323
# Print system's estimate of battery time remaining
2424
pmset -g batt | grep -E "([0-9]+\%).*" -o --colour=auto | cut -f3 -d';'
25-
exit $?
25+
exit $?

bin/clean-xml-clip

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ if ! has tidy; then
2222
fi
2323

2424
pbpaste | tidy -xml -wrap 0 | pbcopy
25-
exit $?
25+
exit $?

bin/darktoggle

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ echo $darktoggle | osascript
2020
else
2121
myname=$(basename "$0")
2222
fail "darktoggle only works on macOS"
23-
fi
23+
fi

bin/diceware-password

+1-1
Original file line numberDiff line numberDiff line change
@@ -7890,4 +7890,4 @@ __END__
78907890
66678 saruman
78917891
66679 balrog
78927892
66680 elboreth
7893-
66681 yendor
7893+
66681 yendor

bin/disable-network-ds-store-files

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ if [[ "$(uname -s)" != 'Darwin' ]]; then
99
exit 1
1010
fi
1111

12-
exec defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE
12+
exec defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE

bin/dump-entitlements

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,4 @@ function main {
108108
esac
109109
}
110110

111-
main "$@"
111+
main "$@"

bin/enable-network-ds-store-files

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ if [[ "$(uname -s)" != 'Darwin' ]]; then
99
exit 1
1010
fi
1111

12-
exec defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool FALSE
12+
exec defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool FALSE

bin/focusmode-disable

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/bin/bash
2+
#
3+
# Copyright 2018 Joe Block <[email protected]>
24

35
if [[ "$(uname -s)" != 'Darwin' ]]; then
46
echo 'Sorry, this script only works on macOS'

bin/focusmode-enable

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
# Copyright 2018 Joe Block <[email protected]>
23

34
if [[ "$(uname -s)" != 'Darwin' ]]; then
45
echo 'Sorry, this script only works on macOS'

bin/get-wallpaper-path

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bash
2+
# Copyright 2017 Joe Block <[email protected]>
23

34
if [[ "$(uname -s)" != 'Darwin' ]]; then
45
echo 'Sorry, this script only works on macOS'
@@ -8,4 +9,4 @@ fi
89
exec osascript -e 'tell application "Finder"
910
set wall to desktop picture as alias
1011
set wallpath to POSIX path of wall
11-
end tell'
12+
end tell'

bin/hide-file

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# Copyright 2022, Joe Block <[email protected]>
66

77
# shellcheck disable=SC2068
8-
exec chflags hidden $@
8+
exec chflags hidden $@

bin/interface-style

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ if [[ "$(uname -s)" != 'Darwin' ]]; then
4545
exit 1
4646
fi
4747

48-
interface-style
48+
interface-style

bin/macos-alert

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ else
3131
# shellcheck disable=SC2086
3232
echo "$(basename $0) only works on macOs"
3333
exit 1
34-
fi
34+
fi

bin/macos-dialog

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ check-deps() {
3939
if ! has launchctl; then
4040
fail "Can't find launchctl in your PATH"
4141
fi
42-
42+
4343
if ! has osascript; then
4444
fail "Can't find osascript in your PATH"
4545
fi
@@ -51,7 +51,7 @@ ask-dialog() { # $1: message $2: default text
5151
user=$(consoleUser)
5252
if [[ "$user" != "" ]]; then
5353
uid=$(id -u "$user")
54-
54+
5555
launchctl asuser "$uid" /usr/bin/osascript <<-EndOfScript
5656
text returned of ¬
5757
(display dialog "$message" ¬
@@ -65,4 +65,4 @@ ask-dialog() { # $1: message $2: default text
6565
}
6666

6767
check-deps
68-
ask-dialog "$@"
68+
ask-dialog "$@"

bin/macos-major-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ if [[ "$(uname -s)" != 'Darwin' ]]; then
1111
exit 1
1212
fi
1313

14-
sw_vers -productVersion | awk -F '.' '{print $1 "." $2}'
14+
sw_vers -productVersion | awk -F '.' '{print $1 "." $2}'

bin/macos-notification

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ else
4545
# shellcheck disable=SC2086
4646
echo "$(basename $0) only works on macOs"
4747
exit 1
48-
fi
48+
fi

bin/manpreview

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ if has ps2pdf; then
2929
else
3030
# shellcheck disable=SC2016
3131
fail 'No ps2pdf in your $PATH, failing.'
32-
fi
32+
fi

bin/pbclean

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ if [[ "$(uname -s)" != 'Darwin' ]]; then
1111
fi
1212

1313
pbpaste | perl -pe 's/\r\n|\r/\n/g' | pbcopy
14-
exit $?
14+
exit $?

bin/pbclean-ansi

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ if [[ "$(uname -s)" != 'Darwin' ]]; then
1111
fi
1212

1313
pbpaste | perl -pe 's/\e\[[0-9;]*m(?:\e\[K)?//g' | pbcopy
14-
exit $?
14+
exit $?

bin/pbindent

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ do
2828
done
2929

3030
pbpaste | sed 's/^/ /' | $writer
31-
exit $?
31+
exit $?

bin/pbsed

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ test $# -eq 0 -o "$1" = "--help" && {
2222

2323
# pipe pboard through sed and then back again
2424
pbpaste | sed "$@" | pbcopy
25-
exit $?
25+
exit $?

bin/pbsort

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ if [[ "$(uname -s)" != 'Darwin' ]]; then
1010
fi
1111

1212
pbpaste | sort | pbcopy
13-
exit $?
13+
exit $?

bin/power-source

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ case "$1" in
7979
echo "power: $(power-state)"
8080
echo "charge: $(charge-percentage)"
8181
;;
82-
esac
82+
esac

bin/pubkey

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ else
2424
fi
2525

2626
if [[ ! -r "$keyname" ]]; then
27-
fail "Can't read $keyname"
27+
fail "Can't read $keyname"
2828
fi
2929

3030
pbcopy < "$keyname"
31-
exit $?
31+
exit $?

bin/restart-audio

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ if [[ "$(uname -s)" != 'Darwin' ]]; then
1111
exit 1
1212
fi
1313

14-
exec sudo pkill -9 -f coreaudio
14+
exec sudo pkill -9 -f coreaudio

bin/screencap-stream

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,4 +197,4 @@ while :; do
197197
echo "📸 $(date +%H:%M:%S) $fname"
198198
screencapture -x "$fname"
199199
sleep "$interval"
200-
done
200+
done

bin/set-cursor-size

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ function cursor_size() {
5959
}
6060
}
6161
cursor_size()
62-
EOF
62+
EOF

bin/set-software-update-interval

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ else
7676
fi
7777

7878
echo "Setting software update check interval to $INTERVAL days"
79-
exec defaults write com.apple.SoftwareUpdate ScheduleFrequency -int "$INTERVAL"
79+
exec defaults write com.apple.SoftwareUpdate ScheduleFrequency -int "$INTERVAL"

bin/smart-quote-disable

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ if [[ "$(uname -s)" != 'Darwin' ]]; then
99
exit 1
1010
fi
1111

12-
exec defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false
12+
exec defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false

bin/time-machine-log-viewer

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ if [[ "$(uname -s)" != 'Darwin' ]]; then
1515
fi
1616

1717
# show --last 6h instead of stream will only dispay the last 6h, then quit.
18-
log stream --color always --predicate 'subsystem == "com.apple.TimeMachine"' --info | grep -v ' SmCp'
18+
log stream --color always --predicate 'subsystem == "com.apple.TimeMachine"' --info | grep -v ' SmCp'

bin/time-machine-throttle

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ if [[ "$(uname -s)" != 'Darwin' ]]; then
99
exit 1
1010
fi
1111

12-
exec sudo sysctl debug.lowpri_throttle_enabled=1
12+
exec sudo sysctl debug.lowpri_throttle_enabled=1

bin/time-machine-unthrottle

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ if [[ "$(uname -s)" != 'Darwin' ]]; then
99
exit 1
1010
fi
1111

12-
exec sudo sysctl debug.lowpri_throttle_enabled=0
12+
exec sudo sysctl debug.lowpri_throttle_enabled=0

bin/unhide-file

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# Copyright 2022, Joe Block <[email protected]>
66

77
# shellcheck disable=SC2068
8-
exec chflags unhidden $@
8+
exec chflags unhidden $@

0 commit comments

Comments
 (0)