Code Monkey home page Code Monkey logo

qute-containers's Introduction

qute-containers

Browser Containers for Qutebrowser

What are containers?

Browser Containers is a feature available as an official extension in Mozilla Firefox. It allows users to have separate 'containers'. All the browser data, cookies and site storage are stored and separated within these containers. Common use cases include having multiple containers to mitigate cookie tracking and using multiple web logins without confusion (Eg: Multiple gmail accounts).

Browser Containers for qutebrowser

Qutebrowser supports containers through the -B basedir command line option. These scripts provide a simple interface to manage the containers by manipulating the basedir parameter.

Requirements

  • dmenu / rofi (although it is possible to use without them)

How it works?

The script creates a file with a list of containers in the location specified by CONTAINER_LIST variable in the containers_config file.

The actual containers are created as directories within the CONTAINER_BASE directory.

Containers can be created or deleted manually by editing the CONTAINER_LIST file and creating/removing respective directory from CONTAINER_BASE. Helper scripts are provided to make this process easier.

Usage

The scripts can be used standalone (from terminal) or as userscripts in qutebrowser.

Opening a browser window in a container

container-open

or from qutebrowser

:spawn --userscript container-open

This opens dmenu with an option to select which container to open.

Opening a browser window in a particular container

container-open <container-name>

or from qutebrowser

:spawn --userscript container-open <container-name>

This opens a window with the given container.

Opening a URL in a given container

container-open <container-name> <URL>

or from qutebrowser

:spawn --userscript container-open <container-name> <URL>

or using hint mode

:hint links userscript container-open

Getting a list of existing containers

container-ls

or from qutebrowser

:spawn --userscript container-ls

Adding a new container

container-add <container-name>

or from qutebrowser

:spawn --userscript container-add <container-name>

Removing a new container

container-rm <container-name>

or from qutebrowser

:spawn --userscript container-rm <container-name>

Useful bindings and aliases

config.bind('C','spawn --userscript container-open')
config.bind('<Alt-c>','set-cmd-text -s :spawn --userscript container-open')
config.bind('<Alt-f>','hint links userscript container-open')
config.bind('<Alt-f>','hint links userscript container-open')

c.aliases['container-open'] = 'spawn --userscript container-open'
c.aliases['container-ls'] = 'spawn --userscript container-ls'
c.aliases['container-add'] = 'spawn --userscript container-add'
c.aliases['container-rm'] = 'spawn --userscript container-rm'

Bonus Tip

You can bind the container-open script to a keybinding within your window manager / hotkey daemon and launch containers directly.

Thank you

I love using qutebrowser and wanted to make this tiny contribution. I hope you find it useful. Suggestions and bugs are welcomed.

qute-containers's People

Contributors

s-praveen-kumar avatar

Stargazers

Joe Fazio avatar Misha Komarovskiy avatar  avatar Simon H Moore avatar  avatar Markus Binsteiner avatar Eder Sosa avatar rukh avatar daru avatar Cyril Levis avatar Giovanni Crisalfi avatar Rin avatar Michał Siedlaczek avatar kevin avatar

Watchers

 avatar

Forkers

simonhughxyz

qute-containers's Issues

Scripts need to copied over for each containers

Qutebrowser looks for userscripts in the userscripts directory within the config directory. As we create new containers the scripts need to copied over or symlinked to each container. This also affects other userscripts the user might be using.

Possible Fix

Symlink the userscripts folder for each container while it is created.

Side effect of the fix

All scripts are accessible in all containers which may or may not be desirable.

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.