diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2018-11-24 20:38:48 +0100 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2018-11-24 20:38:48 +0100 |
| commit | e70f0b4de81d24d22a29a2af03c669368fce6af2 (patch) | |
| tree | f91dfd02434ce460e6120c7747aa0092cbd2327f /src/main.cpp | |
| download | wanda-e70f0b4de81d24d22a29a2af03c669368fce6af2.tar.xz wanda-e70f0b4de81d24d22a29a2af03c669368fce6af2.zip | |
wanda: initial commit
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..fb2e0bf --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,16 @@ +#include "setting.hpp" +#include "optional.hpp" + +#include <iostream> +#include <string> + +int main() { + using namespace wanda::literals; + using namespace wanda::std_ext; + + with("org.gnome.desktop.background"_setting, [](auto & setting){ + with(setting.template get<std::string>("picture-uri"_key), [](auto & value){ + std::cout << value << '\n'; + }) || []{ std::cerr << "No such key!\n"; }; + }) || []{ std::cerr << "No such setting!\n"; }; +} |
