-
Notifications
You must be signed in to change notification settings - Fork 8
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
[Feature request] skip the hook if it is not apply
#70
Comments
Thanks for creating the issue. What would imagine the config item look like for this? |
On a second thought, I think I am having this feature request because
Currently
works the way I want. Making two hooks seem complex. |
I'm glad you've got it working like you'd like. Yeah I do see the issue with |
As Tinty have already offloaded "a bit of work" to the hook, passing of the command ( Users will have the freedom to do what they want in the hook. Just a opinion. |
Can you give a config.yaml example of that suggestion? |
assume [[items]]
name = "base16-i3"
path = "https://github.com/tinted-theming/base16-i3"
themes-dir = "colors"
hook = '[ "%m" = "apply" ] && cp -f %f ~/.config/i3/colors && cat ~/.config/i3/colors ~/.config/i3/base > ~/.config/i3/config && i3-msg reload' |
Added a PR for this: #73 |
Just released the changes, let me know if things aren't as expected. |
Is your feature request related to a problem? Please describe.
No, it is not.
Describe the solution you'd like
Solution: skip the hook if it is not
apply
Reason: there are cases where hook is used to create config file such as copying the template file
cp -f %f ~/.config/i3/color
. Such kind of hook is only required when we are applying new theme, AFAIK. If we can skip the hook oninit
we can increase speed and reduce resource usage.Describe alternatives you've considered
The alternative could be
a. different hooks for apply and init
b. pass
init
orapply
to hook as a template variable and deal with the resource usage in the hook commandAdditional context
The following config always create config file and reload the i3 every time
tinty init
is called.The text was updated successfully, but these errors were encountered: