
#AUTOGENERATED HYPR CONFIG.
#PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT,
#OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.


#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#
# remove this line to remove the warning (super+m exit; super q kitty)

# See https://wiki.hyprland.org/Configuring/Monitors/
#monitor=DP-2,2560x1440@144,0x0,1 #,bitdepth,10
monitor=DP-3,2560x1440@144,0x0,1 
monitor=DP-2,1680x1050@59,-1680x0,1
#1.333333
#monitor=HDMI-A-1, 1920x1080@60,2560x0,1
#windowrulev2 = stayfocused,class:(VencordDesktop),title:(Discord)
#xwayland {
#  force_zero_scaling = true }

# toolkit-specific scale
env = GDK_SCALE,1.5
env = XCURSOR_SIZE,32
#windowrulev2 = float,class:(rofi),title:(rofi)
#exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
#exec-once = obsidian
#exec-once = element-desktop-nightly
# Execute your favorite apps at launch
#exec-once = blueman-tray
#exec-once=signal-desktop
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
exec-once=kdeconnectd
# Some default env vars.
env = XCURSOR_SIZE,24

# For all categories, see https://wiki.hyprlan##d.org/Configuring/Variables/
input {
    kb_layout = us
    kb_variant =
    kb_model =
    kb_options = compose:caps
    kb_rules =

    follow_mouse = 1
    #mouse_refocus = false

    touchpad {
        natural_scroll = no
    }

    sensitivity = -0.5 # -1.0 - 1.0, 0 means no modification.
    #sensitivity = -1 
}

general {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    gaps_workspaces = 0
    gaps_in = 8
    gaps_out = 8
    border_size = 2
    col.active_border = rgba(a6da95ee) rgba(b7bdf8ee) 45deg
    col.inactive_border = rgba(595959aa)

    layout = dwindle
}

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

    rounding = 12
#    blur_enabled = true
#    blur_size = 3
#    blur_passes = 1
    # blur_new_optimizations = on

    #drop_shadow = yes
    #shadow_range = 4
    #shadow_render_power = 3
    #col.shadow = rgba(1a1a1aee)
}

animations {
    enabled = yes

    # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

    bezier = myBezier, 0.05, 0.9, 0.1, 1.05

    animation = windows, 1, 7, myBezier
    animation = windowsOut, 1, 7, default, popin 80%
    animation = border, 1, 10, default
    animation = borderangle, 1, 8, default
    animation = fade, 1, 7, default
    animation = workspaces, 1, 6, default
}

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

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

gestures {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    workspace_swipe = true
}

# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
#device:epic-mouse-v1 {
#    sensitivity = -0.5
#}
exec-once = wl-paste --type text --watch cliphist store # Stores only text data

exec-once = wl-paste --type image --watch cliphist store # Stores only image dbus-update-activation-environment


# Example windowrule v1
#windowrule = pseudo, ^(kitty)$
#windowrule = maxsize 400 100, ^(kitty)$
# Example windowrule v2
#windowrule = float,^(rofi)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more


# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER

exec-once = systemctl --user start hyprpolkitagent
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, kitty
bind = $mainMod, C, killactive, 
bind = $mainMod, N, exec, hyprlock
bind = $mainMod, E, exec, nautilus
bind = $mainMod, V, togglefloating, 
bind = $mainMod, R, exec, rofi -show drun #$HOME/.config/rofi/bin/{launcher,runner,powermenu,screenshot}
bind = $mainMod SHIFT, R, exec, ../waybar/scripts/refresh.sh
#bind = $mainMod, S, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
#bind = $mainMod, L, exec, zsh $HOME/.config/rofi/bin/{powermenu}
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, W, exec, pavucontrol 
bind = $mainMod, O, togglesplit, # dwindle
bind = $mainMod, F, exec, zen-browser 

# 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
bind = $mainMod, A, fullscreen
# 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

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

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

#bind = $mainMod, S, exec, grim -g "$(slurp -o)" $(xdg-user-dir PICTURES)/Screenshots/$(date +'%s_grim.png')
bind = $mainMod SHIFT, S, exec, IMG=~/Pictures/$(date +%Y-%m-%d_%H-%m-%s).png && grim -g "$(slurp)" $IMG && wl-copy < $IMG 
#bind = $mainMod ALT, S, exec, grim $(xdg-user-dir PICTURES)/Screenshots/$(date +'%s_grim.png')
#own editing
#exec-once=swww init

#notification
exec-once=swaync
# Example volume button that allows press and hold, volume limited to 150%
binde = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
binde = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_SINK@ toggle
# Example volume button that will activate even while an input inhibitor is active
bindl = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
#status bar
exec-once=waybar
exec-once= eww open bar --screen 0 --id primary
exec-once= eww open bar --screen 1 --id secondary
#wlan idk
exec-once=systemctl --user start sunshine
exec-once=nm-applet
exec-once=heroic
#exec-once=syncthing
exec-once=openrgb
#authentication client
exec-once=/usr/lib/polkit-kde-authentication-agent-1
# change monitor to hires, the last argument is the scale factor
#monitor=,highres,auto,2
exec-once=swww-daemon
#exec-once=swww img /home/glala/Pictures/background/1345131.jpeg
# sets xwayland scale
#exec-once=xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2

# toolkit-speciific scale
#env = GDK_SCALE,2
#env = XCURSOR_SIZE,32
#exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP

#exec-once=mpvpaper -s -p -o "no-audio --loop-playlist shuffle" '*' ~/Downloads/frieren-sitting-on-the-water-moewalls-com.mp4
#exec-once=swww init
#exec-once=mpvpaper -s -p -o "no-audio --loop-playlist" '*' Downloads/Just\ The\ Two\ Of\ Us\(4K\ wallpaper\ version）.mp4
#exec-once=mpvpaper -vs -o "no-audio loop" DP-3 Videos/random/makima-from-chainsaw-man.3840x2160.mp4
#exec-once=mpvpaper -vs -o "no-audio loop" HDMI-A-1 Videos/random/makima-from-chainsaw-man.3840x2160.mp4
#exec-once=otd
#exec-once=GDK_BACKEDND=x11 dragon-drop

#screenshare
windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$
windowrulev2 = noanim,class:^(xwaylandvideobridge)$
windowrulev2 = nofocus,class:^(xwaylandvideobridge)$
windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$

env = GTK_THEME,Adwaita:dark
#env = QT_QPA_PLATFORMTHEME=qt5ct 

#env = XDG_CURRENT_DESKTOP=Hyprland
#env = XDG_SESSION_TYPE=wayland 
#env = XDG_SESSION_DESKTOP=Hyprland
#exec-once=export GTK_THEME=Adwaita:dark


# will switch to a submap called resize
bind= $mainMod ,T,submap,resize

# will start a submap called "resize"
submap=resize

# sets repeatable binds for resizing the active window
binde=,right,resizeactive,10 0
binde=,left,resizeactive,-10 0
binde=,up,resizeactive,0 -10
binde=,down,resizeactive,0 10

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

binde=,l,resizeactive,10 0
binde=,h,resizeactive,-10 0
binde=,j,resizeactive,0 -10
binde=,k,resizeactive,0 10

binde=SHIFT,l,resizeactive,40 0
binde=SHIFT,h,resizeactive,-40 0
binde=SHIFT,j,resizeactive,0 -40
binde=SHIFT,k,resizeactive,0 40

# use reset to go back to the global submap
bind=,Q,submap,reset 

# will reset the submap, which will return to the global submap
submap=reset
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
# keybinds further down will be global again...
