[Solved] Different launchers on different desktops?

Forum rules
Before you post please read how to get help
Post Reply
FrankB616
Level 2
Level 2
Posts: 75
Joined: Wed Mar 27, 2019 1:50 pm

[Solved] Different launchers on different desktops?

Post by FrankB616 » Mon Apr 01, 2019 11:45 pm

I come from KDE but want to try XFCE. KDE allowed different wallpapers for different desktops, as does XFCE. So far, so good.

KDE allowed different 'shortcuts' or launchers on each of the different desktops. So far, when I create a launcher on one desktop in XFCE, it appears on all of them.

Is there a way to keep a launcher visible ONLY on the desktop on which it is created?

Thanks.

Frank.
Last edited by FrankB616 on Sat Sep 14, 2019 3:33 pm, edited 1 time in total.

gm10
Level 18
Level 18
Posts: 8757
Joined: Thu Jun 21, 2018 5:11 pm

Re: Different launchers on different desktops?

Post by gm10 » Tue Apr 02, 2019 5:19 am

I don't think any of our desktops supports that out of the box, surprisingly.

I wrote this script a while ago that does it, but the approach I took means files will get moved off the desktop as you switch the workspace, so if you're having files located on the desktop open in an application as you switch workspaces this may create problems and you'd better take a different approach. If you're not doing that it should work fine in any desktop environment. Copy & paste into a terminal window, log out and back in:

Code: Select all

DATA_DIR=$(xdg-user-dir DESKTOP)/.workspaces
mkdir -p ${DATA_DIR}
xprop -root _NET_CURRENT_DESKTOP|echo ${REPLY:-0} > ${DATA_DIR}/current_workspace
cat > ${DATA_DIR}/desktop_workspace_sync.sh <<'EOB'
#!/bin/bash
XDG_DESKTOP_DIR=$(xdg-user-dir DESKTOP)
DATA_DIR=${XDG_DESKTOP_DIR}/.workspaces
CURRENT_WORKSPACE=$(<${DATA_DIR}/current_workspace)
DESIRED_WORKSPACE=$1
if [ ${CURRENT_WORKSPACE} == ${DESIRED_WORKSPACE} ]
then
    exit
fi
shopt -u dotglob
if [ ! -e "${DATA_DIR}/${CURRENT_WORKSPACE}" ]
then
    mkdir ${DATA_DIR}/${CURRENT_WORKSPACE}
fi
set -- ${XDG_DESKTOP_DIR}/*
if [ -e "$1" ]
then
    mv ${XDG_DESKTOP_DIR}/* -t ${DATA_DIR}/${CURRENT_WORKSPACE}/
fi
set -- ${DATA_DIR}/${DESIRED_WORKSPACE}/*
if [ -e "$1" ]
then
    mv ${DATA_DIR}/${DESIRED_WORKSPACE}/* -t ${XDG_DESKTOP_DIR}/
fi
echo ${DESIRED_WORKSPACE} > ${DATA_DIR}/current_workspace
EOB
chmod u+x ${DATA_DIR}/desktop_workspace_sync.sh
mkdir -p ~/.local/bin
cat > ~/.local/bin/desktop-workspace-sync <<'EOB'
#!/bin/bash
DATA_DIR=$(xdg-user-dir DESKTOP)/.workspaces
xprop -root -notype -spy _NET_CURRENT_DESKTOP | while read -r; do
    ${DATA_DIR}/desktop_workspace_sync.sh ${REPLY: -1}
done
EOB
chmod u+x ~/.local/bin/desktop-workspace-sync
cat > ~/.config/autostart/desktop-workspace-sync.desktop <<'EOB'
[Desktop Entry]
Type=Application
Exec=desktop-workspace-sync
Name=desktop-workspace-sync
EOB


FrankB616
Level 2
Level 2
Posts: 75
Joined: Wed Mar 27, 2019 1:50 pm

Re: Different launchers on different desktops?

Post by FrankB616 » Tue Apr 02, 2019 10:34 am

>I don't think any of our desktops supports that out of the box, surprisingly. <

Surprising indeed.

Thank you for the script. If it bothers me enough, I will try your script. I don't usually leave files attached to desktop launchers, so I doubt that limitation would trouble me.

I have large 4k screens on my two primary machines, and I don't use enough launchers that this is a 'must have' feature for me. I DO use multiple workspaces, and different backgrounds in each as a visual cue of where I am (that goes all the way back to Xandros 1.0).

Multiple workspaces (desktops) was, for me, one of the 'killer' features of Linux when I started with it back in the early 2000's. It seems, however, that few Linux users today know much about them, and are often quite happy to cluster many app windows on a single desktop, just like the Windows people do. IIRC, I don't think Unity offered the feature at all, and some distros these days come with a default setup of but one workspace, which tends to hide the availability of the feature.

For many years now I have been using 6 workspaces, each one devoted to a specific function (Online, File management, Word processing, etc.) Since at least KDE4, I have been able to place launchers for the apps most commonly used in a desktop ON that desktop, and that desktop only.

Anyway, when I was thinking this over last night, it occurs to me that I can just group launchers in 'pods' on the desktop to achieve the logical separation of function that I am looking for. I'll try that for a while, and see which works best for me.

I appreciate very much that you went to the trouble to create the script. Just out of curiosity, what was your reason for doing that?

Thanks.

Frank.

gm10
Level 18
Level 18
Posts: 8757
Joined: Thu Jun 21, 2018 5:11 pm

Re: Different launchers on different desktops?

Post by gm10 » Tue Apr 02, 2019 10:45 am

FrankB616 wrote:
Tue Apr 02, 2019 10:34 am
Multiple workspaces (desktops) was, for me, one of the 'killer' features of Linux when I started with it back in the early 2000's. It seems, however, that few Linux users today know much about them, and are often quite happy to cluster many app windows on a single desktop, just like the Windows people do.
I think it's more that screens have gotten bigger and/or people have multiple screens, so workspaces are often more a crutch than a feature.
Windows 10 supports workspaces as well, however (called virtual desktops), but also with shared desktop contents across all of them.

FrankB616
Level 2
Level 2
Posts: 75
Joined: Wed Mar 27, 2019 1:50 pm

Re: Different launchers on different desktops?

Post by FrankB616 » Tue Apr 02, 2019 11:48 am

>I think it's more that screens have gotten bigger and/or people have multiple screens, so workspaces are often more a crutch than a feature. <

Possibly. I still love them, however, as they allow me to easily task-orient my work.

>Windows 10 supports workspaces as well, however (called virtual desktops), but also with shared desktop contents across all of them.<

Yeah, I know. I am chronicling my move to Mint 19 XFCE in another tech forum, and a lively discussion ensued as to whether virtual desktops were useful or not. Most of the users in that forum are Windows users, so I would have expected that.

I haven't actually used Windows since Win98, but I do keep Win10 around and updated in the event I ever change my mind, or actually need it for flashing a device, or some other esoteric task. I actually did try switching back to Windows when the virtual desktops became available in Win10, but found the implementation clumsy, and the whole OS slow. The upgrade fiascos that have been common since convince me that, for me, I was right to remain with Linux.

Hoser Rob
Level 14
Level 14
Posts: 5441
Joined: Sat Dec 15, 2012 8:57 am

Re: Different launchers on different desktops?

Post by Hoser Rob » Thu Apr 04, 2019 8:44 am

gm10 wrote:
Tue Apr 02, 2019 5:19 am
I don't think any of our desktops supports that out of the box, surprisingly. ...
It probably seems surprising if you've only used the KDE DE. If, lilke me, you used a bunch of other DEs first not so much. I don't actually use that feature in KDE but I can see others finding it invaluable. And I don't klnow of any others that do it either.

User avatar
secureIT
Level 3
Level 3
Posts: 150
Joined: Wed Dec 05, 2018 1:26 pm

Re: Different launchers on different desktops?

Post by secureIT » Fri Apr 05, 2019 12:28 pm

You can try it with a script for XFCE that will append different panels (with launchers) to different workspaces.
I think you have to adjust it for LM.
Script is inside of the last post on this thread :
https://askubuntu.com/questions/581913/ ... ifferently
In der Ruhe liegt die Kraft ! .......... The strenght is to be found in serenity !

User avatar
deanr72
Level 3
Level 3
Posts: 155
Joined: Sat Mar 24, 2018 2:00 pm
Location: Poland

Re: Different launchers on different desktops?

Post by deanr72 » Fri Apr 26, 2019 12:32 pm

I think using multiple desktops is just not something people really know how to do in terms of it being useful - as well as a case of perhaps not knowing that it even exists.

I've always figured it must be an effective way to aid efficiency but never really 'cracked it' so to speak. And I've looked for articles and YouTube tutorials to no avail.

My latest use of multiple desktops is simply sending open window and docs that I need at a later time (i.e. when I switch from one project to another) from one desktop to the other just to keep them out of the way. I then go to the second desktop, right click 'Move to another workspace' when I want a window or doc back.

Two windows is clearly enough but a change of backgrounds does make things so less confusing and one plank dock seems to works well this way.

FrankB616
Level 2
Level 2
Posts: 75
Joined: Wed Mar 27, 2019 1:50 pm

Re: Different launchers on different desktops?

Post by FrankB616 » Fri May 03, 2019 6:36 pm

deanr72 wrote:
Fri Apr 26, 2019 12:32 pm
I think using multiple desktops is just not something people really know how to do in terms of it being useful - as well as a case of perhaps not knowing that it even exists.

I've always figured it must be an effective way to aid efficiency but never really 'cracked it' so to speak. And I've looked for articles and YouTube tutorials to no avail.

Yeah, I agree. And it is kinda sad. Even Linux users don't know a lot about multiple desktops, and I blame the distros for that. Most of them hide the feature because "it is too confusing" for the Windows escapee. We are coming back to the Windows Lowest Common Denominator. Da*n but Windows has SUCH a heavy hand in advancement, or possibly the lack of. Windows takes SO MUCH hardware to run, and now multiple monitor systems are common, IMHO opinion, because Windows is SO limited by old school thinking. I can do ALL that a multiple monitor Windows system can do on a SINGLE 4K monitor. /end rant
My latest use of multiple desktops is simply sending open window and docs that I need at a later time (i.e. when I switch from one project to another) from one desktop to the other just to keep them out of the way. I then go to the second desktop, right click 'Move to another workspace' when I want a window or doc back.
So, why not do that permanently by organizing your work according to task at the outset?

KDE is currently bucking this trend -- in spades. I hope they succeed, but at present, I see it as going overboard. One can have multiple "Activities", and each activity can have multiple "desktops". Wheels within wheels. Mucho overkill.

Multiple workspaces (or desktops) allows one to put different tasks in different virtual monitors. Has it not happened to you that you have SO MANY windows open at the same time that they get in the way of each other? Obviously you do, or you wouldn't be moving application windows to a 'spare' workspace to 'make room'.

Having a different workspace for each task I find immensely useful. I open my email and web browser in one workspace in one virtual monitor, and my word processor in another. I can cut and paste between the two if I want.

I put my Win10 VM in a third. I can cut and paste from that one as well, if I need to.

I do all my graphics / digital photos in yet another.
Two windows is clearly enough but a change of backgrounds does make things so less confusing and one plank dock seems to works well this way.
Yeah, no. Once you get on to the idea, 2 will never be enough. I use 6 workspaces regularly, one of them being "Miscellaneous" for the things that don't fit anywhere else. So you can see why the visual cues with different wallpapers on each virtual monitor is of value to me. I can just click to move from one task-oriented activity to another. I can't imagine how anyone gets anything done any other way. :-)

Anyway, to each his own. I'm just glad that Linux offers us that choice.

I have come to Mint XFCE looking for a balance between the nutzo complexity of KDE Plasma 5, and the multiple monitor maximum hardware mayhem approach of Windows.

So far, so good. And Linus agrees. :-)

https://linux.slashdot.org/story/11/08/ ... 3-for-xfce

Though, with that said, Linus is hard to pin down. :-)

Frank.

User avatar
deanr72
Level 3
Level 3
Posts: 155
Joined: Sat Mar 24, 2018 2:00 pm
Location: Poland

Re: Different launchers on different desktops?

Post by deanr72 » Mon Jul 15, 2019 7:08 am

Coming back to this...

I've recently dumped Plank in favour of a second panel bottom centre.

One thing I noticed was that opened apps which show up in the 'Window Buttons' (turn off button labels, for space) DO NOT appear on all desktops. See two screenshots below, taken within seconds of each other. Desktop 1 on bottom (not extra 'launchers'), desktop 2 above:
Attachments
Webp.net-resizeimage (1).png
Webp.net-resizeimage (1).png (92.62 KiB) Viewed 207 times
Webp.net-resizeimage.png
Webp.net-resizeimage.png (85.5 KiB) Viewed 207 times

Post Reply

Return to “Xfce”