diff options
author | Soispha <soispha@vhack.eu> | 2024-03-07 15:43:01 +0100 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2024-03-07 15:43:01 +0100 |
commit | d475107efb16535f03e0409bce3809233fbc1478 (patch) | |
tree | 72b183c3076a63fa55675ebc53a9e5091417d1a2 /sys/nixpkgs/pkgs/scripts/source | |
parent | fix(pkgs/scripts/aumo): Add required dependencies (and remove old ones) (diff) | |
download | nixos-config-d475107efb16535f03e0409bce3809233fbc1478.tar.gz nixos-config-d475107efb16535f03e0409bce3809233fbc1478.zip |
feat(pkgs/scripts/neorg/review): Only review opened projects
Diffstat (limited to '')
-rwxr-xr-x | sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/dmenu.sh | 2 | ||||
-rwxr-xr-x | sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/review.sh | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/dmenu.sh b/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/dmenu.sh index 73e9460a..5a138982 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/dmenu.sh +++ b/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/dmenu.sh @@ -4,6 +4,8 @@ dmenu0open_context_in_browser() { project="$(echo "%ALL_PROJECTS_PIPE" | rofi -sep "|" -dmenu)" if [ "$project" ]; then + [ -d "%NEORG_REVIEW_PATH" ] || mkdir --parents "%NEORG_REVIEW_PATH" + [ -f "%NEORG_REVIEW_PATH/$project.lock" ] || touch "%NEORG_REVIEW_PATH/$project.lock" project0open_project_in_browser "$project" else notify-send "(neorg/dmenu) No project selected" 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 index ab9ec6b1..a0a9ab8d 100755 --- a/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/review.sh +++ b/sys/nixpkgs/pkgs/scripts/source/specific/neorg/sh/functions/review.sh @@ -2,8 +2,11 @@ review0start() { for project in $(list0list_all_contexts_newline); do - msg "Starting '$project'" - notify-send "Neorg" "Starting '$project'" - firefox -P "$project" + if [ -f "%NEORG_REVIEW_PATH/$project.lock" ]; then + msg "Reviewing '$project'" + notify-send "Neorg" "Reviewing '$project'" + firefox -P "$project" + rm "%NEORG_REVIEW_PATH/$project.lock" + fi done } |