Page 1 of 1

How do I put a link to a text file on the KDE panel bar?

Posted: Wed May 18, 2022 8:47 am
by cbiweb
I have a text file that I created myself, with information I need to access often.

I want to place it on the panel bar in KDE.

Apparently the correct terminology in Linux is link, not shortcut (which is what it's called in Windows) - a copy of an existing file.

I can put a link/shortcut on the desktop, but I want it on the panel.

It's not a launcher that I want, it's a link.

Re: How do I put a link to a text file on the panel bar?

Posted: Wed May 18, 2022 11:12 am
by CharlesV
I'm not really a KDE person, but I have created a second panel, and then added links to text files using drag and drop onto that second panel.

A quick check and I am unable to do that Drag and Drop onto the main panel, it only works with a second panel? Someone more versed in KDE than I may be able to answer that one better, but that could be your solution.

And if all your after is a single text file, then I would create a launcher for kwrite ( or your favorite text editor in kde) and then edit the launcher to open that single file.

Re: How do I put a link to a text file on the panel bar?

Posted: Wed May 18, 2022 11:16 am
by Eadwine Rose
Maybe (not versed in KDE) the first panel is set as locked, you can then not drag stuff onto it.

Re: How do I put a link to a text file on the panel bar?  [Solved]

Posted: Wed May 18, 2022 11:30 am
by cbiweb
Okay, I managed to figure it out myself with some experimentation.
  1. Drag & drop a file from Dolphin to the far right of the KDE Plasma panel bar. It won't drop anywhere else on the bar, only the far right, and can be dropped anywhere between any of the icons on that side of the panel.
  2. When you drop it, a pop-up will appear with two options:
    • Add Sticky Note
    • Add Icon
    I chose Add Icon
And that was it. I had my file on the panel bar.

I do prefer it to be on the left, though, and the only way to move it is to right-click the panel and choose 'Edit Panel'. Then I was able to move it over to the left.
The downside is it can't be moved anywhere between other icons on that side of the panel. A minor annoyance, but at least I can add files to the panel like I want.
CharlesV wrote: Wed May 18, 2022 11:12 am I'm not really a KDE person, but I have created a second panel, and then added links to text files using drag and drop onto that second panel.

A quick check and I am unable to do that Drag and Drop onto the main panel, it only works with a second panel? Someone more versed in KDE than I may be able to answer that one better, but that could be your solution.
Thanks! I might play around with that as well.
You gave me a good suggestion a couple days ago regarding Xfce, but I've switched to KDE, which is more suited to my brain, lol

Re: How do I put a link to a text file on the KDE panel bar?

Posted: Wed May 18, 2022 12:08 pm
by CharlesV
@cbiweb glad you got it . It looks like drag and drop only works on that panel if you drop it near the MX logo or first couple of icons. I suspect the panel is created with an 'apps area' past that.

@Eadwine Rose thanks, that set me onto finding the lock, which I didnt find, but its the area of the dock it seems. The widgets in other places dont provide DnD.

Re: How do I put a link to a text file on the KDE panel bar?

Posted: Wed May 18, 2022 1:04 pm
by towwire
I don't use KDE but on XFCE there are two ways I know to do what you want. For me the second is the better one. Just don't know if it would work on KDE. OPPS see you did it but will offer this anyway.

First.
1. Create a launcher on your desktop for the program that opens your file.
2. Edit the launcher with the path to you file, something like this.
Name: FeatherPad
Comment: Lightweight Qt text editor
Command: featherpad /home/towwire/Doc_s/Scripts/Commands.txt
3. On XFCE I can right click it Open With "Create Launcher on the panel".
4. You can delete the destop launcher and the panel one will stay. You might want to change the icon to something other than the program one.

Second
The next way is to just add the program to the panel, move it where you want and then edit it.
On XFCE I can add an url that is the path to the file and an Arrow button that lets me either open program or use the arrow to the file.
Screenshot_2022-05-18_09-42-55.png
You can add more url's to other files if you want. Still able to open the program to create a new file.