diff options
Diffstat (limited to 'sys/nixpkgs/pkgs/scripts/source')
-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 } |