|
2 | 2 |
|
3 | 3 | System for choosing default applications, programs, and utilities
|
4 | 4 |
|
5 |
| -Like `update-alternatives`, but local to user and more flexible. Requires a database of applications and their defaults at `"${XDG_CONFIG_HOME:-$HOME/.config}/chooses/defaults"` |
6 |
| - |
7 |
| -## Summary |
8 |
| - |
9 |
| -- Default application manager |
10 |
| - - Double click on file / launch with xdg-open, we control that |
11 |
| - - Abstract image/png, image/jpeg etc. behind 'image-viewer'. associate with single app at a time |
12 |
| -- Default application exec |
13 |
| - - Execute command associated with utility (ex. 'image-viewer's) |
14 |
| - |
15 |
| -## Installation |
16 |
| - |
17 |
| -Use [Basalt](https://github.com/hyperupcall/basalt), a Bash package manager, to install this project globally |
18 |
| - |
19 |
| -```sh |
20 |
| -basalt global add hyperupcall/choose |
21 |
| -``` |
| 5 | +## Use Cases |
22 | 6 |
|
23 |
| -## Environment Variables |
24 |
| - |
25 |
| -- CHOOSE_DB_DIR |
26 |
| - - by default at `$XDG_CONFIG_HOME/choose/db` |
| 7 | +Like `update-alternatives`, but local to user and more flexible. Requires a database of applications and their defaults at `"${XDG_CONFIG_HOME:-$HOME/.config}/chooses/defaults"` |
27 | 8 |
|
28 |
| -## Folder Structure |
| 9 | +1. Launch with file |
29 | 10 |
|
30 |
| -The author's config can be found [here](https://github.com/hyperupcall/dots/tree/main/user/.config/choose/db) |
31 |
| -- db |
| 11 | +Control which applications are selected when opening a file. This works irrespective of the desktop environment. `xdg-open` falls flat because it doesn't work with directories. Furthermore, different applications can be configured to work in a different context (X, Terminal emulator, Linux console). |
32 | 12 |
|
33 |
| - - terminal-emulator |
| 13 | +Since these are just shell scripts, arbitrary arguments should be supported, like `--column` and `--row` for example, if using a text editor. |
34 | 14 |
|
35 |
| - - alacritty |
36 |
| - - kitty |
37 |
| - - launch.sh |
38 |
| - - set.sh |
39 |
| - - get.sh |
40 |
| - - termite |
| 15 | +2. Launch without file |
41 | 16 |
|
42 |
| - - launch.sh |
43 |
| - - set.sh |
44 |
| - - get.sh |
| 17 | +The current 'Browser' or 'Image Viewer' can be launched. Again, this is intended to work across distributions and user interfaces. |
45 | 18 |
|
46 |
| - - image-viewer |
| 19 | +See more info in [details.md](./docs/details.md) |
47 | 20 |
|
48 |
| -## TODO |
| 21 | +## Roadmap |
49 | 22 |
|
50 | 23 | - 'get' subcommand
|
51 | 24 | - use choose when using fuzzer / filter (dmenu vs rofi -dmenu, etc.)
|
52 | 25 | - application categories standardizable?
|
53 | 26 | - new command
|
54 | 27 | - sourcing pre-exec does does output on --verbose flag (or another)
|
| 28 | + |
| 29 | +## Installation |
| 30 | + |
| 31 | +Use [Basalt](https://github.com/hyperupcall/basalt), a Bash package manager, to install this project globally |
| 32 | + |
| 33 | +```sh |
| 34 | +basalt global add hyperupcall/choose |
| 35 | +``` |
0 commit comments