diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-20 18:13:32 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-12-20 18:25:57 +0100 |
commit | 796449ef00d90970c7c2e2cab6bbfb3de16abf3d (patch) | |
tree | 68e3f55da3e806cc3b14bdedeee8a82a5b206bf9 /pkgs/by-name/ne/neorg/main.sh | |
parent | fix(modules/lf/ctpv/prev/any): Fix typo in `preview_xxd` function call (diff) | |
download | nixos-config-796449ef00d90970c7c2e2cab6bbfb3de16abf3d.tar.gz nixos-config-796449ef00d90970c7c2e2cab6bbfb3de16abf3d.zip |
feat(pkgs/neorg): Init `inputs` subcommand
Diffstat (limited to '')
-rwxr-xr-x | pkgs/by-name/ne/neorg/main.sh | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/pkgs/by-name/ne/neorg/main.sh b/pkgs/by-name/ne/neorg/main.sh index 559351b9..b4f0f0e6 100755 --- a/pkgs/by-name/ne/neorg/main.sh +++ b/pkgs/by-name/ne/neorg/main.sh @@ -9,11 +9,12 @@ SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH . ./functions/dmenu.sh . ./functions/f_start.sh . ./functions/f_stop.sh +. ./functions/inputs.sh . ./functions/list.sh . ./functions/project.sh +. ./functions/review.sh . ./functions/utils.sh . ./functions/workspace.sh -. ./functions/review.sh # these are used in version() # shellcheck disable=2034 @@ -70,15 +71,25 @@ COMMANDS: review Review all firefox tabs + + inputs_add F + Add all urls from the file F as inputs to be catogorized + + inputs_review P + Like 'review', but for the inputs that have previously been added. + It takes a project in which to open the urls. ARGUMENTS: ID | *([0-9]) := [[%ID_GENERATION_FUNCTION]] The function displays all possible IDs of the eligable tasks. WS := %ALL_WORKSPACES - All possible workspaces + All possible workspaces. P := %ALL_PROJECTS_PIPE - The possible project + The possible project. + + F := [[fd . --max-depth 3]] + A URL-Input file to use as source. EOF } @@ -153,6 +164,20 @@ while [ "$#" -ne 0 ]; do review0start exit 0 ;; + "inputs_a"*) # inputs_add + shift 1 + url_file="$1" + [ -f "$url_file" ] || die "Url file ('$url_file') is not a valid file." + inputs0add "$url_file" + exit 0 + ;; + "inputs_r"*) # inputs_review + shift 1 + base_project="$1" + [ -z "$base_project" ] && die "'inputs_review' requires a project." + inputs0review "$base_project" + exit 0 + ;; *) die "Command '$1' does not exist! Please look at:\n $NAME --help" exit 0 |