new feat to markslider: autoexec
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
VERSION=20140417
|
||||
VERSION=20150122
|
||||
|
||||
function display_self {
|
||||
$0 $0
|
||||
exit 0
|
||||
}
|
||||
function exit_reset {
|
||||
setterm -cursor on
|
||||
exit
|
||||
}
|
||||
[ -z "$1" ] && display_self
|
||||
[ "$1" = "-h" ] && display_self
|
||||
|
||||
@@ -61,7 +65,8 @@ function slide_exec {
|
||||
|
||||
}
|
||||
|
||||
|
||||
setterm -cursor off
|
||||
trap 'reset;exit_reset' INT
|
||||
E='\x1b['
|
||||
H="${E}1m"
|
||||
Z="${E}0m"
|
||||
@@ -155,7 +160,7 @@ do
|
||||
;;
|
||||
x|q)
|
||||
echo -ne "${E}1E"
|
||||
exit
|
||||
exit_reset
|
||||
;;
|
||||
e)
|
||||
slide_exec "$1" $i
|
||||
@@ -164,7 +169,7 @@ do
|
||||
done
|
||||
|
||||
done
|
||||
exit
|
||||
exit_reset
|
||||
"
|
||||
# Markdown Slide Presenter: MarkSlider
|
||||
|
||||
|
||||
Reference in New Issue
Block a user