mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-16 07:47:22 +01:00
cmd: Add more info to --version.
Now that modeline are supported, they will affect the content of version. This commits only adds the new information. `--version` has to be the last command line argument and the modeline isn't parsed yet. Another commit will make sure --version parses the modeline and finishes to process the command line arguments in case it isn't last. Please note that luarocks also affects data points such as the LGI version. It should be smarter and check if `rc.lua` has `require("luarocks")`. This commit does *not* do it.
This commit is contained in:
parent
e0b982fa1a
commit
d58b4c3d96
3 changed files with 25 additions and 6 deletions
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "common/version.h"
|
#include "common/version.h"
|
||||||
|
#include "globalconf.h"
|
||||||
#include "awesome-version-internal.h"
|
#include "awesome-version-internal.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -67,16 +68,28 @@ eprint_version(void)
|
||||||
|
|
||||||
printf("awesome %s (%s)\n"
|
printf("awesome %s (%s)\n"
|
||||||
" • Compiled against %s (running with %s)\n"
|
" • Compiled against %s (running with %s)\n"
|
||||||
|
" • API level: %d\n"
|
||||||
" • D-Bus support: %s\n"
|
" • D-Bus support: %s\n"
|
||||||
" • xcb-errors support: %s\n"
|
" • xcb-errors support: %s\n"
|
||||||
" • execinfo support: %s\n"
|
" • execinfo support: %s\n"
|
||||||
" • xcb-randr version: %d.%d\n"
|
" • xcb-randr version: %d.%d\n"
|
||||||
" • LGI version: %s\n",
|
" • LGI version: %s\n"
|
||||||
AWESOME_VERSION, AWESOME_RELEASE,
|
" • Transparency enabled: %s\n"
|
||||||
LUA_RELEASE, lua_tostring(L, -2),
|
" • Custom search paths: %s\n",
|
||||||
has_dbus, has_xcb_errors, has_execinfo,
|
/* version */ AWESOME_VERSION,
|
||||||
XCB_RANDR_MAJOR_VERSION, XCB_RANDR_MINOR_VERSION,
|
/* release */ AWESOME_RELEASE,
|
||||||
lua_tostring(L, -1));
|
/* Lua linked */ LUA_RELEASE,
|
||||||
|
/* Lua runtime */ lua_tostring(L, -2),
|
||||||
|
/* API Level */ globalconf.api_level,
|
||||||
|
/* DBus */ has_dbus,
|
||||||
|
/* XCB Error */ has_xcb_errors,
|
||||||
|
/* Execinfo */ has_execinfo,
|
||||||
|
/* XRandR major */ XCB_RANDR_MAJOR_VERSION,
|
||||||
|
/* XRandR minor */ XCB_RANDR_MINOR_VERSION,
|
||||||
|
/* LGI version */ lua_tostring(L, -1),
|
||||||
|
/* ARGB support */ globalconf.had_overriden_depth ? "no" : "yes",
|
||||||
|
/* Search path */ globalconf.have_searchpaths ? "yes" : "no"
|
||||||
|
);
|
||||||
lua_close(L);
|
lua_close(L);
|
||||||
|
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
|
|
@ -126,6 +126,10 @@ typedef struct
|
||||||
bool have_xkb;
|
bool have_xkb;
|
||||||
/** Check for XFixes extension */
|
/** Check for XFixes extension */
|
||||||
bool have_xfixes;
|
bool have_xfixes;
|
||||||
|
/** Custom searchpaths are present, the runtime is tinted */
|
||||||
|
bool have_searchpaths;
|
||||||
|
/** When --no-argb is used in the modeline or command line */
|
||||||
|
bool had_overriden_depth;
|
||||||
uint8_t event_base_shape;
|
uint8_t event_base_shape;
|
||||||
uint8_t event_base_xkb;
|
uint8_t event_base_xkb;
|
||||||
uint8_t event_base_randr;
|
uint8_t event_base_randr;
|
||||||
|
|
|
@ -428,9 +428,11 @@ options_check_args(int argc, char **argv, int *init_flags, string_array_t *paths
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
|
globalconf.have_searchpaths = true;
|
||||||
string_array_append(paths, a_strdup(optarg));
|
string_array_append(paths, a_strdup(optarg));
|
||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
|
globalconf.had_overriden_depth = true;
|
||||||
(*init_flags) &= ~INIT_FLAG_ARGB;
|
(*init_flags) &= ~INIT_FLAG_ARGB;
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
|
|
Loading…
Reference in a new issue