Verified Commit a2c38931 authored by tukusejssirs's avatar tukusejssirs
Browse files

Release 1.0.0

- Remove `todoist` alias, as [Todoist Electron wrapper](https://github.com/KryDos/todoist-linux) is discontinued and official Todoist AppImage is available;
- Replace `XDG_SERIES_DIR` with `XDG_VIDS_SRS_DIR` in `user-dirs.dirs_ts`;
- Add `csp.sh`, `get_phone_bat_status.sh`, `join_by.sh`, `release.sh`, `toggle_monitor.sh`, `win10.sh`, `xcp_add_vusb.sh`, `gitlab_ci_yml_validation.sh`, `ddcutil.sh`, `fragments.sh`, `libsixel.sh`, `systemd_disable_power_button_handling.sh`, `brightness.sh`, `csp.sh`, `multiselect.sh`, `release.sh`, `toggle_monitor.sh`, `win10.sh` initial version of `custom_progress.sh`;
- Add `eid` and `opera` aliases to `aliases.sh`;
- Add `project_name_in_status_bar.py` Sublime Text 3 plugin;
- Update `brightness.sh` to select which monitor’s brightness should be changed;
- Add an option to open a file using the functions defined in `win_progs.sh`;
- Add additional XDG paths to `user-dirs.dirs_ts`:
   - `XDG_BZR_DIR`;
   - `XDG_GGL_DIR`;
   - `XDG_GGL_DRIVE_DIR`;
   - `XDG_MEGA_DIR`;
   - `XDG_SVN_DIR`;
- Add the follwoing options in `gnome_init.sh` and `gnome_janka_init.sh`:
   - an option to disable night light mode;
   - an option to allow volume above 100 %;
   - an option to show weekday in the clock;
- Add installers for MS Windows:
   - `7zip_choco.ps1`;
   - `chocolatey.ps1`;
   - `ff_nightly.ps1`;
   - `indi.ps1`;
   - `mailspring.ps1`;
   - `megasync_choco.ps1`;
   - `nuget.ps1`;
   - `pinutil.ps1`;
   - `richcopy.ps1`;
   - `subl.ps1`;
   - `terminal.ps1`;
   - `vcredist.ps1`;
- Add script `ms_office_2019_activator.ps1` for MS Windows;
- Add MS Windows settings:
   - `disable_uac.ps1`;
   - `enable_rdp.ps1`;
   - `set_execution_policy_unrestricted.ps1`;
   - `set_path_variable.ps1`;
   - `set_timezone.ps1`;
- Rename `export_bw_session.sh` to `bw_settings.sh`;
- Move Bitwarden syncing from `bw_settings.sh` to `bw_sync` SystemD service;
- Create a function from `prosby.sh`:
   - note that this function is deprecated and it will be replaced by `custom_progress.sh` in the future;
- Make `t5500.sh` read the user password from Bitwarden vault;
- Rename `todoist_web_wrapper.sh` to `todoist.sh` and update it to install the official Todoist AppImage;
- Make date in `prompt.sh` locale dependent (sort of);
- Locally define colour variables in `prompt.sh`;
- Add `kig` package to install in `fedora_janka_init.sh`;
- Remove `function` keyword from BASH function definitions;
- Remove all versioning, authoring (except when there are other authors besides @tukusejssirs) and date of last change information from all files:
   - from now on, the whole repository is versioned starting from `1.0.0` using [semantic versioning](https://semver.org);
- Fix ShellCheck warnings in `aliases.sh`, `bashrc_stripped.sh`, `gshort.sh`, `ff_nightly.sh`, `ssh_key_init.sh`, `t5500.sh`, `bitwarden_cli.sh`, `wboot.sh`, `win_progs.sh`, `path_definition.sh`, `fonts.sh`, `git_init.sh`, `gnome_init.sh`, `bash_colours.sh`, `fram.sh`, (partially) `prompt.sh`, `create_ssh_keys.sh`;
- Fix `gl1s.sh` to accept additional parameters;
- Make `megatools_src.sh`, `subnet_mask.sh`, `sway.sh`, `texlive_man_info_paths.sh` executable;
- Check if `~/.ssh/known_hosts` file already exists in `bitwarden_cli.sh`;
- Fix some issues in `gnome_init.sh`:
   - remove `Remmina Dhollandia` shortcut as it is not functional anymore;
   - comment out `xmodmap` commands as it does not work reliably;
   - add a setting to show hidden files in Nautilus;
- Fix some issues in `gnome_janka_init.sh`:
   - remove uninstallation of `gnome-weather`;
   - add a setting to hide hidden files in Nautilus;
   - source `gshort.sh` function;
- Fix exit value of previous command in `PS1` (`prompt` must be the first command in `PROMPT_COMMAND`);
- Fix some typos in `jbead.sh`;
- Fix an issue in `mscore.sh` (we need to make sure `/opt/bin` ,folder exists);
- Remove `user-dirs*` files initialisation from `bash_init.sh` and `user-dirs/user-dirs.dirs_{root,ts}` and `user-dirs/user-dirs.locale_ts` (they are already present in the `.config` repository);
- Fix some issues in `git_init.sh` (like using `XDG_GIT_DIR` variable instead of fixed path);
- Fix setting keyboard shortcut for opening Nautilus (`home`) in `gnome_init.sh` and `gnome_janka_init.sh` as it is sometimes an array and sometimes a string;
- Add shebang to all scripts that miss it or is not located on the first line.
parent 721d9b08
#!/bin/bash
# ls, grep aliases
# TODO: find my old ls aliases
# enable color support of ls and also add handy aliases
if [ -x $usr/bin/dircolors ]; then
test -r ${HOME}/.dircolors && eval "$(dircolors -b ${HOME}/.dircolors)" || eval "$(dircolors -b)"
if [ -x "$usr/bin/dircolors" ]; then
test -r "$HOME/.dircolors" && eval "$(dircolors -b "$HOME/.dircolors")" || eval "$(dircolors -b)"
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
......@@ -32,7 +34,7 @@ if [ "$(trans -V 2> /dev/null | head -1 | grep -o 'Translate Shell')" = 'Transla
for m in {af,am,ar,az,ba,be,bg,bn,bs,ca,ceb,co,cs,cy,da,de,el,emj,en,eo,es,et,eu,fa,fi,fj,fr,fy,ga,gd,gl,gu,ha,haw,he,hi,hmn,hr,ht,hu,hy,id,ig,is,it,ja,jv,ka,kk,km,kn,ko,ku,ky,la,lb,lo,lt,lv,mg,mhr,mi,mk,ml,mn,mr,mrj,ms,mt,mww,my,ne,nl,no,ny,otq,pa,pap,pl,ps,pt,ro,ru,sd,si,sk,sl,sm,sn,so,sq,sr-cyrl,sr-latn,st,su,sv,sw,ta,te,tg,th,tl,tlh,tlh-qaak,to,tr,tt,ty,udm,uk,ur,uz,vi,xh,yi,yo,yua,yue,zh-cn,zh-tw,zu}; do
if [[ $n != $m ]]; then
if [[ $n != "$m" ]]; then
aliasName="tr"$n$m
if [[ $n = "tlh" ]] || [[ $m = "tlh" ]] || [[ $n = "tlh-qaak" ]] || [[ $m = "tlh-qaak" ]] || [[ $n = "otq" ]] || [[ $m = "otq" ]]; then
alias $aliasName="trans -e bing $n:$m"
......@@ -50,7 +52,7 @@ fi
alias bw="node $XDG_GIT_DIR/others/bw/build/bw.js"
# MM: FTP alias
if [[ -e ${HOME}/.mm.cz/ftp ]]; then
if [[ -e "${HOME}/.mm.cz/ftp" ]]; then
alias mm="lftp -u mrtvamanzelkacz,$(bw get item 48bf9816-5951-4eec-845c-aa72007ef132 | jq -r .login.password) ftpx.forpsi.com"
fi
......@@ -64,17 +66,22 @@ if [ -e /usr/bin/com.github.alainm23.planner ]; then
alias planner='/usr/bin/com.github.alainm23.planner'
fi
# Todoist Electron wrapper
if [ -d "$XDG_GIT_DIR/others/todoist-linux/src" ]; then
alias todoist="/usr/local/bin/npm run --prefix \"$XDG_GIT_DIR/others/todoist-linux/src\" start"
fi
# Gnome Contrast
if [ $(which contrast &> /dev/null; echo $?) = 0 ]; then
if command -v contrast &> /dev/null; then
alias contrast="GSETTINGS_SCHEMA_DIR='/opt/share/glib-2.0/schemas/' contrast"
fi
# Shortcuts to use visudo with `nano` text editor
# Note: I could just chane the EDITOR variable and use `visudo` directly, but using it like this always works (when `nano` is installed)
alias nasudo='EDITOR="/bin/nano -u" visudo'
alias nasudoc='EDITOR="/bin/nano -u" visudo -f /etc/sudoers.d/controlserver'
\ No newline at end of file
alias nasudoc='EDITOR="/bin/nano -u" visudo -f /etc/sudoers.d/controlserver'
# eID client app
if command -v EAC_MW_klient &> /dev/null; then
alias eid='EAC_MW_klient'
fi
# Opera web browser (dev edition)
if command -v opera-developer &> /dev/null; then
alias opera='opera-developer'
fi
\ No newline at end of file
#!/bin/bash
# TODO
# - git stuff update scripts [1]
# - .bash_history (auto-update and git push to lnx_*)
......@@ -18,6 +20,7 @@
# git fetch && git pull origin && git pull
# cd $p
# Source ${HOME}/.config/user-dirs.dirs to be able to use the variables in shell
source "${HOME}/.config/user-dirs.dirs"
......
#!/bin/bash
# Stripped down Bash RC file used at work
# author: Tukusej's Sirs
# date: 1 October 2020
# version: 0.9
# Stripped down Bash RC file
# Variables
TEST_GIT_REPO_REPO="$(git rev-parse --show-toplevel 2> /dev/null)"
TEST_GIT_REPO_REPO_RETVAL=$?
if [ $TEST_GIT_REPO_REPO_RETVAL = 0 ] && [ -d "$TEST_GIT_REPO_REPO/bash" ]; then
PATH_REPO_ROOT="$TEST_GIT_REPO_REPO"
else
PATH_REPO_ROOT="$(dirname "$(dirname "$(dirname "$(realpath "$BASH_SOURCE")")")")"
if ! PATH_REPO_ROOT="$(git -C "$(dirname "$(realpath "$BASH_SOURCE")")" rev-parse --show-toplevel 2> /dev/null)"; then
timed PATH_REPO_ROOT="$(dirname "$(dirname "$(dirname "$(realpath "$BASH_SOURCE")")")")"
fi
PATH_FN="${PATH_REPO_ROOT}/bash/functions"
......@@ -29,7 +20,7 @@ src "${PATH_STNGS}/source_user_dirs_and_get_xdg_git_dir.sh"
src "${PATH_STNGS}/lesspipe.sh"
src "${PATH_STNGS}/gcc_colours.sh"
src "${PATH_STNGS}/bash_completion.sh"
src "${PATH_STNGS}/export_bw_session.sh"
src "${PATH_STNGS}/bw_settings.sh"
src "${PATH_STNGS}/acroread.sh"
src "${PATH_STNGS}/kotlin_sdkman.sh"
src "${PATH_STNGS}/texlive_man_info_paths.sh"
......@@ -54,15 +45,20 @@ if [[ $- == *i* ]]; then
# Bash functions
src "${PATH_FN}/add_ssh_keys.sh"
src "${PATH_FN}/add_to_path.sh"
src "${PATH_FN}/brightness.sh"
src "${PATH_FN}/cconv.sh"
src "${PATH_FN}/char_multiplier.sh"
src "${PATH_FN}/create_ssh_keys.sh"
src "${PATH_FN}/custom_progress.sh"
src "${PATH_FN}/csp.sh"
src "${PATH_FN}/fram.sh"
src "${PATH_FN}/hexcol.sh"
src "${PATH_FN}/mkcd.sh"
src "${PATH_FN}/multiselect.sh"
src "${PATH_FN}/prompt.sh"
src "${PATH_FN}/rawurldecode.sh"
src "${PATH_FN}/rawurlencode.sh"
src "${PATH_FN}/release.sh"
src "${PATH_FN}/round.sh"
src "${PATH_FN}/scan.sh"
src "${PATH_FN}/scan_batch_test.sh" # TODO: Remove this by merging it into `scan.sh`
......@@ -70,7 +66,9 @@ if [[ $- == *i* ]]; then
src "${PATH_FN}/subnet_mask.sh"
src "${PATH_FN}/t5500.sh"
src "${PATH_FN}/termtitle.sh"
src "${PATH_FN}/toggle_monitor.sh"
src "${PATH_FN}/up.sh"
src "${PATH_FN}/win10.sh"
if [ -d ~ts ]; then
src "${PATH_FN}/shutup.sh"
......
......@@ -2,12 +2,9 @@
# Add SSH keys from $HOME/.ssh
# author: Tukusej's Sirs
# date: 1 July 2020
# version: 1.3
function add_ssh_keys() {
add_ssh_keys() {
# Make sure only one instance of `ssh-agent` is running
TMP_SSH_AGENT_PID="$(pgrep -u $(whoami) ssh-agent)"
......
......@@ -2,9 +2,6 @@
# Add path(s) to PATH
# author: Tukusej's Sirs
# date: 23 June 2020
# version: 1.1
# dependencies: (GNU) grep, realpath
......@@ -22,7 +19,7 @@
# 3 one or more paths are already in the PATH
function add_to_path() {
add_to_path() {
# Get all paths (including those from globs)
local PATHS_TO_ADD="$(echo $@)"
......
......@@ -2,14 +2,11 @@
# Desktop notifications for commands
# author: Tukusej's Sirs
# date: 28 April 2020
# version: 1.0
# Usage: alert "command with args" "description text"
function alert() {
alert() {
# Variables
local COMMAND="$1"
local DESC="$@"
......
#!/bin/bash
# Format and colours variables definition
# Note: not every terminal emulator supports all of them
# author: Tukusej's Sirs
# date: 4 January 2020
# version: 0.1
# Note: Not every terminal emulator supports all of these definitions.
# terminal colour definitions
# ===========================
......@@ -30,81 +26,64 @@
# lcyan : 55ffff : 85 255 255
# white : ffffff : 255 255 255
# fdefault=$(tput init)
# red=$(tput setaf 1)
# green=$(tput setaf 2)
# yellow=$(tput setaf 3)
# blue=$(tput setaf 4)
# magenta=$(tput setaf 5)
# cyan=$(tput setaf 6)
# lgrey=$(tput setaf 7)
# grey=$(tput setaf 8)
# lred=$(tput setaf 9)
# lgreen=$(tput setaf 10)
# lyellow=$(tput setaf 11)
# lblue=$(tput setaf 12)
# lmagenta=$(tput setaf 13)
# lcyan=$(tput setaf 14)
# white=$(tput setaf 15)
# black=$(tput setaf 16)
# Format
bold="\e[1m" # This is either bold (if supported) or bright in colour
dim="\e[2m"
italics="\e[3m"
underline="\e[4m"
blink="\e[5m"
overline="\e[6m"
invert="\e[7m" # Invert the foreground and background colours
hide="\e[8m" # Change foreground to background colour
strike="\e[9m" # Strikethrough
export bold='\e[1m' # This is either bold (if supported) or bright in colour
export dim='\e[2m'
export italics='\e[3m'
export underline='\e[4m'
export blink='\e[5m'
export overline='\e[6m'
export invert='\e[7m' # Invert the foreground and background colours
export hide='\e[8m' # Change foreground to background colour
export strike='\e[9m' # Strikethrough
# Format and colour reseting
unbold="\e[21m"
undim="\e[22m"
unitalics="\e[23m"
ununderline="\e[24m"
unblink="\e[25m"
unoverline="\e26m"
uninvert="\e[27m"
unhide="\e[28m"
unstrike="\e[9m"
normal="\e[0" # Normal format (i.e reset all manually set format)
fdefault="\e[39m" # Default foreground colour
bdefault="\e[49m" # Default background colour
export unbold='\e[21m'
export undim='\e[22m'
export unitalics='\e[23m'
export ununderline='\e[24m'
export unblink='\e[25m'
export unoverline='\e26m'
export uninvert='\e[27m'
export unhide='\e[28m'
export unstrike='\e[9m'
export normal='\e[0' # Normal format (i.e reset all manually set format)
export fdefault='\e[39m' # Default foreground colour
export bdefault='\e[49m' # Default background colour
# Foreground colours (8/16)
black="\e[30m"
red="\e[31m"
green="\e[32m"
yellow="\e[33m"
blue="\e[34m"
magenta="\e[35m"
cyan="\e[36m"
lgrey="\e[37m"
dgrey="\e[90m"
lred="\e[91m"
lgreen="\e[92m"
lyellow="\e[93m"
lblue="\e[94m"
lmagenta="\e[95m"
lcyan="\e[96m"
white="\e[97m"
export black='\e[30m'
export red='\e[31m'
export green='\e[32m'
export yellow='\e[33m'
export blue='\e[34m'
export magenta='\e[35m'
export cyan='\e[36m'
export lgrey='\e[37m'
export dgrey='\e[90m'
export lred='\e[91m'
export lgreen='\e[92m'
export lyellow='\e[93m'
export lblue='\e[94m'
export lmagenta='\e[95m'
export lcyan='\e[96m'
export white='\e[97m'
# Background colours (8/16)
bblack="\e[40m"
bred="\e[41m"
bgreen="\e[42m"
byellow="\e[43m"
bblue="\e[44m"
bmagenta="\e[45m"
bcyan="\e[46m"
blgrey="\e[47m"
bdgrey="\e[100m"
blred="\e[101m"
blgreen="\e[102m"
blyellow="\e[103m"
blblue="\e[104m"
blmagenta="\e[105m"
blcyan="\e[106m"
bwhite="\e[107m"
\ No newline at end of file
export bblack='\e[40m'
export bred='\e[41m'
export bgreen='\e[42m'
export byellow='\e[43m'
export bblue='\e[44m'
export bmagenta='\e[45m'
export bcyan='\e[46m'
export blgrey='\e[47m'
export bdgrey='\e[100m'
export blred='\e[101m'
export blgreen='\e[102m'
export blyellow='\e[103m'
export blblue='\e[104m'
export blmagenta='\e[105m'
export blcyan='\e[106m'
export bwhite='\e[107m'
\ No newline at end of file
......@@ -2,15 +2,12 @@
# This script logs into Bitwarden and unlocks the session
# author: Tukusej's Sirs
# date: 2 November 2019
# version: 1.0
# $1 email address (optional; required when you want to use second argument as password)
# $2 password (optional)
function bli() {
bli() {
# Variables
email="$1"
if [ "$2" ]; then
......
......@@ -2,12 +2,9 @@
# This script logs out from Bitwarden
# author: Tukusej's Sirs
# date: 2 November 2019
# version: 1.0
function blo() {
blo() {
bw logout
unset BW_SESSION
rm "${HOME}/.bw/BW_SESSION"
......
#!/bin/bash
# This program sets brightness up or down by $step changing the int value in $brightness file
#
# author: Tukusej's Sirs
# date: 11 June 2019
# version: 1.1
# $1 [ up | down ] (required)
# $2 [ step ] (default: 500)
# $1 [ 'HP Z22i' | BenQG2222HDL | internal ] (required)
# $2 [ up | down ] (required)
# $3 [ step ] (default: 500 for internal/notebook screen; 3 % for external monitors)
# return codes:
# 0 success
# 1 no action input
# 2 no valid action input
# 3 return on user input (user did not have write access to $brightnes)
# 3 return on user input (user did not have write access to $brightness)
# 4 unknown monitor was inputs
brightness() {
get_int_current_brightness() {
local brightness_file ret_val
brightness_file="$1"
ret_val=0
if [ ! -w "$brightness_int_file" ]; then
echo "WARNING: This scripts needs write permission to $brightness_int_file file." 2>&1
echo
echo 'You have two options:'
echo ' [1] add write access to the file (you will be prompted for one-time sudo password);'
echo ' [2] run the sudo command when necessery (you will be prompted for sudo password each time you run this script);'
echo ' [3] quit the script.'
echo
echo 'What do you want to do? (default: [1])'
while [ "$ans" != "1" ] && [ "$ans" != "2" ] && [ "$ans" != "3" ]; do
local ans
read -r ans
case $ans in
1|'')
sudo chmod o+w "$brightness_file"
cat "$brightness_file"
;;
2)
sudo bash -c "cat '$brightness_file'"
ret_val=1
;;
3)
return 3
;;
*)
echo "WARNING: $ans is not valid. Please enter valid option." 2>&1
esac
done
fi
return "$ret_val"
}
get_ext_current_brightness() {
local monitor="$1"
if ! sudo ddcutil -l "$monitor" getvcp 10 &> /dev/null; then
echo "WARNING: This scripts needs write permission to run ddcutil. It can be run with root rights only." 2>&1
echo
echo 'You have two options:'
echo ' [1] make current user run ddcutil without password (you will be prompted for one-time sudo password);'
echo ' [2] run the sudo command when necessery (you will be prompted for sudo password each time you run this script);'
echo ' [3] quit the script.'
echo
echo 'What do you want to do? (default: [1])'
while [ "$ans" != "1" ] && [ "$ans" != "2" ] && [ "$ans" != "3" ]; do
local ans
read -r ans
case $ans in
1|'')
sudo bash -c "echo '$USER ALL = (root) NOPASSWD: $(command -v ddcutil) *' >> /etc/sudoers.d/$USER"
;;
2)
;;
3)
return 3
;;
*)
echo "WARNING: $ans is not valid. Please enter valid option." 2>&1
esac
done
fi
if [ -f "/dev/shm/brightness_$monitor" ]; then
brightness_ext_cur="$(< "/dev/shm/brightness_$monitor")"
else
brightness_ext_cur="$(sudo ddcutil -l "$monitor" getvcp 10 | grep -Po 'current value =\s*\K[0-9]+')"
echo "$brightness_ext_cur" > "/dev/shm/brightness_$monitor"
fi
echo "$brightness_ext_cur"
}
function brightness(){
# Variables
local brightness="/sys/class/backlight/intel_backlight/brightness"
local max=$(cat /sys/class/backlight/intel_backlight/max_brightness)
# if [ "$1" ] && [ "$1" = "[uU][pP]*|[dD]|[dD][oO][wW][nN]" ]; then
# echo -n
# elif [ "$1" ]; then
if [ "$1" ] && [[ "$1" != [uU][pP]* ]] && [[ "$1" != [dDuU]* ]] && [[ "$1" != [dD][oO][wW][nN] ]]; then
echo "ERROR: Action $1 is not valid."
return 2
elif [ "$1" = "" ]; then
echo "ERROR: No action was input."
return 1
fi
if [ $2 ] && [ $2 -gt 0 ] && [ $2 -le $max ]; then
local step=$2
else
local step=500
fi
if [ ! -w $brightness ]; then
echo "WARNING: This scripts needs write permission to $brightness file."
echo
echo "You have two options:"
echo " [1] add write access to the file (you will be prompted for one-time sudo password);"
echo " [2] run the sudo command when necessery (you will be prompted for sudo password each time you run this script);"
echo " [3] quit the script."
echo
echo "What do you want to do? (default: [1])"
while [ "$ans" != "1" ] && [ "$ans" != "2" ] && [ "$ans" != "3" ]; do
local ans
read ans
case $ans in
1|'') sudo chmod o+w $brightness ;;
2) su_user="sudo" ;;
3) return 3 ;;
*) echo "$ans is not valid. Please enter valid option."
local action brightness_int_file brightness_int_cur brightness_int_next brightness_ext_cur brightness_ext_next max_ext max_int step step_ext_dflt step_int_dflt su_user
monitor="$1"
action="${2,,}"
step="$3"
brightness_int_file='/sys/class/backlight/intel_backlight/brightness'
max_ext=100
max_int="$(< /sys/class/backlight/intel_backlight/max_brightness)"
min_int=0 # Percentage
min_ext=0
step_ext_dflt=3 # Percentage
step_int_dflt=500
case "${monitor,,}" in
'benqg2222hdl'|'benq'|'b')
monitor='BenQG2222HDL'
;;
'hp z22i'|'hp'|'h')
monitor='HP Z22i'
;;
'internal'|'i')
monitor='internal'
;;
esac
case "$action" in
u|up)
case "$monitor" in
'internal')
brightness_int_cur="$(get_int_current_brightness "$brightness_int_file")"
if [ ! "$step" ]; then
step="$step_int_dflt"
fi
brightness_int_next="$((brightness_int_cur + step))"
if [ "$?" = 1 ]; then
su_user='sudo'
fi
if [ "$brightness_int_next" -gt "$max_int" ]; then
brightness_int_next="$max_int"
fi
if [ "$su_user" = 'sudo' ]; then
"$su_user" bash -c "echo '$brightness_int_next' > '$brightness_int_file'"
fi
;;
'HP Z22i'|'BenQG2222HDL')
brightness_ext_cur="$(get_ext_current_brightness "$monitor")"
if [ ! "$step" ]; then
step="$step_ext_dflt"
fi
brightness_ext_next="$((brightness_ext_cur + step))"
if [ "$brightness_ext_next" -gt "$max_ext" ]; then
brightness_ext_next="$max_ext"
fi
sudo ddcutil -l "$monitor" setvcp 10 "$brightness_ext_next"