Comments (13)
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.
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.
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.
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.
The align
option of the i3bar protocol is already supported AFAIK.
from i3blocks.
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:
from i3blocks.
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.
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.
@vivien Thank you! Works beautifully when set to the width of my monitors resolution.
from i3blocks.
@vivien, we already have align=<left|center|right>, see http://i3wm.org/docs/i3bar-protocol.html
from i3blocks.
@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.
@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.
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)
- Persistent command does not actually persist HOT 3
- How do I tell i3blocks to refresh all blocks? HOT 2
- block freezing my status bar HOT 2
- battery regexp breaks with two batteries HOT 1
- `autogen.sh` Generates a `configure` File that Tries to Call Autoconf macro `PKG_CHECK_MODULES` HOT 1
- [Feature Request] Add ticker support
- I'm having trouble getting fixed-width strings to work on i3blocks. HOT 1
- Block's character will turn into "[" character after clicked and turn normal after sway is reloaded. HOT 1
- Can't use the config variable when running the script using i3-msg -q exec myscript HOT 4
- Simple way to display title of focused window in i3blocks HOT 2
- i3blocks does not show anything except datetime HOT 3
- dmenu hang when called from i3blocks with -fn option
- Battery regex in example doesn't handle 100% HOT 2
- Trouble with setting a label with emoji via the json format HOT 1
- Any script with a 'for' loop doesn't produce any output
- How to get back monochrome icons / emojis? Weird font issue!
- Question: is running a secondary command when clicking a button with an interval possible? HOT 1
- Change the color of borders from within a script
- If I launch a graphical program from a block and restart i3, the program dies even if disowned. HOT 2
- malformated line again HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from i3blocks.