Skip to content

Instantly share code, notes, and snippets.

@Ingvix
Created August 14, 2020 09:50
Show Gist options
  • Save Ingvix/1a17f8559423f97e489e6fedc1fae20f to your computer and use it in GitHub Desktop.
Save Ingvix/1a17f8559423f97e489e6fedc1fae20f to your computer and use it in GitHub Desktop.
#!/bin/sh
# qutebrowser userscript
# Set buffer to command line and tabs.show to always. When leaving the command mode, set tabs.show to switching.
fifo="$QUTE_FIFO"
case "$1" in
0)
echo "bind --mode command <Escape> leave-mode" >> $fifo
echo "bind --mode command <Return> command-accept" >> $fifo
;;
*)
echo "set-cmd-text -s :buffer ;; set tabs.show always" >> $fifo
echo "bind --mode command <Escape> leave-mode ;; set tabs.show switching ;; spawn --userscript $(basename "$0") 0" >> $fifo
echo "bind --mode command <Return> command-accept ;; set tabs.show switching ;; spawn --userscript $(basename "$0") 0" >> $fifo
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment