Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion zsh/aliases/go.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ golangci-lint-with-retry() {
if output=$(golangci-lint run --fix 2>&1); then
echo "$output"
return 0
elif grep -q "parallel golangci-lint is running" <<< "$output"; then
elif [[ "$output" == *"parallel golangci-lint is running"* ]]; then
echo "Attempt $attempt/$max_attempts: Waiting for parallel golangci-lint to finish..."
sleep 1
((attempt++))
Expand Down
8 changes: 4 additions & 4 deletions zsh/macos-notvscode.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ is-at-home() {
[[ "$OSTYPE" != darwin* ]] && return 1
local usb_info
usb_info=$(ioreg -p IOUSB) &&
grep -q "Plugable USBC-6950U" <<< "$usb_info" &&
grep -q "TS4" <<< "$usb_info" &&
[[ "$usb_info" == *"Plugable USBC-6950U"* ]] &&
[[ "$usb_info" == *TS4* ]] &&
networksetup -getnetworkserviceenabled "Thunderbolt Ethernet Slot 2" | grep -q Enabled
}
is-displaylink-connected() {
[[ "$OSTYPE" != darwin* ]] && return 1
local display_info
display_info=$(system_profiler SPDisplaysDataType)
grep -q "ARZOPA" <<< "$display_info" ||
grep -q "TYPE-C" <<< "$display_info"
[[ "$display_info" == *ARZOPA* ]] ||
[[ "$display_info" == *TYPE-C* ]]
}
restart-displaylink() {
if [[ "$OSTYPE" != darwin* ]]; then
Expand Down