From 0c1d1a0f24655c22a373c19aac90a6a225a353e6 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Sat, 8 Dec 2018 10:43:50 +0100 Subject: wanda: reformat source code --- src/wallpaper.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/wallpaper.cpp') diff --git a/src/wallpaper.cpp b/src/wallpaper.cpp index 8f8e8c8..f0ae468 100644 --- a/src/wallpaper.cpp +++ b/src/wallpaper.cpp @@ -1,21 +1,22 @@ +#include "wallpaper.hpp" #include "optional.hpp" #include "setting.hpp" -#include "wallpaper.hpp" namespace wanda { - -void set_wallpaper(std::filesystem::path wallpaper, std::shared_ptr logger) -{ + void set_wallpaper(std::filesystem::path wallpaper, std::shared_ptr logger) + { using namespace wanda::literals; using namespace wanda::std_ext; using namespace std::string_literals; - with("org.gnome.desktop.background"_setting, [&](auto &setting) { - with(setting["picture-uri"_key], [&](auto &value) { - value = "file://" + wallpaper.native(); - }) || [&] { logger->error("invalid settings key"); }; - }) || [&] { logger->error("invalid setting"); }; -} + with("org.gnome.desktop.background"_setting, [&](auto & setting) { + with(setting["picture-uri"_key], [&](auto & value) { + value = "file://" + wallpaper.native(); + }) || + [&] { logger->error("invalid settings key"); }; + }) || + [&] { logger->error("invalid setting"); }; + } -} // namespace wanda \ No newline at end of file +} // namespace wanda \ No newline at end of file -- cgit v1.2.3