Skip to content

Commit

Permalink
chromium edits
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Jul 26, 2023
1 parent 6a4f297 commit 97871f3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
1 change: 0 additions & 1 deletion .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@


[ -f ~/.fzf.bash ] && source ~/.fzf.bash
# .dircolors
19 changes: 13 additions & 6 deletions fish/chromium.fish
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@

function deps --description "run gclient sync"
# --reset drops local changes. often great, but if making changes inside v8, you don't want to use --reset
# also reset seems to reset branch position in the devtools-internal repo??? weird.
gclient sync --delete_unversioned_trees --jobs=70
gclient sync --delete_unversioned_trees --jobs=70 --verbose
end

function hooks --description "run gclient runhooks"
gclient runhooks
end

function b --description "build chromium"
set -l dir_default (grealpath $PWD/(git rev-parse --show-cdup)out/Default/)
set -l dir_default (grealpath $PWD/(git rev-parse --show-cdup)out/Default/)
# autoninja is better than trying to set -j and -l manually.
# and yay, nice cmd built-in, so no more need to do this: `renice +19 -n (pgrep ninja); renice +19 -n (pgrep compiler_proxy)`
set -l cmd "nice -n 19 autoninja -C "$dir_default" chrome" # blink_tests
Expand Down Expand Up @@ -56,7 +55,15 @@ function cr --description "open built chromium (accepts runtime flags)"
end

function dtcr --description "run chrome with dev devtools"
set -l crpath "./$(git rev-parse --show-cdup)/third_party/chrome/chrome-mac/Chromium.app/Contents/MacOS/Chromium"

# function handle_int --on-signal SIGINT
# echo Got SIGINT
# end

set -l cdup (git rev-parse --show-cdup)
# node ./$cdup/scripts/component_server/server.js --traces & # start in background. trap will kill on exit.

set -l crpath "./$cdup/third_party/chrome/chrome-mac/Chromium.app/Contents/MacOS/Chromium"
set -l dtpath (realpath out/Default/gen/front_end)
if test ! -e "$dtpath/devtools_app.html"
echo "Not found at: $dtpath/devtools_app.html"
Expand All @@ -67,8 +74,8 @@ function dtcr --description "run chrome with dev devtools"
end

# A lil landing page that gives me the local loadTimelineFromURL url to load directly (as we can't have chrome open it (or navigate to it))
set -l landing_url "data:text/html;charset=utf-8,<p>hi.<p><textarea cols=100>devtools://devtools/bundled/devtools_app.html?loadTimelineFromURL=http://localhost:9435/ikea-latencyinfoflow.json</textarea><p><textarea cols=100>devtools://devtools/bundled/devtools_app.html</textarea>"
set -l cmd "$crpath --custom-devtools-frontend=file://$dtpath --user-data-dir=$HOME/chromium-devtools/dt-chrome-profile $clutch_chrome_flags $argv '$landing_url'"
# set -l landing_url "data:text/html;charset=utf-8,<p>hi.<p><textarea cols=100>devtools://devtools/bundled/devtools_app.html?loadTimelineFromURL=http://localhost:9435/ikea-latencyinfoflow.json</textarea><p><textarea cols=100>devtools://devtools/bundled/devtools_app.html</textarea>"
set -l cmd "$crpath --custom-devtools-frontend=file://$dtpath --user-data-dir=$HOME/chromium-devtools/dt-chrome-profile $clutch_chrome_flags $argv http://localhost:11010/"
echo " > $cmd"
eval $cmd
end
Expand Down
6 changes: 2 additions & 4 deletions fish/functions.fish
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ end
# yes I love this gross combo of shell script, escapes, and node.
function gz --d "Get the gzipped size"
printf "%-20s %12s\n" "compression method" "bytes"
# TODO.. omg theres no need to go backwards. i can do this in 1 pass.
set origstr (printf "%-20s %'12.0f" "original" (cat "$argv[1]" | wc -c))
echo $origstr
set -l array "$origstr"
Expand Down Expand Up @@ -99,10 +100,7 @@ function gz --d "Get the gzipped size"
end

sleep 0.05
# TODO: fix the off by one.
# set -a array (printf "nothing really 000")
# echo $array[-1]


for item in $array
# ANSI escape cursor movement https://tldp.org/HOWTO/Bash-Prompt-HOWTO/x361.html
printf "\033[1A" # up 1 row
Expand Down
6 changes: 6 additions & 0 deletions setup-a-new-machine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,12 @@ sudo sysctl kern.maxvnodes=… blah blah something…
git config status.showuntrackedfiles no
git config core.untrackedCache true
git update-index --untracked-cache
# use fsmonitor
git config core.fsmonitor true
# dumb gitsecrets checks
git config --type=bool --add google.gitSecretsHook false


# also this unrelated thing
git config user.email "xxxx@chromium.org"

Expand Down

0 comments on commit 97871f3

Please sign in to comment.