rox4

Moderator: Forum moderators

Post Reply
nik120s
Posts: 5
Joined: Mon Aug 05, 2024 2:50 pm

rox4

Post by nik120s »

Code: Select all


#!/bin/sh

############# set --->  never automatically resize ##########################
#############      defaultfilemanager==rox    #############################

ROX_FUNCx2 () {  defaultfilemanager /root ; wmctrl -r :ACTIVE: -e 0,120,100,800,400; defaultfilemanager / ; wmctrl -r :ACTIVE: -e 0,930,100,800,400 
     };  export -f ROX_FUNCx2     
     ROX_FUNCx2
   function ROX_FUNCx4()
{
    case $1 in
        start)
   if [ ! -f /tmp/win3 ]; then     defaultfilemanager /usr ; wmctrl -r :ACTIVE: -e 0,120,550,800,400
	  defaultfilemanager /etc ; wmctrl -r :ACTIVE: -e 0,930,550,800,400	  
	   wmctrl -l | grep "/usr" | cut -d ' ' -f 1 > /tmp/win3
	 wmctrl -l | grep "/etc" | cut -d ' ' -f 1 > /tmp/win4; fi
        ;;
        stop)
     if [ -f /tmp/win3 ]; then   wmctrl -r "$(cat /tmp/win3)" -i -b add,hidden;  wmctrl -r "$(cat /tmp/win4)" -i -b add,hidden
         fi
        ;;
    esac
}
export -f  ROX_FUNCx4
       
min () { 
	for i in $(wmctrl -lx | grep "ROX-Filer" | cut -d ' ' -f 1 | tr '\n' ' '); do wmctrl -r "$i" -i -b add,hidden; done
	 }
	  export -f min
max () { 
	for i in $(wmctrl -lx | grep "ROX-Filer" | cut -d ' ' -f 1 | tr '\n' ' '); do wmctrl -r "$i" -i -b remove,hidden; wmctrl -r "$i" -i -b add,above; done
	
 }
	  export -f max	  
	
export TILING_ROX='
<window title="TILING_ROX" resizable="false"  decorated="false">
 <vbox>     
 <hbox homogeneous="true">
 
	<button><label>🌍browser🌍</label><action>defaultbrowser &</action></button> 
 
	<button><label>🍎sublime_text🍎</label><action>sublime &</action></button> 
	
 <togglebutton tooltip-text="  ">
    <label>🔼 rox 🔽</label>
    <action>if true min &</action>
    <action>if false max &</action>
 </togglebutton>
  
	  <togglebutton tooltip-text="  ">
     <label>🔢2+2 rox</label>
     <action>if true ROX_FUNCx4 start &</action>
     <action>if false ROX_FUNCx4 stop &</action>
  </togglebutton> 
	
	<button tooltip-text="  "><label>❎close</label><action>rm -f /tmp/win3 /tmp/win4</action><action>"rox -D /"</action><action type="exit">TILING_ROX</action></button>
	
 </hbox></vbox></window>'
 
gtkdialog --program=TILING_ROX   -G  1615x36+120+50
geo_c
Posts: 3050
Joined: Fri Jul 31, 2020 3:37 am
Has thanked: 2372 times
Been thanked: 945 times

Re: rox4

Post by geo_c »

geo_c wrote:

So does this give you 4 rox windows tiled?

I gave it a whirl on KLV-airedale. Rox windows don't exactly tile, but this script looks very cool.

I'll try it on dpupbw.

geo_c
Old School Hipster, and Such

nik120s
Posts: 5
Joined: Mon Aug 05, 2024 2:50 pm

Re: rox4

Post by nik120s »

geo_c wrote: Thu Feb 27, 2025 3:51 pm

I gave it a whirl on KLV-airedale. Rox windows don't exactly tile, but this script looks very cool.

I'll try it on dpupbw.

I'm glad you liked it.Rox is a good file manager.For me, rox lacks breadcrumbs and a second panel

Post Reply

Return to “File Management”