picky

command module
v0.0.0-...-b2150b7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2023 License: MIT Imports: 8 Imported by: 0

README

Picky

Note This repository has moved to sourcehut.

Build Status Go Report Card GoDoc Maintainability codecov

This program lets you open URIs using different browsers (or profiles) following a set of rules.

Table of Contents

Example config

Picky is driven by a configuration file located at $HOME/.config/picky/config.

debug: true
default: &default
  command: chromium-browser
  args: ["--profile-directory=Default Profile"]
rules:
  - <<: *default
    args: First Profile
    uris:
    - hotmail.com
    - gmail.com
  - <<: *default
    args: Second Profile
    uris:
    - (cnn|nyt).com

Installation

$ go get -u github.com/jcmuller/picky

$ mkdir -p ~/.local/share/applications; cp picky.desktop ~/.local/share/applications
$ sudo update-alternatives --install /usr/bin/picky x-www-browser /usr/local/bin/picky 100
$ sudo update-alternatives --install /usr/bin/picky-gnome gnome-www-browser  /usr/local/bin/picky 100
$ xdg-settings set default-web-browser picky.desktop

Usage

$ picky SOME_URI

Documentation

Overview

Package main is the entrypoint

Directories

Path Synopsis
Package chooser chooses what browser to use depending on a rule and URI
Package chooser chooses what browser to use depending on a rule and URI
Package config has configuration responsibilities
Package config has configuration responsibilities
Package rule wraps heuristics to choose browsers
Package rule wraps heuristics to choose browsers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL