-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zsh_aliases
34 lines (30 loc) · 1.94 KB
/
.zsh_aliases
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
alias ejectall="osascript -e 'tell application \"Finder\" to eject (every disk whose ejectable is true)'"
alias aliases="code ~/.zsh_aliases"
alias reload="source ~/.zshrc"
# alias lights="python3 ~/Developer/Scripts/RotateLIFXLights/rotate_lifx_lights.py"
alias xclean="rm -rf ~/Library/Developer/Xcode/DerivedData/*"
alias tomp3='find . -name "*.flac" -exec sh -c '\''ffmpeg -i "$0" -ab 320k -map_metadata 0 -id3v2_version 3 "$(basename "$0" .flac)".mp3'\'' {} \;'
# If need to use this, open terminal with laptop and enter command, then shut laptop and hit enter to run and fix
alias fixresolution='/Applications/RDM.app/Contents/MacOS/SetResX -w 2560 -h 1440 -s 2.0 -d 0'
function wip() { git push --set-upstream origin $@ -o merge_request.create -o merge_request.remove_source_branch -o merge_request.title="WIP: Merge $@"}
function merge() { git push -o merge_request.title="Merge $@" }
function round_15_series_screenshot_corners {
# Remove any previously framed
for f in **/*15*framed.png*(N); do rm "$f"; done
# Round corners of screens that need it as aren't rounded by frame
for f in **/*15*.png; do convert "$f" \( +clone -alpha extract \
-draw 'fill black polygon 0,0 0,50 50,0 fill white circle 50,50 50,0' \
\( +clone -flip \) -compose Multiply -composite \
\( +clone -flop \) -compose Multiply -composite \
\) -alpha off -compose CopyOpacity -composite "${f%%.png}.png"; done
}
function round_14_series_screenshot_corners {
# Remove any previously framed
for f in **/*14*framed.png*(N); do rm "$f"; done
# Round corners of screens that need it as aren't rounded by frame
for f in **/*14*.png; do convert "$f" \( +clone -alpha extract \
-draw 'fill black polygon 0,0 0,50 50,0 fill white circle 50,50 50,0' \
\( +clone -flip \) -compose Multiply -composite \
\( +clone -flop \) -compose Multiply -composite \
\) -alpha off -compose CopyOpacity -composite "${f%%.png}.png"; done
}