Menu

modify_keybindings

Niri Keybindings Bearbeiten


Methode 1: Über das Terminal (Yazi & Helix Editor)

Für die schnelle Bearbeitung direkt im Terminal steht dir eine Kombination aus dem Dateimanager Yazi und dem Texteditor Helix zur Verfügung:

  1. Konfigurationsverzeichnis öffnen: Drücke die Tastenkombination Mod + Y, um den Terminal-Dateimanager Yazi zu starten und gehe in das Verzeichnis ~/.config/niri/ . Du kannst die .-Taste drücken um versteckte Verzeichnisse und Dateien anzuzeigen.
  2. Datei auswählen: Navigiere mit den Pfeiltasten oder j/k zur Datei keybindings.kdl.
  3. In Helix öffnen: Drücke Enter. Die Datei öffnet sich automatisch im Helix Editor.
  4. Änderungen speichern: Nach dem Bearbeiten kannst du die Datei in Helix mit :w speichern. Niri lädt die Konfiguration automatisch im Hintergrund neu.

Yazi
Helix Editor


Methode 2: Über die grafische Oberfläche (GUI)

Wenn du visuelles Arbeiten bevorzugst, bietet das System ein grafisches Keymap-Tool zur Konfiguration:

  1. Tool öffnen: Klicke in der Statusleiste oben links auf das Tastatur-Symbol (Keyboard).
  2. Suchen & Verwalten: Im sich öffnenden "Keymap"-Fenster siehst du eine vollständige Übersicht aller aktiven Tastaturbefehle, sortiert nach Kategorien wie Fenster-Management oder Navigation.
  3. Bearbeiten:
  4. Klicke oben rechts auf "Edit shortcuts", um bestehende Kombinationen zu ändern.
  5. Klicke auf "New shortcut", um eine völlig neue Aktion zuzuweisen.

KeyMap Tool


Wichtige Befehle zur Fehlerbehebung

Sollte nach einer manuellen Änderung etwas nicht funktionieren, kannst du die Syntax der Konfigurationsdateien jederzeit im Terminal überprüfen:

niri validate

Editing Niri Keybindings


Method 1: Via the Terminal (Yazi & Helix Editor)

For quick editing directly in the terminal, you can use a combination of the Yazi file manager and the Helix text editor:

  1. Open the configuration directory: Press the key combination Mod + Y to launch the Yazi terminal file manager and navigate to the ~/.config/niri/ directory. You can press the . key to toggle the visibility of hidden directories and files.
  2. Select the file: Use the arrow keys or j/k to navigate to the keybindings.kdl file.
  3. Open in Helix: Press Enter. The file will automatically open in the Helix Editor.
  4. Save changes: After editing, you can save the file in Helix using :w. Niri will automatically reload the configuration in the background.

Yazi
Helix Editor


Method 2: Via the Graphical User Interface (GUI)

If you prefer a visual workflow, the system features a graphical Keymap tool for configuration:

  1. Open the tool: Click the keyboard icon in the top-left corner of the status bar.
  2. Search & Manage: In the "Keymap" window that opens, you will see a complete overview of all active keyboard shortcuts, organized by categories such as Window Management or Navigation.
  3. Edit:
  4. Click "Edit shortcuts" in the top-right corner to modify existing combinations.
  5. Click "New shortcut" to assign a completely new action.

KeyMap Tool


Important Commands for Troubleshooting

If something goes wrong after making manual changes, you can verify the syntax of your configuration files in the terminal at any time:

niri validate