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="---
|
||||
deploy-test * Test Deployment
|
||||
deploy-prod * Prod Deployment
|
||||
maintenance * Maintenance Mode
|
||||
new * New Post
|
||||
quit * Quit Main Menu"
|
||||
@ -20,7 +18,7 @@ do
|
||||
|
||||
# parse csv, build and show list
|
||||
_selection=$(hugo list all \
|
||||
| grep -Ev ^path\|_index \
|
||||
| grep -Ev ^path \
|
||||
| while read _line
|
||||
do
|
||||
# csv fields:
|
||||
@ -40,8 +38,9 @@ do
|
||||
_draft_fmt=$([ "$_draft" == "true" ] && echo "(draft)")
|
||||
_date="$(echo $_line | cut -d"," -f4)"
|
||||
_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") \
|
||||
| fzf -e --tac +s --with-nth 2.. \
|
||||
@ -132,8 +131,6 @@ _edit_entry() {
|
||||
case "$_selection" in
|
||||
new) _new ;;
|
||||
---) ;;
|
||||
deploy-test) make update ;;
|
||||
deploy-prod) make prod ;;
|
||||
maintenance) make maintenance ;;
|
||||
quit) _quit=1; echo "Good bye." ;;
|
||||
*) [ -n "$_selection" ] \
|
||||
|
204
.bin/chrome
204
.bin/chrome
@ -1,62 +1,146 @@
|
||||
#!/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 \
|
||||
# --disable-auto-reload \
|
||||
# --disable-breakpad \
|
||||
# --disable-client-side-phishing-detection \
|
||||
# --disable-component-cloud-policy \
|
||||
# --disable-component-update \
|
||||
# --disable-crash-reporter \
|
||||
# --disable-device-discovery-notifications \
|
||||
# --disable-logging \
|
||||
# --disable-login-animations \
|
||||
# --disable-notifications \
|
||||
# --disable-pinch \
|
||||
# --disable-software-rasterizer \
|
||||
# --disable-chrome-browser-cloud-management \
|
||||
# --disable-field-trial-config \
|
||||
# --disable-cookie-encryption \
|
||||
# --disable-cloud-print-proxy \
|
||||
# --dbus-stub \
|
||||
# --cros-disks-fake \
|
||||
# --disable-stack-profiler \
|
||||
# --disable-touch-drag-drop \
|
||||
# --disable-usb-keyboard-detect \
|
||||
# --disable-default-apps \
|
||||
# --disable-histogram-customizer \
|
||||
# --disable-in-process-stack-traces \
|
||||
# --no-service-autorun \
|
||||
# --no-experiments \
|
||||
# --use-gl=egl \
|
||||
# --force-dark-mode \
|
||||
# --enable-features=WebUIDarkMode \
|
||||
# --hide-crash-restore-bubble \
|
||||
# --no-default-browser-check \
|
||||
# --no-proxy-server \
|
||||
# --no-recovery-component \
|
||||
# --password-store=basic \
|
||||
# --structured-metrics-disabled \
|
||||
# --wm-window-animations-disabled \
|
||||
# #--enable-features=RunVideoCaptureServiceInBrowserProcess,WebUIDarkMode \
|
||||
# #--use-gl=egl \
|
||||
# --disable-yuv-image-decoding \
|
||||
# --use-gl=desktop \
|
||||
# --high-dpi-support=1 \
|
||||
# --force-device-scale-factor=1.5 \
|
||||
# flag documentation:
|
||||
# https://peter.sh/experiments/chromium-command-line-switches/
|
||||
|
||||
# helper functions
|
||||
addflag() { FLAGS="$FLAGS $1"; }
|
||||
enable() { ENABLED_FEATURES="$ENABLED_FEATURES $1"; }
|
||||
disable() { DISABLED_FEATURES="$DISABLED_FEATURES $1"; }
|
||||
|
||||
###
|
||||
### SETUP ENVIRONMENT
|
||||
###
|
||||
|
||||
# disable WASM (OpenBSD specific)
|
||||
#export ENABLE_WASM=0
|
||||
|
||||
# Nuke DBUS
|
||||
# some webpages suggest value "disabled:"
|
||||
export DBUS_SESSION_BUS_ADDRESS="unix:path=/dev/null"
|
||||
|
||||
###
|
||||
### CHROMIUM FLAGS
|
||||
###
|
||||
|
||||
# disable pledge (OpenBSD specific)
|
||||
#addflag "--no-sandbox"
|
||||
|
||||
# disable unveil (OpenBSD specific)
|
||||
#addflag "--disable-unveil"
|
||||
|
||||
# Skip First Run tasks as well as not showing additional dialogs,
|
||||
# prompts or bubbles. Suppressing dialogs, prompts, and bubbles is
|
||||
# important as this switch is used by automation (including performance
|
||||
# benchmarks) where it's important only a browser window is shown. This
|
||||
# may not actually be the first run or the What's New page. Overridden
|
||||
# by kForceFirstRun (for FRE) and kForceWhatsNew (for What's New). This
|
||||
# does not drop the First Run sentinel and thus doesn't prevent first run
|
||||
# from occurring the next time chrome is launched without this flag. It
|
||||
# also does not update the last What's New milestone, so does not prevent
|
||||
# What's New from occurring the next time chrome is launched without this
|
||||
# flag.
|
||||
addflag "--no-first-run"
|
||||
|
||||
# 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