about summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--hm/soispha/pkgs/scripts.nix2
-rwxr-xr-xhm/soispha/pkgs/scripts/wrappers/neorg20
2 files changed, 22 insertions, 0 deletions
diff --git a/hm/soispha/pkgs/scripts.nix b/hm/soispha/pkgs/scripts.nix
index 5fa88b91..5d91fda6 100644
--- a/hm/soispha/pkgs/scripts.nix
+++ b/hm/soispha/pkgs/scripts.nix
@@ -52,6 +52,8 @@
     dependencies = with pkgs; [
       cocogitto
       git-crypt
+      rofi
+      libnotify
     ];
     generateCompletions = true;
     replacementStrings = {
diff --git a/hm/soispha/pkgs/scripts/wrappers/neorg b/hm/soispha/pkgs/scripts/wrappers/neorg
index f979c2af..8b10f3ef 100755
--- a/hm/soispha/pkgs/scripts/wrappers/neorg
+++ b/hm/soispha/pkgs/scripts/wrappers/neorg
@@ -29,6 +29,10 @@ COMMANDS:
                             current context's norg file.
                             If no context is set, drops you to the selection prompt
 
+    dmenu
+                            Select a project in dmenu mode. This will give you all projects
+                            and exectute the selected one as in 'neorg projects <selected>'
+
     workspace [WS]
                             The neorg workspace (WS) to open at startup, an empty value drops
                             you at a prompt to enter the workspace yourself.
@@ -138,6 +142,18 @@ PROJECT_open_context_in_browser() {
     firefox -P "$context"
 }
 # }}}
+# Dmenu {{{
+DMENU_open_context_in_browser() {
+    project="$(echo "%ALL_POJECTS_PIPE" | rofi -sep "|" -dmenu)";
+    if [ "$project" ]; then
+        PROJECT_open_context_in_browser "$current_context";
+    else
+        current_context="$(UTILS_get_current_context)";
+        [ "$current_context" ] || notify-send "No current context"
+        PROJECT_open_context_in_browser "$current_context";
+    fi
+}
+# }}}
 # List {{{
 LIST_list_all_contexts_newline() {
     print "%ALL_PROJECTS_NEWLINE"
@@ -215,6 +231,10 @@ while [ "$#" -ne 0 ]; do
             ADD_open_taskwarrior_project_file;
             exit 0
             ;;
+        "d"*) # dmenu
+            DMENU_open_context_in_browser;
+            exit 0
+            ;;
         *)
             die "Command '$1' does not exist! Please look at:\n $NAME --help";
             exit 0;