Update 2025-01-18 09:07 OpenBSD/amd64-t14
This commit is contained in:
parent
33471962fb
commit
7a70f07a67
@ -8,8 +8,6 @@ cd "$HOME/blog"
|
|||||||
|
|
||||||
# extra options appended to the menu
|
# extra options appended to the menu
|
||||||
_extra="---
|
_extra="---
|
||||||
deploy-test * Test Deployment
|
|
||||||
deploy-prod * Prod Deployment
|
|
||||||
maintenance * Maintenance Mode
|
maintenance * Maintenance Mode
|
||||||
new * New Post
|
new * New Post
|
||||||
quit * Quit Main Menu"
|
quit * Quit Main Menu"
|
||||||
@ -20,7 +18,7 @@ do
|
|||||||
|
|
||||||
# parse csv, build and show list
|
# parse csv, build and show list
|
||||||
_selection=$(hugo list all \
|
_selection=$(hugo list all \
|
||||||
| grep -Ev ^path\|_index \
|
| grep -Ev ^path \
|
||||||
| while read _line
|
| while read _line
|
||||||
do
|
do
|
||||||
# csv fields:
|
# csv fields:
|
||||||
@ -40,8 +38,9 @@ do
|
|||||||
_draft_fmt=$([ "$_draft" == "true" ] && echo "(draft)")
|
_draft_fmt=$([ "$_draft" == "true" ] && echo "(draft)")
|
||||||
_date="$(echo $_line | cut -d"," -f4)"
|
_date="$(echo $_line | cut -d"," -f4)"
|
||||||
_date_fmt=$(date -f "%Y-%m-%dT%H:%M:%S" -j "$_date" +"%Y-%m-%d %H:%M")
|
_date_fmt=$(date -f "%Y-%m-%dT%H:%M:%S" -j "$_date" +"%Y-%m-%d %H:%M")
|
||||||
|
_type=$(echo "$_file" | grep -q "_index.md$" && echo "page" || echo "post")
|
||||||
|
|
||||||
echo "$_file * $_date_fmt | $_title $_draft_fmt"
|
echo "$_file * $_date_fmt | $_type | $_title $_draft_fmt"
|
||||||
|
|
||||||
done | (sort -t" " -k 2; echo "$_extra") \
|
done | (sort -t" " -k 2; echo "$_extra") \
|
||||||
| fzf -e --tac +s --with-nth 2.. \
|
| fzf -e --tac +s --with-nth 2.. \
|
||||||
@ -132,8 +131,6 @@ _edit_entry() {
|
|||||||
case "$_selection" in
|
case "$_selection" in
|
||||||
new) _new ;;
|
new) _new ;;
|
||||||
---) ;;
|
---) ;;
|
||||||
deploy-test) make update ;;
|
|
||||||
deploy-prod) make prod ;;
|
|
||||||
maintenance) make maintenance ;;
|
maintenance) make maintenance ;;
|
||||||
quit) _quit=1; echo "Good bye." ;;
|
quit) _quit=1; echo "Good bye." ;;
|
||||||
*) [ -n "$_selection" ] \
|
*) [ -n "$_selection" ] \
|
||||||
|
204
.bin/chrome
204
.bin/chrome
@ -1,62 +1,146 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#/usr/local/bin/ungoogled-chromium \
|
|
||||||
#export DBUS_SESSION_BUS_ADDRESS="unix:path=/dev/null"
|
|
||||||
export ENABLE_WASM=Yes
|
|
||||||
/usr/local/bin/chrome \
|
|
||||||
--no-first-run \
|
|
||||||
--disable-crash-reporter \
|
|
||||||
--disable-logging \
|
|
||||||
--disable-login-animations \
|
|
||||||
--disable-notifications \
|
|
||||||
--disable-infobars \
|
|
||||||
--disable-dev-shm-usage \
|
|
||||||
--log-level=0 \
|
|
||||||
--hide-crash-restore-bubble \
|
|
||||||
--no-default-browser-check \
|
|
||||||
--high-dpi-support=1 \
|
|
||||||
--force-device-scale-factor=1.5 \
|
|
||||||
--new-window "$@"
|
|
||||||
|
|
||||||
# --bwsi \
|
# flag documentation:
|
||||||
# --disable-auto-reload \
|
# https://peter.sh/experiments/chromium-command-line-switches/
|
||||||
# --disable-breakpad \
|
|
||||||
# --disable-client-side-phishing-detection \
|
# helper functions
|
||||||
# --disable-component-cloud-policy \
|
addflag() { FLAGS="$FLAGS $1"; }
|
||||||
# --disable-component-update \
|
enable() { ENABLED_FEATURES="$ENABLED_FEATURES $1"; }
|
||||||
# --disable-crash-reporter \
|
disable() { DISABLED_FEATURES="$DISABLED_FEATURES $1"; }
|
||||||
# --disable-device-discovery-notifications \
|
|
||||||
# --disable-logging \
|
###
|
||||||
# --disable-login-animations \
|
### SETUP ENVIRONMENT
|
||||||
# --disable-notifications \
|
###
|
||||||
# --disable-pinch \
|
|
||||||
# --disable-software-rasterizer \
|
# disable WASM (OpenBSD specific)
|
||||||
# --disable-chrome-browser-cloud-management \
|
#export ENABLE_WASM=0
|
||||||
# --disable-field-trial-config \
|
|
||||||
# --disable-cookie-encryption \
|
# Nuke DBUS
|
||||||
# --disable-cloud-print-proxy \
|
# some webpages suggest value "disabled:"
|
||||||
# --dbus-stub \
|
export DBUS_SESSION_BUS_ADDRESS="unix:path=/dev/null"
|
||||||
# --cros-disks-fake \
|
|
||||||
# --disable-stack-profiler \
|
###
|
||||||
# --disable-touch-drag-drop \
|
### CHROMIUM FLAGS
|
||||||
# --disable-usb-keyboard-detect \
|
###
|
||||||
# --disable-default-apps \
|
|
||||||
# --disable-histogram-customizer \
|
# disable pledge (OpenBSD specific)
|
||||||
# --disable-in-process-stack-traces \
|
#addflag "--no-sandbox"
|
||||||
# --no-service-autorun \
|
|
||||||
# --no-experiments \
|
# disable unveil (OpenBSD specific)
|
||||||
# --use-gl=egl \
|
#addflag "--disable-unveil"
|
||||||
# --force-dark-mode \
|
|
||||||
# --enable-features=WebUIDarkMode \
|
# Skip First Run tasks as well as not showing additional dialogs,
|
||||||
# --hide-crash-restore-bubble \
|
# prompts or bubbles. Suppressing dialogs, prompts, and bubbles is
|
||||||
# --no-default-browser-check \
|
# important as this switch is used by automation (including performance
|
||||||
# --no-proxy-server \
|
# benchmarks) where it's important only a browser window is shown. This
|
||||||
# --no-recovery-component \
|
# may not actually be the first run or the What's New page. Overridden
|
||||||
# --password-store=basic \
|
# by kForceFirstRun (for FRE) and kForceWhatsNew (for What's New). This
|
||||||
# --structured-metrics-disabled \
|
# does not drop the First Run sentinel and thus doesn't prevent first run
|
||||||
# --wm-window-animations-disabled \
|
# from occurring the next time chrome is launched without this flag. It
|
||||||
# #--enable-features=RunVideoCaptureServiceInBrowserProcess,WebUIDarkMode \
|
# also does not update the last What's New milestone, so does not prevent
|
||||||
# #--use-gl=egl \
|
# What's New from occurring the next time chrome is launched without this
|
||||||
# --disable-yuv-image-decoding \
|
# flag.
|
||||||
# --use-gl=desktop \
|
addflag "--no-first-run"
|
||||||
# --high-dpi-support=1 \
|
|
||||||
# --force-device-scale-factor=1.5 \
|
# Enables TLS/SSL errors on localhost to be ignored (no interstitial, no
|
||||||
|
# blocking of requests).
|
||||||
|
addflag "--allow-insecure-localhost"
|
||||||
|
|
||||||
|
# If present animations are disabled
|
||||||
|
addflag "--wm-window-animations-disabled"
|
||||||
|
|
||||||
|
# Select which implementation of GL the GPU process should use.
|
||||||
|
# Options are:
|
||||||
|
# desktop: whatever desktop OpenGL the user has installed (Linux and Mac default).
|
||||||
|
# egl: whatever EGL / GLES2 the user has installed (Windows default - actually ANGLE).
|
||||||
|
# swiftshader: The SwiftShader software renderer.
|
||||||
|
addflag "--use-gl=desktop"
|
||||||
|
|
||||||
|
# Disable structured metrics logging of cros actions.
|
||||||
|
addflag "--structured-metrics-disabled"
|
||||||
|
|
||||||
|
# Enables cros disks fake behavior. If the switch is set, fake cros disk
|
||||||
|
# D-Bus client is initialized and USB events do not reach chrome.
|
||||||
|
addflag "--cros-disks-fake"
|
||||||
|
|
||||||
|
# Specifies which encryption storage backend to use. Possible values are
|
||||||
|
# kwallet, kwallet5, kwallet6, gnome-libsecret, basic. Any other value
|
||||||
|
# will lead to Chrome detecting the best backend automatically.
|
||||||
|
addflag "--password-store=basic"
|
||||||
|
|
||||||
|
# Disables the service process from adding itself as an autorun process.
|
||||||
|
# This does not delete existing autorun registrations, it just prevents
|
||||||
|
# the service from registering a new one.
|
||||||
|
addflag "--no-service-autorun"
|
||||||
|
|
||||||
|
# Prevent downloading and running the recovery component.
|
||||||
|
addflag "--no-recovery-component"
|
||||||
|
addflag "--no-proxy-server"
|
||||||
|
addflag "--no-experiments"
|
||||||
|
addflag "--no-default-browser-check"
|
||||||
|
addflag "--log-level=0"
|
||||||
|
addflag "--high-dpi-support=1"
|
||||||
|
addflag "--hide-crash-restore-bubble"
|
||||||
|
addflag "--force-device-scale-factor=1.5"
|
||||||
|
addflag "--force-dark-mode"
|
||||||
|
|
||||||
|
addflag "--enable-gpu-rasterization"
|
||||||
|
addflag "--enable-zero-copy"
|
||||||
|
# addflag "--enable-unsafe-webgpu" # leads to banner "stability and security will suffer
|
||||||
|
addflag "--ignore-gpu-blocklist"
|
||||||
|
|
||||||
|
# fix webcam issues?
|
||||||
|
# addflag "--disable-yuv-image-decoding"
|
||||||
|
#
|
||||||
|
addflag "--disable-usb-keyboard-detect"
|
||||||
|
addflag "--disable-touch-drag-drop"
|
||||||
|
addflag "--disable-stack-profiler"
|
||||||
|
#addflag "--disable-software-rasterizer"
|
||||||
|
addflag "--disable-pinch"
|
||||||
|
addflag "--disable-notifications"
|
||||||
|
addflag "--disable-login-animations"
|
||||||
|
addflag "--disable-logging"
|
||||||
|
addflag "--disable-infobars"
|
||||||
|
addflag "--disable-in-process-stack-traces"
|
||||||
|
addflag "--disable-histogram-customizer"
|
||||||
|
addflag "--disable-field-trial-config"
|
||||||
|
|
||||||
|
addflag "--disable-device-discovery-notifications"
|
||||||
|
# addflag "--disable-dev-shm-usage"
|
||||||
|
addflag "--disable-default-apps"
|
||||||
|
|
||||||
|
# Disable crash reporting
|
||||||
|
addflag "--disable-crash-reporter"
|
||||||
|
addflag "--disable-cookie-encryption"
|
||||||
|
addflag "--disable-component-update"
|
||||||
|
addflag "--disable-component-cloud-policy"
|
||||||
|
addflag "--disable-cloud-print-proxy"
|
||||||
|
addflag "--disable-client-side-phishing-detection"
|
||||||
|
addflag "--disable-chrome-browser-cloud-management"
|
||||||
|
addflag "--disable-breakpad"
|
||||||
|
addflag "--disable-auto-reload"
|
||||||
|
# addflag "--dbus-stub" # default on non chrome-os
|
||||||
|
addflag "--bwsi" # force guest mode (no sign-in)
|
||||||
|
|
||||||
|
###
|
||||||
|
### ENABLE / DISABLE PROCESS FEATURES
|
||||||
|
###
|
||||||
|
|
||||||
|
enable "WebUIDarkMode" # enables dark mode
|
||||||
|
# enable RunVideoCaptureServiceInBrowserProcess # fixes webcam issues by avoiding multiple /dev/video opens
|
||||||
|
enable "VaapiVideoDecoder"
|
||||||
|
enable "VaapiVideoEncoder"
|
||||||
|
disable "IndexedDBCompressValuesWithSnappy" # disable indexdb compression, speeds up facebook
|
||||||
|
disable "Vulkan"
|
||||||
|
disable "UseChromeOSDirectVideoDecoder"
|
||||||
|
enable "VaapiVideoDecodeLinuxGL"
|
||||||
|
enable "VaapiIgnoreDriverChecks"
|
||||||
|
disable "UseSkiaRenderer"
|
||||||
|
|
||||||
|
# add features to flag list
|
||||||
|
addflag "--enable-features=$(echo "$ENABLED_FEATURES" | tr -s " " | sed 's/^ //g' | tr ' ' ',')"
|
||||||
|
addflag "--enable-features=$(echo "$DISABLED_FEATURES" | tr -s " " | sed 's/^ //g' | tr ' ' ',')"
|
||||||
|
|
||||||
|
# finally start chrome...
|
||||||
|
set -x
|
||||||
|
/usr/local/bin/chrome $FLAGS --new-window "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user