general:
  # Commands to run when the WM has started. This is useful for running a
  # script or launching another application.
  # Example: The below command launches Zebar.
  startup_commands: []

  # Commands to run just before the WM is shutdown.
  # Example: The below command kills Zebar.
  shutdown_commands: []

  # Commands to run after the WM config is reloaded.
  config_reload_commands: []

  # Whether to automatically focus windows underneath the cursor.
  focus_follows_cursor: false

  # Whether to switch back and forth between the previously focused
  # workspace when focusing the current workspace.
  toggle_workspace_on_refocus: false

  cursor_jump:
    # Whether to automatically move the cursor on the specified trigger.
    enabled: true

    # Trigger for cursor jump:
    # - 'monitor_focus': Jump when focus changes between monitors.
    # - 'window_focus': Jump when focus changes between windows.
    trigger: 'monitor_focus'

  # How windows should be hidden when switching workspaces.
  # - 'cloak': (Windows-only) Recommended option for Windows.
  # - 'hide': (Windows-only) Legacy option for Windows. Has stability issues with some apps.
  # - 'place_in_corner': Artifically hides the window by placing it in the corner of the
  #   monitor. On macOS, this is always used instead of cloak/hide.
  hide_method: 'cloak'

  # Affects which windows get shown in the native Windows taskbar. Has no
  # effect if `hide_method: 'hide'`.
  # - 'true': Show all windows (regardless of workspace).
  # - 'false': Only show windows from the currently shown workspaces.
  show_all_in_taskbar: false

gaps:
  # Whether to scale the gaps with the DPI of the monitor.
  scale_with_dpi: true

  # Gap between adjacent windows.
  inner_gap: '20px'

  # Gap between windows and the screen edge.
  outer_gap:
    top: '20px'
    right: '20px'
    bottom: '20px'
    left: '20px'

window_effects:
  # Visual effects to apply to the focused window.
  focused_window:
    # Highlight the window with a colored border.
    # ** Exclusive to Windows 11 due to API limitations.
    border:
      enabled: false
      color: '#8dbcff'

    # Remove the title bar from the window's frame. Note that this can
    # cause rendering issues for some applications.
    hide_title_bar:
      enabled: false

    # Change the corner style of the window's frame.
    # ** Exclusive to Windows 11 due to API limitations.
    corner_style:
      enabled: false
      # Allowed values: 'square', 'rounded', 'small_rounded'.
      style: 'square'

    # Change the transparency of the window.
    transparency:
      enabled: false
      # Can be something like '95%' or '0.95' for slightly transparent windows.
      # '0' or '0%' is fully transparent (and, by consequence, unfocusable).
      opacity: '95%'

  # Visual effects to apply to non-focused windows.
  other_windows:
    border:
      enabled: true
      color: '#a1a1a1'
    hide_title_bar:
      enabled: false
    corner_style:
      enabled: false
      style: 'square'
    transparency:
      enabled: false
      opacity: '0%'

window_behavior:
  # New windows are created in this state whenever possible.
  # Allowed values: 'tiling', 'floating'.
  initial_state: 'tiling'

  # Sets the default options for when a new window is created. This also
  # changes the defaults for when the state change commands, like
  # `set-floating`, are used without any flags.
  state_defaults:
    floating:
      # Whether to center floating windows by default.
      centered: true

      # Whether to show floating windows as always on top.
      shown_on_top: false

    fullscreen:
      # Maximize the window if possible. If the window doesn't have a
      # maximize button, then it'll be fullscreen'ed normally instead.
      maximized: false

      # Whether to show fullscreen windows as always on top.
      shown_on_top: false

workspaces:
  # --- Desktop 1 ---
  - name: "1-Links"
    bind_to_monitor: 0  
  - name: "1-Mitte"
    bind_to_monitor: 1  
  - name: "1-Rechts"
    bind_to_monitor: 2  

  # --- Desktop 2 ---
  - name: "2-Links"
    bind_to_monitor: 0  
  - name: "2-Mitte"
    bind_to_monitor: 1  
  - name: "2-Rechts"
    bind_to_monitor: 2  

  # --- Desktop 3 ---
  - name: "3-Links"
    bind_to_monitor: 0  
  - name: "3-Mitte"
    bind_to_monitor: 1  
  - name: "3-Rechts"
    bind_to_monitor: 2  

  # --- Desktop 4 ---
  - name: "4-Links"
    bind_to_monitor: 0  
  - name: "4-Mitte"
    bind_to_monitor: 1  
  - name: "4-Rechts"
    bind_to_monitor: 2  

  # --- Desktop 5 ---
  - name: "5-Links"
    bind_to_monitor: 0  
  - name: "5-Mitte"
    bind_to_monitor: 1  
  - name: "5-Rechts"
    bind_to_monitor: 2  

  # --- Desktop 6 ---
  - name: "6-Links"
    bind_to_monitor: 0  
  - name: "6-Mitte"
    bind_to_monitor: 1  
  - name: "6-Rechts"
    bind_to_monitor: 2  

  # --- Desktop 7 ---
  - name: "7-Links"
    bind_to_monitor: 0  
  - name: "7-Mitte"
    bind_to_monitor: 1  
  - name: "7-Rechts"
    bind_to_monitor: 2  

  # --- Desktop 8 ---
  - name: "8-Links"
    bind_to_monitor: 0  
  - name: "8-Mitte"
    bind_to_monitor: 1  
  - name: "8-Rechts"
    bind_to_monitor: 2  

  # --- Desktop 9 ---
  - name: "9-Links"
    bind_to_monitor: 0  
  - name: "9-Mitte"
    bind_to_monitor: 1  
  - name: "9-Rechts"
    bind_to_monitor: 2

window_rules:
  - commands: ['ignore']
    match:
      # Ignores any Zebar windows.
      - window_process: { equals: 'zebar' }

      # Ignores picture-in-picture windows for browsers.
      - window_title: { regex: '[Pp]icture.in.[Pp]icture' }
        window_class: { regex: 'Chrome_WidgetWin_1|MozillaDialogClass' }

      # Ignore rules for various 3rd-party apps.
      - window_process: { equals: 'PowerToys' }
        window_class: { regex: 'HwndWrapper\[PowerToys\.PowerAccent.*?\]' }
      - window_title: { equals: 'Command Palette' }
        window_class: { equals: 'WinUIDesktopWin32WindowClass' }
      - window_process: { equals: 'PowerToys' }
        window_title: { regex: '.*? - Peek' }
      - window_process: { equals: 'Lively' }
        window_class: { regex: 'HwndWrapper' }
      - window_process: { equals: 'EXCEL' }
        window_class: { not_regex: 'XLMAIN' }
      - window_process: { equals: 'WINWORD' }
        window_class: { not_regex: 'OpusApp' }
      - window_process: { equals: 'POWERPNT' }
        window_class: { not_regex: 'PPTFrameClass' }

binding_modes:
  # When enabled, the focused window can be resized via arrow keys or HJKL.
  - name: 'resize'
    keybindings:
      - commands: ['resize --width -2%']
        bindings: ['h', 'left']
      - commands: ['resize --width +2%']
        bindings: ['l', 'right']
      - commands: ['resize --height +2%']
        bindings: ['k', 'up']
      - commands: ['resize --height -2%']
        bindings: ['j', 'down']
      # Press enter/escape to return to default keybindings.
      - commands: ['wm-disable-binding-mode --name resize']
        bindings: ['escape', 'enter']

keybindings:
  # Shift focus in a given direction.
  - commands: ['focus --direction left']
    bindings: ['alt+h', 'alt+left']
  - commands: ['focus --direction right']
    bindings: ['alt+l', 'alt+right']
  - commands: ['focus --direction up']
    bindings: ['alt+k', 'alt+up']
  - commands: ['focus --direction down']
    bindings: ['alt+j', 'alt+down']

  # Move focused window in a given direction.
  - commands: ['move --direction left']
    bindings: ['alt+shift+h', 'alt+shift+left']
  - commands: ['move --direction right']
    bindings: ['alt+shift+l', 'alt+shift+right']
  - commands: ['move --direction up']
    bindings: ['alt+shift+k', 'alt+shift+up']
  - commands: ['move --direction down']
    bindings: ['alt+shift+j', 'alt+shift+down']

  # Resize focused window by a percentage or pixel amount.
  - commands: ['resize --width -2%']
    bindings: ['alt+u']
  - commands: ['resize --width +2%']
    bindings: ['alt+p']
  - commands: ['resize --height +2%']
    bindings: ['alt+o']
  - commands: ['resize --height -2%']
    bindings: ['alt+i']

  # As an alternative to the resize keybindings above, resize mode enables
  # resizing via arrow keys or HJKL. The binding mode is defined above with
  # the name 'resize'.
  - commands: ['wm-enable-binding-mode --name resize']
    bindings: ['alt+r']

  # Disables window management and all other keybindings until alt+shift+p
  # is pressed again.
  - commands: ['wm-toggle-pause']
    bindings: ['alt+shift+p']

  # Change tiling direction. This determines where new tiling windows will
  # be inserted.
  - commands: ['toggle-tiling-direction']
    bindings: ['alt+v']

  # Change focus from tiling windows -> floating -> fullscreen.
  - commands: ['wm-cycle-focus']
    bindings: ['alt+space']

  # Change the focused window to be floating.
  - commands: ['toggle-floating --centered']
    bindings: ['alt+shift+space']

  # Change the focused window to be tiling.
  - commands: ['toggle-tiling']
    bindings: ['alt+t']

  # Change the focused window to be fullscreen.
  - commands: ['toggle-fullscreen']
    bindings: ['alt+f']

  # Minimize focused window.
  - commands: ['toggle-minimized']
    bindings: ['alt+m']

  # Close focused window.
  - commands: ['close']
    bindings: ['alt+shift+q']

  # Kill GlazeWM process safely.
  - commands: ['wm-exit']
    bindings: ['alt+shift+e']

  # Re-evaluate configuration file.
  - commands: ['wm-reload-config']
    bindings: ['alt+shift+r']

  # Redraw all windows.
  - commands: ['wm-redraw']
    bindings: ['alt+shift+w']

  # Launch CMD terminal. Alternatively, use `shell-exec wt` or
  # `shell-exec %ProgramFiles%/Git/git-bash.exe` to start Windows
  # Terminal and Git Bash respectively.
  - commands: ['shell-exec cmd']
    bindings: ['alt+enter']

  # Focus the next/previous active workspace defined in `workspaces` config.
  - commands: ['focus --next-active-workspace']
    bindings: ['alt+s']
  - commands: ['focus --prev-active-workspace']
    bindings: ['alt+a']

  # Focus the workspace that last had focus.
  - commands: ['focus --recent-workspace']
    bindings: ['alt+d']

  # Change focus to a workspace defined in `workspaces` config.
  - commands: ['focus --workspace 1-Links', 'focus --workspace 1-Rechts', 'focus --workspace 1-Mitte']
    bindings: ['alt+1']
  - commands: ['focus --workspace 2-Links', 'focus --workspace 2-Rechts', 'focus --workspace 2-Mitte']
    bindings: ['alt+2']
  - commands: ['focus --workspace 3-Links', 'focus --workspace 3-Rechts', 'focus --workspace 3-Mitte']
    bindings: ['alt+3']
  - commands: ['focus --workspace 4-Links', 'focus --workspace 4-Rechts', 'focus --workspace 4-Mitte']
    bindings: ['alt+4']
  - commands: ['focus --workspace 5-Links', 'focus --workspace 5-Rechts', 'focus --workspace 5-Mitte']
    bindings: ['alt+5']
  - commands: ['focus --workspace 6-Links', 'focus --workspace 6-Rechts', 'focus --workspace 6-Mitte']
    bindings: ['alt+6']
  - commands: ['focus --workspace 7-Links', 'focus --workspace 7-Rechts', 'focus --workspace 7-Mitte']
    bindings: ['alt+7']
  - commands: ['focus --workspace 8-Links', 'focus --workspace 8-Rechts', 'focus --workspace 8-Mitte']
    bindings: ['alt+8']
  - commands: ['focus --workspace 9-Links', 'focus --workspace 9-Rechts', 'focus --workspace 9-Mitte']
    bindings: ['alt+9']

  # Move the focused window's parent workspace to a monitor in a given
  # direction.
  - commands: ['move-workspace --direction left']
    bindings: ['alt+shift+a']
  - commands: ['move-workspace --direction right']
    bindings: ['alt+shift+f']
  - commands: ['move-workspace --direction up']
    bindings: ['alt+shift+d']
  - commands: ['move-workspace --direction down']
    bindings: ['alt+shift+s']

  # Move focused window to a workspace defined in `workspaces` config.
  - commands: ['move --workspace 1-Mitte', 'focus --workspace 1-Links', 'focus --workspace 1-Rechts', 'focus --workspace 1-Mitte']
    bindings: ['alt+shift+1']

  - commands: ['move --workspace 2-Mitte', 'focus --workspace 2-Links', 'focus --workspace 2-Rechts', 'focus --workspace 2-Mitte']
    bindings: ['alt+shift+2']

  - commands: ['move --workspace 3-Mitte', 'focus --workspace 3-Links', 'focus --workspace 3-Rechts', 'focus --workspace 3-Mitte']
    bindings: ['alt+shift+3']

  - commands: ['move --workspace 4-Mitte', 'focus --workspace 4-Links', 'focus --workspace 4-Rechts', 'focus --workspace 4-Mitte']
    bindings: ['alt+shift+4']

  - commands: ['move --workspace 5-Mitte', 'focus --workspace 5-Links', 'focus --workspace 5-Rechts', 'focus --workspace 5-Mitte']
    bindings: ['alt+shift+5']

  - commands: ['move --workspace 6-Mitte', 'focus --workspace 6-Links', 'focus --workspace 6-Rechts', 'focus --workspace 6-Mitte']
    bindings: ['alt+shift+6']

  - commands: ['move --workspace 7-Mitte', 'focus --workspace 7-Links', 'focus --workspace 7-Rechts', 'focus --workspace 7-Mitte']
    bindings: ['alt+shift+7']

  - commands: ['move --workspace 8-Mitte', 'focus --workspace 8-Links', 'focus --workspace 8-Rechts', 'focus --workspace 8-Mitte']
    bindings: ['alt+shift+8']

  - commands: ['move --workspace 9-Mitte', 'focus --workspace 9-Links', 'focus --workspace 9-Rechts', 'focus --workspace 9-Mitte']
    bindings: ['alt+shift+9']
