git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit75ba50151fa734a14f92694615c8c9bc1d4627ef
parent1e12ce767f
authorIsaac Freund <[email protected]>
date2020-06-01 00:04
Rename mode command to enter_mode

 src/Config.zig                           | 4 ++--
 src/command.zig                          | 6 +++---
 src/command/{mode.zig => enter_mode.zig} | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/Config.zig b/src/Config.zig
index 8677acc..d948a95 100644
--- a/src/Config.zig
+++ b/src/Config.zig
@@ -228,7 +228,7 @@ pub fn init(self: *Self, allocator: *std.mem.Allocator) !void {
         allocator,
         c.XKB_KEY_F11,
         mod,
-        &[_][]const u8{ "mode", "passthrough" },
+        &[_][]const u8{ "enter_mode", "passthrough" },
     ));
 
     // Change master orientation with Mod+{Up,Right,Down,Left}
@@ -270,7 +270,7 @@ pub fn init(self: *Self, allocator: *std.mem.Allocator) !void {
         allocator,
         c.XKB_KEY_F11,
         mod,
-        &[_][]const u8{ "mode", "normal" },
+        &[_][]const u8{ "enter_mode", "normal" },
     ));
 
     // Float views with app_id "float"
diff --git a/src/command.zig b/src/command.zig
index 39b8b79..e2c32b1 100644
--- a/src/command.zig
+++ b/src/command.zig
@@ -29,7 +29,7 @@ const impl = struct {
     const layout = @import("command/layout.zig").layout;
     const modMasterCount = @import("command/mod_master_count.zig").modMasterCount;
     const modMasterFactor = @import("command/mod_master_factor.zig").modMasterFactor;
-    const mode = @import("command/mode.zig").mode;
+    const enterMode = @import("command/enter_mode.zig").enterMode;
     const sendToOutput = @import("command/send_to_output.zig").sendToOutput;
     const spawn = @import("command/spawn.zig").spawn;
     const tagView = @import("command/tag_view.zig").tagView;
@@ -68,10 +68,10 @@ const str_to_impl_fn = [_]Definition{
     .{ .name = "focus_all_tags",    .impl = impl.focusAllTags },
     .{ .name = "focus_output",      .impl = impl.focusOutput },
     .{ .name = "focus_tag",         .impl = impl.focusTag },
-    .{ .name = "layout",            .impl = impl.layout},
+    .{ .name = "layout",            .impl = impl.layout },
     .{ .name = "mod_master_count",  .impl = impl.modMasterCount },
     .{ .name = "mod_master_factor", .impl = impl.modMasterFactor },
-    .{ .name = "mode",              .impl = impl.mode },
+    .{ .name = "enter_mode",        .impl = impl.enterMode },
     .{ .name = "send_to_output",    .impl = impl.sendToOutput },
     .{ .name = "spawn",             .impl = impl.spawn },
     .{ .name = "tag_view",          .impl = impl.tagView },
diff --git a/src/command/mode.zig b/src/command/enter_mode.zig
similarity index 98%
rename from src/command/mode.zig
rename to src/command/enter_mode.zig
index 364e399..8c7e3e4 100644
--- a/src/command/mode.zig
+++ b/src/command/enter_mode.zig
@@ -21,7 +21,7 @@ const Error = @import("../command.zig").Error;
 const Seat = @import("../Seat.zig");
 
 /// Switch to the given mode
-pub fn mode(
+pub fn enterMode(
     allocator: *std.mem.Allocator,
     seat: *Seat,
     args: []const []const u8,