allow for a default installed config file set.. and use it.. and allow the

default profiel to be named etc. etc.



SVN revision: 35614
devs/princeamd/enlightenment-0.17-elive
Carsten Haitzler 14 years ago
parent ec395ca318
commit 56154ad290
  1. 2
      Makefile.am
  2. 20
      config/Makefile.am
  3. 35
      config/default/Makefile.am
  4. 1982
      config/default/e.src
  5. 6
      config/default/module.battery.src
  6. 4
      config/default/module.cpufreq.src
  7. 7
      config/default/module.dropshadow.src
  8. 28
      config/default/module.fileman.src
  9. 25
      config/default/module.ibar.src
  10. 20
      config/default/module.ibox.src
  11. 15
      config/default/module.pager.src
  12. 13
      config/default/module.temperature.src
  13. 1
      config/profile.src
  14. 14
      configure.in
  15. 34
      src/bin/e_config.c

@ -1,4 +1,4 @@
SUBDIRS = src data doc po
SUBDIRS = src data doc po config
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \
config.h.in config.sub configure install-sh \

@ -0,0 +1,20 @@
MAINTAINERCLEANFILES = Makefile.in
SUBDIRS = default
EET_EET = @eet_eet@
EXTRA_DIST = profile.src
filesdir = $(edatadir)/config
files_DATA = profile.cfg
%.cfg: %.src
$(EET_EET) -i \
$(top_builddir)/config/$@ config \
$< 0
clean-local:
rm -rf *.cfg *~

@ -0,0 +1,35 @@
MAINTAINERCLEANFILES = Makefile.in
EET_EET = @eet_eet@
EXTRA_DIST = \
e.src \
module.battery.src \
module.cpufreq.src \
module.dropshadow.src \
module.fileman.src \
module.ibar.src \
module.ibox.src \
module.pager.src \
module.temperature.src
filesdir = $(edatadir)/config/default
files_DATA = \
e.cfg \
module.battery.cfg \
module.cpufreq.cfg \
module.dropshadow.cfg \
module.fileman.cfg \
module.ibar.cfg \
module.ibox.cfg \
module.pager.cfg \
module.temperature.cfg
%.cfg: %.src
$(EET_EET) -e \
$(top_builddir)/config/default/$@ config \
$< 1
clean-local:
rm -rf *.cfg *~

File diff suppressed because it is too large Load Diff

@ -0,0 +1,6 @@
group "Battery_Config" struct {
value "poll_interval" int: 512;
value "alert" int: 30;
value "alert_p" int: 10;
value "alert_timeout" int: 0;
}

@ -0,0 +1,4 @@
group "Cpufreq_Config" struct {
value "poll_interval" int: 32;
value "restore_governor" int: 1;
}

@ -0,0 +1,7 @@
group "Dropshadow_Config" struct {
value "shadow_x" int: 4;
value "shadow_y" int: 4;
value "blur_size" int: 10;
value "quality" int: 2;
value "shadow_darkness" double: 0.5;
}

@ -0,0 +1,28 @@
group "Fileman_Config" struct {
value "config_version" int: 65793;
value "view.mode" int: 1;
value "view.open_dirs_in_place" uchar: 0;
value "view.selector" uchar: 0;
value "view.single_click" uchar: 0;
value "view.no_subdir_jump" uchar: 0;
value "view.no_subdir_drop" uchar: 0;
value "view.always_order" uchar: 0;
value "view.link_drop" uchar: 0;
value "view.fit_custom_pos" uchar: 0;
value "view.show_full_path" uchar: 0;
value "view.show_desktop_icons" uchar: 1;
value "view.show_toolbar" uchar: 0;
value "icon.icon.w" int: 48;
value "icon.icon.h" int: 48;
value "icon.list.w" int: 16;
value "icon.list.h" int: 16;
value "icon.fixed.w" uchar: 0;
value "icon.fixed.h" uchar: 0;
value "icon.extension.show" uchar: 1;
value "list.sort.no_case" uchar: 1;
value "list.sort.dirs.first" uchar: 1;
value "list.sort.dirs.last" uchar: 0;
value "selection.single" uchar: 0;
value "selection.windows_modifiers" uchar: 0;
value "theme.fixed" uchar: 0;
}

@ -0,0 +1,25 @@
group "IBar_Config" struct {
group "items" list {
group "IBar_Config_Item" struct {
value "id" string: "0";
value "dir" string: "default";
value "show_label" int: 1;
value "eap_label" int: 0;
}
}
group "items" list {
group "IBar_Config_Item" struct {
value "id" string: "ibar.1";
value "show_label" int: 1;
value "eap_label" int: 0;
}
}
group "items" list {
group "IBar_Config_Item" struct {
value "id" string: "ibar.1";
value "dir" string: "default";
value "show_label" int: 1;
value "eap_label" int: 0;
}
}
}

@ -0,0 +1,20 @@
group "IBox_Config" struct {
group "items" list {
group "IBox_Config_Item" struct {
value "id" string: "0";
value "show_label" int: 0;
value "show_zone" int: 1;
value "show_desk" int: 0;
value "icon_label" int: 0;
}
}
group "items" list {
group "IBox_Config_Item" struct {
value "id" string: "ibox.1";
value "show_label" int: 0;
value "show_zone" int: 1;
value "show_desk" int: 0;
value "icon_label" int: 0;
}
}
}

@ -0,0 +1,15 @@
group "Pager_Config" struct {
value "popup" uint: 1;
value "popup_speed" double: 1.0;
value "popup_urgent" uint: 0;
value "popup_urgent_stick" uint: 0;
value "popup_urgent_speed" double: 1.5;
value "show_desk_names" uint: 1;
value "popup_height" int: 60;
value "popup_act_height" int: 60;
value "drag_resist" uint: 3;
value "btn_drag" uchar: 1;
value "btn_noplace" uchar: 2;
value "btn_desk" uchar: 0;
value "flip_desk" uchar: 0;
}

@ -0,0 +1,13 @@
group "Temperature_Config" struct {
group "faces" hash {
key "temperature.1";
group "Temperature_Config_Face" struct {
value "id" string: "temperature.1";
value "poll_interval" int: 128;
value "low" int: 30;
value "high" int: 80;
value "sensor_type" int: 0;
value "units" int: 0;
}
}
}

@ -275,6 +275,18 @@ AC_ARG_WITH(edje-cc,
])
AC_SUBST(edje_cc)
PKG_CHECK_MODULES(EET, [eet >= 1.0.1])
AC_ARG_WITH(eet-eet,
[ --with-eet-eet=PATH specify a specific path to eet utility],
[
v=$withval;
eet_eet=$v
echo " Enlightenment eet explicitly set to "$eet_eet;
],[
eet_eet=$(pkg-config --variable=prefix eet)/bin/eet
])
AC_SUBST(eet_eet)
AC_DEFINE(E_INTERNAL, 1, "This define can be used to wrap internal E stuff, as config.h isn't exported")
@ -438,6 +450,8 @@ data/backgrounds/Makefile
data/etc/Makefile
data/icons/Makefile
doc/Makefile
config/Makefile
config/default/Makefile
po/Makefile.in
enlightenment-config
],[

@ -51,18 +51,30 @@ e_config_init(void)
E_EVENT_CONFIG_ICON_THEME = ecore_event_type_new();
_e_config_profile = getenv("E_CONF_PROFILE");
if (!_e_config_profile)
if (_e_config_profile)
/* if environment var set - use this profile name */
_e_config_profile = strdup(_e_config_profile);
else
{
Eet_File *ef;
char buf[4096];
const char *homedir;
/* try user profile config */
homedir = e_user_homedir_get();
snprintf(buf, sizeof(buf), "%s/.e/e/config/profile.cfg",
homedir);
ef = eet_open(buf, EET_FILE_MODE_READ);
if (!ef)
{
/* use system if no user profile config */
snprintf(buf, sizeof(buf), "%s/data/config/profile.cfg",
e_prefix_data_get());
ef = eet_open(buf, EET_FILE_MODE_READ);
}
if (ef)
{
/* profile config exists */
char *data;
int data_len = 0;
@ -80,11 +92,25 @@ e_config_init(void)
eet_close(ef);
}
else
_e_config_profile = strdup("default");
{
/* no profile config - try other means */
char *link = NULL;
/* check symlink - if default is a symlink to another dir */
snprintf(buf, sizeof(buf), "%s/data/config/default",
e_prefix_data_get());
link = ecore_file_readlink(buf);
/* if so use just the filename as the priofle - must be a local link */
if (link)
{
_e_config_profile = strdup(ecore_file_file_get(link));
free(link);
}
else
_e_config_profile = strdup("default");
}
e_util_env_set("E_CONF_PROFILE", _e_config_profile);
}
else
_e_config_profile = strdup(_e_config_profile);
_e_config_gadcon_client_edd = E_CONFIG_DD_NEW("E_Config_Gadcon_Client", E_Config_Gadcon_Client);
#undef T

Loading…
Cancel
Save