#!/bin/bash ## #***************************************************************** # brave-profiles - equk.co.uk #***************************************************************** # # This script was created to simplify and standardize brave configuration # across profiles. # ## # equk 2018 - equk.co.uk ## # License: MIT (LICENSE file should be included with script) # Tweaked by Zach Smith ## variables profile_name=$1 profile_folder="$HOME/.local/share/brave_profiles/$profile_name" brave_bin="/usr/bin/brave" brave_flags="--ssl-version-min=tls1 --enable-smooth-scrolling --enable-tab-audio-muting" # color / colour blue="\033[1;34m" green="\033[1;32m" red="\033[1;31m" bold="\033[1;37m" reset="\033[0m" # CLI feedback cl_error="[$red ERROR $reset]" gplus="[$green+$reset]" bplus="[$blue+$reset]" # Check if running within X Window Session if [ "x$DISPLAY" = "x" ]; then echo "must be run within the X Window System." >&2 echo "Exiting." >&2 exit 1 fi # Check for root ( quit if root :x ) if [ $(whoami) = "root" ]; then echo -e "$cl_error do not run this script as root" exit 1 fi # Check if user namespaces is enabled (for sandbox) # Note: this is to enforce user namespaces for sandbox if [[ ! (-r /proc/sys/kernel/unprivileged_userns_clone && $(