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

# This is an example Hyprland config file.
# Refer to the wiki for more information.
# https://wiki.hyprland.org/Configuring/

# Please note not all available settings / options are set here.
# For a full list, see the wiki

# You can split this configuration into multiple files
# Create your files separately and then link them to this file like this:
# source = ~/.config/hypr/myColors.conf

	
################
### ALT TAB  ###
################
#bind = SUPER, TAB, cyclenext
#bind = SUPER, TAB, bringactivetotop
#bind = SUPER, TAB, exec, dms ipc call hypr toggleOverview
bind = SUPER, TAB, exec, hyprswitch gui --mod-key super_l --key tab --close mod-key-release --sort-recent --filter-current-monitor

################
### MONITORS ###
################

# See https://wiki.hyprland.org/Configuring/Monitors/
# Auto-generated by raveos-monitor-setup or manually configured
source = ./monitors.conf
source = ./workspaces.conf

# Example workspace assignments (customize for your setup):
#workspace=1, monitor:DP-1, persistent:1
#workspace=2, monitor:DP-1, persistent:1
#workspace=3, monitor:DP-1, persistent:1
#workspace=4, monitor:DP-1, persistent:1
#workspace=5, monitor:DP-1, persistent:1
#workspace=6, monitor:DP-2, persistent:1
#workspace=7, monitor:DP-2, persistent:1
#workspace=8, monitor:DP-2, persistent:1
#workspace=9, monitor:HDMI-A-1, persistent:1
#workspace=10, monitor:HDMI-A-1, persistent:1



###################
### MY PROGRAMS ###
###################

# See https://wiki.hyprland.org/Configuring/Keywords/

# Set programs that you use
$terminal = kitty
$fileManager = Thunar


#################
### AUTOSTART ###
#################

# Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this:

exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = dbus-update-activation-environment --systemd --all
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = corectrl
exec-once = input-remapper-control --command autoload --preset uk
exec-once = hyprswitch init --show-title --size-factor 6 --workspaces-per-row 5 &

#exec-once = systemctl --user start hyprpolkitagent


#############################
### ENVIRONMENT VARIABLES ###
#############################

# See https://wiki.hyprland.org/Configuring/Environment-variables/
exec-once = gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
exec-once = bash -c "wl-paste --watch cliphist store &"
exec-once = dms run
exec-once = sleep 1 && /usr/lib/pam_kwallet_init
exec-once = /usr/lib/mate-polkit/polkit-mate-authentication-agent-1
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = dbus-update-activation-environment --systemd --all
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP


# Theme

env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24

env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = XDG_MENU_PREFIX,arch-

env = GDK_BACKEND,wayland
env = QT_QPA_PLATFORM,wayland
env = QT_QPA_PLATFORMTHEME,qt6ct
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = QT_STYLE_OVERRIDE,kvantum
env = SSH_AUTH_SOCK,$XDG_RUNTIME_DIR/ssh-agent.socket

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

# Refer to https://wiki.hyprland.org/Configuring/Variables/

# https://wiki.hyprland.org/Configuring/Variables/#general
general {
    gaps_in = 5
    gaps_out = 2

    border_size = 0

    # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
    col.active_border = rgba(4f23b5cc) rgba(b57123fc) 45deg
    col.inactive_border = rgba(595959aa)

    # Set to true enable resizing windows by clicking and dragging on borders and gaps
    resize_on_border = true

    # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
    allow_tearing = false

    layout = dwindle
}

# https://wiki.hyprland.org/Configuring/Variables/#decoration
decoration {
    rounding = 11
    rounding_power = 3


    # Change transparency of focused and unfocused windows
    active_opacity = 1.0
    inactive_opacity = 1.0

    shadow {
        enabled = false
        range = 4
        render_power = 3
        color = rgba(1a1a1aee)
    }

    # https://wiki.hyprland.org/Configuring/Variables/#blur
    blur {
        enabled = true
        size = 3
        passes = 1


        vibrancy = 0.1696
    }
}

# https://wiki.hyprland.org/Configuring/Variables/#animations
animations {
    enabled = yes, please :)

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

    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

    animation = global, 1, 10, default
    animation = border, 1, 5.39, easeOutQuint
    animation = windows, 1, 4.79, easeOutQuint
    animation = windowsIn, 1, 4.1, easeOutQuint, popin 87%
    animation = windowsOut, 1, 1.49, linear, popin 87%
    animation = fadeIn, 1, 1.73, almostLinear
    animation = fadeOut, 1, 1.46, almostLinear
    animation = fade, 1, 3.03, quick
    animation = layers, 1, 3.81, easeOutQuint
    animation = layersIn, 1, 4, easeOutQuint, fade
    animation = layersOut, 1, 1.5, linear, fade
    animation = fadeLayersIn, 1, 1.79, almostLinear
    animation = fadeLayersOut, 1, 1.39, almostLinear
    animation = workspaces, 1, 1.94, almostLinear, fade
    animation = workspacesIn, 1, 1.21, almostLinear, fade
    animation = workspacesOut, 1, 1.94, almostLinear, fade
}

# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/
# "Smart gaps" / "No gaps when only"
# uncomment all if you wish to use that.
# workspace = w[tv1], gapsout:0, gapsin:0
# workspace = f[1], gapsout:0, gapsin:0
# windowrule = bordersize 0, floating:0, onworkspace:w[tv1]
# windowrule = rounding 0, floating:0, onworkspace:w[tv1]
# windowrule = bordersize 0, floating:0, onworkspace:f[1]
# windowrule = rounding 0, floating:0, onworkspace:f[1]

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

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

# https://wiki.hyprland.org/Configuring/Variables/#misc
misc {
    force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
    disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :(
}


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

# https://wiki.hyprland.org/Configuring/Variables/#input
input {
    kb_layout = gb
    kb_variant = mac
    kb_model =
    kb_options =
    kb_rules = 

    follow_mouse = 1

    sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
    numlock_by_default = true
    accel_profile = flat
    
    touchpad {
        natural_scroll = false
    }
}

cursor {
	no_warps = true
}

# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device {
    name = epic-mouse-v1
    sensitivity = -0.5
}


###################
### KEYBINDINGS ###
###################

# See https://wiki.hyprland.org/Configuring/Keywords/
$mainMod = SUPER # Sets "Windows" key as main modifier
$key = tab

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more

# My binds

bind = ALT ,mouse:274, fullscreen
#	bind = SUPER_L, Tab, exec, hypr-alttab
bind = CTRL_ALT, D, exec, $HOME/Documents/discord.sh
bind = CTRL_ALT, G, exec, gedit
bind = CTRL_ALT, P, exec, pavucontrol
bind = CTRL_SUPER, KP_End, exec, reboot
bind = CTRL_SUPER, KP_Next, exec, poweroff
bind = CTRL, KP_Next, exec, $HOME/Documents/mute.sh
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod, S, movetoworkspace, +0
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod, S, movetoworkspace, special:magic
bind = $mainMod, S, togglespecialworkspace, magic
bind = CTRL_ALT, T, exec, $terminal
bind = CTRL_ALT, F, exec, freetube
bind = $mainMod, Q, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, nautilus
bind = $mainMod, V, togglefloating,
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle


# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d

# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, exec, Thunar
bind = $mainMod, 2, exec, librewolf
bind = $mainMod, 3, exec, vivaldi
bind = Ctrl Shift, KP_End, workspace, 1
bind = Ctrl Shift, KP_Down, workspace, 2
bind = Ctrl Shift, KP_Next, workspace, 3
bind = Ctrl Shift, KP_Left, workspace, 4
bind = Ctrl Shift, KP_Begin, workspace, 5
bind = Ctrl Shift, KP_Right, workspace, 6
bind = Ctrl Shift, KP_Home, workspace, 7
bind = Ctrl Shift, KP_Up, workspace, 8
bind = Ctrl Shift, KP_Prior, workspace, 9
bind = Ctrl Shift, KP_Insert, workspace, 10

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, KP_End, movetoworkspace, 1
bind = $mainMod SHIFT, KP_Down, movetoworkspace, 2
bind = $mainMod SHIFT, KP_Next, movetoworkspace, 3
bind = $mainMod SHIFT, KP_Left, movetoworkspace, 4
bind = $mainMod SHIFT, KP_Begin, movetoworkspace, 5
bind = $mainMod SHIFT, KP_Right, movetoworkspace, 6
bind = $mainMod SHIFT, KP_Home, movetoworkspace, 7
bind = $mainMod SHIFT, KP_Up, movetoworkspace, 8
bind = $mainMod SHIFT, KP_Prior, movetoworkspace, 9
bind = $mainMod SHIFT, KP_Insert, movetoworkspace, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

# Shell Binds

bind = SUPER, SUPER_L, exec, dms ipc call spotlight toggle
bind = $mainMod, V, exec, dms ipc call clipboard toggle
#bind = $mainMod, M, exec, dms ipc call processlist toggle
bind = $mainMod, comma, exec, dms ipc call settings toggle
bind = $mainMod, N, exec, dms ipc call notifications toggle
bind = $mainMod SHIFT, N, exec, dms ipc call notepad toggle
bind = $mainMod, Y, exec, dms ipc call dankdash wallpaper
#bind = $mainMod, TAB, exec, dms ipc call hypr toggleOverview
bind = SUPER, Return, exec, kitty

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

# Laptop multimedia keys for volume and LCD brightness
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%-

# Requires playerctl
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous

##############################
### WINDOWS AND WORKSPACES ###
##############################

# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules

# Example windowrule
windowrule {
  name = windowrule-1
  float = on
  match:class = .*
}

windowrule {
  name = windowrule-2
  size = 1000 1000
  match:class = org.pulseaudio.pavucontrol
}

windowrule {
  name = windowrule-3
  size = 640 700
  match:title = GST
}

windowrule {
  name = windowrule-4
  size = 1900 1060
  workspace = 2
  match:title = ^(.*OBS.*)$
  workspace = 6
}

windowrule {
  name = windowrule-5
  fullscreen = on
  match:class = ^steam_app\d+$
}

windowrule {
  name = windowrule-6
  workspace = 1
  match:class = ^steam_app_\d+$
}

windowrule {
  name = windowrule-7
  size = 1000 777
  match:title = ^(.*Properties for*.)$
}

windowrule {
  name = windowrule-8
  size = 1000 1000
  match:class = org.gnome.gedit
}

windowrule {
  name = windowrule-10
  size = 444 444
  match:title = Preferences
}

windowrule {
  name = windowrule-11
  size = 2560 1403
  move = (0) (37)
  match:title = FreeTube
  workspace = 5
}

windowrule {
  name = windowrule-12
  size = 1222 777
  match:title = rave - Thunar
}

windowrule {
  name = windowrule-13
  size = 444 111
  match:title = File Operation Progress
}

windowrule {
  name = windowrule-14
  size = 520 600
  move = (0) (541)
  match:class = vivaldi-kick.com__rpslair_popout_activity-feed-Default
  workspace = 9
}

windowrule {
  name = windowrule-15
  size = 520 600
  move = (0) (0)
  match:class = vivaldi-streamlabs.com__dashboard_recent-events-Default
  workspace = 9
}

windowrule {
  name = windowrule-16
  size = 1408 623
  move = (510) (0)
  match:class = vivaldi-www.twitch.tv__popout_ravepriest1_chat-Default
  workspace = 9
}

windowrule {
  name = windowrule-17
  size = 1920 1080
  move = (0) (0)
  match:class = discord
  workspace = 7
}

windowrule {
  name = windowrule-18
  size = 515 565
  move = (769) (0)
  match:class = virt-manager
  workspace = 8
}

windowrule {
  name = windowrule-19
  size = 768 480
  move = (0) (0)
  match:class = audacious
  workspace = 8
}

windowrule {
  name = windowrule-20
  size = 1413 685
  move = (510) (450)
  match:class = vivaldi-kick.com__popout_rpslair_chat-Default
  workspace = 9
}

windowrule {
  name = windowrule-21
  size = 1920 1080
  move = (0) (0)
  match:class = vivaldi-stable
  workspace = 10
}

windowrule {
  name = windowrule-22
  size = 1920 1080
  move = (0) (0)
  match:class = firejail
  workspace = 7
}

windowrule {
  name = windowrule-23
  size = 1272 789
  move = (645) (290)
  match:title = JKBMS on QEMU/KVM
  workspace = 8
}

# Ignore maximize requests from apps. You'll probably like this.
#windowrule = suppressevent maximize, class:.*

# Fix some dragging issues with XWayland
#windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0

layerrule = match:class ^(quickshell)$, no_anim on

###############
### PLUGINS ###
###############




source = ./dms/cursor.conf
source = ./dms/layout.conf
source = ./dms/windowrules.conf
