diff --git a/README.md b/README.md index bab9c68..c25cf8a 100644 --- a/README.md +++ b/README.md @@ -1,47 +1,47 @@ -# `qpm`: qutebrowser profile manager +# qutebrowser profile manager [![builds.sr.ht status](https://builds.sr.ht/~pvsr/qpm.svg)](https://builds.sr.ht/~pvsr/qpm?) -qpm is a tool for creating and managing +qutebrowser profile manager (qbpm) is a tool for creating and managing [qutebrowser](https://github.com/qutebrowser/qutebrowser) profiles. There isn't -any built in concept of profiles in qutebrowser, but there is the `--basedir` +any built in concept of profiles in qutebrowser, but there is a `--basedir` flag which allows you to use any random directory to store qutebrowser config -and data. By default qpm creates profiles that source your main qutebrowser -configuration, but have their own history, bookmarks, etc. Qutebrowser sessions +and data. By default qbpm creates profiles that source your main qutebrowser +configuration, but have their own history, bookmarks, etc. qutebrowser sessions started from separate profiles are entirely isolated from each other, and can be opened and closed independently. ## Usage Create a new profile called "python", edit its `config.py`, then launch it: ``` -$ qpm new python -$ qpm edit python -$ qpm launch python docs.python.org +$ qbpm new python +$ qbpm edit python +$ qbpm launch python docs.python.org ``` -Notice that `qpm launch` passes extra arguments directly to qutebrowser, so you +Notice that `qbpm launch` passes extra arguments directly to qutebrowser, so you can use it to open urls in your profile and use any options you would pass to qutebrowser: ``` -$ qpm launch python duck.com --target window --loglevel info +$ qbpm launch python duck.com --target window --loglevel info ``` -`qpm from-session` can copy the tabs of a [saved qutebrowser +`qbpm from-session` can copy the tabs of a [saved qutebrowser session](https://qutebrowser.org/doc/help/commands.html#session-save) to a new profile. If you have a window full of tabs related to planning a vacation, you could save it to a session called "vacation" using `:session-save -o vacation` in qutebrowser, then create a new profile with those tabs: ``` -$ qpm from-session vacation +$ qbpm from-session vacation ``` The default profile directory is `$XDG_DATA_HOME/qutebrowser-profiles`, where `$XDG_DATA_HOME` is usually `$HOME/.local/share`, but you can create and launch profiles from anywhere using `--profile-dir`/`-P`: ``` -$ qpm --profile-dir ~/dev/my-project new qb-profile +$ qbpm --profile-dir ~/dev/my-project new qb-profile $ cd ~/dev/my-project -$ qpm -P . launch qb-profile +$ qbpm -P . launch qb-profile # or $ qutebrowser --basedir qb-profile ``` @@ -53,7 +53,7 @@ $ qutebrowser --basedir qb-profile `$XDG_CONFIG_HOME` is supported) - Source `autoconfig.yml` instead of `config.py` - Bundled config file optimized for single-site browsing -- `qpm.conf` to configure the features above +- `qbpm.conf` to configure the features above - Someday: qutebrowser plugin Patches accepted! diff --git a/default.nix b/default.nix index 2302263..378f77e 100644 --- a/default.nix +++ b/default.nix @@ -4,8 +4,8 @@ with pythonPackages; buildPythonPackage rec { - pname = "qpm"; - version = "0.2"; + pname = "qbpm"; + version = "0.3"; src = ./.; doCheck = true; propagatedBuildInputs = [ pyxdg ]; diff --git a/qpm/profiles.py b/qpm/profiles.py index e399087..97ffbea 100644 --- a/qpm/profiles.py +++ b/qpm/profiles.py @@ -80,7 +80,7 @@ def create_config(profile: Profile, home_page: Optional[str] = None) -> None: print(f"config.source('{conf}')", file=dest_config) -application_dir = Path(BaseDirectory.xdg_data_home) / "applications" / "qpm" +application_dir = Path(BaseDirectory.xdg_data_home) / "applications" / "qbpm" def create_desktop_file(profile: Profile): diff --git a/qpm/utils.py b/qpm/utils.py index 557d6ac..1b9b4f7 100644 --- a/qpm/utils.py +++ b/qpm/utils.py @@ -17,7 +17,7 @@ def user_data_dir() -> Path: error("This operation is only implemented for linux and macOS.") print( "If you're interested in adding support for another OS, send a PR " - "to github.com/pvsr/qpm adding the location of qutebrowser data such " + "to github.com/pvsr/qbpm adding the location of qutebrowser data such " "as history.sqlite on your OS to user_data_dir() in qpm/utils.py.", file=stderr, ) diff --git a/setup.py b/setup.py index 271c620..3cf2403 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,11 @@ from setuptools import setup, find_packages setup( - name="qpm", - version="0.2", + name="qbpm", + version="0.3", url="https://git.sr.ht/~pvsr/qpm", packages=find_packages(), - entry_points={"console_scripts": ["qpm = qpm.main:main"]}, + entry_points={"console_scripts": ["qbpm = qpm.main:main"]}, install_requires=["pyxdg"], author="Peter Rice", author_email="peter@peterrice.xyz",