diff --git a/binding-mri/wallpaper-binding.cpp b/binding-mri/wallpaper-binding.cpp index 6eb054c..a27971b 100644 --- a/binding-mri/wallpaper-binding.cpp +++ b/binding-mri/wallpaper-binding.cpp @@ -338,11 +338,11 @@ end: "d.writeConfig(\"Image\", \"file://" << concatPath << "\");" << "d.writeConfig(\"FillMode\", \"6\");" << "d.writeConfig(\"Blur\", false);" << - "d.writeConfig(\"Color\", \"" << - std::to_string((color >> 16) & 0xFF) << "," << - std::to_string((color >> 8) & 0xFF) << "," << + "d.writeConfig(\"Color\", [\"" << + std::to_string((color >> 16) & 0xFF) << "\", \"" << + std::to_string((color >> 8) & 0xFF) << "\", \"" << std::to_string(color & 0xFF) << - "\");" << + "\"]);" << "}" << "'"; Debug() << "Wallpaper command:" << command.str(); @@ -458,7 +458,7 @@ RB_METHOD(wallpaperReset) "d.writeConfig(\"Image\", dat.picture);" << "}" << "if (dat.color) {" << - "d.writeConfig(\"Color\", dat.color);" << + "d.writeConfig(\"Color\", dat.color.split(\",\"));" << "}" << "if (dat.mode) {" << "d.writeConfig(\"FillMode\", dat.mode);" << diff --git a/journal/unix/images/icon.png b/journal/unix/images/icon.png new file mode 100644 index 0000000..41a1cfd Binary files /dev/null and b/journal/unix/images/icon.png differ diff --git a/scripts/Script.rb b/scripts/Script.rb index f3bbc5f..bf6845b 100644 --- a/scripts/Script.rb +++ b/scripts/Script.rb @@ -2,6 +2,8 @@ PROTO_TEXT = "put me in the big portal" CEDRIC_TEXT = "put me in the big portal" RUE_TEXT = "put me in the big portal" +SUPPORTED_DE = ["cinnamon", "gnome", "mate", "kde", "xfce"] + module Script def self.px logpos($game_player.x, $game_player.real_x, $game_player.direction == 6) @@ -385,7 +387,21 @@ module Script end end else - File.symlink Dir.pwd + "/" + Oneshot::JOURNAL, Oneshot::GAME_PATH + "/Oneshot/" + Oneshot::JOURNAL + if Oneshot::OS == "linux" and SUPPORTED_DE.include? Oneshot::DE + path = Oneshot::GAME_PATH + "/Oneshot/" + Oneshot::JOURNAL + ".desktop" + File.open(path, "wb") do |output| + output.write("[Desktop Entry]\n") + output.write("Comment=...\n") + output.write("Terminal=false\n") + output.write("Name=_______\n") + output.write("Exec=#{Dir.pwd}/#{Oneshot::JOURNAL}\n") + output.write("Type=Application\n") + output.write("Icon=#{Dir.pwd}/images/icon.png\n") + end + FileUtils.chmod 0777 path + else + File.symlink Dir.pwd + "/" + Oneshot::JOURNAL, Oneshot::GAME_PATH + "/Oneshot/" + Oneshot::JOURNAL + end end rescue Errno::EACCES => e #this probably means the clover.exe already exists and is running, so no need to create it again