This forum uses cookies. Click X button to hide this message. What is stored? / Privacy
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can I create a view mode that sorts by Dimensions

 
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander (English) Printable version
View previous topic :: View next topic  
Author Message
Jorge24
Junior Member
Junior Member


Joined: 06 Nov 2016
Posts: 7
Location: USA

PostPosted: Sun Apr 01, 2018 11:01 am    Post subject: Can I create a view mode that sorts by Dimensions Reply with quote

In Options > View Mode, I can change the sort order to Name, Ext, Date, Size, and Unsorted. Is there a way to sort using other fields such as Dimension (for images) or Track Number (for music files)?
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 35434
Location: Switzerland

PostPosted: Tue Apr 03, 2018 8:01 am    Post subject: Reply with quote

You need to switch to a custom columns view for this.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Jorge24
Junior Member
Junior Member


Joined: 06 Nov 2016
Posts: 7
Location: USA

PostPosted: Thu Apr 05, 2018 9:56 pm    Post subject: Reply with quote

What I'm trying to do is use the Autoswitch feature to automatically switch to a view mode that sorts files by image dimension when I browse certain folders. Is there a way to set the sorting order of custom columns to "sort by dimension" by default?
Back to top
View user's profile Send private message
tuska
Power Member
Power Member


Joined: 21 May 2007
Posts: 1067

PostPosted: Fri Apr 06, 2018 8:03 am    Post subject: Custom columns | View Mode | Auto Switch Mode | Sorting Reply with quote

2Jorge24
There is a solution - below is an example for pictures.
You will at least need one content plugin for the view.

Plugins
1.  ImgSize 2.03
1.1 fields: [=imgsize.Width], [=imgsize.Height] --> separate columns for sorting: e.g. width 5472, height 3648
2.  ShellDetails Version 1.25
2.1 field: [=shelldetails.Dimensions] --> only one column for sorting: dimensions e.g. 5472 x 3648

Download the .zip file(s) and double-click on it for installation of the plugin(s).

Creation of a "Custom columns - View" (with plugin ImgSize installed)
 1. Recommended(!): Switch to a directory in TC that already contains pictures
 2. Configuration - Options - Custom columns - New
 3. Name: e.g. Photos_dimensions
 4. Button "Add column"
 5. Caption: Path (Name and Ext. already defined as default)
 6. Click on the "+"-sign -> Plugins "imgsize" -> double-click on "Width" under Properties or OK
 7. Field contents: [=imgsize.Width]
 8. Button "Add column"
 9. Click on the "+"-sign -> Plugins "imgsize" -> double-click on "Height" under Properties or OK
10. Field contents: [=imgsize.Height]
11. tick: Adjust Tabs to window width
12. tick: Horizontal scrollbar
13. Button "Apply", OK, OK

Pull the column separation lines to the desired widths.
With "Configuration" - "Save position" you should save your settings regarding column widths now.

The "Custom columns view" can be displayed as follows (at this time manually):
 1. Right-click on a column header,...
 2. Menu "Show" - "Custom Columns Mode"
 3. After pressing a button in TC with command: cm_SrcCustomViewX Photos_dimensions (X=No. of your "Customs columns view")
    At this point, I strongly recommend to create a button with command: cm_SrcViewMode0
    (cm_SrcViewMode0 8500 Source: Default view mode (no colors or icons)

Creation of a "View Mode"
- Configuration - Options - "View Mode"
- click on Button "Add..."
- Name of your "View Mode": Photos_dimensions_W-H (example!)
- Button OK
- Columns view: Choose your "Custom columns - View"(!) by clicking the dropdown-arrow, i.e. Photos_dimensions
- Sort order: Choose "Width" or "Height" by clicking the dropdown-arrow, e.g. "Height",
  then you have the possibility to choose "Descending" by clicking the field
- check the next fields...
- Auto run commands: |cm_SrcViewMode0 --> press button "Help" for details --> you need this command when the "View Mode" is left
  to return to your "View Mode" <Default>;
- "View Mode" <Default> should be defined(!), e.g. Columns view: Full, Sort order: Name.
View modes can be toggled manually using the View menu or automatically by custom rules.

The "View Mode" can be displayed as follows (at this time manually):
- Menu "Show" - "Custom View Modes"
- After pressing a button in TC with command: cm_SrcViewModeList Photos_dimensions_W-H
  At this point, I strongly recommend to create a button with command: cm_SrcViewMode0
  (cm_SrcViewMode0 8500 Source: Default view mode (no colors or icons)

Creation of an "Auto Switch Mode"
- Configuration - Options - "Auto Switch Mode"
- tick "Automatically switch view mode on directory change"
- click on Button "Add..."
- Rule: +: Must match, Directory: e.g. I:\photos\* (only example ... see below
  --> press Help for details, e.g. * ... = The folder "I:\photos" and all subfolders
- Option: Click on "More sub-rules" and note the button "&" on the left (click on it) regarding parameters "& AND (all match)"
  and "| OR (any match)"
- Rule: Click on the dropdown-arrow to see more options like "%: At least 50% match", "?: At least one match", etc.
- As a rule for you could probably the rule with parameter "%: At least 50% match" fit,
  File types: *.ani *.bmp *.gif *.ico *.jpe *.jpeg *.jpg *.pcx *.png *.psd *.tga *.tif *.tiff *.wmf
  Also, because you can call the desired view (="View Mode") at any time via a button.
- Set this mode: ... Choose this field content by drop-down box: Photos_dimensions_W-H (= Name of your View Mode!)
- Click on button: Apply, then OK

Attention - Rules - Overlaps:
TC goes through the list of rules from top to bottom, and applies the first one that applies.
The same also applies to overlaps in the sub-rules!
- Use arrow up (Moves the vertical position one line up) or
- use arrow down (moves the vertical position one line down)
to change the order in the list of rules [=> Prioritization change!].

Example:
- Rule: "%: At least 50% match" --- File types: *.3ga *.669 *.a52 *.aac *.ac3 *.adt *.adts *.aif *.aifc *.aiff *.amr *.aob
  *.ape *.awb *.caf *.dts *.flac *.it *.kar *.m4a *.m4b *.m4p *.m5p *.mid *.mka *.mlp *.mod *.mpa *.mp1 *.mp2 *.mp3 *.mpc
  *.mpga *.mus *.oga *.ogg *.oma *.opus *.qcp *.ra *.rmi *.s3m *.sid *.spx *.thd *.tta *.voc *.vqf *.w64 *.wav *.wma *.wv *.xa *.xm
- Rule: "%: At least 50% match" --- File types: *.ani *.bmp *.gif *.ico *.jpe *.jpeg *.jpg *.pcx *.png *.psd *.tga *.tif *.tiff *.wmf

In my case, the "Auto Switch Mode" did not work immediately.
For me it was even necessary that I had to change the previous order, so that the "Auto Switch Mode" was executed.
Hopefully that was just an exception, but it cost me some time to find out.

Custom columns | View Mode | Auto Switch Mode
https://ghisler.ch/board/viewtopic.php?p=329888#329888 Overview
https://ghisler.ch/board/viewtopic.php?p=329833#329833 Button for View Mode <default>; Shortcut for a View Mode

I wish you success.

Regards
Karl
Back to top
View user's profile Send private message
Jorge24
Junior Member
Junior Member


Joined: 06 Nov 2016
Posts: 7
Location: USA

PostPosted: Sat Apr 07, 2018 10:55 pm    Post subject: Reply with quote

Wow I didn't realize it would take that many steps. Thank you for all the help!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander (English) All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Imprint/Impressum: This site is maintained by Ghisler Software GmbH
Privacy Policy | Datenschutzerklärung | Politique de Confidentialité

Using phpBB © phpBB Group