diff options
Diffstat (limited to '.w3m/cgi-bin/fn_save_session.cgi')
-rwxr-xr-x | .w3m/cgi-bin/fn_save_session.cgi | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/.w3m/cgi-bin/fn_save_session.cgi b/.w3m/cgi-bin/fn_save_session.cgi new file mode 100755 index 0000000..fb9bd59 --- /dev/null +++ b/.w3m/cgi-bin/fn_save_session.cgi @@ -0,0 +1,16 @@ +#!/usr/bin/env sh +# demo: https://www.youtube.com/watch?v=qYhNJ3itqWw +echo "W3m-control: BACK" +saving_session="$HOME/.w3m/RestoreSession.txt" +echo "W3m-control: EXTERN echo %s > $saving_session" +# loop save URL of all tabs +n=0 +while [ "$n" -lt 30 ]; do + n=$(( n + 1 )) + echo "W3m-control: NEXT_TAB" + echo "W3m-control: EXTERN echo %s >> $saving_session" +done +# generate a script; run 'w3mlastsession' command in terminal to restore session +echo "W3m-control: READ_SHELL ~/.w3m/cgi-bin/restore_session.cgi" +echo "W3m-control: BACK" +echo "W3m-control: QUIT" |