monitor=HDMI-A-1,1920x1080@75,auto,auto

hide_on_fullscreen = true

$terminal = foot
$menu = rofi -show drun -config /home/coast/.config/rofi/config.rasi
$webBrowser = firefox-bin
$discordApp = vesktop-bin --proxy-server="socks5://127.0.0.1:65000"
$restartWaybar = pkill waybar; waybar&disown
$fileManager = pcmanfm

exec-once = hyprctl setcursor Adwaita 24 &
exec-once = wbg /home/coast/Pictures/walls/wallhaven-d83vjl_1920x1080.png &
exec-once = hypridle &
exec-once = hyprpm reload -n;
exec-once = dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=Hyprland
exec-once = gnome-keyring-daemon --start --components=secrets
exec-once = waybar &
exec-once = mpd ~/.mpdconf &
exec-once = mpc add /;

env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24

general {
    gaps_in = 5
    gaps_out = 15
    border_size = 2
    col.active_border = rgba(6c6c9dee) rgba(1e1e2eee) 45deg
    col.inactive_border = rgba(1e1e2eaa)
    resize_on_border = false
    allow_tearing = false
    layout = master
}

decoration {
    rounding = 10
    active_opacity = 1.0
    inactive_opacity = 1.0
    shadow {
        enabled = true
        range = 4
        render_power = 3
        color = rgba(1a1a1aee)
    }
    blur {
        enabled = true
        size = 3
        passes = 1
        vibrancy = 0.1696
        new_optimizations = true
    }
}

animations {
    enabled = yes
    bezier = shot, 0.2, 1, 0.3, 1
    bezier = swipe, 0.6, 0, 0.4, 1
    bezier = bounce, 0.1, 1.1, 0.3, 1
    animation = windows, 1, 3, bounce, popin 80%
    animation = windowsIn, 1, 3, bounce, popin 80%
    animation = windowsOut, 1, 2, shot, popin 80%
    animation = border, 1, 2, default
    animation = fade, 1, 2, default
    animation = layers, 1, 4, swipe, slide top
    animation = layersIn, 1, 4, swipe, slide top
    animation = layersOut, 1, 2, swipe, slide top
    animation = workspaces, 1, 3, swipe, slide
}

master {
    new_status = slave
}

misc {
    force_default_wallpaper = 0
    disable_hyprland_logo = true
}

input {
    kb_layout = us
    follow_mouse = 1
    sensitivity = 0
}

$mainMod = SUPER

bind = $mainMod, Return, exec, $terminal
bind = $mainMod, S, killactive,
bind = $mainMod, M, exec, killall eww; eww daemon && eww open bar
bind = $mainMod SHIFT, Q, exit
bind = $mainMod, Space, togglefloating
bind = $mainMod, Space, resizeactive, exact 1000 800
bind = $mainMod, Space, centerwindow
bind = $mainMod, R, exec, $menu

bind = $mainMod, H, movefocus, l
bind = $mainMod, L, movefocus, r
bind = $mainMod, K, movefocus, u
bind = $mainMod, J, movefocus, d

bind = $mainMod SHIFT, H, movewindow, l
bind = $mainMod SHIFT, L, movewindow, r
bind = $mainMod SHIFT, K, movewindow, u
bind = $mainMod SHIFT, J, movewindow, d

binde = $mainMod ALT, H, resizeactive, -30 0
binde = $mainMod ALT, L, resizeactive, 30 0
binde = $mainMod ALT, K, resizeactive, 0 -30
binde = $mainMod ALT, J, resizeactive, 0 30

binde = $mainMod, left, moveactive, -40 0
binde = $mainMod, right, moveactive, 40 0
binde = $mainMod, up, moveactive, 0 -40
binde = $mainMod, down, moveactive, 0 40

binde = $mainMod SHIFT, left, resizeactive, -40 0
binde = $mainMod SHIFT, right, resizeactive, 40 0
binde = $mainMod SHIFT, up, resizeactive, 0 -40
binde = $mainMod SHIFT, down, resizeactive, 0 40

bind = $mainMod, Backslash, centerwindow,

bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9

bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9

bind = $mainMod, C, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, exec, grim -g "$(slurp)" - | wl-copy

bind = $mainMod CONTROL, L, exec, hyprlock

bind = $mainMod SHIFT, B, exec, $webBrowser
bind = $mainMod SHIFT, V, exec, $discordApp
bind = $mainMod, F, exec, $fileManager

bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

bind = $mainMod SHIFT, P, exec, $restartWaybar

plugin {
    hyprbars {
        enabled = true

        bar_height = 25
        bar_color = rgba(1e1e2eaa)
        bar_blur = true

        bar_title_enabled = true
        bar_text_font = "JetBrainsMono Nerd Font"
        bar_text_size = 12
        bar_text_align = center
        col.text = rgba(ffffffdd)

        bar_buttons_alignment = left
        bar_padding = 10
        bar_button_padding = 6
        icon_on_hover = false

        hyprbars-button = rgb(ff5f57), 14, , hyprctl dispatch killactive
        hyprbars-button = rgb(febb2e), 14, , hyprctl dispatch togglefloating
        hyprbars-button = rgb(28c840), 14, , hyprctl dispatch fullscreen 1

        on_double_click = hyprctl dispatch fullscreen 1
    }

	hyprexpo {
		columns = 3 
		gap_size = 5 
		bg_col = rgba(1e1e2eaa)
		workspace_method = center current
		gesture_distance = 300
	}
}

bind = $mainMod, e, hyprexpo:expo, toggle

bind = $mainMod ALT, up, exec, /home/coast/.local/bin/mpc-shuf.sh shuf
bind = $mainMod ALT, down, exec, /home/coast/.local/bin/mpc-shuf.sh shufno
bind = $mainMod ALT, right, exec, /home/coast/.local/bin/mpc-shuf.sh next
bind = $mainMod ALT, left, exec, /home/coast/.local/bin/mpc-shuf.sh prev
bind = $mainMod SHIFT, R, exec, /home/coast/.local/bin/mpc-shuf.sh search
bind = $mainMod, slash, exec, /home/coast/.local/bin/mpc-shuf.sh info
bind = $mainMod, comma, exec, mpc volume -5
bind = $mainMod, period, exec, mpc volume +5
bind = $mainMod SHIFT, up, exec, mpc pause; notify-send "Paused: $(mpc current)"
bind = $mainMod SHIFT, down, exec, mpc play; notify-send "Unpaused: $(mpc current)"
bind = $mainMod CONTROL, up, exec, mpc stop; mpc add /; notify-send "Reset MPC!"

xwayland {
    enabled = true
}
