#
#fix the fucking portal
exec-once=systemctl --user import-environment
exec-once=dbus-update-activation-environment --all
#

env = PATH,/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:$HOME/.local/bin:$HOME/.cargo/bin:$PATH

monitor=eDP-1,1920x1080@144,0x0,1
monitor=,highres,1920x0,1
input {
    kb_file=/home/dashie/.config/keymap.xkb #us with dead_diaeresis on shift + ' to get ä ö ü
    repeat_delay=200
    repeat_rate=35
    natural_scroll=false
    follow_mouse=1
    force_no_accel=true
    
    touchpad {
        natural_scroll=yes
	      tap-to-click=yes
    }
}

general {
    sensitivity=1.0 # for mouse cursor

    gaps_in=5
    gaps_out=10
    border_size=3
    col.active_border=0xFFFF0000 0xFF00FF00 0xFF0000FF 60deg
    col.inactive_border=0x66333333

    apply_sens_to_raw=0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse)

}

decoration {
    rounding=10
}

animations {
    enabled=1
    animation=windowsMove,1,5,default
    animation=windows,1,5,default
    animation=border,1,10,default
    animation=fade,1,10,default
    animation=workspaces,1,3,default
}

dwindle {
    preserve_split=true
    pseudotile=0 # enable pseudotiling on dwindle
}

gestures {
    workspace_swipe=yes
}

misc {
    vfr=true
    vrr=1
    animate_manual_resizes=true
    animate_mouse_windowdragging=false
    enable_swallow=true
    swallow_regex=^(.*)(kitty)(.*)$
  }

# debug {
#     overlay=true
#   }

#reserve place for bar
#monitor=eDP-1,addreserved,45,0,0,0

# example window rules
# for windows named/classed as abc and xyz
windowrule=opacity 80,^(.*)(dunst)(.*)$
windowrule=float,^(.*)(OxiCalc)(.*)$
windowrule=float,^(.*)(copyq)(.*)$
windowrule=dimaround,^(.*)(onagre)(.*)$
windowrule=noborder,^(.*)(onagre)(.*)$
#windowrule=tile,xyz
#windowrule=float,abc
#windowrule=pseudo,abc
#windowrule=monitor 0,xyz

# example binds
bind=SUPER,S,exec,grim -g "$(slurp)" - | wl-copy
bind=SUPER,F,exec,firefox
bind=SUPER,T,exec,kitty
bind=SUPER,Q,killactive,
bind=SUPERALTSHIFT,M,exit,
bind=SUPERSHIFT,M,exec,oxidash --css /home/dashie/gits/OxiDash/style.css
bind=SUPER,E,exec,nautilus --new-window
bind=SUPER,V,togglefloating,
# bind=SUPER,R,exec,rofi -show drun -theme tokyonight
# bind=SUPERSHIFT,R,exec,rofi -show run -theme tokyonight
bind=SUPER,R,exec,anyrun
bind=SUPER,C,togglesplit
bind=SUPER,B,fullscreen
bind=SUPER,G,exec, oxicalc
bind=SUPERSHIFT,equal,exec, hyprdock --gui
bind=SUPERSHIFT,L,exec, playerctl --all-players -a pause & swaylock -c 000000 & systemctl suspend 
bind=,XF86AudioMute,exec, $HOME/.config/eww/scripts/toggle-mute
bind=,XF86AudioLowerVolume,exec, $HOME/.config/eww/scripts/change-volume sink -5%
bind=,XF86AudioRaiseVolume,exec, $HOME/.config/eww/scripts/change-volume sink +5%
bind=,XF86AudioPlay,exec, playerctl --player=ncspot,firefox play-pause
bind=,XF86AudioNext,exec, playerctl --player=ncspot,firefox next
bind=,XF86AudioPrev,exec, playerctl --player=ncspot,firefox previous
bind=,XF86MonBrightnessDown,exec, $HOME/.config/eww/scripts/change-brightness brightness 10%-
bind=,XF86MonBrightnessUp,exec, $HOME/.config/eww/scripts/change-brightness brightness +10%
bind=SUPERSHIFT,S,exec, grim -g "$(slurp)" - | swappy -f -
bind=SUPERSHIFTALT,S,exec, grim -g "$(slurp)" $HOME/gits/ost-4semester/Screenshots/$(date +'%Y_%m_%d_%I_%M_%S.png') && (date +'%Y_%m_%d_%I_%M_%S.png') | wl-copy
bind=SUPER,D,exec, oxishut --css /home/dashie/gits/OxiShut/style.css
bind=,Print,exec, grim - | wl-copy
bind=SUPER,A,exec,copyq toggle
bind=SUPERSHIFT,Y,exec, $HOME/.config/eww/scripts/monitor.sh extend 
bind=SUPERSHIFT,H,exec, $HOME/.config/eww/scripts/monitor.sh mirror 
bind=SUPERSHIFT,P,exec,hyprpicker | wl-copy


# bind=SUPERALT,H,pass,^(wlroots)$
# bind=SUPERALT,left,pass,^(wlroots)$
# bind=SUPERALT,right,pass,^(wlroots)$
# bind=SUPERALT,up,pass,^(wlroots)$
# bind=SUPERALT,down,pass,^(wlroots)$

bind=SUPER,J,movefocus,l
bind=SUPER,semicolon,movefocus,r
bind=SUPER,L,movefocus,u
bind=SUPER,K,movefocus,d

binde=SUPER,U,resizeactive,-20 0
binde=SUPER,P,resizeactive,20 0
binde=SUPER,O,resizeactive,0 -20
binde=SUPER,I,resizeactive,0 20

bind=SUPER,left,movewindow,l
bind=SUPER,right,movewindow,r
bind=SUPER,up,movewindow,u
bind=SUPER,down,movewindow,d

# bind=SUPERALT,left,movecursortocorner,2
# bind=SUPERALT,left,exec, hyprctl dispatch movewindow && hyprctl dispatch moveactive -1000 300 && sleep 0.5 && hyprctl dispatch togglefloating 

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

bind=SUPERSHIFT,1,movetoworkspace,1
bind=SUPERSHIFT,2,movetoworkspace,2
bind=SUPERSHIFT,3,movetoworkspace,3
bind=SUPERSHIFT,4,movetoworkspace,4
bind=SUPERSHIFT,5,movetoworkspace,5
bind=SUPERSHIFT,6,movetoworkspace,6
bind=SUPERSHIFT,7,movetoworkspace,7
bind=SUPERSHIFT,8,movetoworkspace,8
bind=SUPERSHIFT,9,movetoworkspace,9
bind=SUPERSHIFT,0,movetoworkspace,10

bind=SUPERSHIFTALT,1,movetoworkspacesilent,1
bind=SUPERSHIFTALT,2,movetoworkspacesilent,2
bind=SUPERSHIFTALT,3,movetoworkspacesilent,3
bind=SUPERSHIFTALT,4,movetoworkspacesilent,4
bind=SUPERSHIFTALT,5,movetoworkspacesilent,5
bind=SUPERSHIFTALT,6,movetoworkspacesilent,6
bind=SUPERSHIFTALT,7,movetoworkspacesilent,7
bind=SUPERSHIFTALT,8,movetoworkspacesilent,8
bind=SUPERSHIFTALT,9,movetoworkspacesilent,9
bind=SUPERSHIFTALT,0,movetoworkspacesilent,10

bind=SUPER,mouse_down,workspace,e+1
bind=SUPER,mouse_up,workspace,e-1
bindm=SUPER,mouse:272,movewindow
bindm=SUPER,mouse:273,resizewindow

#autostart programs
exec-once=hyprpaper
exec-once=nheko
exec-once=firefox
exec-once=nextcloud
exec-once=kitty ncspot
exec-once=oxinoti --css /home/dashie/gits/oxinoti/style.css
exec-once = copyq --start-server
exec-once = hyprdock server
exec-once=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once=ironbar
