/usr/bin/fvwm-crystal.videomodeswitch- is in fvwm-crystal 3.2.7+dfsg-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #!/bin/bash
# xrandr wrapper for FVWM-Crystal
# Dominique Michel <dominique_libre@users.sourceforge.net> 2013
# Released under the GNU/GPL license version 2 or any later version
LC_ALL=C
CURRENT_MODE=$( xrandr | grep '[0-9]\*' | sed -e 's:\(^ *\)\([0-9]*x[0-9]*\).*:\2:' )
ALL_MODES=( $( xrandr | grep -E "^ *[0-9]" | sed -e 's:\(^ *\)\([0-9]*x[0-9]*\).*:\2:' | sort -grs ) )
index=${#ALL_MODES[@]}
i=0
while [ "$i" -lt "$index" ]
do
if [ "${CURRENT_MODE}" == "${ALL_MODES[i]}" ]
then
m=$(($i+1))
if [ "$m" -eq "$index" ]
then
m=0
fi
NEXT_MODE="${ALL_MODES[m]}"
fi
let "i+=1"
done
xrandr -s "${NEXT_MODE}"
|