Closed fMichaleczek closed 4 years ago
Wow. That's a huge overhaul. I need some time to go through all this (not sure when, I haven't had any since February :/ ).
Right off the bat I see a lot of boilerplate code which could probably be simplified or moved to more appropriate places. I have had similar ideas for the grouping and categorizing and wanted to do it via custom attributes, but as it turns out, PowerShell is still not .NETty enough for that.
I'll probably eventually turn down most of your ideas, but don't be bummed about it and keep up the good work. :)
@Disassembler0 About your problems with attributes, this is a workaround :
@'
class SomeAttribute : Attribute {
[string]$Text
}
class OtherAttribute : Attribute {
[string]$Text
}
'@ > "$pwd\attributes.ps1"
@'
class MyClass {
[SomeAttribute(Text="sometext")]
[OtherAttribute(Text="othertext")]
MyMethod() {
# ...
}
}
[MyClass].GetMethod("MyMethod").GetCustomAttributes($false)
'@ > "$pwd\MyClass.ps1"
. "$pwd\attributes.ps1"
. "$pwd\MyClass.ps1"
The version and features you've got are nice and all, but I'm probably just lying to myself by keeping this issue open. I don't think I'd ever get to merging most of the ideas, as it seems that my use cases are vastly different from yours. TBH, I don't even use my own script anymore, because it deviated from the original intention (short, simple and straight to the point) so much. :/ So with that, thanks for your work, but there's no point in keeping this issue open. Sorry about that.
I made a POC for daily not initial setup. WindowsTweaks
Features :
Breaking changes (todo) :
I think this code is suffisant for handle HKCU change in desktop without explorer restart
Let me know, if you are interested by my works .After this version on gist, I will maybe try to rewrite functions (parsing AST scriptblock) and be a fork :/
Thank you so much for this project !