-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
2,282 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
BasedOnStyle : LLVM | ||
AccessModifierOffset : -1 | ||
AlignAfterOpenBracket : AlwaysBreak | ||
AlignConsecutiveAssignments : true | ||
AlignConsecutiveDeclarations : false | ||
AlignConsecutiveMacros : true | ||
AlignEscapedNewlines : Left | ||
AlignOperands : true | ||
AlignTrailingComments : true | ||
AllowAllArgumentsOnNextLine : true | ||
AllowAllConstructorInitializersOnNextLine : true | ||
AllowAllParametersOfDeclarationOnNextLine : true | ||
AllowShortBlocksOnASingleLine : true | ||
AllowShortCaseLabelsOnASingleLine : true | ||
AllowShortFunctionsOnASingleLine : false | ||
AllowShortIfStatementsOnASingleLine : Never | ||
AllowShortLambdasOnASingleLine : All | ||
AlwaysBreakAfterReturnType : All | ||
AlwaysBreakAfterDefinitionReturnType : All | ||
AlwaysBreakTemplateDeclarations : Yes | ||
KeepEmptyLinesAtTheStartOfBlocks : false | ||
IndentWrappedFunctionNames : false | ||
UseTab : Never | ||
IndentWidth : 2 | ||
TabWidth : 2 | ||
ContinuationIndentWidth : 4 | ||
BinPackArguments : true | ||
BinPackParameters : true | ||
ColumnLimit : 80 | ||
Language : Cpp | ||
Standard : Auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# - - - - - - - - - - - - - configuration - - - - - - - - - - - - - # | ||
|
||
BIN = treee | ||
PREFIX = /usr/local | ||
|
||
LIBS = -lncurses | ||
|
||
EXTDIR = ext | ||
INCDIR = include | ||
SRCDIR = src | ||
|
||
BINDIR = .bin | ||
OBJDIR = .obj | ||
DEPDIR = .dep | ||
|
||
SRC = disp.c \ | ||
file.c \ | ||
main.c | ||
|
||
CFLAGS = -std=gnu99 \ | ||
-g \ | ||
-pedantic \ | ||
-Wall \ | ||
-I/usr/include \ | ||
-I${INCDIR} \ | ||
-I${EXTDIR} | ||
LDFLAGS = ${LIBS} | ||
|
||
# - - - - - - - - - - - - - - - phony - - - - - - - - - - - - - - - - # | ||
|
||
all: ${BINDIR}/${BIN} | ||
|
||
run: ${BINDIR}/${BIN} | ||
./${BINDIR}/${BIN} | ||
|
||
install: ${BINDIR}/${BIN} | ||
cp $< ${PREFIX}/bin | ||
|
||
uninstall: | ||
rm -f ${PREFIX}/bin/${BIN} | ||
|
||
clean: | ||
rm -rf ./${BINDIR} ./${OBJDIR} ./${DEPDIR} | ||
|
||
.PHONY: all run clean | ||
|
||
# - - - - - - - - - - - - - - - objects - - - - - - - - - - - - - - - # | ||
|
||
vpath %.c ${SRCDIR} | ||
|
||
OBJ = $(patsubst %.c,${OBJDIR}/%.o,$(SRC)) | ||
|
||
${OBJ}: | ${OBJDIR} | ||
|
||
${OBJDIR}: | ||
@mkdir -p $@ | ||
|
||
${OBJDIR}/%.o: %.c | ||
${CC} ${CFLAGS} -c $< -o $@ | ||
|
||
# - - - - - - - - - - - - - - - binary - - - - - - - - - - - - - - - # | ||
|
||
${BINDIR}: | ||
@mkdir -p $@ | ||
|
||
${BINDIR}/${BIN}: ${BINDIR} ${OBJ} ${INC} | ||
${CC} -o $@ ${OBJ} ${LDFLAGS} | ||
@chmod 755 $@ | ||
|
||
# - - - - - - - - - - - - - - dependencies - - - - - - - - - - - - - - # | ||
|
||
$(patsubst %.c,${DEPDIR}/%.d,$(SRC)): | ${DEPDIR} | ||
|
||
${DEPDIR}: | ||
@mkdir -p $@ | ||
|
||
${DEPDIR}/%.d: %.c | ||
@${CC} ${CFLAGS} \ | ||
-MF"$@" -MG -M -MP \ | ||
-MT"$@" \ | ||
-MT"$(patsubst %.c,${DEPDIR}/%.o,${<})" \ | ||
"$<" | ||
|
||
include $(patsubst %.c,${DEPDIR}/%.d,$(SRC)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# treee | ||
|
||
treee is an interactive GNU/Linux `tree` clone. | ||
|
||
_This project is in a very early stage of development, but basic features are complete._ | ||
|
||
## Purpose | ||
|
||
I have found `tree` to be a really great addition to development. | ||
|
||
This program is similar to `tree` but is built with ncurses; | ||
the working directory is scanned every second and updates the display. | ||
|
||
## Example | ||
|
||
![example](./.assets/tree.example.png) | ||
![showhidden.example](./.assets/tree_showhidden.example.png) | ||
|
||
## Usage | ||
|
||
```bash | ||
git clone https://github.com/jpcx/treee | ||
cd treee | ||
make | ||
sudo make install | ||
|
||
treee | ||
|
||
# for other directories: | ||
treee ../another_dir | ||
``` | ||
|
||
## Controls | ||
|
||
`h`, `j`, `k`, `l` for motion | ||
|
||
_[hold shift for fast motion]_ | ||
|
||
press `.` to toggle hidden file display | ||
|
||
pres `q` to exit | ||
|
||
## TODO | ||
|
||
- color different file types differently | ||
- add `/` control for search | ||
- add more command parameters | ||
- enable/disable colors | ||
- exclude matching | ||
- display more directory information | ||
|
||
## Contribution | ||
|
||
Contribution is welcome! Again, this is in an early stage of development. |
Oops, something went wrong.