]> git.mdlowis.com Git - projs/tide.git/commitdiff
rerouted directorys to a tide window instead of a file browser. This enables acme...
authorMichael D. Lowis <mike.lowis@gentex.com>
Thu, 31 Oct 2019 19:30:41 +0000 (15:30 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Thu, 31 Oct 2019 19:30:41 +0000 (15:30 -0400)
TODO.md
config.h
src/tide.c

diff --git a/TODO.md b/TODO.md
index 36bcd20e48d0f19e7b26ea6cc109b7cdaaba97e0..6c6a3e03715255c26eb55bbca2265040408d1a60 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -28,6 +28,7 @@
 
 Tags:
 
+* Dir,Ls - List current directory contents
 * ID - Get window id of the X window
 * Zerox - Create a copy of the window
 
index 812653778e6bb2b7aaa9f669ae981d6e977b4bad..540d2fc21cadfa64a300c08704795a467b28c2a1 100644 (file)
--- a/config.h
+++ b/config.h
@@ -126,7 +126,7 @@ static Rule* BuiltinRules[] = {
     },
     (Rule[]){ /* If it's an existing directory, open it with system default */
         { ISDIR, "$data", NULL },
-        { LAUNCH, OPENCMD " $data", NULL },
+        { LAUNCH, "cd $data && ls -ap | tide -", NULL },
         { COMPLETE, NULL, NULL }
     },
 };
index f8b49054eeacf9ec38ca1084379e801f189a27f0..d7448d9e619ad011db00591cb8f62e54b838d17b 100644 (file)
@@ -23,8 +23,8 @@ typedef struct {
 } Tag;
 
 char* ARGV0;
-static Tag Builtins[18];
-static KeyBinding Bindings[41];
+static Tag* Builtins;
+static KeyBinding* Bindings;
 static WinRegion Focused = EDIT;
 static View Regions[NREGIONS];
 static int Divider;
@@ -423,6 +423,7 @@ static Tag* tag_lookup(char* cmd)
 
     for (char* tag = cmd; *tag && !isspace(*tag); tag++, len++)
     {
+        /* do nothing */
     }
 
     while (tags->tag)
@@ -674,7 +675,7 @@ static void tag_line(char* cmd)
 
 /* Main Routine
  ******************************************************************************/
-static Tag Builtins[18] = {
+static Tag* Builtins = (Tag[]){
     { .tag = "Cut",    .action = cut       },
     { .tag = "Copy",   .action = copy      },
     { .tag = "Del",    .action = quit      },
@@ -695,7 +696,7 @@ static Tag Builtins[18] = {
     { .tag = NULL,     .action = NULL      }
 };
 
-static KeyBinding Bindings[41] = {
+static KeyBinding* Bindings = (KeyBinding[]){
     /* Cursor Movements */
     { .mods = ModAny,  .key = KEY_HOME,  .fn = cursor_home  },
     { .mods = ModAny,  .key = KEY_END,   .fn = cursor_end   },