diff options
Diffstat (limited to '')
3 files changed, 9 insertions, 3 deletions
diff --git a/sys/nixpkgs/pkgs/scripts/default.nix b/sys/nixpkgs/pkgs/scripts/default.nix index 094dae68..477f5f5b 100644 --- a/sys/nixpkgs/pkgs/scripts/default.nix +++ b/sys/nixpkgs/pkgs/scripts/default.nix @@ -250,6 +250,7 @@ DEFAULT_NEORG_PROJECT_DIR = config.programs.nixvim.plugins.neorg.modules."core.dirman".config.workspaces.projects; HOME_TASKRC = "${config.xdg.configHome}/task/home-manager-taskrc"; + NEORG_REVIEW_PATH = "${config.xdg.configHome}/neorg/review"; ALL_PROJECTS_NEWLINE = "${config.soispha.taskwarrior.projects.projects_newline}"; ALL_PROJECTS_COMMA = "${config.soispha.taskwarrior.projects.projects_comma}"; ALL_PROJECTS_PIPE = "${config.soispha.taskwarrior.projects.projects_pipe}"; 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 } |