Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

Group and parametrize tweaks #241

Open
Disassembler0 opened this issue May 31, 2019 · 1 comment
Open

Group and parametrize tweaks #241

Disassembler0 opened this issue May 31, 2019 · 1 comment

Comments

@Disassembler0
Copy link
Owner

The idea

Currently the tweaks are as individual unparametrized idempotent functions. This was generally OK in the beginning of the project as all the tweaks were just enable/disable. Then we got things like #45, #55 or #78 where there were more than two possibilities how to customize one particular control or item.

E.g. in case of

HideTaskbarSearch / ShowTaskbarSearchIcon / ShowTaskbarSearchBox

we could have something like

TaskbarSearch -Hide
TaskbarSearch -Icon
TaskbarSearch -Box

or more PowerShell-y

TaskbarSearch -Type Hide
TaskbarSearch -Type Icon
TaskbarSearch -Type Box

Furthermore, we have tweaks like

HideDesktopFromThisPC / ShowDesktopInThisPC
HideDocumentsFromThisPC / ShowDocumentsInThisPC
HideDownloadsFromThisPC / ShowDownloadsInThisPC
HideMusicFromThisPC / ShowMusicInThisPC
HidePicturesFromThisPC / ShowPicturesInThisPC
HideVideosFromThisPC / ShowVideosInThisPC
Hide3DObjectsFromThisPC / Show3DObjectsInThisPC

which could also benefit from grouping and parametrization, so we'd have something like

HideFromThisPC -Desktop -Documents
ShowInThisPC -Downloads -Music

or

ThisPCLibraries -HideDesktop -HideDocuments -ShowDownloads -ShowMusic

or

ThisPCLibraries -Desktop Hide -Documents Hide -Downloads Show -Music Show

or

ThisPCLibraries -Hide "Desktop", "Documents" -Show "Downloads", "Music"

This has been also proposed (by @r3incarnat0r in #165 and possibly by others elsewhere) for bloatware removal functions where this would enable use of -AllUsers and exclusion lists.

Lastly, proposals like #199 couldn't be even done by any other way as the complexity and repetition needed for such a tweak if it would be done in the classical way would be way too large.

Upsides:

Much lower number of individual tweak functions, as the tweaks would be grouped thematically.

Better possibilities for customization.

Hopefully more comprehensive tweaking as the user would see what options can one particular tweak have and wouldn't need to look up another tweaks just to get the overview. Also tab-completion would work in case of interactive scripting.

Downsides:

Absolutely all tweaks need to be renamed and rewritten. Basically the project would restart from scratch and it may be extremely confusing for occasional and non tech-savvy users.

Parametrization makes the tweaks more difficult to use as the user needs to know appropriate PowerShell syntax for appropriate data types.

It would be less obvious to determine what was the default value before modification and what would be the appropriate parameter to pass in order to restore the defaults. For this, Wiki proposed in #225 would help.

One of the core rules of the project would be broken, as the tweak function body couldn't be simply copy-pasted and run without any context anymore. Though this might be downside only for me. :)

Most importantly, the tweaks couldn't be passed directly from command line anymore as it would be no longer possible to properly parse all the options, not to mention correctly pass them to elevated command in case of RequireAdmin. Only preset files could be used.

@ghost
Copy link

ghost commented Jun 12, 2019

I'd vote for PowerShell-y arguments. :)

ThisPCLibraries -Hide "Desktop", "Documents"

...confusing for occasional and non tech-savvy users...user needs to know appropriate PowerShell syntax...

Shouldn't the GUI described in #244 make tweaking even simplier than before in the end?

all tweaks need to be renamed and rewritten

Maybe an opportunity to change function names to more PowerShell-y paradigm?

Set-ThisPCLibraries

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

No branches or pull requests

1 participant