From 5f6b10368a4bdc49484d3c91fac1a44ebfb46d3f Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 10 Mar 2026 12:29:15 +0100 Subject: [PATCH] Make makima remapping an opt-in feature under Setup > Key Remapping --- bin/omarchy-menu | 6 ++++-- bin/omarchy-setup-makima | 22 ++++++++++++++++++++++ install/config/all.sh | 1 - install/config/makima.sh | 14 -------------- install/omarchy-base.packages | 1 - 5 files changed, 26 insertions(+), 18 deletions(-) create mode 100755 bin/omarchy-setup-makima delete mode 100644 install/config/makima.sh diff --git a/bin/omarchy-menu b/bin/omarchy-menu index f327b9f4..11ead83d 100755 --- a/bin/omarchy-menu +++ b/bin/omarchy-menu @@ -20,8 +20,8 @@ back_to() { } toggle_existing_menu() { - if pgrep -f "walker.*--dmenu" > /dev/null; then - walker --close > /dev/null 2>&1 + if pgrep -f "walker.*--dmenu" >/dev/null; then + walker --close >/dev/null 2>&1 exit 0 fi } @@ -221,6 +221,7 @@ show_font_menu() { show_setup_menu() { local options=" Audio\n Wifi\n󰂯 Bluetooth\n󱐋 Power Profile\n System Sleep\n󰍹 Monitors" [[ -f ~/.config/hypr/bindings.conf ]] && options="$options\n Keybindings" + options="$options\n Key Remapping" [[ -f ~/.config/hypr/input.conf ]] && options="$options\n Input" options="$options\n󰱔 DNS\n Security\n Config" @@ -233,6 +234,7 @@ show_setup_menu() { *Monitors*) open_in_editor ~/.config/hypr/monitors.conf ;; *Keybindings*) open_in_editor ~/.config/hypr/bindings.conf ;; *Input*) open_in_editor ~/.config/hypr/input.conf ;; + *Key\ Remapping*) omarchy-setup-makima && open_in_editor "$HOME/.config/makima/AT Translated Set 2 keyboard.toml" && omarchy-restart-makima ;; *DNS*) present_terminal omarchy-setup-dns ;; *Security*) show_setup_security_menu ;; *Config*) show_setup_config_menu ;; diff --git a/bin/omarchy-setup-makima b/bin/omarchy-setup-makima new file mode 100755 index 00000000..707465b4 --- /dev/null +++ b/bin/omarchy-setup-makima @@ -0,0 +1,22 @@ +#!/bin/bash + +# Setup makima - key remapping service for remapping Copilot key to Omarchy Menu + +CONFIG_FILE="$HOME/.config/makima/AT Translated Set 2 keyboard.toml" + +if [[ ! -f $CONFIG_FILE ]]; then + omarchy-pkg-add makima-bin + + mkdir -p "$HOME/.config/makima" + cp "$OMARCHY_PATH/default/makima/AT Translated Set 2 keyboard.toml" "$CONFIG_FILE" + + sudo mkdir -p /etc/systemd/system/makima.service.d + sudo tee /etc/systemd/system/makima.service.d/override.conf >/dev/null </dev/null || true +fi diff --git a/install/config/all.sh b/install/config/all.sh index 14480206..c12ffc64 100644 --- a/install/config/all.sh +++ b/install/config/all.sh @@ -20,7 +20,6 @@ run_logged $OMARCHY_INSTALL/config/walker-elephant.sh run_logged $OMARCHY_INSTALL/config/fast-shutdown.sh run_logged $OMARCHY_INSTALL/config/sudoless-asdcontrol.sh run_logged $OMARCHY_INSTALL/config/input-group.sh -run_logged $OMARCHY_INSTALL/config/makima.sh run_logged $OMARCHY_INSTALL/config/omarchy-ai-skill.sh run_logged $OMARCHY_INSTALL/config/kernel-modules-hook.sh run_logged $OMARCHY_INSTALL/config/powerprofilesctl-rules.sh diff --git a/install/config/makima.sh b/install/config/makima.sh deleted file mode 100644 index bee64136..00000000 --- a/install/config/makima.sh +++ /dev/null @@ -1,14 +0,0 @@ -# Remap Copilot key (Super+Shift+F23) to Super+Alt+Space (Omarchy Menu) using makima -mkdir -p "$HOME/.config/makima" -cp "$OMARCHY_PATH/default/makima/AT Translated Set 2 keyboard.toml" "$HOME/.config/makima/" - -# Create systemd override with correct user and config path -sudo mkdir -p /etc/systemd/system/makima.service.d -sudo tee /etc/systemd/system/makima.service.d/override.conf > /dev/null </dev/null || true diff --git a/install/omarchy-base.packages b/install/omarchy-base.packages index 2974fbde..ebcddb72 100644 --- a/install/omarchy-base.packages +++ b/install/omarchy-base.packages @@ -75,7 +75,6 @@ libreoffice-fresh llvm localsend luarocks -makima-bin mako man-db mariadb-libs