Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyprbars bar_precedence_over_border = true causes border flickering/lack of focus #222

Open
1 task done
Candyhands opened this issue Sep 15, 2024 · 4 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@Candyhands
Copy link

Already reported ? *

  • I have searched the existing open and closed issues.

Regression?

No

System Info and Version

System/Version info
<Hyprland, built from branch  at commit 0f594732b063a90d44df8c5d402d658f27471dfe  (props: bump version to 0.43.0).
Date: Sun Sep 8 16:48:21 2024
Tag: v0.43.0, commits: 5196

flags: (if any)


System Information:
System name: Linux
Node name: arch
Release: 6.10.10-zen1-1-zen
Version: #1 ZEN SMP PREEMPT_DYNAMIC Thu, 12 Sep 2024 17:17:51 +0000


GPU information: 
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX/7900M] [1002:744c] (rev cc) (prog-if 00 [VGA controller])


os-release: NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo


plugins:
  hyprbars by Vaxry ver 1.0
  
################
### MONITORS ###
################



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

monitor=DP-1,[email protected],0x0,1
monitor=HDMI-A-1,1920x1080@60Hz,2560x0,1,transform,3


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

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



# Set programs that you use
$terminal = kitty
$fileManager = thunar
$menu = wofi --show drun
$OBS = flatpak run com.obsproject.Studio


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

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

# exec-once = $terminal
# exec-once = nm-applet &
# exec-once = waybar & hyprpaper & firefox
#polkit launch
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & hyprpaper & waybar & hyprpm reload -n
exec-once = /usr/lib/xdg-desktop-portal-hyprland
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once=/usr/bin/easyeffects --gapplication-service

#################
### CLIPBOARD ###
#################

exec-once = clipse -listen # run listener on startup

windowrulev2 = float,class:(clipse) # ensure you have a floating window class set if you want this behavior
windowrulev2 = size 622 652,class:(clipse) # set the size of the window as necessary

bind = CONTROL SUPER, SUPER_L, exec, kitty --class clipse -e 'clipse'
#bindr = SUPER CONTROL,Super_L, exec, kitty
#bindr = CONTROL SUPER,Super_L, exec, kitty

# Example: bind = SUPER, V, exec, alacritty --class clipse -e 'clipse'

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

# See https://wiki.hyprland.org/Configuring/Environment-variables/

env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24


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

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

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

    border_size = 5

    # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
    col.active_border = rgba(000080ff) rgba(000080ff)
    col.inactive_border = rgba(595959aa) rgba(595959aa)

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

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

    layout = dwindle
}

# https://wiki.hyprland.org/Configuring/Variables/#decoration
decoration {
    rounding = 0

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

    drop_shadow = false
    shadow_range = 8
    shadow_render_power = 3
    col.shadow = rgba(00008080)
    col.shadow_inactive = rgba(c0c0c0c0)
    # https://wiki.hyprland.org/Configuring/Variables/#blur
    blur {
        enabled = false
        size = 3
        passes = 1

        vibrancy = 0.1696
    }
}

# https://wiki.hyprland.org/Configuring/Variables/#animations
animations {
    enabled = false

    # 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
}

# 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 = 0 # 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 = us
    kb_variant =
    kb_model =
    kb_options =
    kb_rules =

    follow_mouse = 2

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

    touchpad {
        natural_scroll = false
    }
}

# https://wiki.hyprland.org/Configuring/Variables/#gestures
gestures {
    workspace_swipe = false
}

# 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
}


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

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

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
#bind = $mainMod, Q, exec, $terminal
bind = SHIFT ALT, ALT_L, exec, kitty
bind = $control, Q, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, T, exec, $fileManager
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, F, exec, pgrep firefox && hyprctl dispatch focuswindow firefox || firefox
bind = $mainMod, D, exec, pgrep Discord && hyprctl dispatch focuswindow discord || discord --enable-features=UseOzonePlatform --ozone-platform=wayland  LIBVA_DRIVER_NAME=i915 discord --ignore-gpu-blocklist --disable-features=UseOzonePlatform --enable-features=VaapiVideoDecoder --use-gl=desktop --enable-gpu-rasterization --enable-zero-copy
bind = $mainMod, M, exit,
bind = $mainMod, F11, exec, $terminal--enable-features=UseOzonePlatform --ozone-platform=wayland
bind = $mainMod, E, exec, [workspace 5 silent] MusicBeeLaunch.sh
bind = $mainMod, S, exec, [workspace 3 silent] gamescope -W 2560 -H 1440 -r 170 -e -- steam
bind = $mainMod, 1, exec, telegram-desktop
bind = $mainMod,P,fullscreen
bind = $mainMod, G, exec, gimp
bindr = SUPER, SUPER_L, exec, wofi -m -I --show drun
bindr = SHIFT SUPER, SUPER_L, exec, kate
bind= $mainMod, Q, exec, $OBS
bind = ,Print, exec,  grimblast copysave area

# 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

#Move window on screen
bind = control, left, movewindow, l
bind = control, right, movewindow, r
bind = control, up, movewindow, u
bind = control, down, movewindow, d

# Switch workspaces with mainMod + [0-9]
bind = control, insert, workspace, 1
bind = control, home, workspace, 2
bind = control, page_up, workspace, 3
bind = control, delete, workspace, 4
bind = control, end, workspace, 5
bind = control, page_down, workspace, 6
bind = $alt, 5, workspace, 5
bind = $alt, 6, workspace, 6
bind = $alt, 7, workspace, 7
bind = $alt, 8, workspace, 8
bind = $alt, 9, workspace, 9
bind = $alt, 0, workspace, 10

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod, insert, movetoworkspace, 1
bind = $mainMod, home, movetoworkspace, 2
bind = $mainMod, page_up, movetoworkspace, 3
bind = $mainMod, delete, movetoworkspace, 4
bind = $mainMod, end, movetoworkspace, 5
bind = $mainMod, page_down, movetoworkspace, 6
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



# Example special workspace (scratchpad)
bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic

# 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 = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

#Global Keybinds

bind = ,insert,pass,^(com\.obsproject\.Studio)$
bind = ,f8,pass,^(explorer.exe)$
bind = ,f7,pass,^(explorer.exe)$
bind = ,f9,pass,^(explorer.exe)$


##############################
### 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 v1
# windowrule = float, ^(kitty)$

# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$

windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
windowrulev2 = workspace 3, class:^(steam)$
windowrulev2 = workspace 5, title:^(MusicBee)$
windowrulev2 = stayfocused, title:^()$,class:^(steam)$
windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$
windowrulev2 = workspace 2, title:^(Telegram)$
windowrulev2 = workspace 2, title:^(Discord)$
windowrule = noblur,gamescope
windowrule = fullscreen,gamescope

workspace = 1, monitor:DP-1
workspace = 2, monitor:HDMI-A-1
workspace = 3, monitor:DP-1
workspace = 4, monitor:HDMI-A-1
workspace = 5, monitor:DP-1

######PLUGINS



plugin {
    hyprbars {
        # example config
        bar_height = 25
        bar_title_enabled = true
        # example buttons (R -> L)
        # hyprbars-button = color, size, on-click
        #font
        bar_text_font = Noto Sans
        col.text = rgb(000000)
        bar_color = rgb(c0c0c0)
        bar_part_of_window = true
        bar_precedence_over_border = true

    }
}



>

Description

When bar_precedence_over_border = true in Hyprbars and a border is set, quite often the border starts to flicker like it's trying to find focus. It is usually present in two windows, with the active window and most recent inactive window flickering between the active and inactive border color at the top.

How to reproduce

Enable Hyprbars plugin, set 'bar_precedence_over_border = true', and have a border for the windows set in hyprland.conf

Crash reports, logs, images, videos

This video shows Firefox as the active window, and Thunar as the most recent inactive window. The flickering is present in these two windows

2024-09-15.15-50-30.mp4
@Candyhands Candyhands added the bug Something isn't working label Sep 15, 2024
@vaxerski
Copy link
Member

wrong repo

@vaxerski vaxerski transferred this issue from hyprwm/Hyprland Sep 16, 2024
@Candyhands
Copy link
Author

wrong repo

Crap, I could have sworn I put it in the plugin repo. My bad.

@n1yn
Copy link

n1yn commented Dec 5, 2024

I have this exact same issue too. Does anyone have a hint about what the cause is? I'd try to fix it then but don't want to invest too much time as I have a lot to do besides coding

@vaxerski
Copy link
Member

vaxerski commented Dec 7, 2024

dunno, probably some geometry is wrong somewhere, flickering is damage, focus is ... focus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants