aboutsummaryrefslogtreecommitdiff
path: root/util/fluxbox-update_configs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'util/fluxbox-update_configs.cc')
-rw-r--r--util/fluxbox-update_configs.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/util/fluxbox-update_configs.cc b/util/fluxbox-update_configs.cc
index 233bdbb..883d864 100644
--- a/util/fluxbox-update_configs.cc
+++ b/util/fluxbox-update_configs.cc
@@ -724,6 +724,22 @@ update_move_slitlist_to_init_file(std::auto_ptr<FbTk::ResourceManager_base>& rm,
724 rc_slitlist->push_back(line); 724 rc_slitlist->push_back(line);
725} 725}
726 726
727void update_keys_for_lua(std::auto_ptr<FbTk::ResourceManager_base>& rm, FbTk::Lua &l) {
728 extern const char update_keys[];
729 extern const unsigned int update_keys_size;
730
731 l.checkstack(2);
732 lua::stack_sentry s(l);
733
734 FbTk::StringResource &rc_keyfile = rm->getResource<string, FbTk::StringTraits>("keyFile");
735
736 l.loadstring(update_keys, update_keys_size);
737 l.pushstring(read_file(FbTk::StringUtil::expandFilename(*rc_keyfile)));
738 l.call(1, 1);
739 *rc_keyfile = string(*rc_keyfile) + ".lua";
740 write_file(FbTk::StringUtil::expandFilename(*rc_keyfile), l.tostring(-1));
741}
742
727/*------------------------------------------------------------------*\ 743/*------------------------------------------------------------------*\
728\*------------------------------------------------------------------*/ 744\*------------------------------------------------------------------*/
729 745
@@ -747,7 +763,8 @@ const Update UPDATES[] = {
747 { 12, update_keys_for_activetab }, 763 { 12, update_keys_for_activetab },
748 { 13, update_limit_nextwindow_to_current_workspace }, 764 { 13, update_limit_nextwindow_to_current_workspace },
749 { 14, update_lua_resource_manager }, 765 { 14, update_lua_resource_manager },
750 { 15, update_move_slitlist_to_init_file } 766 { 15, update_move_slitlist_to_init_file },
767 { 16, update_keys_for_lua }
751}; 768};
752 769
753/*------------------------------------------------------------------*\ 770/*------------------------------------------------------------------*\