cursor {
  hide_on_key_press = true
  enable_hyprcursor = true
  zoom_rigid = true
}

env = HYPRCURSOR_THEME,catppuccin-mocha-sapphire
env = HYPRCURSOR_SIZE,40
env = XCURSOR_THEME,catppuccin-mocha-sapphire
env = XCURSOR_SIZE,40

$mod = SUPER

input {
  touchpad {
    disable_while_typing = true # set to true while playing
  }
}

monitor = HDMI-A-1, 2560x1440, 0x0, 1 # picard
monitor = eDP-1, 1920x1080, 0x0, 1, mirror, DP-1 # kirk

bindl=,switch:off:Lid Switch,exec,switch-monitor.sh open
bindl=,switch:on:Lid Switch,exec,switch-monitor.sh close

exec-once = hyprpaper

windowrulev2 = tile, class:^(Spotify)$
windowrulev2 = workspace 9, class:^(Spotify)$
windowrulev2 = float, title:^(floating)$

bind = $mod, b, exec, firefox
# bind = $mod, t, exec, footclient $SHELL -C "zellij"
bind = $mod, t, exec, footclient $SHELL
bind = $mod, RETURN, exec, emacsclient -c --eval "(ccr/start-eshell)"
bind = $mod, m, exec, emacsclient -c --eval '(notmuch-search "tag:new")'
bind = $mod, g, exec, emacsclient -c --eval '(switch-to-buffer (gptel "*ChatGPT*"))'
bind = $mod, c, exec, emacsclient -c --eval '(org-roam-dailies-capture-today)'
bind = $mod, d, exec, fuzzel --background-color=253559cc --border-radius=5 --border-width=0
bind = $mod, s, exec, screenshot.sh
bind = $mod, n, exec, logseq
bind = $mod, x, exec, emacsclient -c
bind = , XF86MonBrightnessUp, exec, brightnessctl s +5%
bind = , XF86MonBrightnessDown, exec, brightnessctl s 5%-
bind = $mod, code:60, exec, brightnessctl s +5%
bind = $mod, code:59, exec, brightnessctl s 5%-

bind = $mod SHIFT, t, hy3:makegroup, tab, ephemeral
bind = $mod SHIFT, q, killactive
bind = $mod SHIFT, f, fullscreen, 0
bind = $mod SHIFT, e, exit

bind = $mod, h, hy3:movefocus, l
bind = $mod, l, hy3:movefocus, r
bind = $mod, k, hy3:movefocus, u
bind = $mod, j, hy3:movefocus, d

bind = $mod SHIFT, h, hy3:movewindow, l
bind = $mod SHIFT, l, hy3:movewindow, r
bind = $mod SHIFT, k, hy3:movewindow, u
bind = $mod SHIFT, j ,hy3:movewindow, d

bind = $mod, v, hy3:makegroup, v
bind = $mod SHIFT, v, hy3:makegroup, h

bind = $mod, p, movecurrentworkspacetomonitor, r
bind = $mod, o, movecurrentworkspacetomonitor, l

bindm=ALT,mouse:272,hy3:movewindow

bind = $mod, 1, workspace, 1
bind = $mod, 2, workspace, 2
bind = $mod, 3, workspace, 3
bind = $mod, 4, workspace, 4
bind = $mod, 5, workspace, 5
bind = $mod, 6, workspace, 6
bind = $mod, 7, workspace, 7
bind = $mod, 8, workspace, 8
bind = $mod, 9, workspace, 9
bind = $mod, 0, workspace, 10

bind = $mod SHIFT, 1, movetoworkspace, 1
bind = $mod SHIFT, 2, movetoworkspace, 2
bind = $mod SHIFT, 3, movetoworkspace, 3
bind = $mod SHIFT, 4, movetoworkspace, 4
bind = $mod SHIFT, 5, movetoworkspace, 5
bind = $mod SHIFT, 6, movetoworkspace, 6
bind = $mod SHIFT, 7, movetoworkspace, 7
bind = $mod SHIFT, 8, movetoworkspace, 8
bind = $mod SHIFT, 9, movetoworkspace, 9
bind = $mod SHIFT, 0, movetoworkspace, 10

general {
  layout = hy3
  gaps_in = 8
  gaps_out = 5
}

decoration {
  rounding = 8

  # drop_shadow = true
  # shadow_range = 4
  # shadow_render_power = 3
  # col.shadow = rgba(a8cfee11)
}

animations {
  enabled = true

  bezier = myBezier, 0.05, 0.9, 0.1, 1.05

  animation = windows, 1, 3, myBezier
  animation = windowsOut, 1, 3, default, popin 80%
  animation = border, 1, 5, default
  animation = borderangle, 1, 4, default
  animation = fade, 1, 3, default
  animation = workspaces, 1, 3, default
}

plugin {
  hy3 {
    # disable gaps when only one window is onscreen
    # 0 - always show gaps
    # 1 - hide gaps with a single window onscreen
    # 2 - 1 but also show the window border
    no_gaps_when_only = 0 # default: 0

    # policy controlling what happens when a node is removed from a group,
    # leaving only a group
    # 0 = remove the nested group
    # 1 = keep the nested group
    # 2 = keep the nested group only if its parent is a tab group
    node_collapse_policy = 2 # default: 2

    # offset from group split direction when only one window is in a group
    group_inset = 0 # default: 10

    # if a tab group will automatically be created for the first window spawned in a workspace
    tab_first_window = false

    # tab group settings
    tabs {
      # height of the tab bar
      height =  20

      # padding between the tab bar and its focused node
      padding = 10

      # the tab bar should animate in/out from the top instead of below the window
      from_top = false

      # rounding of tab bar corners
      rounding = 4

      # render the window title on the bar
      render_text = true

      # center the window title
      text_center = true

      # font to render the window title with
      text_font = Fira Code

      # height of the window title
      text_height = 14
      
      # left padding of the window title
      text_padding = 4

      # active tab bar segment color
      # col.active = <color> # default: 0xff32b4ff

      # urgent tab bar segment color
      # col.urgent = <color> # default: 0xffff4f4f

      # inactive tab bar segment color
      # col.inactive = <color> # default: 0x80808080

      # active tab bar text color
      # col.text.active = <color> # default: 0xff000000

      # urgent tab bar text color
      # col.text.urgent = <color> # default: 0xff000000

      # inactive tab bar text color
      # col.text.inactive = <color> # default: 0xff000000
    }
  }
}
