new feat to markslider: autoexec
This commit is contained in:
12
mvregex
12
mvregex
@@ -1,11 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
IFS=$'\n'
|
function helpexit() {
|
||||||
if [ -z "$1" ]
|
echo rename files in current folder replacing arg1 with arg2.
|
||||||
then echo rename files in current folder replacing arg1 with arg2.
|
|
||||||
echo '-n for match non ascii, replace with arg2'
|
echo '-n for match non ascii, replace with arg2'
|
||||||
exit
|
exit
|
||||||
fi
|
}
|
||||||
|
|
||||||
|
IFS=$'\n'
|
||||||
|
[[ -z "$1" ]] && helpexit
|
||||||
|
[[ "$1" = "-h" ]] && helpexit
|
||||||
|
|
||||||
POSTPROC="sed 's, , -> ,'"
|
POSTPROC="sed 's, , -> ,'"
|
||||||
which ncsv &>/dev/null && POSTPROC="ncsv -c"
|
which ncsv &>/dev/null && POSTPROC="ncsv -c"
|
||||||
c=0
|
c=0
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ do
|
|||||||
LINES=$( tput lines )
|
LINES=$( tput lines )
|
||||||
[ "$cmd" = "e" ] && read -N 1 foo
|
[ "$cmd" = "e" ] && read -N 1 foo
|
||||||
display_slide "$1" $i
|
display_slide "$1" $i
|
||||||
|
|
||||||
# save cursor location
|
# save cursor location
|
||||||
echo -ne "${E}s"
|
echo -ne "${E}s"
|
||||||
# ask for user input
|
# ask for user input
|
||||||
@@ -121,6 +122,7 @@ do
|
|||||||
echo -ne "${E}1B${E}3Dq:x"
|
echo -ne "${E}1B${E}3Dq:x"
|
||||||
echo -ne "${E}1B${E}3Dm:▲${E}4A"
|
echo -ne "${E}1B${E}3Dm:▲${E}4A"
|
||||||
}
|
}
|
||||||
|
[[ -z "$MARKSLIDER_AUTOEXEC" ]] || slide_exec "$1" $i
|
||||||
read -s -N 1 cmd
|
read -s -N 1 cmd
|
||||||
# Escape inputed if arrow keys used
|
# Escape inputed if arrow keys used
|
||||||
[ "$cmd" = "" ] && read -s -N 2 cmd
|
[ "$cmd" = "" ] && read -s -N 2 cmd
|
||||||
@@ -244,6 +246,9 @@ $( gnuplot -e "set term dumb 60 15 enhanced; set parametric; set trange [0:10*pi
|
|||||||
&( xeyes )
|
&( xeyes )
|
||||||
$( ls )
|
$( ls )
|
||||||
[s$( echo You can hide commands too... )[1K[uHidden command
|
[s$( echo You can hide commands too... )[1K[uHidden command
|
||||||
|
* Commands are auto-run, if MARKSLIDER_AUTOEXEC=true
|
||||||
|
${H}${R}NOTE: This setting is potentially dangerous, don't view anyones
|
||||||
|
presentations but yours with the setting!${Z}
|
||||||
|
|
||||||
# Hints: Other tools
|
# Hints: Other tools
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user