{enable}: {
  inherit enable;
  xwayland.enable = true;
  extraConfig = ''
    # Waybar
    exec-once = waybar

    # Notifications Daemon
    exec-once = dunst &

    # Wallpaper
    exec-once = swww init
    exec-once = swww img ~/.wallpaper --transition-step 255

    # Clipboard
    exec-once = copyq --start-server

    # Window Rules
    windowrulev2 = float,title:(CopyQ)$
    windowrulev2 = float,title:^(Volume Control)$

    # Keybinds
    $Mod    = Alt
    $altMod = SUPER

    bind = $Mod,               D,      exec, wofi --show drun
    bind = $Mod,               Return, exec, alacritty
    bind = $Mod,               V,      exec, copyq
    bind = $Mod,               S,      exec, grim -g "$(slurp)"
    bind = $Mod SHIFT,         C,      exec, copyq show

    bind = $Mod,               C,      killactive,
    bind = $Mod CONTROL SHIFT, K,      exit,
    bind = $Mod,               M,      togglefloating
    bind = $Mod,               F,      fullscreen, 1 # maximize
    bind = $Mod SHIFT,         F,      fullscreen, 0 # fullscreen
    bind = $Mod,               P,      pseudo

    # Move focus with mainMod + arrow keys
    bind = $Mod, h, movefocus, l
    bind = $Mod, j, movefocus, d
    bind = $Mod, k, movefocus, u
    bind = $Mod, l, movefocus, r

    bind = $Mod SHIFT, h, swapwindow, l
    bind = $Mod SHIFT, j, swapwindow, d
    bind = $Mod SHIFT, k, swapwindow, u
    bind = $Mod SHIFT, l, swapwindow, r

    bind = $Mod      , Tab, cyclenext, prev
    bind = $Mod SHIFT, Tab, cyclenext,

    # Layouting
    bind = $Mod         , Space, togglegroup,
    bind = $altMod      , Tab  , changegroupactive, forward
    bind = $altMod SHIFT, Tab  , changegroupactive, back

    bind = $altMod, h, moveintogroup, l
    bind = $altMod, j, moveintogroup, d
    bind = $altMod, k, moveintogroup, u
    bind = $altMod, l, moveintogroup, r

    bind = $altMod SHIFT, h, moveoutofgroup, l
    bind = $altMod SHIFT, j, moveoutofgroup, d
    bind = $altMod SHIFT, k, moveoutofgroup, u
    bind = $altMod SHIFT, l, moveoutofgroup, r

    # Switch workspaces
    bind = $Mod, 1, workspace, -1
    bind = $Mod, 2, workspace, +1

    # Move active window to a workspace
    bind = $Mod SHIFT, 1, movetoworkspace, -1
    bind = $Mod SHIFT, 2, movetoworkspace, +1

    # Scroll through existing workspaces
    bind = $Mod, mouse_up,   workspace, -1
    bind = $Mod, mouse_down, workspace, +1

    # Move/resize windows
    bindm = $Mod, mouse:272, movewindow
    bindm = $Mod, mouse:273, resizewindow

    # TODO: renameworkspace with dmenu or rofi prompt

    input {
      kb_layout = at
    }
  '';
}
