# You can split this configuration into multiple files
# Create your files separately and then link them to this file like this:
# source = ~/.config/hypr/myColors.conf


################
### MONITORS ###
################

# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,auto


###################
### MY PROGRAMS ###
###################

# See https://wiki.hyprland.org/Configuring/Keywords/

# Set programs that you use
$terminal = kitty

$Void = rgb(191919)
$void = rgba(19191966)
$Dark = rgb(222222)
$dark = rgba(22222266)
$Tone = rgb(66cccc)
$tone = rgba(66cccc66)
$Dimm = rgb(747369)
$dimm = rgba(74736966)
$Warm = rgb(c47848)
$warm = rgba(c4784866)


#############################
### ENVIRONMENT VARIABLES ###
#############################

# See https://wiki.hyprland.org/Configuring/Environment-variables/

env = XCURSOR_SIZE,12
env = HYPRCURSOR_SIZE,12


#####################
### LOOK AND FEEL ###
#####################

# Refer to https://wiki.hyprland.org/Configuring/Variables/

# https://wiki.hyprland.org/Configuring/Variables/#general
general {
    gaps_in = 0
    gaps_out = 0
    border_size = 0
    # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
    col.active_border = $dimm
    col.inactive_border = $void
    # Set to true enable resizing windows by clicking and dragging on borders and gaps
    resize_on_border = true
    # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
    allow_tearing = false
    layout = hy3
  # no_focus_fallback = true
}

# https://wiki.hyprland.org/Configuring/Variables/#decoration
decoration {

    rounding = 0
    # Change transparency of focused and unfocused windows
    active_opacity = 0.7
    inactive_opacity = 0.7

    dim_inactive = false
    dim_strength = 0.5

    shadow {
        enabled = true
        range = 9
        render_power = 4
        color = $void
    }

    # https://wiki.hyprland.org/Configuring/Variables/#blur
    blur {
        enabled = true
        special = true
        size = 1
        passes = 7
        vibrancy = 0.1696
    }

}

# https://wiki.hyprland.org/Configuring/Variables/#animations
animations {

    enabled = true
    # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
    animation = windows, 1, 0.7, default, gnomed
    animation = layers, 1, 1, linear, fade
    animation = fade, 1, 1, linear
    animation = border, 1, 1, linear
    animation = borderangle, 1, 1, linear
    animation = fade, 1, 1, linear
    animation = workspaces, 1, 1, linear, slide

}

# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle {
    pseudotile = true # Master switch for pseudotiling. Enabling is bound to sup + P in the keybinds section below
    preserve_split = true # You probably want this
}

# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
master {
    new_status = master
}

# https://wiki.hyprland.org/Configuring/Variables/#misc
misc {
    force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
    disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :(
    disable_splash_rendering = true
    font_family = Source Code Pro
    enable_swallow = true
    mouse_move_focuses_monitor = false
    middle_click_paste = false
    background_color = $dark
}


#############
### INPUT ###
#############

# https://wiki.hyprland.org/Configuring/Variables/#input
input {
    kb_layout = us
    kb_variant =
    kb_model =
    kb_options =
    kb_rules =

    repeat_rate = 90
    repeat_delay = 260

    natural_scroll = true

    follow_mouse = 2
    float_switch_override_focus = 0

    sensitivity = 0 # -1.0 - 1.0, 0 means no modification.

    touchpad {
        natural_scroll = true
    }
}

# https://wiki.hyprland.org/Configuring/Variables/#gestures
gestures {
    workspace_swipe = false
}

# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device {
    name = epic-mouse-v1
    sensitivity = -0.5
}


###############
### PLUGINS ###
###############

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 = <int> # 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 = <int> # default: 2

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

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

    # tab group settings
    tabs {

      # height of the tab bar
      height = 2

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

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

      # radius of tab bar corners
      radius = 0

      # render the window title on the bar
      render_text = false

      # center the window title
    # text_center = <bool> # default: true

      # font to render the window title with
    # text_font = <string> # default: Sans

      # height of the window title
    # text_height = <int> # default: 8

      # left padding of the window title
    # text_padding = <int> # default: 3

      # active tab bar segment colors
      col.active = $dimm
      col.border.active = $dimm
    # col.text.active = <color> # default: rgba(000000ff)

      # urgent tab bar segment colors
      col.urgent = $Warm
      col.border.urgent = $Warm
    # col.text.urgent = <color> # default: rgba(000000ff)

      # inactive tab bar segment colors
      col.inactive = rgba(00000000)
      col.border.inactive = rgba(00000000)
    # col.text.inactive = <color> # default: rgba(ffffffff)

      # if tab backgrounds should be blurred
      # Blur is only visible when the above colors are not opaque.
    # blur = <bool> # default: true

      # opacity multiplier for tabs
      # Applies to blur as well as the given colors.
    # opacity = <float> # default: 1.0

    }

    # autotiling settings
    autotile {
      # enable autotile
      enable = true

      # make autotile-created groups ephemeral
      ephemeral_groups = false

      # if a window would be squished smaller than this width, a vertical split will be created
      # -1 = never automatically split vertically
      # 0 = always automatically split vertically
      # <number> = pixel width to split at
    # trigger_width = <int> # default: 0

      # if a window would be squished smaller than this height, a horizontal split will be created
      # -1 = never automatically split horizontally
      # 0 = always automatically split horizontally
      # <number> = pixel height to split at
    # trigger_height = <int> # default: 0

      # a space or comma separated list of workspace ids where autotile should be enabled
      # it's possible to create an exception rule by prefixing the definition with "not:"
      # workspaces = 1,2 # autotiling will only be enabled on workspaces 1 and 2
      # workspaces = not:1,2 # autotiling will be enabled on all workspaces except 1 and 2
    # workspaces = <string> # default: all
    }
  }

}


###################
### KEYBINDINGS ###
###################

# See https://wiki.hyprland.org/Configuring/Keywords/
$super = SUPER # Sets "Windows" key as main modifier

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $super, RETURN, exec, $terminal
bind = $super SHIFT, Q, killactive,
bind = $super SHIFT, E, exec, bash -c 'echo -e "no\nyes" | tofi --prompt-text "exit hyprland? " | grep -qi yes && hyprctl dispatch exit'
bind = $super SHIFT, SPACE, togglefloating,
bind = $super, F, fullscreen,
bind = $super, D, exec, tofi-run | xargs hyprctl dispatch exec
bind = $super SHIFT, D, exec, tofi-drun | xargs -I {} sh -c '{}'
bind = $super SHIFT, P, pseudo, # dwindle
#bind = $super, E, togglesplit, # dwindle
bind = $super, TAB, exec, hyprctl clients -j | jq -r '.[] | "\(.address) \(.title)"' | tofi | cut -d' ' -f1 | xargs -I {} hyprctl dispatch focuswindow address:{}

bind = $super SHIFT, W, exec, sh -c 'if pgrep -x hyprpaper > /dev/null; then pkill hyprpaper; else hyprpaper & fi'

# Move focus
bind = $super, H, hy3:movefocus, l
bind = $super, H, alterzorder, top
bind = $super, L, hy3:movefocus, r
bind = $super, L, alterzorder, top
bind = $super, K, hy3:movefocus, u
bind = $super, K, alterzorder, top
bind = $super, J, hy3:movefocus, d
bind = $super, J, alterzorder, top

bind = $super, A, hy3:changefocus, raise
bind = $super, X, hy3:changefocus, lower

bind = $super, I, focuscurrentorlast
bind = $super, O, focusurgentorlast
bind = $super, SPACE, hy3:togglefocuslayer, nowarp

# Move focused window
#bind = $super SHIFT, H, hy3:movewindow, left
#bind = $super SHIFT, L, hy3:movewindow, right
#bind = $super SHIFT, K, hy3:movewindow, up
#bind = $super SHIFT, J, hy3:movewindow, down
#binde = $super, left, moveactive, -48 0
#binde = $super, right, moveactive, 48 0
#binde = $super, up, moveactive, 0 -48
#binde = $super, down, moveactive, 0 48
# PATCH FOR FLOATING WINDOWS UNDER HY3:
binde = $super SHIFT, H, exec, fish ~/.config/hypr/hy3patch.fish left
binde = $super SHIFT, L, exec, fish ~/.config/hypr/hy3patch.fish right
binde = $super SHIFT, K, exec, fish ~/.config/hypr/hy3patch.fish up
binde = $super SHIFT, J, exec, fish ~/.config/hypr/hy3patch.fish down

# Center focused window
bind = $super, C, centerwindow
bind = $super SHIFT, C, centerwindow
bind = $super SHIFT, S, pin

# # Groups
bind = $super, V, hy3:makegroup, tab
bind = $super, W, hy3:changegroup, toggletab
bind = $super, E, hy3:changegroup, opposite

# Example special workspace (scratchpad)
bind = $super, Z, togglespecialworkspace
bind = $super SHIFT, Z, movetoworkspace, special

# Resize
bind = $super, left, resizeactive, -96 0
bind = $super, right, resizeactive, 96 0
bind = $super, up, resizeactive, 0 96
bind = $super, down, resizeactive, 0 -96
bind = $super, left, moveactive, 48 0
bind = $super, right, moveactive, -48 0
bind = $super, up, moveactive, 0 -48
bind = $super, down, moveactive, 0 48

bind = $super SHIFT, left, resizeactive, -24 0
bind = $super SHIFT, right, resizeactive, 24 0
bind = $super SHIFT, up, resizeactive, 0 24
bind = $super SHIFT, down, resizeactive, 0 -24
bind = $super SHIFT, left, moveactive, 12 0
bind = $super SHIFT, right, moveactive, -12 0
bind = $super SHIFT, up, moveactive, 0 -12
bind = $super SHIFT, down, moveactive, 0 12

# Resize Mode
bind = $super, R, submap, resize
submap = resize
bind =, H, resizeactive, -96 0
bind =, L, resizeactive, 96 0
bind =, K, resizeactive, 0 96
bind =, J, resizeactive, 0 -96
bind =, H, moveactive, 48 0
bind =, L, moveactive, -48 0
bind =, K, moveactive, 0 -48
bind =, J, moveactive, 0 48
### Useful (change here if changed outside)
## Move focus
bind = $super, H, hy3:movefocus, l
bind = $super, H, alterzorder, top
bind = $super, L, hy3:movefocus, r
bind = $super, L, alterzorder, top
bind = $super, K, hy3:movefocus, u
bind = $super, K, alterzorder, top
bind = $super, J, hy3:movefocus, d
bind = $super, J, alterzorder, top
## Move focused window
binde = $super SHIFT, H, exec, fish ~/.config/hypr/hy3patch.fish left
binde = $super SHIFT, L, exec, fish ~/.config/hypr/hy3patch.fish right
binde = $super SHIFT, K, exec, fish ~/.config/hypr/hy3patch.fish up
binde = $super SHIFT, J, exec, fish ~/.config/hypr/hy3patch.fish down
bind = $super, C, centerwindow
###
bind =, escape, submap, reset
submap = reset

# Switch work spaces  with sup + [0-9]
bind = $super, 1, workspace, 1
bind = $super, 2, workspace, 2
bind = $super, 3, workspace, 3
bind = $super, 4, workspace, 4
bind = $super, 5, workspace, 5
bind = $super, 6, workspace, 6
bind = $super, 7, workspace, 7
bind = $super, 8, workspace, 8
bind = $super, 9, workspace, 9
bind = $super, 0, workspace, 10

# Move active window to a workspace with sup + SHIFT + [0-9]
bind = $super SHIFT, 1, movetoworkspace, 1
bind = $super SHIFT, 2, movetoworkspace, 2
bind = $super SHIFT, 3, movetoworkspace, 3
bind = $super SHIFT, 4, movetoworkspace, 4
bind = $super SHIFT, 5, movetoworkspace, 5
bind = $super SHIFT, 6, movetoworkspace, 6
bind = $super SHIFT, 7, movetoworkspace, 7
bind = $super SHIFT, 8, movetoworkspace, 8
bind = $super SHIFT, 9, movetoworkspace, 9
bind = $super SHIFT, 0, movetoworkspace, 10

# Scroll through existing workspaces with sup + scroll
bind = $super, N, workspace, e+1
bind = $super, P, workspace, e-1

bind = $super SHIFT, N, movetoworkspace, e+1
bind = $super SHIFT, P, movetoworkspace, e-1

# Move/resize windows with sup + LMB/RMB and dragging
bindm = $super, mouse:272, movewindow
bindm = $super, mouse:273, resizewindow

# Laptop multimedia keys for volume and LCD brightness
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ --limit=1
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%-

# Requires playerctl
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous

# Toggle Gaps
bind = $super SHIFT, G, exec, hyprctl keyword general:gaps_in 6
bind = $super SHIFT, G, exec, hyprctl keyword general:gaps_out 12
bind = $super SHIFT, G, exec, hyprctl keyword general:border_size 1

bind = $super, G, exec, hyprctl keyword general:gaps_in 0
bind = $super, G, exec, hyprctl keyword general:gaps_out 0
bind = $super, G, exec, hyprctl keyword general:border_size 0

# Toggle bar
bind = $super, B, exec, pkill -SIGUSR1 waybar || waybar


##############################
### WINDOWS AND WORKSPACES ###
##############################

cursor {
 # enable_hyprcursor = false
   hide_on_key_press = true
   no_warps = true
}


##############################
### WINDOWS AND WORKSPACES ###
##############################

# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules

# Example windowrule v1
# windowrule = float, ^(kitty)$

# rules

# make focused window opaque
windowrulev2 = opaque, focus:1

# shadow on floating only
windowrulev2 = noshadow, floating:0

# Make pinned windows opaque
windowrulev2 = opaque, floating:1, pinned:1
windowrulev2 = pseudo, floating:1, pinned:1
windowrulev2 = bordercolor $tone $Tone 30deg, floating:1, pinned:1

# Special wokspace window border
windowrulev2 = bordercolor $dimm $tone 30deg, onworkspace: s[true]


# Ignore maximize requests from apps. You'll probably like this.
windowrulev2 = suppressevent maximize, class:.*

# Float by default
windowrulev2 = float, class:^(kitty)$
windowrulev2 = float, class:^(Sxiv)$
windowrulev2 = float, class:^(Nsxiv)$
windowrulev2 = float, class:^(vlc)$
windowrulev2 = float, class:^(mpv)$

# Inhibit idle
windowrulev2 = idleinhibit, class:^(vlc)$
windowrulev2 = idleinhibit, class:^(mpv)$

# Default terminal size
windowrulev2 = size 828 420, class:^(kitty)$, title:^(kitty)$

# Fix some dragging issues with XWayland
windowrulev2 = nofocus, class:^$, title:^$, xwayland:1, floating:1, fullscreen:0, pinned:0


# screenshot

bind = $super, S, exec, grim -g "$(slurp -w 0)"


# dismiss notification
bind = $super, Escape, exec, makoctl dismiss -g
bind = $super SHIFT, Escape, exec, hyprlock


# exec

exec-once = hyprpm reload -n

exec-once = pipewire

exec-once = hyprpaper
exec-once = hypridle
exec-once = waybar

exec-once = wlsunset -l 41.1 -L -8.4
#exec-once = gammastep -l 41.1:-8.4 -t 6500:2500

# this
exec-once = ~/this