qtile / qtile

:cookie: A full-featured, hackable tiling window manager written and configured in Python (X11 + Wayland)
http://qtile.org
MIT License
4.81k stars 699 forks source link

Unmaximising a window using ```lazy.window.toggle_maximize()``` causes window to glitch through its borders (and go to bottom of stack) #4838

Closed theshatterstone closed 5 months ago

theshatterstone commented 5 months ago

Issue description

Issue Description: When a window is un-maximised (using lazy.window.toggle_maximize() ), it will either:

Relevant Information: Setup: Qtile Wayland with Qtile-extras (both 0.26.0) on Fedora 40 (AMD CPU & GPU if relevant)

Note: The config should be irrelevant for the most part but I have included it just in case. If you need any more information or clarifications, please let me know.

Version

0.26.0

Backend

Wayland (experimental)

Config

import os
import re
import socket
import subprocess
from libqtile import qtile
from libqtile.config import Click, Drag, Group, KeyChord, Key, Match, Screen
#from libqtile.command import lazy
from libqtile import layout, bar, hook
from libqtile import widget
#from libqtile.widget import StatusNotifier
from libqtile import config
from libqtile.layout import  base
from libqtile.lazy import lazy
from libqtile.utils import guess_terminal
from typing import List  # noqa: F401
from libqtile.backend.wayland import InputConfig

from qtile_extras import widget
from qtile_extras.widget.decorations import BorderDecoration
from qtile_extras.widget.decorations import PowerLineDecoration

import os
os.environ["XCURSOR_SIZE"] = "24"
os.environ["XDG_CURRENT_DESKTOP"] = "qtile"

home = os.path.expanduser('~') # defining home directory for the hardware configs   

if qtile.core.name == "x11":
    #browser = "vivaldi"
    myTerm = "kitty"
    runlauncher = "rofi -show run -display-run ' Run: '"
    bgchange = "feh --bg-fill --randomize "+home+"/wallpapers"
    drun = "rofi -show drun -display-drun ' Desktop: '"
    #os.environ["MOZ_ENABLE_WAYLAND"] = "0"
    browser = "firefox"
    #scrot = "xfce4-screenshooter"
    full_screenshot = "xfce4-screenshooter"
    screenshot = "xfce4-screenshooter"
    log_out = home + "/.local/bin/logout-script"
    lockscreen = "dm-logout"
    #fileman = "thunar"
elif qtile.core.name == "wayland":
     #browser = "vivaldi --enable-features=UseOzonePlatform --ozone-platform=wayland"
     #browser = "flatpak run com.vivaldi.Vivaldi --enable-features=UseOzonePlatform --ozone-platform=wayland"
     myTerm = "foot"
     runlauncher = home + "/.local/bin/my-bemenu -r"
     #runlauncher = " bemenu-run --hb '#467b96' --hf '#dfdfdf' --tb '#467b96' --tf '#dfdfdf' -H 20 --fn 'Hack' -p 'Run:' "
     bgchange = "setrandom "+home+"/wallpapers"
     #  drun = "wofi --show drun"
     drun = home + "/.local/bin/my-bemenu -d"
     #drun = "j4-dmenu-desktop --dmenu=\"bemenu --hb '#467b96' --hf '#dfdfdf' --tb '#467b96' --tf '#dfdfdf' -H 20 --fn 'Hack' -p 'Desktop:' -i -w --fork\" --term=kitty --usage-log=/home/shatterstone/.local/share/j4-dmenu-desktop.log --no-generic"
     lockscreen = "swaylock -f -i ~/wallpapers/4.jpg --effect-blur 10x5 --clock --indicator"
     os.environ["MOZ_ENABLE_WAYLAND"] = "1"
     browser = "floorp-ablaze"
     #browser = "floorp"
     #browser = "firefox-wayland"
     #browser = "firefox"
     full_screenshot = "grimshot save output"
     screenshot = "grimshot save area"
     log_out = home + "/.local/bin/logout-script"
     #fileman = "thunar"
mod = "mod4"              # Sets mod key to SUPER/WINDOWS

#myTerm = "kitty"
music = myTerm + " -e cmus"
#browser = "qutebrowser"
#fileman = myTerm + " -e ranger" #either pcmanfm or "kitty -e ranger"
fileman = "thunar" #either pcmanfm or "kitty -e ranger"
#bgchange = "feh --bg-fill --randomize /home/shatterstone/wallpapers"
logout = "dm-logout -d" #either archlinux-logout or "dm-logout -r"
browser = "flatpak run one.ablaze.floorp"

keys = [
         ### The essentials
         Key([mod], "Return",
             lazy.spawn(myTerm),
             desc='Launches My Terminal'
             ),
         Key([mod, "shift"], "Return",
             lazy.spawn(fileman),
             desc='Launches File Manager'
             ),
         Key([mod], "p",
             lazy.spawn(drun),
             desc='Rofi'
             ),
         Key([mod], "d",
             lazy.spawn("dmenu_run"),
             #lazy.spawn("dmenu_run -m 0 -fn 'monospace:size=10' -nb '#282c34' -nf '#dfdfdf' -sb '#467b96' -sf '#dfdfdf' -p ' Run: '"),
             desc='dmenu'
             ),
         Key([mod, "shift"], "d",
             lazy.spawn("dm-hub "),
             desc='dmscripts'
             ),
         Key([mod, "shift"], "m",
             lazy.spawn(music),
             desc='music'
             ),
         Key([mod], "e",
             lazy.spawn("emacsclient -c -a 'emacs'"),
             desc='Launch Emacs'
             ),
         Key([mod], "r",
             lazy.spawn(runlauncher),
             desc="dmenu"),
         Key([mod], "w",
             lazy.spawn(browser),
             desc='Firefox'
             ),
         Key(["mod1"], "x",
             #subprocess.Popen([home + '/.config/qtile/scripts/kill-autokey.sh']),
             lazy.spawn("killall autokey-gtk && killall autokey-qt"),
             desc='End all running macros (autokey)'
             ),
         Key([mod], "v",
             lazy.spawn(bgchange),
             # lazy.screen.set_wallpaper('/home/shatterstone/.config/qtile/wall.jpg', mode='fill'), # not working
             desc='random wallpaper'
             ),
         Key([mod, "shift"], "s",
             lazy.spawn(full_screenshot),
             # lazy.screen.set_wallpaper('/home/shatterstone/.config/qtile/wall.jpg', mode='fill'), # not working
             desc='Screenshot'
             ),
         Key([mod], "s",
             lazy.spawn(screenshot),
             # lazy.screen.set_wallpaper('/home/shatterstone/.config/qtile/wall.jpg', mode='fill'), # not working
             desc='Screenshot'
             ),
         Key([mod], "b",
             lazy.hide_show_bar(),
             desc='Toggle Bar'
             ),
         Key([mod, "shift"], "l",
             lazy.spawn(lockscreen),
             desc='Lock Screen'),
         Key([mod], "Tab",
             lazy.next_layout(),
             desc='Toggle through layouts'
             ),
         Key([mod, "shift"], "c",
             lazy.window.kill(),
             desc='Kill active window'
             ),
         Key([mod, "shift"], "r",
             lazy.reload_config(),
             desc='Restart Qtile'
             ),
         Key([mod, "shift"], "q",
             #lazy.shutdown(),
             lazy.spawn(log_out),
             desc='Log out of Qtile'
             ),
         ### Switch focus of monitors
         Key([mod], "period",
             lazy.next_screen(),
             desc='Move focus to next monitor'
             ),
         Key([mod], "comma",
             lazy.prev_screen(),
             desc='Move focus to prev monitor'
             ),

                 # ------------ Hardware Configs ------------
        # Volume
        Key([], "XF86AudioMute",
            lazy.spawn("amixer set Master toggle"),
            desc='Mute audio'
            ),
        Key([], "XF86AudioLowerVolume",#
            lazy.spawn("amixer set Master 1%-"),
            desc='Volume down'
            ),
        Key([], "XF86AudioRaiseVolume",
            lazy.spawn("amixer set Master 1%+"),
            desc='Volume up'
            ),

        # Brightness
        Key([], "XF86MonBrightnessDown",
            lazy.spawn("brightnessctl set 1%-"),
            desc='Brightness down'
            ),
        Key([], "XF86MonBrightnessUp",
            lazy.spawn("brightnessctl set +1%"),
            desc='Brightness up'
            ),
         ### Switch focus of monitors
         Key([mod], "period",
             lazy.next_screen(),
             desc='Move focus to next monitor'
             ),
         Key([mod], "comma",
             lazy.prev_screen(),
             desc='Move focus to prev monitor'
             ),
         ### Treetab controls
          Key([mod, "shift"], "h",
             lazy.layout.move_left(),
             desc='Move up a section in treetab'
             ),
         Key([mod, "shift"], "l",
             lazy.layout.move_right(),
             desc='Move down a section in treetab'
             ),
         ### Window controls
         Key([mod], "j",
             lazy.layout.down(),
             desc='Move focus down in current stack pane'
             ),
         Key([mod], "k",
             lazy.layout.up(),
             desc='Move focus up in current stack pane'
             ),
         Key([mod, "shift"], "j",
             lazy.layout.shuffle_down(),
             lazy.layout.section_down(),
             desc='Move windows down in current stack'
             ),
         Key([mod, "shift"], "k",
             lazy.layout.shuffle_up(),
             lazy.layout.section_up(),
             desc='Move windows up in current stack'
             ),
         Key([mod], "h",
             lazy.layout.shrink(),
             lazy.layout.decrease_nmaster(),
             desc='Shrink window (MonadTall), decrease number in master pane (Tile)'
             ),
         Key([mod], "l",
             lazy.layout.grow(),
             lazy.layout.increase_nmaster(),
             desc='Expand window (MonadTall), increase number in master pane (Tile)'
             ),
         Key([mod], "n",
             lazy.layout.normalize(),
             desc='normalize window size ratios'
             ),
         Key([mod], "m",
             #lazy.layout.maximize(),
             lazy.window.toggle_maximize(),
             desc='Toggle maximize'
             ),
         Key([mod, "shift"], "f",
             lazy.window.toggle_floating(),
             desc='toggle floating'
             ),
         Key([mod], "f",
             lazy.window.toggle_fullscreen(),
             desc='toggle fullscreen'
             ),
         ### Stack controls
         Key([mod, "shift"], "Tab",
             lazy.layout.rotate(),
             lazy.layout.flip(),
             desc='Switch which side main pane occupies (XmonadTall)'
             ),
          Key([mod], "space",
             lazy.layout.swap_main(),
             desc='Move window to master'
             ),
         Key([mod, "shift"], "space",
             lazy.layout.toggle_split(),
             desc='Toggle between split and unsplit sides of stack'
             ),
         # Keybinds for switching to TTYs on Wayland
         Key(["mod1", "control"], "F1", lazy.core.change_vt(1)),
         Key(["mod1", "control"], "F2", lazy.core.change_vt(2)),
         Key(["mod1", "control"], "F3", lazy.core.change_vt(3)),
         Key(["mod1", "control"], "F4", lazy.core.change_vt(4)),
         Key(["mod1", "control"], "F5", lazy.core.change_vt(5)),
         Key(["mod1", "control"], "F6", lazy.core.change_vt(6)),
         Key(["mod1", "control"], "F7", lazy.core.change_vt(7)),
]

groups = [Group(i) for i in "123456789"]

for i in groups:
    keys.extend(
        [
            # mod1 + letter of group = switch to group
            Key(
                [mod],
                i.name,
                lazy.group[i.name].toscreen(),
                desc="Switch to group {}".format(i.name),
            ),
            # mod1 + shift + letter of group = switch to & move focused window to group
            Key(
                [mod, "shift"],
                i.name,
                lazy.window.togroup(i.name, switch_group=True),
                desc="Switch to & move focused window to group {}".format(i.name),
            ),
            # Or, use below if you prefer not to switch to that group.
            # # mod1 + shift + letter of group = move focused window to group
            # Key([mod, "shift"], i.name, lazy.window.togroup(i.name),
            #     desc="move focused window to group {}".format(i.name)),
        ]
    )

layout_theme = {"border_width": 2,
                "margin": 7,
                "border_focus": "#51afef",
                "border_normal": "#467b96"
                }

layouts = [
    layout.MonadTall(margin=7, border_width=2, border_focus="#467b96", border_normal="#889fa7", new_client_position="bottom"),
    #layout.MonadWide(**layout_theme),
    #layout.Bsp(**layout_theme),
    #layout.Stack(stacks=2, **layout_theme),
    #layout.Columns(**layout_theme),
    #layout.RatioTile(**layout_theme),
    #layout.Tile(shift_windows=True, **layout_theme),
    #layout.VerticalTile(**layout_theme),
    #layout.Matrix(**layout_theme),
    #layout.Zoomy(**layout_theme),
    #layout.MonadTall(margin=7, border_width=2, border_focus="#467b96", border_normal="#889fa7", new_client_position="bottom"),
    layout.Max(margin=7, border_width=2, border_focus="#467b96", border_normal="#889fa7"),
    layout.Floating(margin=7, border_width=2, border_focus="#467b96", border_normal="#889fa7"),
    #layout.Stack(num_stacks=2),
    #layout.RatioTile(**layout_theme),
    #layout.TreeTab(
    #     font = "Ubuntu",
    #     fontsize = 10,
    #     sections = ["FIRST", "SECOND", "THIRD", "FOURTH"],
    #     section_fontsize = 10,
    #     border_width = 2,
    #     bg_color = "1c1f24",
    #     active_bg = "c678dd",
    #     active_fg = "000000",
    #     inactive_bg = "a9a1e1",
    #     inactive_fg = "1c1f24",
    #     padding_left = 0,
    #     padding_x = 0,
    #     padding_y = 5,
    #     section_top = 10,
    #     section_bottom = 20,
    #     level_shift = 8,
    #     vspace = 3,
    #     panel_width = 200
    #     ),
]

colors = [["#282c34", "#282c34"],
          ["#1c1f24", "#1c1f24"],
          ["#dfdfdf", "#dfdfdf"],
          ["#ff6c6b", "#ff6c6b"],
          ["#98be65", "#98be65"],
          ["#da8548", "#da8548"],
          ["#51afef", "#51afef"],
          ["#889fa7", "#889fa7"],
          ["#467b96", "#467b96"],
          ["#a9a1e1", "#a9a1e1"]]

prompt = "{0}@{1}: ".format(os.environ["USER"], socket.gethostname())

##### DEFAULT WIDGET SETTINGS #####
widget_defaults = dict(
    font="Ubuntu Bold",
    fontsize = 14,
    padding = 0,
    background=colors[2]
)
extension_defaults = widget_defaults.copy()

screens = [
    Screen(
        top=bar.Bar([
#              widget.Sep(
#                       linewidth = 0,
#                       padding = 1,
#                       #foreground = colors[2],
#                       background = '#00000000',
#                       decorations=[
#                           PowerLineDecoration(
#                               #extrawidth = 2,
#                               path = 'rounded_right',
#                               override_colour = '#00000000',
#                               override_next_colour = colors[0],
#                               shift = 2,
#                               #padding_x = -8,
#                               size = 12,
#                           )
#                       ],
#                       ),
#              widget.Image(
#                       filename = "~/.config/qtile/icons/python-white.png",
#                       scale = "False",
#                      #mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm)}
#                       ),
#              widget.Sep(
#                       linewidth = 0,
#                       padding = 6,
#                       foreground = colors[2],
#                       background = colors[0]
#                       ),

              widget.Sep(
                       linewidth = 0,
                       padding = 5,
                       #foreground = colors[2],
                       background = '#00000000',
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_right',
                               override_colour = '#00000000',
                               override_next_colour = colors[0],
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),

               widget.StatusNotifier(
                        background = colors[0],
                        icon_theme = "Sardi-Flat-Arc",
                        icon_size = 16,
                        # The following options are for the StatusNotfier from qtile-extras
                        highlight_colour = '308dcd', # 308dcd is a darker shade of 51afef that looks closer to the way 51afef is rendered on the WindowName widget
                        menu_background = '282c34',
                        menu_font = 'Ubuntu Bold',
                        menu_fontsize = 11,
                        menu_foreground = 'dfdfdf',
                        # The padding is for either version of the StatusNotifier widget
                        padding = 1
                        ),
              widget.Systray(
                       background = colors[0],
                       icon_size = 16,
                       padding = 1
                       ),
              widget.KeyboardLayout(
                       background = colors[0],
                       configured_keyboards = ['gb', 'bg phonetic'],
                       display_map = {'gb': 'gb', 'bg phonetic': 'bg'},
                       fmt = 'Kb: {}',
                       padding = 3
                       ),
              widget.Sep(
                       linewidth = 0,
                       padding = 1,
                       #foreground = colors[2],
                       background = '#00000000', 
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_left',
                               override_colour = colors[0],
                               override_next_colour = '#00000000',
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),

              widget.Sep(
                       linewidth = 0,
                       padding = 8,
                       #foreground = colors[2],
                       background = '#00000000',
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_right',
                               override_colour = '#00000000',
                               override_next_colour = colors[0],
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),

              widget.WindowName(
                       foreground = colors[6],
                       background = colors[0],
                       padding = 4,
                       update_interval = 0.001,
                       fontsize = 15
                       ),
             widget.Sep(
                       linewidth = 0,
                       padding = 3,
                       #foreground = colors[2],
                       background = '#00000000', 
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_left',
                               override_colour = colors[0],
                               override_next_colour = '#00000000',
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),

              widget.Sep(
                       linewidth = 0,
                       padding = 8,
                       #foreground = colors[2],
                       background = '#00000000',
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_right',
                               override_colour = '#00000000',
                               override_next_colour = colors[0],
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),
              widget.GroupBox(
                    #    font = "Sans Bold",
                       font = "Ubuntu Mono Bold",
                       fontsize = 13,
                       markup = True,
                       margin_y = 4,
                       margin_x = 2,
                       padding_y = 3,
                       padding_x = 7,
                       borderwidth = 2,
                       active = colors[2],
                       inactive = '#696969', 
                       rounded = False,
                       highlight_color = colors[1],
                       highlight_method = "line",
                       this_current_screen_border = colors[6],
                       this_screen_border = colors [4],
                       other_current_screen_border = colors[6],
                       other_screen_border = colors[4],
                       foreground = colors[2],
                       background = colors[0]
                       ),
              widget.Sep(
                       linewidth = 0,
                       padding = 1,
                       #foreground = colors[2],
                       background = '#00000000', 
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_left',
                               override_colour = colors[0],
                               override_next_colour = '#00000000',
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),

#              widget.Sep(
#                       linewidth = 0,
#                       padding = 1,
#                       #foreground = colors[2],
#                       background = '#00000000',
#                       decorations=[
#                           PowerLineDecoration(
#                               #extrawidth = 2,
#                               path = 'rounded_right',
#                               override_colour = '#00000000',
#                               override_next_colour = colors[0],
#                               shift = 2,
#                               #padding_x = -8,
#                               size = 12,
#                           )
#                       ],
#                       ),
#              widget.TextBox(
#                       text = '|',
#                       font = "Ubuntu Mono",
#                       background = colors[0],
#                       foreground = '474747',
#                       padding = 2,
#                       fontsize = 14
#                       ),
#              widget.CurrentLayoutIcon(
#                       custom_icon_paths = [os.path.expanduser("~/.config/qtile/icons")],
#                       foreground = colors[2],
#                       background = colors[0],
#                       padding = 0,
#                       scale = 0.7
#                       ),
#              widget.CurrentLayout(
#                       foreground = colors[2],
#                       background = colors[0],
#                       padding = 5,
#                       margin = [ 0, 2, 0, 0],
#                       ),
#              widget.TextBox(
#                       text = '|',
#                       font = "Ubuntu Mono",
#                       background = colors[0],
#                       foreground = '474747',
#                       padding = 2,
#                       fontsize = 14
#                       ),
#              widget.Sep(
#                       linewidth = 0,
#                       padding = 1,
#                       #foreground = colors[2],
#                       background = '#00000000', 
#                       decorations=[
#                           PowerLineDecoration(
#                               #extrawidth = 2,
#                               path = 'rounded_left',
#                               override_colour = colors[8],
#                               override_next_colour = '#00000000',
#                               shift = 2,
#                               #padding_x = -8,
#                               size = 12,
#                           )
#                       ],
#                       ),
              widget.Sep(
                       linewidth = 0,
                       padding = 8,
                       #foreground = colors[2],
                       background = '#00000000',
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_right',
                               override_colour = '#00000000',
                               override_next_colour = colors[8],
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),

             # widget.TextBox(
             #          text = '󱄄 ',
             #          font = "Ubuntu Mono",
             #          foreground = colors[6],
             #          background = colors[0],
             #          padding = 2,
             #          fontsize = 14
             #          ),
              widget.Backlight(
                       foreground = colors[2],
                       background = colors[8],
                       brightness_file = '/sys/class/backlight/amdgpu_bl1/brightness',
                       max_brightness_file = '/sys/class/backlight/amdgpu_bl1/max_brightness',
                       #format = '<u> 󱄄   {percent:2.0%} </u>', 
                       format = ' 󱄄    {percent:2.0%} ', 
                       #padding = 5,5,5,5,
                       #decorations=[
                       #    PowerLineDecoration(
                       #        #extrawidth = 2,
                       #        path = 'forward_slash',
                       #        override_colour = colors[8],
                       #        override_next_colour = colors[7],
                       #    )
                       #],
                       ),
              widget.Sep(
                       linewidth = 0,
                       padding = 1,
                       #foreground = colors[2],
                       background = '#00000000', 
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_left',
                               override_colour = colors[8],
                               override_next_colour = '#00000000',
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),

              widget.Sep(
                       linewidth = 0,
                       padding = 8,
                       #foreground = colors[2],
                       background = '#00000000',
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_right',
                               override_colour = '#00000000',
                               override_next_colour = colors[7],
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),
              widget.CPU(
                       foreground = colors[0],
                       background = colors[7],
                       padding = 5,
                       #format = '    {load_percent}%', # {freq_current}GHz',
                       format = '    {load_percent}%', 
                       #decorations=[
                       #    PowerLineDecoration(
                       #        #extrawidth = 2,
                       #        path = 'forward_slash',
                       #        override_colour = colors[7],
                       #        override_next_colour = colors[8],
                       #    )
                       #],
                       ),
              widget.Sep(
                       linewidth = 0,
                       padding = 1,
                       #foreground = colors[2],
                       background = '#00000000', 
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_left',
                               override_colour = colors[7],
                               override_next_colour = '#00000000',
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),

              widget.Sep(
                       linewidth = 0,
                       padding = 8,
                       #foreground = colors[2],
                       background = '#00000000',
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_right',
                               override_colour = '#00000000',
                               override_next_colour = colors[8],
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),
              widget.Battery(
                       foreground = colors[2],
                       background = colors[8],
                       battery = 1,
                       discharge_char = '',
                       low_foreground = '#ff0000',
                       low_percentage = 0.15,
                       empty_char = 'X',
                       fmt = '    {}',
                       format = '{char} {percent:2.0%}',
                       #decorations=[
                       #    PowerLineDecoration(
                       #        #extrawidth = 2,
                       #        path = 'forward_slash',
                       #        override_colour = colors[8],
                       #        override_next_colour = colors[7],
                       #    )
                       #],
                       padding = 5
                       ),
              widget.Sep(
                       linewidth = 0,
                       padding = 1,
                       #foreground = colors[2],
                       background = '#00000000', 
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_left',
                               override_colour = colors[8],
                               override_next_colour = '#00000000',
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),

              widget.Sep(
                       linewidth = 0,
                       padding = 8,
                       #foreground = colors[2],
                       background = '#00000000',
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_right',
                               override_colour = '#00000000',
                               override_next_colour = colors[7],
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),
              widget.Volume(
                       foreground = colors[0],
                       background = colors[7],
                       fmt = '󰕾   {}',
                       padding = 5,
                       #decorations=[
                       #    PowerLineDecoration(
                       #        #extrawidth = 2,
                       #        path = 'forward_slash',
                       #        override_colour = colors[7],
                       #        override_next_colour = colors[8],
                       #    )
                       #],
                       ),
              widget.Sep(
                       linewidth = 0,
                       padding = 1,
                       #foreground = colors[2],
                       background = '#00000000', 
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_left',
                               override_colour = colors[7],
                               override_next_colour = '#00000000',
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),

              widget.Sep(
                       linewidth = 0,
                       padding = 8,
                       #foreground = colors[2],
                       background = '#00000000',
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_right',
                               override_colour = '#00000000',
                               override_next_colour = colors[8],
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),
              widget.ThermalSensor(
                       foreground = colors[2],
                       background = colors[8],
                       padding = 5,
                       threshold = 90,
                       fmt = '   {}',
                       #decorations=[
                       #    PowerLineDecoration(
                       #        #extrawidth = 2,
                       #        path = 'forward_slash',
                       #        override_colour = colors[8],
                       #        override_next_colour = colors[7],
                       #    )
                       #],
                       ),
              widget.Sep(
                       linewidth = 0,
                       padding = 1,
                       #foreground = colors[2],
                       background = '#00000000', 
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_left',
                               override_colour = colors[8],
                               override_next_colour = '#00000000',
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),

              widget.Sep(
                       linewidth = 0,
                       padding = 8,
                       #foreground = colors[2],
                       background = '#00000000',
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_right',
                               override_colour = '#00000000',
                               override_next_colour = colors[7],
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),
              widget.Memory(
                       foreground = colors[0],
                       background = colors[7],
                       #mouse_callbacks = {'Button1': lambda: qtile.cmd_spawn(myTerm + ' -e htop')},
                       format = '󰒋   {MemUsed:.0f}{mm}/{MemTotal:.0f}{mm}',
                       padding = 5,
                       #decorations=[
                       #    PowerLineDecoration(
                       #        #extrawidth = 2,
                       #        path = 'forward_slash',
                       #        override_colour = colors[7],
                       #        override_next_colour = colors[8],
                       #    )
                       #],
                       ),
              widget.Sep(
                       linewidth = 0,
                       padding = 1,
                       #foreground = colors[2],
                       background = '#00000000', 
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_left',
                               override_colour = colors[7],
                               override_next_colour = '#00000000',
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),

              widget.Sep(
                       linewidth = 0,
                       padding = 8,
                       #foreground = colors[2],
                       background = '#00000000',
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_right',
                               override_colour = '#00000000',
                               override_next_colour = colors[8],
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),
              widget.Clock(
                       foreground = colors[2],
                       background = colors[8],
                       format = " 󰃭    %A, %d %B - %H:%M ",
                       #decorations=[
                       #    PowerLineDecoration(
                       #        #extrawidth = 2,
                       #        path = 'forward_slash',
                       #        override_colour = colors[8],
                       #        override_next_colour = colors[7],
                       #    )
                       #],
                       ),
              widget.Sep(
                       linewidth = 0,
                       padding = 1,
                       #foreground = colors[2],
                       background = '#00000000', 
                       decorations=[
                           PowerLineDecoration(
                               #extrawidth = 2,
                               path = 'rounded_left',
                               override_colour = colors[8],
                               override_next_colour = '#00000000',
                               shift = 2,
                               #padding_x = -8,
                               size = 12,
                           )
                       ],
                       ),
              widget.Sep(
                        linewidth = 0,
                        foreground = '#00000000',
                        background = '#00000000',
                        padding = 4),
            ],
            24,
            margin = [5, 5, 5, 5],
        ),
    )
]

# Drag floating layouts.
mouse = [
    Drag([mod], "Button1", lazy.window.set_position_floating(), start=lazy.window.get_position()),
    Drag([mod], "Button3", lazy.window.set_size_floating(), start=lazy.window.get_size()),
    Click([mod], "Button2", lazy.window.bring_to_front()),
]

def window_to_prev_group(qtile):
    if qtile.currentWindow is not None:
        i = qtile.groups.index(qtile.currentGroup)
        qtile.currentWindow.togroup(qtile.groups[i - 1].name)

def window_to_next_group(qtile):
    if qtile.currentWindow is not None:
        i = qtile.groups.index(qtile.currentGroup)
        qtile.currentWindow.togroup(qtile.groups[i + 1].name)

def window_to_previous_screen(qtile):
    i = qtile.screens.index(qtile.current_screen)
    if i != 0:
        group = qtile.screens[i - 1].group.name
        qtile.current_window.togroup(group)

def window_to_next_screen(qtile):
    i = qtile.screens.index(qtile.current_screen)
    if i + 1 != len(qtile.screens):
        group = qtile.screens[i + 1].group.name
        qtile.current_window.togroup(group)

def switch_screens(qtile):
    i = qtile.screens.index(qtile.current_screen)
    group = qtile.screens[i - 1].group
    qtile.current_screen.set_group(group)

dgroups_key_binder = None
dgroups_app_rules = []  # type: list
follow_mouse_focus = True
bring_front_click = False
cursor_warp = False
floating_layout = layout.Floating( margin=7, border_width=2, border_focus="#467b96", border_normal="#889fa7",
    float_rules=[
        # Run the utility of `xprop` to see the wm class and name of an X client.
        *layout.Floating.default_float_rules,
        Match(wm_class="confirmreset"),  # gitk
        Match(wm_class="makebranch"),  # gitk
        Match(wm_class="maketag"),  # gitk
        Match(wm_class="ssh-askpass"),  # ssh-askpass
    Match(title='Bluetooth'),         # Blueberry
    Match(title='Bluetooth Devices'),         # Blueman
        Match(title="branchdialog"),  # gitk
        Match(title="pinentry"),  # GPG key password entry
    ]
)
auto_fullscreen = True
focus_on_window_activation = "smart"
reconfigure_screens = True

# If things like steam games want to auto-minimize themselves when losing
# focus, should we respect this or not?
auto_minimize = True

@hook.subscribe.startup_once
def start_once():
    if qtile.core.name == "x11":
        # subprocess.call([home + '/.config/qtile/scripts/autostart-theme1.sh'])
        subprocess.Popen([home + '/.config/qtile/scripts/autostart-theme1.sh'])
        # lazy.screen.set_wallpaper([home + '/.config/qtile/wall.jpg'], mode=fill)
    elif qtile.core.name == "wayland":
        subprocess.Popen([home + '/.config/qtile/scripts/autostart-theme1-wayland.sh']),
        subprocess.Popen(lazy.reload_config()),
        lazy.screen.set_wallpaper([home + '/.config/qtile/wall.jpg'], mode=fill)

# When using the Wayland backend, this can be used to configure input devices.
wl_input_rules = {
   "1267:12477:ELAN1300:00 04F3:3047 Touchpad": InputConfig(left_handed=False, tap = True),
   "*": InputConfig(left_handed=False, pointer_accel=False, tap = True),
   "type:keyboard": InputConfig(kb_layout="gb")
}
lazy.spawn("wlr-randr --output X11-1 --on --custom-mode 1920x1080@60Hz")
lazy.reload_config(),

# XXX: Gasp! We're lying here. In fact, nobody really uses or cares about this
# string besides java UI toolkits; you can see several discussions on the
# mailing lists, GitHub issues, and other WM documentation that suggest setting
# this string if your java app doesn't work correctly. We may as well just lie
# and say that we're a working one by default.
#
# We choose LG3D to maximize irony: it is a 3D non-reparenting WM written in
# java that happens to be on java's whitelist.
wmname = "LG3D"

Logs

No response

Required

jwijenbergh commented 5 months ago

Thanks, that is annoying. Fixed in #4839

theshatterstone commented 5 months ago

And I thank you! Is there anything else I need to do? (Will I need to close the issue when the PR gets merged, etc)

jwijenbergh commented 5 months ago

If you can, test the pr, but I am 100% sure it fixes the border issue so no need. Regarding bottom of the stack stuff that has always happened in qtile, no? See issues like #3517

jwijenbergh commented 5 months ago

Fixed in git master