-
Notifications
You must be signed in to change notification settings - Fork 106
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
Configuration file #34
Comments
Could you be a bit more specific what you would like to store in such a configuration file? Why don't shell aliases or a simple wrapper script work for you? I assume your shell configuration file is already under version control, hence these should be easy to deploy? Generally I'm hesitant to add the complexity for a configuration file parser. For smaller projects like dvtm compile time based configuration (i.e. |
I do versioning on a per-project basis, where all the tools I use have their own repository. I could add an alias to my shell's configuration file but like I said in my previous post I don't like to introduce aliases that have side effects (such as setting configuration variables, as opposed to making typing commands less hard). I could use a wrapper script, but it looks more like a consequence of not having a configuration file rather than an alternative to having one. That also makes it hard for multiple users to use the same program with different settings, so a configuration file would nullify those issues (which again occur because there's not configuration file). I get where you're coming from, in theory a single user can get away with a compile-time configuration, but leaving that scope turns the lack of file-based user independent configuration settings into an inconvenience. Hence my proposal to have a configuration file in Cheers. |
By adding more actions to the config.h, and creating the command FIFO by default. This would make a binary install of dvtm (through package manager) still customizable. The tweaking of the Maybe we could go with a simple shell script sourced at startup from dvtm-status after all FIFOs creation, with calls to some dvtm-cmd. Their arguments would be executed by being piped through the dvtm command FIFO. A shell script could even implement this all. |
If I understand correctly, a wrapper script would suit your use case perfectly fine; the problems you've stated only apply if you create a system wide wrapper. You can, of course, just create a wrapper for dvtm that exists in your versioned dotfiles and will be just as easy to pull as a config file. Add a folder |
Or you can also have dvtm compiled and installed in ~/.local/bin or equivalent and backup your config.h in your dotfiles. And it’s not like dvtm is big (60~90K for amd64) and takes time to compile(less than 1s). |
Those workarounds are all great but they're not solutions that would make everything so much easier when deploying the software, not just using it on a single personal machine. |
Going by your own mention of using a wrapper script, I had assumed you were using vanilla dvtm. If that's the case, my suggestion is the literal equivalent of a config file; it is just as easy as having a config. If you're not using vanilla dvtm, backing up your dvtm binary in dotfiles as @lanodan suggested is just as easy as a config, too. I also consider the 'ease of deploying' a program from source the responsibilty of your distro build environment. With something like ArchLinux ABS or FreeBSD ports, I can use a config.h as easily as I can use a config. There are enough solutions to this problem; I don't think it's worth the added complexity or dev time to implement configs. |
I made a script to compile a programs in
If you want to use local libraries, man pages and include headers, you have to source this very same script on your You can add recipes in Here are my recipes. Is this what you mean by wrapper srcipt? |
When I say 'vanilla dvtm in a wrapper script' I mean installing dvtm from your distro's package manager, and placing a script named 'dvtm' on your PATH which contains your preferred switches.
#!/bin/sh
/usr/bin/dvtm -M "$@" I do this with dmenu https://github.com/Link-Satonaka/dotfiles/blob/master/common/home/user/.bin/dmenu |
Ah, sorry my bad. Thank you for explaining. |
Hi,
Would you consider adding support for a configuration file ?
A simple ini-type file that allows setting defaults for the command line flags would be nice, as I basically only use
dvtm
with the-c
flag, and don't want to litter my shell with a dedicated alias (or recompile it every-time there's a new version out). I also like to version my configuration files withvcsh
so I can deploy my dot files easily to a new system, and I can't do that withdvtm
at the moment because I would have to recompiledvtm
on every system I want it on.Thanks.
The text was updated successfully, but these errors were encountered: