From a9ff740abec02395fcf23db3f704d8ecce4d0bed Mon Sep 17 00:00:00 2001 From: Soispha Date: Fri, 1 Mar 2024 21:17:50 +0100 Subject: feat(pkgs/neorg/review): Init This makes reviewing (and closing) opened firefox tabs easier. --- .../pkgs/scripts/source/specific/neorg/sh/functions/review.sh | 9 +++++++++ sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/main.sh | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100755 sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/review.sh (limited to 'sys/nixpkgs/pkgs/scripts/source') diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/review.sh b/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/review.sh new file mode 100755 index 00000000..ab9ec6b1 --- /dev/null +++ b/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/review.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env dash + +review0start() { + for project in $(list0list_all_contexts_newline); do + msg "Starting '$project'" + notify-send "Neorg" "Starting '$project'" + firefox -P "$project" + done +} diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/main.sh b/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/main.sh index 249856a9..bf07bbd6 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/main.sh +++ b/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/main.sh @@ -13,6 +13,7 @@ SHELL_LIBRARY_VERSION="2.1.1" . %SHELL_LIBRARY_PATH . ./functions/project.sh . ./functions/utils.sh . ./functions/workspace.sh +. ./functions/review.sh # these are used in version() # shellcheck disable=2034 @@ -66,6 +67,9 @@ COMMANDS: fstop Stops the current active task + + review + Review all firefox tabs ARGUMENTS: ID | *([0-9]) := [[%ID_GENERATION_FUNCTION]] The function displays all possible IDs of the eligable tasks. @@ -144,6 +148,11 @@ while [ "$#" -ne 0 ]; do fstop0stop_current_task exit 0 ;; + "r"*) # review + shift 1 + review0start + exit 0 + ;; *) die "Command '$1' does not exist! Please look at:\n $NAME --help" exit 0 -- cgit 1.4.1