Git Product home page Git Product logo

qutebrowser-userscripts's Introduction

CIAvash::Qutebrowser::Userscripts

A collection of userscripts I wrote, and use in qutebrowser.

qutebrowser userscript dig url

Requirements

Clipboard

Selection/Completion

Rofi: used in select* userscripts

File Selection

Zenity: only used in open-file userscript

Programming Language

Raku - Right now regex is the slowest part of Raku, so the scripts doing any parsing will be slow

Module Manager

zef

Modules

zef install --deps-only --/test .

Features

Example configs to show the features

Open

# Open file with zenity
config.bind(',of', 'spawn --userscript open-file')

Hint: Follow

config.bind(',fd', 'hint links userscript open-domain')

Copy

# Copy title and URL of the page separated with newline
config.bind(',ytu', 'spawn --userscript yank title-url')
# Copy selected text and URL of the page separated with newline
config.bind(',ysu', 'spawn --userscript yank-text-url')
Copy: Hint
# Copy image URL
config.bind(',yiu', 'hint images userscript yank-url')
# Copy link text
config.bind(',ylt', 'hint links userscript yank-link-text')
config.bind(',rylt', 'hint --rapid links userscript yank-link-text')
# Copy link URL (pretty)
config.bind(',ylu', 'hint links userscript yank-url')
config.bind(',rylu', 'hint --rapid links userscript yank-url')
# Copy link's text and URL separated with newline
config.bind(',yla', 'hint links userscript yank-text-url')

Select with Rofi

Available actions:

  • Enter: Copy
  • Alt+1: Copy Separately (useful if you use a clipboard manager)
  • Alt+2: Open
  • Alt+3: Download
  • Shift+Enter: Select multiple items
  • Ctrl+Space: Set selected item as input text
  • Custom entry is allowed
config.bind(',sfu', 'spawn --userscript select Feeds')
config.bind(',sft', 'spawn --userscript select Feeds --with-title')
config.bind(',slu', 'spawn --userscript select Links')
config.bind(',slt', 'spawn --userscript select Links --with-title')
config.bind(',siu', 'spawn --userscript select Images')
config.bind(',sit', 'spawn --userscript select Images --with-title')
config.bind(',smu', 'spawn --userscript select MetaLinks')
config.bind(',smt', 'spawn --userscript select MetaLinks --with-title')
config.bind('<Alt-s>', 'spawn --userscript select', mode='command')
config.bind(',sa', 'spawn --userscript select-scroll-to-anchor')
Select: Hint
non_containers = ['a', 'button', 'img', 'svg', 'input', 'textarea', 'code', 'pre',
                  ''.join([f'h{n}' for n in range(1, 6)])]
c.hints.selectors['containers'] = [
    'body ' + ''.join([':not('+e+')' for e in non_containers])]

config.bind(',seu', 'hint containers userscript select-links')
config.bind(',set', 'hint containers userscript select-links-with-title')
Select: Dig (Get the URLs of all the segments a URL has)
config.bind(',sdd', 'spawn --userscript dig --domain')
config.bind(',sdu', 'spawn --userscript dig')
Select: Hint: Dig
config.bind(',sdlu', 'hint links userscript dig')
config.bind(',sdld', 'hint links userscript dig-domain')

qutebrowser-userscripts's People

Contributors

ciavash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

qutebrowser-userscripts's Issues

yank-text-url - Userscript exited with status 1

though this issue is not related to your scripts, i request your help in solving installation of zef modules

yank-title-url exited successfully.

yank-text-url is giving following error.

�[31m===�[0mSORRY!�[31m===�[0m Error while compiling /home/xxxx/.local/share/qutebrowser/userscripts/yank-text-url
Could not find Clipboard in:
    inst#/home/xxxx/.raku
    inst#/home/xxxx/.rakubrew/versions/moar-/share/perl6/site
    inst#/home/xxxx/.rakubrew/versions/moar-/share/perl6/vendor
    inst#/home/xxxx/.rakubrew/versions/moar-/share/perl6/core
    ap#
    nqp#
    perl5#
at /home/xxxx/.local/share/qutebrowser/userscripts/yank-text-url:5

i have tried to install Clipborad using zef and got the following result.

zef search clipboard
===> Found 0 results

after googling, i found a suggestion to install inline::Perl5 to use modules in perl5 installation.

I have got the following error.

zef install Inline::Perl5
===> Searching for: Inline::Perl5
===> Searching for missing dependencies: perl:from<native>, File::Temp, Distribution::Builder::MakeFromJSON:ver<0.6+>
===> Failed to find dependencies: perl:from<native>
Failed to resolve some missing dependencies (use e.g. --exclude="perl" to skip)

request your guidance on this matter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.