####################################
### USE WEV TO GET THE KEYS CODE ###
####################################

####################
### KEYBINDINGSS ###
####################

$terminal = kitty
$fileManager = dolphin
$menu = wofi --show drun

# MainMod
$mainMod = SUPER # "Windows" key

# exec
bind = $mainMod, Q, exec, $terminal
bind = $mainMod, C, killactive,
bind = $mainMod, comma, exit,
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, R, exec, $menu
bind = $mainMod, W, exec, wlogout
bind = $mainMod, A, exec, qutebrowser
bind = $mainMod, F, fullscreen
bind = $mainMod, T, togglefloating

# Quick
bind = ,XF86AudioMute, exec, obsidian 
bind = ,XF86AudioRaiseVolume, exec, virt-manager
bind = ,XF86AudioLowerVolume, exec, virt-manager

# Reload waybar
bind = $mainMod SHIFT, B, exec, killall waybar && waybar &

# Hide waybar
bind = $mainMod, X, exec, killall waybar || waybar &

# Clipboard history
bind = $mainMod, V, exec, cliphist list | wofi -dmenu | cliphist decode | wl-copy 

# Screenshot to clipboard
bind = $mainMod SHIFT, S, exec, grim -g "$(slurp -d)" - | wl-copy

# 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

# Resize Windows
bind = SUPER CTRL, h, resizeactive, -20 0
bind = SUPER CTRL, l, resizeactive, 20 0
bind = SUPER CTRL, k, resizeactive, 0 -20
bind = SUPER CTRL, j, resizeactive, 0 20

# Set default workspace
workspace=DP-1,1
workspace=DP-2,11

# Set workspaces
workspace=1,monitor:DP-1
workspace=2,monitor:DP-1
workspace=3,monitor:DP-1
workspace=4,monitor:DP-1
workspace=5,monitor:DP-1
workspace=6,monitor:DP-1
workspace=7,monitor:DP-1
workspace=8,monitor:DP-1
workspace=9,monitor:DP-1
workspace=10,monitor:DP-1

workspace=11,monitor:DP-2
workspace=12,monitor:DP-2
workspace=13,monitor:DP-2
workspace=14,monitor:DP-2

# Switch workspaces with mainMod + [0-9]
bind = $mainMod, ampersand 	, workspace, 1
bind = $mainMod, eacute    	, workspace, 2
bind = $mainMod, quotedbl  	, workspace, 3
bind = $mainMod, apostrophe	, workspace, 4
bind = $mainMod, parenleft 	, workspace, 5
bind = $mainMod, minus     	, workspace, 6
bind = $mainMod, egrave    	, workspace, 7
bind = $mainMod, underscore	, workspace, 8
bind = $mainMod, ccedilla  	, workspace, 9
bind = $mainMod, agrave         , workspace, 10
bind = $mainMod, dead_circumflex, workspace, 11
bind = $mainMod, dollar		, workspace, 12
bind = $mainMod, ugrave		, workspace, 13
bind = $mainMod, asterisk	, workspace, 14

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, ampersand      , movetoworkspace, 1
bind = $mainMod SHIFT, eacute         , movetoworkspace, 2
bind = $mainMod SHIFT, quotedbl       , movetoworkspace, 3
bind = $mainMod SHIFT, apostrophe     , movetoworkspace, 4
bind = $mainMod SHIFT, parenleft      , movetoworkspace, 5
bind = $mainMod SHIFT, minus          , movetoworkspace, 6
bind = $mainMod SHIFT, egrave         , movetoworkspace, 7
bind = $mainMod SHIFT, underscore     , movetoworkspace, 8
bind = $mainMod SHIFT, ccedilla       , movetoworkspace, 9
bind = $mainMod SHIFT, agrave         , movetoworkspace, 10
bind = $mainMod SHIFT, dead_circumflex, movetoworkspace, 11
bind = $mainMod SHIFT, dollar         , movetoworkspace, 12
bind = $mainMod SHIFT, ugrave	        , movetoworkspace, 13
bind = $mainMod SHIFT, asterisk	      , movetoworkspace, 14

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