Xfce Forum

Sub domains
 

You are not logged in.

#1 2017-03-28 20:34:59

Pimpifax
Member
Registered: 2017-03-28
Posts: 7

Customized taskbar for each workspace possible?

I'm getting more and mor into Linux and i started to use the different workspaces. Now to my question is: is there a way to customize each taskbar for each workspace so that there would be different shortcuts on each taskbar? Instead of having globally all the same shortcuts.

Just for example:

Workspace 1: Firefox, Thunderbird, Transmission

Workspace 2: Writer, Calc, Gimp

Workspace 3: Gparted, USB-Maker, Application-Installer

...


The idea would be that i have one workspace with the applications i would use primarly for privat and another one i would use for work so that i could switch between them on the fly. Different user-accounts are not really an option for me because of the lack of userbiity by every time logging off/on/off/on/...

So does maybe anyone know a solution for my issue?

Last edited by Pimpifax (2017-03-28 20:36:45)

Offline

#2 2017-03-28 23:28:34

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Customized taskbar for each workspace possible?

There was a thread a while about this request. The information there is still valid including a script that you could use to provide a similar type functionality.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2017-03-29 05:40:46

k-3.14
Member
From: Rhineland
Registered: 2017-02-18
Posts: 153

Re: Customized taskbar for each workspace possible?

Pity, jmrichardson did not share his experience with that script

"I will be testing this out and let you know how it goes."

One comment - a panel #0 does not show up here. First panel is #1 !? Xfce4.12 Debian Stretch

Just gave it a try with that script.

2 workspaces. panel1 at top, panel2 at bottom and panel3 on right side.

Get this message, when running that script

"kalle@nostromo:~$ ./panel_switcher
pswDEBUG: Locking succeeded
Die Eigenschaft »/panels/panel-2/autohide« ist in dem Kanal »xfce4-panel« nicht vorhanden. Um eine neue Eigenschaft anzulegen, bitte die Option --create« benutzen.
Die Eigenschaft »/panels/panel-2/autohide« ist in dem Kanal »xfce4-panel« nicht vorhanden. Um eine neue Eigenschaft anzulegen, bitte die Option --create« benutzen.
Die Eigenschaft »/panels/panel-3/autohide« ist in dem Kanal »xfce4-panel« nicht vorhanden. Um eine neue Eigenschaft anzulegen, bitte die Option --create« benutzen.
Die Eigenschaft »/panels/panel-3/autohide« ist in dem Kanal »xfce4-panel« nicht vorhanden. Um eine neue Eigenschaft anzulegen, bitte die Option --create« benutzen.
Die Eigenschaft »/panels/panel-2/autohide« ist in dem Kanal »xfce4-panel« nicht vorhanden. Um eine neue Eigenschaft anzulegen, bitte die Option --create« benutzen."


The property autohide does not exist, to create such a property, use the option --create ??

br

Last edited by k-3.14 (2017-03-29 06:58:44)

Offline

#4 2017-03-29 10:44:11

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Customized taskbar for each workspace possible?

I think this was initially coded for Xfce 4.10. Try this updated script for 4.12:

#!/bin/bash
# The Poor Man's Panel Switcher solution (Xfce 4.12)
# Requires: wmctrl
# Make sure you edit the PANEL configuration parameters to suit.
# debug mode = bash -xv /path/to/psw 2>&1 | tee wspm.log

# make sure that only one instance of this script is running
lockfile=/tmp/.psw.lockfile
if ( set -o noclobber; echo "locked" > "$lockfile") 2> /dev/null; then
  	trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT
  	echo "pswDEBUG: Locking succeeded" >&2

######### PANEL CONFIGURATION: EDIT THESE VALUES ######################################################
###																												
### WORKSPACE[x]=Panel Number					                                                        
###																										              
	WORKSPACE[1]=1													                        
	WORKSPACE[2]=2		
	WORKSPACE[3]=4													                        
	WORKSPACE[4]=3										                       
####################################################################################################

######### DO NOT EDIT BELOW #############################################################################
	CURRENT_WORKSPACE=$(($(wmctrl -d | grep \* | cut -d' ' -f1)+1))
   [[ $(xfconf-query -c xfce4-panel -p /panels/panel-${WORKSPACE[$CURRENT_WORKSPACE]}/autohide-behavior) ]] || xfconf-query -c xfce4-panel -p /panels/panel-${WORKSPACE[$CURRENT_WORKSPACE]}/autohide-behavior -n -t int -s 0
	xfconf-query -c xfce4-panel -p /panels/panel-${WORKSPACE[$CURRENT_WORKSPACE]}/autohide-behavior -s 0
	
	while true
	do
		NEW_WORKSPACE=$(($(wmctrl -d | grep \* | cut -d' ' -f1)+1))	
		if [ $CURRENT_WORKSPACE -ne $NEW_WORKSPACE ]; then
			wmctrl -s $((($NEW_WORKSPACE)-1))
			# autohide the current workspace panel
			[[ $(xfconf-query -c xfce4-panel -p /panels/panel-${WORKSPACE[$CURRENT_WORKSPACE]}/autohide-behavior) ]] || xfconf-query -c xfce4-panel -p /panels/panel-${WORKSPACE[$CURRENT_WORKSPACE]}/autohide-behavior -n -t int -s 0
			xfconf-query -c xfce4-panel -p /panels/panel-${WORKSPACE[$CURRENT_WORKSPACE]}/autohide-behavior -s 2
			# unhide the new workspace panel
			[[ $(xfconf-query -c xfce4-panel -p /panels/panel-${WORKSPACE[$NEW_WORKSPACE]}/autohide-behavior) ]] || xfconf-query -c xfce4-panel -p /panels/panel-${WORKSPACE[$NEW_WORKSPACE]}/autohide-behavior -n -t int -s 0
			xfconf-query -c xfce4-panel -p /panels/panel-${WORKSPACE[$NEW_WORKSPACE]}/autohide-behavior -s 0
			CURRENT_WORKSPACE=$NEW_WORKSPACE
		fi
	sleep 1
	done

  	rm -f "$lockfile"
else
  	echo "pswDEBUG: Lock failed - exit" >&2
  	exit 1
fi

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2017-03-29 14:48:44

k-3.14
Member
From: Rhineland
Registered: 2017-02-18
Posts: 153

Re: Customized taskbar for each workspace possible?

+1

It works like a charm.

Can make a video and post it!?

br

Offline

#6 2017-03-29 15:19:06

Jerry3904
Member
Registered: 2013-11-09
Posts: 850

Re: Customized taskbar for each workspace possible?

Late to the party, great script ToZ.

Different user-accounts are not really an option for me because of the lack of userbiity by every time logging off/on/off/on/...

There are simpler ways to do that:

https://forum.xfce.org/viewtopic.php?id=8686


MX-23 (based on Debian Stable) with our flagship Xfce 4.18.

Offline

#7 2017-03-29 16:29:45

Pimpifax
Member
Registered: 2017-03-28
Posts: 7

Re: Customized taskbar for each workspace possible?

Thank you for trying to help me! The thing is auto-hide isn't really my cup of tea because of driving me mad all the time... ^^ But someone suggested me to try tint2. So that i'm still not that much aware of Linux in detail i have to figure out what this is and how to use it for first...

Offline

#8 2017-03-29 17:01:49

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Customized taskbar for each workspace possible?

k-3.14 wrote:

+1

It works like a charm.

Can make a video and post it!?

br

Absolutely, lets see it in action.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2017-03-29 17:38:12

k-3.14
Member
From: Rhineland
Registered: 2017-02-18
Posts: 153

Re: Customized taskbar for each workspace possible?

A pleasure, but this is again vbox DEBIAN Jessie on my PCLinuxOS KDE4 host with a Intel Core2 Duo CPU E6750 @ 2.66GHz

IT IS WORKING, but switchover is dead slow ;-) Sorry.

https://youtu.be/coeLXfvcQj8

PS. As KDE5 is around the corner and I am NOT!! going that way, I am waiting for DEBIAN Stretch to be stable. Then DEBIAN with XFCE4.12 will be my host system ...

Offline

#10 2021-03-10 11:09:44

DavidB
Member
From: France
Registered: 2021-03-10
Posts: 6
Website

Re: Customized taskbar for each workspace possible?

Hello,

I am a bit late to the party but I wanted so much to thank you for this script. It does exactly what I was looking for — setting up a different panel for each workspace, working fine on 4.16 if anyone is interested.

Thx, once again wink

Last edited by DavidB (2021-03-10 11:10:22)

Offline

Board footer

Powered by FluxBB