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

Polybar misplacement #13

Closed
nuzzzen opened this issue Mar 8, 2022 · 9 comments
Closed

Polybar misplacement #13

nuzzzen opened this issue Mar 8, 2022 · 9 comments

Comments

@nuzzzen
Copy link

nuzzzen commented Mar 8, 2022

I'm having issues with polybar on Awesome WM. The bar fails to assume correct position. In my case I tried to set the bar on top, and it kinda works but as you can see on the screenshot, it's in the middle of the way and overlaps windows.
I tried applying the polybar default and your config, both top and bottom position, but results didn't change.

On HerbstluftWM (my prev WM) this problem doesn't exist, therefore I think this is related to the Awesome config, but can't figure out what to edit, since I'm relatively new to this WM.

The following is bottom = false
polybarissue

This one is bottom = true
polybottom

I can post my rc.lua config if needed, but I didn't change almost anything from the one in the repo.

Hope someone can point me to the correct solution.

@Manas140
Copy link
Owner

Manas140 commented Mar 9, 2022

Well even with the default config it works, try running the launch.sh in the polybar config... it will restart the bar and it might work
image

@nuzzzen
Copy link
Author

nuzzzen commented Mar 9, 2022

Tried restarting, reverting to Awesome and polybar default config, but the problem is still there. I don't know if this has to do with picom or something related.

@Manas140
Copy link
Owner

Manas140 commented Mar 9, 2022

Can you share the config you're using currently?

@nuzzzen
Copy link
Author

nuzzzen commented Mar 9, 2022

Here's my rc.lua config. Polybar and picom are the same as the ones in your repo.
As you can see I edited some minor things, they're clearly not related to this issue tho.

-- Importing libraries
local gears = require('gears')
local awful = require('awful')
local wibox = require('wibox')
require('awful.autofocus')
local beautiful = require('beautiful')
local keys = require('keys')

-- Variables
theme_path = string.format('%s/.config/awesome/themes/%s.lua', os.getenv('HOME'), 'default')
beautiful.init(theme_path)

-- Layouts
awful.layout.layouts = {
  --awful.layout.suit.fair,
  awful.layout.suit.tile,
  --awful.layout.suit.spiral.dwindle,
  awful.layout.suit.max,
  --awful.layout.suit.magnifier,
  --awful.layout.suit.tile.bottom,
  --awful.layout.suit.tile.top,
  --awful.layout.suit.corner.nw,
  --awful.layout.suit.fair.horizontal,
  --awful.layout.suit.spiral,
  --awful.layout.suit.max.fullscreen,
  --awful.layout.suit.corner.ne,
  --awful.layout.suit.corner.sw,
  --awful.layout.suit.corner.se,
  awful.layout.suit.floating,
}

-- Virtual desktops/ Tabs
awful.screen.connect_for_each_screen(function(s)
  local tagTable = {}
  for i = 1, keys.tags do
    table.insert(tagTable, tostring(i))
  end

  awful.tag(tagTable, s, awful.layout.layouts[1])
end)

awful.rules.rules = {
  -- All windows
  { rule = { },
    properties = { 
      border_width = beautiful.border_width,
      focus = awful.client.focus.filter,
      raise = true,
      keys = keys.clientkeys,
      buttons = keys.clientbuttons,
      screen = awful.screen.preferred,
      placement = awful.placement.no_overlap+awful.placement.no_offscreen,
      --size_hints_honor = false,
  },


  -- Floating exceptions
  { rule_any = {
      class = {'Lxappearance', 'qt5ct'},
      name = {'Event Tester'}, --xev
      role = {'pop-up', 'GtkFileChooserDialog'},
      type = {'dialog'}
    },
    properties = {floating = true}
  }
   
}

-- Enable sloppy focus
client.connect_signal('mouse::enter', function(c)
  c:emit_signal('request::activate', 'mouse_enter', {raise = false})
end)

-- Autostart
-- awful.spawn.with_shell('redshift -x && redshift -O 4000K')
awful.spawn.with_shell('$HOME/.config/polybar/launch.sh')
awful.spawn.with_shell('killall dunst; dunst')
awful.spawn.with_shell('picom -b')
-- awful.spawn.with_shell('feh --bg-fill -r -z $HOME/Immagini/wallpapers/0330.jpg')
awful.spawn.with_shell('feh --bg-center $HOME/Immagini/wallpapers/0330.jpg')

-- Garbage Collection
collectgarbage('setpause', 110)
collectgarbage('setstepmul', 1000)

@Manas140
Copy link
Owner

Manas140 commented Mar 9, 2022

Ohk, try this it will start polybar again and not with awesome, as It happened to me earlier but then it just stopped, so I interpreted as if it was cause it was spawning at the same time..., if running that renders polybar at bottom of the screen, you can try spawning it with other methods instead of spawn.with_shell()

~/.config/polybar/launch.sh

@nuzzzen
Copy link
Author

nuzzzen commented Mar 10, 2022

Tried commenting out awful.spawn.with_shell('$HOME/.config/polybar/launch.sh') and starting manually from the .sh file, but didn't change.
Thing is that other WMs don't generate this issue.

I'll try in some days when I reinstall Arch from scratch, maybe the issue will disappear someway. I'll keep you updated if u want.

@Manas140
Copy link
Owner

Can you check if the issue is due to the config, and nothing else?

@WitherCubes
Copy link

WitherCubes commented Mar 15, 2022

@nuzzzen The issue is with polybar 3.6.1 as well as 3.6.0. Thisi is a problem with polybar and not with the config. I do not use Manas's polybar config, but still I get the misplacement of the bar and I am not able to fix it.

Edit: BTW I have asked about this issue on reddit, if you want to add comments to the issue, please do.

@Manas140
Copy link
Owner

Thanks @WitherCubes well that does helps close this issue, Moreover I must start being up to date with the changes/releases made to the programs I use...

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

3 participants