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

Open
kb100 opened this Issue Nov 27, 2017 · 1 comment

Comments

Projects
None yet
4 participants
@kb100

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.

@i3bot i3bot added the enhancement label Nov 27, 2017

@Airblader Airblader added the 4.14 label Dec 27, 2017

@stapelberg

This comment has been minimized.

Show comment
Hide comment
@stapelberg

stapelberg Mar 5, 2018

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.

Member

stapelberg commented Mar 5, 2018

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.

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