My dotfiles for my Linux rice managed with stow and make
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

qutebrowser_reload.py 568B

123456789101112131415161718192021
  1. #!/usr/bin/env python3
  2. """
  3. Small Python script to reload qutebrowser themes.
  4. """
  5. try:
  6. from qutebrowser import qutebrowser, app
  7. from qutebrowser.misc import ipc
  8. except ImportError:
  9. print("error: qutebrowser missing.")
  10. exit(1)
  11. def qute_reload():
  12. """Send config-source command to qutebrowsers ipc server."""
  13. args = qutebrowser.get_argparser().parse_args()
  14. app.standarddir.init(args)
  15. socket = ipc._get_socketname(args.basedir)
  16. ipc.send_to_running_instance(socket, [":config-source"], args.target)
  17. qute_reload()