diff --git a/inc/config.h b/inc/config.h index 40e9871..04a7a4c 100644 --- a/inc/config.h +++ b/inc/config.h @@ -11,11 +11,11 @@ const uint32_t permission_colour = 0xD0D0D0; #define DATE_STYLE_NUM ( ( int )1 ) const style_t date_style[ DATE_STYLE_NUM ] = { style_none }; -const uint32_t date_colour = 0xBBEEEE; +const uint32_t date_colour = 0x808080; #define USER_STYLE_NUM ( ( int )1 ) const style_t user_style[ USER_STYLE_NUM ] = { style_none }; -const uint32_t user_colour = 0xEEBBEE; +const uint32_t user_colour = 0x748CE0; #define TYPE_STYLE_NUM ( ( int )1 ) const style_t type_style[ TYPE_STYLE_NUM ] = { style_none }; diff --git a/src/main.c b/src/main.c index cd33c7e..46b6f5e 100644 --- a/src/main.c +++ b/src/main.c @@ -66,15 +66,24 @@ int main( int argc, char** argv ) else if ( !S_ISDIR( status.st_mode ) ) { char* name = basename( args.path[ n ] ); + directory_entry_t file = { - .extension = strrchr( name, '.' ), .stats = status, .type = get_entry_type( status ) }; strncpy( file.name, name, NAME_MAX ); - // TODO: fix colours + file.extension = strrchr( file.name, '.' ); + if ( file.extension == file.name ) + { + file.extension = NULL; + } + else if ( file.extension ) + { + file.extension += 1; + } display_entry( &file, &args ); + continue; }