2016-07-20 11:06:35 +02:00
|
|
|
#!/usr/bin/env bash
|
2015-04-21 22:52:43 +02:00
|
|
|
|
2015-04-24 22:05:27 +02:00
|
|
|
# Copyright 2015 Zach-Button <zachrey.button@gmail.com>
|
2017-05-09 21:37:03 +02:00
|
|
|
# Copyright 2016-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
|
2015-04-24 22:05:27 +02:00
|
|
|
#
|
|
|
|
# This file is part of qutebrowser.
|
|
|
|
#
|
|
|
|
# qutebrowser is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# qutebrowser is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2016-07-01 15:53:21 +02:00
|
|
|
#
|
2015-04-21 22:52:43 +02:00
|
|
|
# This script fetches the unprocessed HTML source for a page and opens it in vim.
|
|
|
|
# :bind gf spawn --userscript qutebrowser_viewsource
|
|
|
|
#
|
2015-04-24 22:05:27 +02:00
|
|
|
# Caveat: Does not use authentication of any kind. Add it in if you want it to.
|
|
|
|
#
|
2015-04-21 22:52:43 +02:00
|
|
|
|
2016-09-29 20:58:21 +02:00
|
|
|
path=$(mktemp --tmpdir qutebrowser_XXXXXXXX.html)
|
2015-04-21 22:52:43 +02:00
|
|
|
|
2016-09-29 20:58:21 +02:00
|
|
|
curl "$QUTE_URL" > "$path"
|
2015-04-21 22:52:43 +02:00
|
|
|
urxvt -e vim "$path"
|
|
|
|
|
|
|
|
rm "$path"
|