hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
19.71k stars 837 forks source link

idk how to center floating window #3562

Closed daUnknownCoder closed 11 months ago

daUnknownCoder commented 11 months ago

Hyprland Version

Hyprland, built from branch main at commit 90c03e5bd2204ba6d1a0167c68f65b7a9231bef4 dirty (master: layout resize makes the wrong size changes (3064)). Tag: v0.28.0-89-g90c03e5b flags: (if any)

Bug or Regression?

Bug

Description

eh i cant center the float

How to reproduce

current config:

# See https://wiki.hyprland.org/Configuring/Monitors/
monitor= ,preferred,auto,auto
# See https://wiki.hyprland.org/Configuring/Keywords/ for more

# Execute your favorite apps at launch
exec-once = hyprpaper
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf

# Some default env vars.
env = XCURSOR_SIZE,24

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

    follow_mouse = 1

    touchpad {
        natural_scroll = no
    }

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

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

    gaps_in = 5
    gaps_out = 20
    border_size = 2
    col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
    col.inactive_border = rgba(595959aa)

    layout = dwindle
}

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

    rounding = 10
    blur {
        enabled = true
        size = 3
        passes = 1
    }

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

animations {

  enabled = yes
  bezier = wind, 0.05, 0.9, 0.1, 1.05
  bezier = winIn, 0.1, 1.1, 0.1, 1.1
  bezier = winOut, 0.3, -0.3, 0, 1
  bezier = liner, 1, 1, 1, 1
  animation = windows, 1, 6, wind, slide
  animation = windowsIn, 1, 6, winIn, slide
  animation = windowsOut, 1, 5, winOut, slide
  animation = windowsMove, 1, 5, wind, slide
  animation = border, 1, 1, liner
  animation = borderangle, 1, 30, liner, loop
  animation = fade, 1, 10, default
  animation = workspaces, 1, 10, wind

}

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 = off
}

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

# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more

# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
$mainMod2 = ALT
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, return, exec, kitty
bind = $mainMod, G, exec, waterfox-g
bind = $mainMod, C, killactive,
bind = $mainMod, E, exec, kitty -e xplr
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, ~/.config/rofi/scripts/launcher_t1
bind = $mainMod, code:9, exec, ~/.config/rofi/scripts/powermenu_t1
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, L, exec, swaylock -f -i ~/Pictures/1cl5vpT.jpeg -k -l --scaling=fill
bind = $mainMod, TAB, bringactivetotop
bind = $mainMod, M, exit,
# Move focus with mainMod + arrow keys
binde = $mainMod, left, movefocus, l
binde = $mainMod, right, movefocus, r
binde = $mainMod, up, movefocus, u
binde = $mainMod, down, movefocus, d

# Move windows with mainMod2 + arrow keys
binde = $mainMod2, left, movewindow, l
binde = $mainMod2, right, movewindow, r
binde = $mainMod2, up, movewindow, u
binde = $mainMod2, down, movewindow, d
# 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, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

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

# Resizing windows
binde = SUPERSHIFT, right, resizeactive, 10 0
binde = SUPERSHIFT, left, resizeactive, -10 0
binde = SUPERSHIFT, up, resizeactive, 0 -10
binde = SUPERSHIFT, down, resizeactive, 0 10

# Screenshot with hyprshot
bind = SHIFT, code:107, exec, hyprshot -m window
bind = , code:107, exec, hyprshot -m region

Crash reports, logs, images, videos

2023-10-13-182159_hyprshot

MightyPlaza commented 11 months ago

1- not an issue 2- read the wiki https://wiki.hyprland.org/Configuring/Dispatchers/#list-of-dispatchers, you can do it via window rules or dispatcher 3- you're on a very old Hyprland version, you probably want to update

daUnknownCoder commented 10 months ago

3- you're on a very old Hyprland version, you probably want to update

ah sorry 2023-10-26-220415_hyprshot