Merge pull request #99 from mattkae/release/0.2.0

release: v0.2.0
This commit is contained in:
Matthew Kosarek 2024-04-19 11:46:19 -04:00 committed by GitHub
commit a7641a11a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 22 additions and 7 deletions

View File

@ -68,8 +68,13 @@ add_custom_target(miracle-wm-sensible-terminal ALL
cp ${CMAKE_CURRENT_SOURCE_DIR}/src/miracle-wm-sensible-terminal ${CMAKE_BINARY_DIR}/bin
)
add_custom_target(miracle-wm-unsnap ALL
cp ${CMAKE_CURRENT_SOURCE_DIR}/src/miracle-wm-unsnap ${CMAKE_BINARY_DIR}/bin
)
install(PROGRAMS
src/miracle-wm-sensible-terminal
src/miracle-wm-unsnap
DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@ -6,7 +6,7 @@ description: |
that provides a tiling-window manager.
confinement: classic
base: core22
version: 0.1.0
version: 0.2.0
architectures:
- build-on: amd64

10
src/miracle-wm-unsnap Executable file
View File

@ -0,0 +1,10 @@
#! /bin/bash
set -e
if [ "$SNAP_NAME" == "miracle-wm" ]; then
unset __EGL_VENDOR_LIBRARY_DIRS
unset LIBGL_DRIVERS_PATH
unset LIBINPUT_QUIRKS_DIR
PATH="$(echo "$PATH" | sed "s#$SNAP[^:]*:##g")"
fi
exec "$@"

View File

@ -82,7 +82,7 @@ void MiracleConfig::_load()
outer_gaps_x = 10;
outer_gaps_y = 10;
startup_apps = {};
terminal = "miracle-wm-sensible-terminal";
terminal = "miracle-wm-unsnap miracle-wm-sensible-terminal";
desired_terminal = "";
resize_jump = 50;
@ -525,7 +525,7 @@ void MiracleConfig::_load()
YAML::Node modifiers_node;
try
{
command = sub_node["command"].as<std::string>();
command = "miracle-wm-unsnap " + sub_node["command"].as<std::string>();
action = sub_node["action"].as<std::string>();
key = sub_node["key"].as<std::string>();
modifiers_node = sub_node["modifiers"];
@ -655,7 +655,7 @@ void MiracleConfig::_load()
try
{
auto command = node["command"].as<std::string>();
auto command = "miracle-wm-unsnap " + node["command"].as<std::string>();
bool restart_on_death = false;
if (node["restart_on_death"])
{
@ -677,7 +677,7 @@ void MiracleConfig::_load()
{
try
{
terminal = config["terminal"].as<std::string>();
terminal = "miracle-wm-unsnap " + config["terminal"].as<std::string>();
}
catch (YAML::BadConversion const& e)
{

View File

@ -165,7 +165,7 @@ TEST_F(MiracleConfigTest, CanCreateCustomAction)
MirKeyboardAction::mir_keyboard_action_down,
KEY_X,
mir_input_event_modifier_meta);
EXPECT_EQ(custom_action->command, "echo Hi");
EXPECT_EQ(custom_action->command, "miracle-wm-unsnap echo Hi");
EXPECT_EQ(custom_action->key, KEY_X);
EXPECT_EQ(custom_action->action, mir_keyboard_action_down);
}
@ -256,7 +256,7 @@ TEST_F(MiracleConfigTest, ValidStartupAppsAreParsed)
MiracleConfig config(runner, path);
EXPECT_EQ(config.get_startup_apps().size(), 1);
EXPECT_EQ(config.get_startup_apps()[0].command, "echo Hi");
EXPECT_EQ(config.get_startup_apps()[0].command, "miracle-wm-unsnap echo Hi");
EXPECT_EQ(config.get_startup_apps()[0].restart_on_death, true);
}