# Mouse binds
bindm=SUPER,mouse:272,movewindow
bindm=SUPER,mouse:273,resizewindow

# Basic keybinds
bind=SUPER,Q,killactive,
bind=SUPERCTRL,R,exec, pkill waybar || waybar
bind=SUPERCTRL,M,exit
bind=SUPER,A,exec, hyprctl dispatch togglefloating && hyprctl dispatch centerwindow 1
bind=SUPER,P,pseudo
bind=SUPER,F,fullscreen,0
bind=SUPER,Z,exec,pypr zoom

## Applications
bind=SUPER,W,exec,~/.config/hypr/scripts/custom_app_launch librewolf
bind=SUPER,O,exec,~/.config/hypr/scripts/custom_app_launch obsidian
bind=SUPERSHIFT,O,exec,~/.config/hypr/scripts/custom_app_launch office
bind=SUPERSHIFT,E,exec, ~/.config/hypr/scripts/custom_app_launch nemo
bind=SUPER,RETURN,exec,kitty
bind=SUPERSHIFT,RETURN,exec,~/.config/hypr/scripts/custom_app_launch kitty
bind=SUPER,BackSpace,exec,~/.config/hypr/scripts/custom_app_launch nvim
bind=SUPERSHIFT,BackSpace,exec,~/.config/hypr/scripts/custom_app_launch neovide

# Launchers
bind=SUPER, 23, exec, rofi -show drun -theme ~/.config/rofi/style.rasi # tab

# Scratchpads
bind=SUPER,V,exec,pypr toggle volume
bind=SUPER, 51, exec, pypr toggle terminal && hyprctl dispatch bringactivetotop ## Backslash
bind=SUPER, B, exec, pypr toggle btop && hyprctl dispatch bringactivetotop
bind=SUPERSHIFT, G, exec, pypr toggle gpt && hyprctl dispatch bringactivetotop
bind=SUPERSHIFT, B, exec, pypr toggle bluetooth && hyprctl dispatch bringactivetotop
# bind=SUPERSHIFT, S, exec, pypr toggle localsend && hyprctl dispatch bringactivetotop
bind=SUPER,E,exec,pypr toggle yazi && hyprctl dispatch bringactivetotop
bind=SUPER,D,exec,pypr toggle dots && hyprctl dispatch bringactivetotop

# Screenshotting
bind=SHIFT,Insert,exec, hyprshot -m output -o ~/Imagenes/Capturas/PC -f captura-$(date +'%Y-%m-%d-%s').png
bind=SUPERSHIFT,Insert,exec, hyprshot -m window -o ~/Imagenes/Capturas/PC -f captura-$(date +'%Y-%m-%d-%s').png
bind=CTRL,Insert,exec, hyprshot -m region -o ~/Imagenes/Capturas/PC -f captura-$(date +'%Y-%m-%d-%s').png
bind=ALT,Insert,exec, ~/.config/hypr/scripts/rofi/screenshots_selection

# Clipboard
bind=SUPER,y,exec, cliphist list | rofi -dmenu -theme ~/.config/rofi/style.rasi | cliphist decode | wl-copy

# Logout menu
bind=SUPER, escape, exec, wleave

# Color picker
bind=SUPER,Insert,exec, ~/.config/hypr/scripts/color_picker

# Wallpaper
bind=SUPERSHIFT,w,exec, ~/.config/hypr/scripts/wallpaper select
bind=SUPERCTRL,w,exec, ~/.config/hypr/scripts/wallpaper random

# Keybindings Cheatsheet
bind=SUPER,i,exec, ~/.config/hypr/scripts/rofi/keybindings

# Recording
bind=SUPERSHIFT,r,exec, ~/.config/hypr/scripts/rofi/recording

## Windows
## Focusing on windows
bind=SUPER,left,movefocus,l
bind=SUPER,right,movefocus,r
bind=SUPER,up,movefocus,u
bind=SUPER,down,movefocus,d
# Vim-keybinds
bind=SUPER,h,movefocus,l
bind=SUPER,l,movefocus,r
bind=SUPER,k,movefocus,u
bind=SUPER,j,movefocus,d

## Moving windows
bind=SUPERSHIFT,left,movewindow,l
bind=SUPERSHIFT,right,movewindow,r
bind=SUPERSHIFT,up,movewindow,u
bind=SUPERSHIFT,down,movewindow,d
# Vim-keybinds
bind=SUPERSHIFT,h,movewindow,l
bind=SUPERSHIFT,l,movewindow,r
bind=SUPERSHIFT,k,movewindow,u
bind=SUPERSHIFT,j,movewindow,d

## Workspaces
# Focusing other workspaces
bind=SUPER,1,exec,hyprsome workspace 1
bind=SUPER,2,exec,hyprsome workspace 2
bind=SUPER,3,exec,hyprsome workspace 3
bind=SUPER,4,exec,hyprsome workspace 4
bind=SUPER,5,exec,hyprsome workspace 5
bind=SUPER,6,exec,hyprsome workspace 6
bind=SUPER,7,exec,hyprsome workspace 7
bind=SUPER,8,exec,hyprsome workspace 8
bind=SUPER,9,exec,hyprsome workspace 9
bind=SUPER,0,exec,hyprsome workspace 10

# Moving windows to other workspaces
bind=SUPERSHIFT,1,exec,hyprsome move 1
bind=SUPERSHIFT,2,exec,hyprsome move 2
bind=SUPERSHIFT,3,exec,hyprsome move 3
bind=SUPERSHIFT,4,exec,hyprsome move 4
bind=SUPERSHIFT,5,exec,hyprsome move 5
bind=SUPERSHIFT,6,exec,hyprsome move 6
bind=SUPERSHIFT,7,exec,hyprsome move 7
bind=SUPERSHIFT,8,exec,hyprsome move 8
bind=SUPERSHIFT,9,exec,hyprsome move 9
bind=SUPERSHIFT,0,exec,hyprsome move 10

# Moving windows to other workspaces (silent)
bind=SUPERALT,1,exec,hyprsome movetoworkspacesilent 1
bind=SUPERALT,2,exec,hyprsome movetoworkspacesilent 2
bind=SUPERALT,3,exec,hyprsome movetoworkspacesilent 3
bind=SUPERALT,4,exec,hyprsome movetoworkspacesilent 4
bind=SUPERALT,5,exec,hyprsome movetoworkspacesilent 5
bind=SUPERALT,6,exec,hyprsome movetoworkspacesilent 6
bind=SUPERALT,7,exec,hyprsome movetoworkspacesilent 7
bind=SUPERALT,8,exec,hyprsome movetoworkspacesilent 8
bind=SUPERALT,9,exec,hyprsome movetoworkspacesilent 9
bind=SUPERALT,0,exec,hyprsome movetoworkspacesilent 10

# Moving to other wokspace with mouse control
bind=SUPER,mouse_down,workspace,m-1
bind=SUPER,mouse_up,workspace,m+1

# Moving to other wokspace with keyboard
bind=SUPERCTRL,LEFT,workspace,m-1
bind=SUPERCTRL,RIGHT,workspace,m+1

bind=SUPERCTRL,h,workspace,m-1
bind=SUPERCTRL,l,workspace,m+1

# Center a window
bind=SUPER,c,exec,hyprctl dispatch centerwindow 1

# Group control
bind=SUPERSHIFT,51,exec,pypr expose
bind=SUPERSHIFT,48,togglespecialworkspace, minimized
bind=SUPER,48,exec,pypr toggle_minimized
bind=SUPER,S, togglesplit
bind=SUPER,G,togglegroup
bind=ALT,tab,changegroupactive

# Submap for resizing windows
bind=SUPER,R,submap,resize
submap=resize

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

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

bind=,escape,submap,reset 

submap=reset

## Audio
bind=SUPERCTRL,V,exec,restartAudio
#bind=,XF86AudioPlay,exec,playerctl play-pause
bindl=SUPERCTRL,mouse:274,exec,playerctl play-pause
#bind=,XF86AudioPrev,exec,playerctl previous
bindl=SUPERCTRL,mouse_up,exec,playerctl previous
#bind=,XF86AudioNext,exec,playerctl next
bindl=SUPERCTRL,mouse_down,exec,playerctl next

bindl=,XF86AudioMedia,exec,playerctl play-pause
bindl=,XF86AudioStop,exec,playerctl stop

bindle=,XF86AudioRaiseVolume,exec,swayosd --output-volume raise
bindle=,XF86AudioLowerVolume,exec,swayosd --output-volume lower

bindle=,XF86AudioMute,exec,swayosd --output-volume mute-toggle
bindle=,XF86AudioMicMute,exec,exec swayosd --input-volume mute-toggle


# Disable anim, blur, etc
bind=SUPER,F1,exec,~/.config/hypr/scripts/performance
