Git Product home page Git Product logo

Comments (13)

vivien avatar vivien commented on June 30, 2024 7

Hi @nim-,

This is indeed a good example! While this configuration is not portable, you can easy acheive this by setting the min_width (as @bchretien correctly suggested) of a single block to the width of your current resolution.

For instance, ~/.config/i3/config:

bar {
  position top
  workspace_buttons yes
  status_command i3blocks -c ~/.config/i3blocks/wintitle.conf
}

bar {
  position bottom
  workspace_buttons no
  status_command i3blocks
  ...
}

and ~/.config/i3blocks/wintitle.conf:

[window title]
command=xdotool getactivewindow getwindowname
interval=3
color=#A6D1FA
min_width=1366
align=center

I added an entry in the FAQ for that. (I am currently using this setup now, thanks!).

Maybe @stapelberg would be interested in adding an align=<left|center|right> to i3bar?

from i3blocks.

nim- avatar nim- commented on June 30, 2024 5

Hi, sorry if I was being unclear.

I'm not talking about align text within a block, I'm talking about aligning a block on the center of i3bar.
In the same way the "moist@thinkpad ~" window title is centered here (I believe this is bspwm with BAR):
http://i.imgur.com/2Q7lPA4.png

Of course, I don't know if this is possible, but it would surely be amazing.

from i3blocks.

elhackerlibre avatar elhackerlibre commented on June 30, 2024 1

Primero pido disculpa PorQue mi PREGUNTA esta muy fuera del tema!
@bchretien
you use i3bar?
as you did to change the separator character ?

from i3blocks.

jpleau avatar jpleau commented on June 30, 2024

I did not even know i3bar protocol allowed us to specify alignment. Now that I know, I agree with you it'd be cool to have i3blocks support this !

from i3blocks.

bchretien avatar bchretien commented on June 30, 2024

The align option of the i3bar protocol is already supported AFAIK.

from i3blocks.

bchretien avatar bchretien commented on June 30, 2024

I don't think that's possible since this is a limit of i3bar. You can achieve something similar by playing with align and min_width, but that would depend on the rest of the bar and the screen size.

For example:

bar_example

from i3blocks.

nim- avatar nim- commented on June 30, 2024

Ah, I see. I'll try working with that then. Thanks.

Sorry for cluttering up the issues page if this is an i3bar limit.

from i3blocks.

bchretien avatar bchretien commented on June 30, 2024

Well, more people may be wondering about the same thing so this is actually useful. Note that the trick I gave you won't work on a multiscreen setup if you have different resolutions, so this is extremely limited.

from i3blocks.

nim- avatar nim- commented on June 30, 2024

@vivien Thank you! Works beautifully when set to the width of my monitors resolution.

from i3blocks.

stapelberg avatar stapelberg commented on June 30, 2024

@vivien, we already have align=<left|center|right>, see http://i3wm.org/docs/i3bar-protocol.html

from i3blocks.

vivien avatar vivien commented on June 30, 2024

@stapelberg, sorry, I meant an align option for the bar blocks, i.e.:

bar {
  position top
  workspace_buttons yes
  status_command i3blocks -c ~/.config/i3blocks/wintitle.conf
  align center
}

So blocks (one or more) would be centered in the bar, as i3bar knows the resolution of the current monitor.

from i3blocks.

Airblader avatar Airblader commented on June 30, 2024

@vivien Such a feature was accepted, but no one submitted a patch yet. See http://bugs.i3wm.org/report/ticket/1148

However, this feature is not exactly what was asked for here as only one particular block should be aligned.

from i3blocks.

simonnagl avatar simonnagl commented on June 30, 2024

Hi, just for information: I want to start developing the features discussed here. The discussion is at i3/i3#1148.

from i3blocks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.