Skip to content

Commit aeeee6e

Browse files
committed
refactor: rename fox-default to 'choose'
1 parent dcc25b2 commit aeeee6e

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
System for choosing default applications, programs, and utilities
44

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}/fox-defaults/defaults"
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"
66

77
## Summary
88

@@ -15,10 +15,10 @@ Like `update-alternatives`, but local to user and more flexible. Requires a data
1515
## Installation
1616

1717
```sh
18-
git clone https://github.com/eankeen/fox-default
19-
cd fox-default
18+
git clone https://github.com/eankeen/choose
19+
cd choose
2020

21-
./fox-default.sh set
21+
./choose.sh set
2222
```
2323

2424
- CHOOSE_DB_DIR
@@ -46,6 +46,7 @@ cd fox-default
4646
## TODO
4747

4848
- 'get' subcommand
49-
- use fox-default when using fuzzer / filter (dmenu vs rofi -dmenu, etc.)
49+
- use choose when using fuzzer / filter (dmenu vs rofi -dmenu, etc.)
5050
- application categories standardizable?
5151
- new command
52+
- sourcing pre-exec does does output on --verbose flag (or another)

choose.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ main() {
7272

7373
# get variable
7474
[ ! -f "$dbDir/$category/_.current" ] && {
75-
notify_die "$gui" "Program for '$category' is not set. Please set with 'fox-default set'"
75+
notify_die "$gui" "Program for '$category' is not set. Please set with 'choose set'"
7676
}
7777

7878
program="$(<"$dbDir/$category/_.current")"
7979

8080
# ensure variable (we already use 'ensure_has_dot_current' in
8181
# util_get_category_filter; this is another safeguard)
8282
[ -z "$program" ] && {
83-
notify_die "$gui" "Program for '$category' is not set. Please set with 'fox-default set'"
83+
notify_die "$gui" "Program for '$category' is not set. Please set with 'choose set'"
8484
return
8585
}
8686

@@ -119,15 +119,15 @@ main() {
119119
# get variable
120120
# TODO: cleanup
121121
[ ! -f "$dbDir/$category/_.current" ] && [ "$ignoreErrors" = no ] && {
122-
notify_die "$gui" "Program for '$category' is not set. Please set with 'fox-default set'"
122+
notify_die "$gui" "Program for '$category' is not set. Please set with 'choose set'"
123123
}
124124

125125
program="$(<"$dbDir/$category/_.current")"
126126

127127
# ensure variable (we already use 'ensure_has_dot_current' in
128128
# util_get_category_filter; this is another safeguard)
129129
[ -z "$program" ] && [ "$ignoreErrors" = no ] && {
130-
notify_die "$gui" "Program for '$category' is not set. Please set with 'fox-default set'"
130+
notify_die "$gui" "Program for '$category' is not set. Please set with 'choose set'"
131131
return
132132
}
133133

lib/util.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ util_get_cmd() {
106106

107107
local cmd="fzf"
108108
if [ "$isGui" = "yes" ]; then
109-
# TODO: check for fox-default value
109+
# TODO: check for choose value
110110
if command -v rofi >&/dev/null; then
111111
cmd="rofi -dmenu"
112112
elif command -v dmenu >&/dev/null; then

package.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
# shellcheck shell=sh
2+
# shellcheck disable=SC2034
3+
14
BINS="./choose"

0 commit comments

Comments
 (0)