Xfce Forum

Sub domains
 

You are not logged in.

#1 2013-08-26 04:26:12

Rava
Member
Registered: 2007-03-06
Posts: 9

thunar via bash script - howto open several tabs

I want to use a bash script to open several tabs with folders in thunar, but I don't know how to do that.

If I run, e.g.

$ thunar /tmp /usr

two thunar's are started, one with /tmp and one with /usr, instead of one thunar that opens both folders in a tab.

How can I achieve that?

My system: Slackware x86-64, thunar V 1.6.3

Offline

#2 2013-08-26 05:41:10

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,019

Re: thunar via bash script - howto open several tabs

http://docs.xfce.org/xfce/thunar/hidden-settings

shows a hidden setting, /misc-always-show-tabs. I am not sure whether this is only a yes/no option or if the user can add a number and have it show multiple tabs. But, thinking about it, it doesn't seem like an option that would show tabs at all times - but only be able to start up with one tab - would be all that useful, so you might have some luck playing around with it.

Although even if that ended up allowing you to have Thunar start with multiple tabs, it might not allow you to start Thunar with specific directories open in them.

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#3 2013-08-26 06:56:32

Rava
Member
Registered: 2007-03-06
Posts: 9

Re: thunar via bash script - howto open several tabs

^
This is about if the tabs row should be shown when there is only one open tab at all...
I think setting this hidden settings won't help me with my problem...

Offline

#4 2018-09-10 15:46:50

yurbev
Member
Registered: 2016-04-18
Posts: 28

Re: thunar via bash script - howto open several tabs

I'm surprised there's no solution for this.

Offline

#5 2018-09-10 20:17:50

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,846

Re: thunar via bash script - howto open several tabs

See: https://forum.xfce.org/viewtopic.php?id=12154 for a workaround.

See: bug report / enhancement request. I'm sure a patch would be welcome.

Offline

#6 2018-09-11 00:25:28

mint4all
Member
From: America
Registered: 2018-08-21
Posts: 64

Re: thunar via bash script - howto open several tabs

Rava wrote:

I want to use a bash script to open several tabs with folders in thunar, but I don't know how to do that.

If I run, e.g.

$ thunar /tmp /usr

two thunar's are started, one with /tmp and one with /usr, instead of one thunar that opens both folders in a tab.

How can I achieve that?

My system: Slackware x86-64, thunar V 1.6.3

Greetings!

I just tested MDM's suggestion (add a hidden setting for thunar) and can confirm that this extra setting has no effect on a newly-opened thunar session -- 2 separate instances of thunar still open up. However, when testing your requirement (2 URLs/URIs being passed to the file manager) with Double-Commander ("doublecmd %F %F"), that file manager neatly opens 2 panes in a split view, and in the desired folder sequence. I tested this both with a panel-button and in a terminal session.

The foregoing is not meant to detract from thunar -- it is doing a fine & stable job as file managers go, but in all honesty doesn't keep pace with Nemo's or Caja's features. So let me stir the broth a bit more: how about assigning different colors (not emblems) to folders? Not with thunar ...

Cheers, M4A


Linux Mint 18.3-xfce & Linux Mint 19-xfce  -- Dell Precision T1500 Desktops -- Toshiba Satellite Laptop -- Family & Community Support re. Linux

Offline

#7 2018-09-11 00:36:01

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,846

Re: thunar via bash script - howto open several tabs

mint4all wrote:

So let me stir the broth a bit more: how about assigning different colors (not emblems) to folders? Not with thunar ...

Actually, as of this commit you can now have custom folder icons for thunar. More info here.

Offline

#8 2018-09-11 01:41:17

mint4all
Member
From: America
Registered: 2018-08-21
Posts: 64

Re: thunar via bash script - howto open several tabs

ToZ wrote:
mint4all wrote:

So let me stir the broth a bit more: how about assigning different colors (not emblems) to folders? Not with thunar ...

Actually, as of this commit you can now have custom folder icons for thunar. More info here.

Touch'e smile

Will its implementation work akin to this post @ http://www.webupd8.org/2015/03/nautilus … older.html ?

Thanks!


Linux Mint 18.3-xfce & Linux Mint 19-xfce  -- Dell Precision T1500 Desktops -- Toshiba Satellite Laptop -- Family & Community Support re. Linux

Offline

#9 2018-09-11 02:15:57

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,846

Re: thunar via bash script - howto open several tabs

Kind of.
This enhancement will allow for the use of a specific file in the folder to be the folder thumbnail (for example: folder.jpg, .folder.png, etc).

A utility (or a thunar custom action) can be created to programatically change the image file (like re-coloring it).

I've been using it to overlay an album cover on a folder icon:
thunar.png
...using the following script:

#!/bin/bash

convert -resize 300x300 "$1" c.jpg
composite -geometry +175+150 c.jpg /home/toz/f.png .folder.png
rm c.jpg

So, it is quite possible to create a small script to recolor the folder icons.

Edit: the caveat here is that this will require a file in every folder. Looking at folder-color source code, it looks like it uses gvfs metadata to accomplish this.

Last edited by ToZ (2018-09-11 16:32:29)

Offline

#10 2018-09-11 04:29:55

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,019

Re: thunar via bash script - howto open several tabs

ToZ wrote:

I've been using it to overlay an album cover on a folder icon:

Now that's a neat little trick. Kudos.

Regards,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#11 2018-09-11 16:24:51

mint4all
Member
From: America
Registered: 2018-08-21
Posts: 64

Re: thunar via bash script - howto open several tabs

MountainDewManiac wrote:
ToZ wrote:

I've been using it to overlay an album cover on a folder icon:

Now that's a neat little trick. Kudos.

Regards,
MDM

Awesome, thanks for sharing this with us, ToZ ... Any idea when this great feature will get into the "wild"? Will we have to wait for the full 4.14 release?

Cheers, M4A


Linux Mint 18.3-xfce & Linux Mint 19-xfce  -- Dell Precision T1500 Desktops -- Toshiba Satellite Laptop -- Family & Community Support re. Linux

Offline

#12 2018-09-11 16:35:26

ToZ
Moderator
From: Canada
Registered: 2011-06-02
Posts: 4,846

Re: thunar via bash script - howto open several tabs

This will be ready to use with tumbler 0.2.0 (already released) and thunar 1.8.2 (not yet released - soon?) and when your distro adds these versions to their repositories.

Offline

Board footer

Powered by FluxBB