################
### MONITORS ###
################
monitor=DP-1,1920x1080@144,auto,auto


###################
### MY PROGRAMS ###
###################
$terminal = kitty
$fileManager = yazi
$menu = rofi -show run
$browser = app.zen_browser.zen 
$taskManager = btop
$colorpicker = hyprpicker


#################
### AUTOSTART ###
#################
exec-once = hyprctl setcursor "Banana" 40
exec = gsettings set org.gnome.desktop.interface cursor-theme "Banana"
exec = gsettings set org.gnome.desktop.interface cursor-size 40
exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store
exec-once = hyprpaper & waybar
exec-once = hypridle
exec-once = [workspace 1] $browser 
exec-once = [workspace 2] $terminal 



#############################
### Windows Rules ###
#############################
# windowrule = opacity 1 override 1 override 1.0 override, class:Code
#windowrule = opacity 1 override 1 override 1.0 override, class:zen 
windowrulev2 = workspace 1, class:zen
windowrulev2 = workspace 1, class:firefox-bin
windowrulev2 = workspace 1, class:obsidian
windowrulev2 = workspace 3, class:Code
windowrulev2 = workspace 4, class:Docker Desktop
windowrulev2 = workspace 4, class:GitKraken


#############################
### ENVIRONMENT VARIABLES ###
#############################
env = XCURSOR_SIZE,8
env = HYPRCURSOR_SIZE,8


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

general {
    gaps_in = 3
    gaps_out = 6

    border_size = 2

    col.active_border = rgb(8aadf4) rgb(24273A) rgb(24273A) rgb(8aadf4) 45deg
    col.inactive_border = rgb(24273A) rgb(24273A) rgb(24273A) rgb(27273A) 45deg

    resize_on_border = true
    extend_border_grab_area = 30
    hover_icon_on_border = true
    resize_corner = 5
    allow_tearing = false


    layout = dwindle
}

decoration {
    dim_special = 0.2
    rounding = 6
    #rounding = 20

    active_opacity = 1
    inactive_opacity = 1
    shadow {
        enabled = true
        # range = 3
        # render_power = 1
    }

    blur {
        enabled = true
        size = 2
        passes = 4
        new_optimizations = true
        vibrancy = 0.1000
        ignore_opacity = true
    }

}


animations {
    enabled = true

    # bezier = easeOutBack, 0.34, 1.56, 0.64, 1
#     bezier = sideDown, 0.3, 1, 0.7, 1


#     # animation = windowsIn, 1, 2.5, easeOutBack, popin 90%
#     bezier = easeOutQuint, 0.23, 1, 0.32, 1
#     bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1
#     bezier = linear, 0, 0, 1, 1
#     bezier = almostLinear, 0.5, 0.5, 0.75, 1.0
#     bezier = quick, 0.15, 0, 0.1, 1

# #     # General window animations
#     animation = windowsIn, 1, 2.5, easeOutQuint, slide
#     animation = windowsOut, 1, 2.5,sideDown, slide
#     animation = windows, 1, 5.0, easeOutQuint

# #     # Fade animations
#     animation = fadeIn, 1, 2.0, almostLinear
#     animation = fadeOut, 1, 1.8, almostLinear
#     animation = fade, 1, 2.8, quick

# #     # Layer animations
#     animation = layers, 1, 3.2, easeOutQuint
#     animation = layersIn, 1, 3.6, easeOutQuint, fade
#     animation = layersOut, 1, 2.0, easeInOutCubic, fade
#     animation = fadeLayersIn, 1, 1.7, almostLinear
#     animation = fadeLayersOut, 1, 1.4, almostLinear

# #     # Workspace animations
#     animation = workspaces, 1, 2.0, easeInOutCubic, slide
#     animation = workspacesIn, 1, 3.0, easeInOutCubic, slide
#     animation = workspacesOut, 1, 3.0, easeInOutCubic, slide

    bezier = wind, 0.05, 0.9, 0.1, 1.05
    bezier = winIn, 0.1, 1.1, 0.1, 1.1
    bezier = winOut, 0.3, -0.3, 0, 1
    bezier = liner, 1, 1, 1, 1
    animation = windows, 1, 6, wind, slide
    animation = windowsIn, 1, 6, winIn, slide
    animation = windowsOut, 1, 5, winOut, slide
    animation = windowsMove, 1, 5, wind, slide
    animation = border, 1, 1, liner
    animation = borderangle, 1, 300, liner
    animation = fade, 1, 10, default
    animation = workspaces, 1, 5, wind
}

dwindle {
    pseudotile = true
    preserve_split = true
}

master {
    new_status = inherit
    new_on_top = true
    new_on_active = true
    smart_resizing = true
}

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

input {
    kb_layout = us
    kb_variant =
    kb_model =
    kb_options =
    kb_rules =

    follow_mouse = 1

    sensitivity = -0.1

    touchpad {
        disable_while_typing = true
        natural_scroll = true
    }
     force_no_accel = 0
}

gestures {
    workspace_swipe = true
}

device {
    name = epic-mouse-v1
    sensitivity = -0.5
}



xwayland {
  force_zero_scaling = true
}

misc {
    force_default_wallpaper = -1
    disable_hyprland_logo = true
    disable_splash_rendering  = false
}

####################
### KEYBINDINGSS ###
####################
binds {
    workspace_back_and_forth = true
    allow_workspace_cycles = true
}

$mainMod = SUPER
bind = $mainMod, T, exec, $terminal
bind = $mainMod ,B, exec, $browser
bind = $mainMod, W, killactive
bind = $mainMod, V, togglefloating
bind = $mainMod, F, fullscreen, 1
bind = $mainMod, G, fullscreen, 0
bind = $mainMod, O, exec, obsidian /home/arcadian/Obsidian/ \Vault Notes.canvas
bind = $mainMod_Shift, O,exec, obsidian
bind = $mainMod_Shift, T, exec, [float; size 1000 500] $terminal

$key = tab
$mod = super


#Yazi File Manager
bind = $mainMod, E, exec, $terminal $fileManager
#Rofi Powermenu
bind = $mainMod, P, exec, ~/.config/rofi/powermenu/powermenu.sh
#Rofi Launcher
bind = $mainMod, Space, exec, ~/.config/rofi/launcher/launcher.sh


#Grim & Slurp  for Screenshot
bind = $mainMod_Shift, S, exec, slurp | grim -g - /tmp/photo && wl-copy < /tmp/photo && notify-send -w 'Screenshot' 'Screenshot Copied to Clipboard' -i /tmp/photo
bind = Alt+Shift, S, exec, grim -g "$(slurp)" $HOME/Pictures/Screenshot/$(date +'%m-%d-%H-%M-%S').png && notify-send 'Screenshot Saved' -i $HOME/Pictures/Screenshot/$(date +'%m-%d-%H-%M-%S').png

bind = Alt+Shift, W, exec, pkill -9 waybar ||  waybar &

#Task Manager
bind = Ctrl_Shift, Tab, exec, $terminal $taskManager

#ColorPicker
bind = $mainMod, C, exec, $colorpicker -a

bind = $mainMod, I, exec, ~/.config/waybar/scripts/change-wallpaper.sh && hyprpaper
bind = $mainMod, M, exec, ~/.config/rofi/clipboard/launcher.sh


#Volume Control
binde = , xf86audioraisevolume, exec, pamixer -i 2 && ~/.local/bin/volume.sh
binde = , xf86audiolowervolume, exec, pamixer -d 2 && ~/.local/bin/volume.sh
binde = , xf86AudioMute, exec, pamixer -t && dunstify -i ~/.config/dunst/assets/$(pamixer --get-mute | grep -q "true" && echo "volume-mute.svg" || echo "volume.svg") -t 500 -r 2593 "Toggle Mute"


#Player Control
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
bindl = , XF86AudioNext, exec, playerctl next


#Brightness Control
binde = , XF86MonBrightnessDown,exec,brightnessctl set 2%- &&  ~/.local/bin/brightness.sh
binde = , XF86MonBrightnessUp,exec,brightnessctl set +2% && ~/.local/bin/brightness.sh

bind = $mainMod_Shift, l, exec, hyprlock

bind = Alt, Tab , cyclenext
bind = $mainMod, Tab, bringactivetotop,
bind = Alt Shift, Tab, cyclenext, prev

# bind = $mainMod, Tab, workspace, e-2
bind = $mainMod, A, exec,bash  ~/.config/rofi/wifi/wifi.sh
#bind = $mainMod, S, exec,bash ~/.config/rofi/search/search.sh



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

# Switch workspaces with mainMod + [0-9]
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, 0, workspace, 10

# Move active window to a workspace with mainMod + SHIFT + [0-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 SHIFT, 0, movetoworkspace, 10


# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, E, movetoworkspace, special:magic

# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

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