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

`--program-suffix` is not taken into account in config defaults #3838

Open
umanwizard opened this issue Oct 17, 2019 · 5 comments

Comments

@umanwizard
Copy link

@umanwizard umanwizard commented Oct 17, 2019

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

I have built i3 from source with the --program-suffix=-btv argument to configure. This causes me to have binaries with names like i3-btv, i3bar-btv and so on. However, even when running i3-btv, the default config value for bar_i3bar_command is i3bar

Expected Behavior

The default value of bar_i3bar_command should be i3bar-btv. Or at the very least, this value should be set by i3-config-wizard-btv.

Reproduction Instructions

See above

Environment

Output of i3 --moreversion 2>&-:

Binary i3 version:  4.17-212-g9138bb37 (2019-10-16, branch "next") © 2009 Michael Stapelberg and contributors
Running i3 version: 4.17-212-g9138bb37 (2019-10-16, branch "next") (pid 4201)
Loaded i3 config: /home/brennan/.config/i3/config (Last modified: Thu 17 Oct 2019 07:14:31 PM EDT, 495 seconds ago)

The i3 binary you just called: /home/brennan/.local/bin/i3-btv
The i3 binary you are running: /home/brennan/.local/bin/i3-btv


Logfile URL:
- Linux Distribution & Version:
- Are you using a compositor (e.g., xcompmgr or compton):
@i3bot i3bot added the bug label Oct 17, 2019
@i3bot

This comment was marked as outdated.

Copy link

@i3bot i3bot commented Oct 17, 2019

I don’t see a link to logs.i3wm.org. Did you follow https://i3wm.org/docs/debugging.html? (In case you actually provided a link to a logfile, please ignore me.)

@umanwizard

This comment was marked as outdated.

Copy link
Author

@umanwizard umanwizard commented Oct 17, 2019

Logfile is irrelevant; I know exactly where and why this is happening (main.c:1011)

@Airblader

This comment has been minimized.

Copy link
Member

@Airblader Airblader commented Oct 18, 2019

I wouldn't call this a bug because we never supported or intended to support this so far, but I'm fine with supporting it. There's probably a bunch of places where this would have to be fixed, though, including scripts.

@umanwizard

This comment has been minimized.

Copy link
Author

@umanwizard umanwizard commented Oct 18, 2019

Actually I looked a bit into how to fix this and it seems to be the path to madness. Autotools doesn't define a macro with that information, and in fact it's different between build and install time (in the build folder the binary is just called i3; it only gets changed if you run make install.

In fact, you can pass any arbitrary transform which the Makefile then passes to sed... it's not limited to prefixes and suffixes.

So I think this might be too complicated to support reliably (unless you want to embed a sed implementation in i3...), and so I will just continue specifying i3bar-btv in my config file :)

@orestisfl

This comment has been minimized.

Copy link
Member

@orestisfl orestisfl commented Oct 18, 2019

It seems that you can use $(program_transform_name) (which includes prefix and suffix if specified), maybe $(program_suffix) and $(program_prefix) too.

Btw, if this ever gets implemented, I'd like to keep the config file stored in git clean of any variables that specify prefixes / suffixes. It should remain a valid config file.

@orestisfl orestisfl added the technical label Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.