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

Enhancement: different font (sizes) for different outputs #3060

Closed
kb100 opened this issue Nov 27, 2017 · 2 comments
Closed

Enhancement: different font (sizes) for different outputs #3060

kb100 opened this issue Nov 27, 2017 · 2 comments

Comments

@kb100
Copy link

kb100 commented Nov 27, 2017

I suggest that i3 allows a different font for each output. I have multiple monitors that have vastly different resolutions and pixel densities. I would like to have a different font size for each of these monitors, both for window titles and for bars. E.g. in my config I would like to be able to put something like

font {
    pango:DejaVu Sans Mono 15
    output DP1
    output HDMI1
}

font {
    pango:DejaVu Sans Mono 10
    output VGA1
}

And similarly for the bar

bar {
    status_command i3blocks
    font {
        pango:DejaVu Sans Mono 15
        output DP1
        output HDMI1
    }

    font {
        pango:DejaVu Sans Mono 10
        output VGA1
    }

}

Of course I don't know exactly how fonts are handled in i3 so if there is a more natural syntax for the config whatever works is fine. I hope you get the idea of what I'm trying to do though.

Note: I know that for bars I can simply make two separate bar blocks, each of which outputs on a different monitor and has its own font. This does not solve my issue because each block would spawn its own copy of i3blocks, and I only want one i3blocks running because my (1) i3blocks calls a few long-lived processes, and (2) some of those processes need read/write locks on certain files, so having two running simultaneously would not work.

I guess another possible solution, just for bars, would be to allow the status_command of a bar to be copied from another bar, as in something like

bar {
    id bar1
    status_command i3blocks
    font pango:DejaVu Sans Mono 15
    output DP1
    output HDMI1
    }

bar {
    status_command [copy="bar1"]
    pango:DejaVu Sans Mono 10
    output VGA1
}

Let me know if you think either of these solutions is viable/likely to be implemented.

@stapelberg
Copy link
Member

Note: I know that for bars I can simply make two separate bar blocks, each of which outputs on a different monitor and has its own font. This does not solve my issue because each block would spawn its own copy of i3blocks, and I only want one i3blocks running because my (1) i3blocks calls a few long-lived processes, and (2) some of those processes need read/write locks on certain files, so having two running simultaneously would not work.

I’d suggest to wrap i3blocks in such a way that one instance generates output and an arbitrary number of processes can pick up that output. That way, no code changes in i3 are necessary.

@orestisfl
Copy link
Member

Closing because this is too much effort that ultimately should be fixed with xrandr's scale or wrapping i3blocks as mentioned

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

No branches or pull requests

5 participants