Sometimes the extra semantic colors of Label Assignments and Relative Graphs are useful to quickly find largest, newest etc files or folders, but other times the extra visual information is not needed and distracting.
Quickly switching these features on / off can therefor improve file operations.
Multiple Function Button
This button combines the buttons below. Left-click for Relative Graphs and right-click for Label Assignments.
Colors.dcf (3.5 KB)
1. Relative Graphs
This button toggles both the date and size columns' relative graphs.
(Ctrl + click opens the related preferences page.)
Date + Size Graphs.dcf (745 Bytes)
@keydown:ctrl
Prefs PAGE=columnoptions COLLAPSEALL
@keydown:none
Set RELATIVEDATEGRAPHS=Toggle
Set RELATIVESIZEGRAPHS=Toggle
2. Label Assignments
Label assignments don't have a similar global command and thus require a workaround, as inspired by the post to Switch between dark / light mode label schemes, bytim.
This button toggles label assignments by switching between two foldercolors.oxc config files.
(Ctrl + click opens the related preferences page. Shift + click opens the related folder.)
Note: to use the button script you will first have to:
Specify the name of an existing Filter Label or Wildcart Label, from Preferences / Labels / Label Assignments, in the first variable; i.e.@set label_name = < your label name goes here >
(The specified label filter is used in the double ENABLELABELFILTER toggle at the end of the script, to refresh label assignments, after the config files were swapped.)
Once the button created a second foldercolors.oxc file in the /dopusdata\User Data\Colors folder, it toggles between these two config files. You can then uncheck all label assignments in Preferences / Labels / Label Assignments to create a "switched off" file, and use the other file for all your specific label assignment selections.
(Note: that if you edit the labels of one of these files, the files will differ beyond only the checked selections. If necessary, the two files can then be "reset" by toggling to make the preferred file active, in Preferences / Labels / Label Assignments, and deleting the other file in the /dopusdata\User Data\Colors folder. The button will then restart the process by making a duplicate of the active config file.)
Label Assignments.dcf (2.5 KB)
Button Script
// Specify the name of an existing Filter Label or Wildcart Label
// from Preferences / Labels / Label Assignments
@set label_name = My_Label_Name
@set path_main = /dopusdata\ConfigFiles
@set path_copy = /dopusdata\User Data\Colors
@set file_main = foldercolors.oxc
@set file_copy = foldercolors_{date|yyyyMMdd}_{time|HHmmss}.oxc
@eval:path_none = !Exists( Resolve("/dopusdata\User Data\Colors"))
@eval:file_none = !Exists( Resolve( "/dopusdata\User Data\Colors\foldercolors.oxc"))
@keydown:ctrl
Prefs PAGE=assignedlabels COLLAPSEALL
@keydown:shift
Go "{$path_copy}" NEWTAB=findexisting
@keydown:none
@if:=path_none
CreateFolder "{$path_copy}"
@if:common
Copy "{$path_main}\{$file_main}" TO "{$path_copy}" AS "{$file_copy}" WHENEXISTS=replace
@if:=file_none
Copy DUPLICATE "{$path_copy}\{$file_copy}" AS "{$file_main}"
@if:common
Copy MOVE "{$path_copy}\{$file_main}" TO "{$path_main}" WHENEXISTS=replace
Rename "{$path_copy}\{$file_copy}" TO "{$file_main}"
Set ENABLELABELFILTER "{$label_name}",toggle
Set ENABLELABELFILTER "{$label_name}",toggle