// gKeyMapper - reading and writing the mappings configuration file. #ifndef GKEYMAPPER_MAPPINGS_H #define GKEYMAPPER_MAPPINGS_H #include #include #include "keyrow.h" namespace gkeymapper { // Default config file: ~/.config/gKeyMapper/mappings.conf. std::string default_config_path(); // Writes all rows as "G1=type:target" lines. Returns false on I/O error. bool write_mappings(const std::string& path, const std::vector& rows); // Loads mappings from path into the rows' widgets. Missing/invalid lines are // skipped; a missing file is reported and otherwise ignored. void read_mappings(const std::string& path, const std::vector& rows); } // namespace gkeymapper #endif // GKEYMAPPER_MAPPINGS_H