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

Rightmost widgit disappears after adding a certain amount #3872

Open
VehementHam opened this issue Nov 30, 2023 · 0 comments
Open

Rightmost widgit disappears after adding a certain amount #3872

VehementHam opened this issue Nov 30, 2023 · 0 comments

Comments

@VehementHam
Copy link

Output of awesome --version:

awesome v4.3-1618-g375d9d72-dirty (Too long)
 • Compiled against Lua 5.1.5 (running with Lua 5.1)
 • API level: 4
 • D-Bus support: yes
 • xcb-errors support: no
 • execinfo support: yes
 • xcb-randr version: 1.6
 • LGI version: 0.9.2
 • Transparency enabled: yes
 • Custom search paths: no

How to reproduce the issue:
Put the following in the rc.lua in place of the wibar config. Color variables where defined in the theme.lua for me so you would have to replace them.

----- WIBAR ------




---- Status ----

-- Keyboard map indicator and switcher
mykeyboardlayout = awful.widget.keyboardlayout()

-- Create a textclock widget
mytextclock = wibox.widget.textclock()




---- Tags ----

awful.screen.connect_for_each_screen(function(s)



        --- Labels ---
    
        -- Each screen has its own tag table.
        awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20" }, s, awful.layout.layouts[1])

        -- Create a taglist widget
        s.mytaglist = awful.widget.taglist {
        screen  = s,
        filter  = awful.widget.taglist.filter.all,
        buttons = taglist_buttons
        }

        -- Create a tasklist widget
        s.mytasklist = awful.widget.tasklist {
        screen  = s,
        filter  = awful.widget.tasklist.filter.currenttags,
        buttons = tasklist_buttons
    }

    


    --- Prompt Box --- 

    -- Create a promptbox for each screen
    s.mypromptbox = awful.widget.prompt()



    --- Layout Indicator ---

    -- Create an imagebox widget which will contain an icon indicating which layout we're using.
    -- We need one layoutbox per screen.
    s.mylayoutbox = awful.widget.layoutbox(s)





    ---- Wibox ----  
    


    --- Create The Wibox --- 
    
    function rounded_rect(cr, width, height)

    local RADIUS = 20 -- If you want to change how round the corners are, just change the RADIUS value.

    gears.shape.rounded_rect(cr, width, height, RADIUS)

    end

    s.mywibox = awful.wibar { 
	    position = "top", 
	    screen = s, 
	    shape = rounded_rect, 
	    margins = {
            left    = 5,
	    right   = 5
            }
	}



    -- Add widgets to the wibox
    s.mywibox:setup {

        layout = wibox.layout.align.horizontal,

        expand = "none",



	--- Left Widgets ---
	
        { 
	
	layout = wibox.layout.align.horizontal,

            mylauncher,

            s.mytaglist,
            s.mypromptbox,   
            s.mylayoutbox

        },



        --- Middle Widgests ---

        --s.mytasklist,

	{

            layout = wibox.layout.background,

            mytextclock,
	
	    --fg = text,
	    --bg = base .. "b3",

	    widget = wibox.container.background 

        },
        

        --- Right Widgets ---

        {

	    -- GPU --

	    {

		{

		    {
                    
		        -- Margin on the left for arrow
			
		        {

     
                            layout = wibox.layout.background,
 
	                    left  = 25,
            	
	                    widget = wibox.container.margin

		        },

		        -- GPU Icon
		        {

     
                             layout = wibox.layout.background,
 
		             markup = "",
    		             halign = "center",
   		             valign = "center",
			     font = "feather-font-addon 15", 

    		             widget = wibox.widget.textbox
   
  		        },
   
			-- RAM usage output
                        {

	                     layout = wibox.layout.background,

                             widget = awful.widget.watch('bash -c \'echo "$(cat /sys/class/drm/card0/gt_cur_freq_mhz) MHz  "\'' , 2),  
                
	                }, 
                     
		        layout = wibox.layout.align.horizontal,

		    -- Formating -- text color, background color, shape... 
	            },

                    fg     = text,
	            bg     = green,

                    shape = function(cr, width, height)
	    	        gears.shape.rectangular_tag(cr, width, height, 15)
	            end,

                    widget = wibox.container.background  

	        },

	   
	    -- Formatting -- Layout, second background layer...
            layout = wibox.layout.background,

       	    widget = wibox.container.background, 

            bg = sapphire 

	    },


	    -- CPU --

	    {

		{

		    {
                    
		        -- Margin on the left for arrow
		        {

     
                            layout = wibox.layout.background,
 
	                    left  = 25,
            	
	                    widget = wibox.container.margin

		        },

		        -- CPU Icon
		        {

     
                             layout = wibox.layout.background,
 
		             markup = "",
    		             halign = "center",
   		             valign = "center",
			     font = "feather-font-addon 15", 

    		             widget = wibox.widget.textbox
   
  		        },
   
		        -- RAM usage output
                        {

	                     layout = wibox.layout.background,

                             widget = awful.widget.watch('bash -c "ps aux --sort=-%cpu | awk \'NR==2 {print $3\\"% \\"}\'"' , 2),  
                
	                }, 
                     
		        layout = wibox.layout.align.horizontal,

		    -- Formating -- text color, background color, shape... 
	            },

                    fg     = base .. "b3",
	            bg     = yellow,

                    shape = function(cr, width, height)
	    	        gears.shape.rectangular_tag(cr, width, height, 15)
	            end,

                    widget = wibox.container.background  

	        },

	   
	    -- Formatting -- Layout, second background layer...
            layout = wibox.layout.background,

       	    widget = wibox.container.background, 

            bg = green 

	    },


            -- RAM -- 

	    {

		{

		    {
                    
		        -- Margin on the left for arrow
		        {

     
                            layout = wibox.layout.background,
 
	                    left  = 25,
            	
	                    widget = wibox.container.margin

		        },

		        -- RAM Icon
		        {

     
                             layout = wibox.layout.background,
 
		             markup = "",
    		             halign = "center",
   		             valign = "center",
			     font = "feather-font-addon 15", 

    		             widget = wibox.widget.textbox
   
  		        },
   
		        -- RAM usage output
                        {

	                     layout = wibox.layout.background,

                             widget = awful.widget.watch('bash -c "free -m | awk \'NR==2 {print $3 \\" MB \\"}\'"' , 2),  
                
	                }, 
                     
		        layout = wibox.layout.align.horizontal,

		    -- Formating -- text color, background color, shape... 
	            },

                    fg     = text,
	            bg     = peach,

                    shape = function(cr, width, height)
	    	        gears.shape.rectangular_tag(cr, width, height, 15)
	            end,

                    widget = wibox.container.background  

	        },

	   
	    -- Formatting -- Layout, second background layer...
            layout = wibox.layout.background,

       	    widget = wibox.container.background, 

            bg = yellow 

  	    },


	    -- Keybord --

            {

		{

		    -- Margin on the left for arrow
		    -- Keybord module
       	            {		

                        layout = wibox.layout.background,
            
	                widget = wibox.widget.textbox,
                        mykeyboardlayout,
                        --wibox.widget.systray(), 

	                left  = 15,
            	
	                widget = wibox.container.margin

	            },

                    -- Formating -- text color, background color, shape... 
                    fg     = text,
	            bg     = red,

                    shape = function(cr, width, height)
	    	        gears.shape.rectangular_tag(cr, width, height, 15)
	            end,

                    widget = wibox.container.background  

    	        },  
	   
	    -- Formatting -- Layout, second background layer...
            layout = wibox.layout.background,

       	    widget = wibox.container.background, 

            bg = peach

	    },

	layout = wibox.layout.align.horizontal

        },
     

    }

Actual result:
When I add a certain amount of elements to the righ side of the wibar, the righmost element disapears.

Expected result:
The rightmost element should still be their

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant