qterminal icon indicating copy to clipboard operation
qterminal copied to clipboard

[Feature request] Improve bookmarks panel

Open stefonarch opened this issue 3 years ago • 42 comments

Is your feature request related to a problem? Please describe.

I never ever use one of the "local bookmarks". Instead of HOME most users will use cd, most terminal user never enter "Music" folder and so on.

Describe the solution you'd like

Hardcoded bookmarks should be removed in favor of only user defined bookmarks, shipping just a list of useful examples. Also distinction "local" and "synchronized" section would be gone, just "Bookmarks", all of the XDG_* commands would work also if saved remotely,

Context

https://github.com/lxqt/qterminal/issues/789#issuecomment-1012060723

stefonarch avatar Jan 13 '22 12:01 stefonarch

Hardcoded bookmarks should be removed in favor of only user defined bookmarks

I agree. What's the use of adding cd ... for someone that works with a terminal emulator? If he doesn't know about cd, PWD, HOME, etc., he needs to learn them elsewhere.

tsujan avatar Jan 13 '22 13:01 tsujan

If we remove "Local Bookmarks", I think we should also hide the top branch "Synchronized Bookmarks", so that the user could have his own meaningful tree:

tree

tsujan avatar Jan 13 '22 15:01 tsujan

Apparently, the bookmark functionality isn't used by many; otherwise, there would be an open issue about bookmark filtering, which doesn't work.

tsujan avatar Jan 13 '22 15:01 tsujan

Apparently, the bookmark functionality isn't used by many; otherwise, there would be an open issue about bookmark filtering, which doesn't work.

True, never used it as they aren't so many here. I specially use them for locations. "Edit bookmartks" is for using featherpad to modify them, downside they get not reloaded on save. schermata-01-13-17-15-01

stefonarch avatar Jan 13 '22 16:01 stefonarch

IMHO a good and various collection of bookmarks in the default file will show well the potentials.

stefonarch avatar Jan 13 '22 16:01 stefonarch

I think, before any design change (which will need @yan12125's presence), the filtering should be enabled.

tsujan avatar Jan 13 '22 16:01 tsujan

Step by step, no hurry.

stefonarch avatar Jan 13 '22 16:01 stefonarch

Step by step, no hurry.

I agree. Mixed PRs can be a nightmare for reviewers — they are for me.

tsujan avatar Jan 13 '22 16:01 tsujan

Hardcoded bookmarks should be removed in favor of only user defined bookmarks, shipping just a list of useful examples.

That sounds a good idea! Just note that this is a backward-incompatible changes, so upcoming release notes should clearly indicate this and have some tips on how to add XDG folders and/or environment variables back to bookmarks.

downside they get not reloaded on save

Live-reloading is also a nice feature!

IMHO a good and various collection of bookmarks in the default file will show well the potentials.

Good idea! An example with nested groups will be great!

yan12125 avatar Jan 30 '22 01:01 yan12125

I think i would be also better not to show or show the command only in a tooltip - usually the user will know the command a bookmarks execute. It's often half visible and takes to much space all open.

schermata-01-30-11-21-02

stefonarch avatar Jan 30 '22 10:01 stefonarch

I think i would be also better not to show or show the command only in a tooltip

I have a ready patch that removes the redundant "Bookmarks" branch as well as hard-coded bookmarks. But I first should make the style changes @yan12125 wanted and merge the previous PR. We could discuss further details later.

tsujan avatar Jan 30 '22 10:01 tsujan

Still on the wishlist:

  • retain state for collapsed, detached etc.
  • add bookmarks file: load only .xml files, open ~/.config/qterminal.org/ directory

stefonarch avatar Feb 20 '22 14:02 stefonarch

retain state for collapsed, detached etc.

I also liked to remember attachment/detachment. Unfortunately, there was a problem: Remembering attachment/detachment isn't enough in practice because we don't want a detached dock in front of the terminal window (it's useless). But positioning of the detached dock beside the terminal window can't be done reliably on startup (to say nothing of Wayland, where it's impossible). The reason is somehow complicated....

tsujan avatar Feb 20 '22 14:02 tsujan

add bookmarks file: load only .xml files, open ~/.config/qterminal.org/ directory

This should be easy.

tsujan avatar Feb 21 '22 10:02 tsujan

Hey. I'm so happy you're all asking about those features. qterminal bookmarks feature is the main reason I'm using it :)

I would like to ask \ fix something else. the column width has been changed recently and it is annoying, and I didn't find a way to expand the left column and be able to see the whole name.

Please see the screenshot below, where the left column is the "Name" of the bookmark, and the right column is and command itself.

bad-new view: image

good-old view: image

Please fix it.

DrorDvash avatar Mar 07 '22 08:03 DrorDvash

I can't reproduce this, there is a scrollbar at the bottom and the first column is always visible completely: schermata-03-07-09-54

AFAIK there were not changes "recently" here. Which versions are those screens?

stefonarch avatar Mar 07 '22 08:03 stefonarch

I can't reproduce this, there is a scrollbar at the bottom and the first column is always visible complete: schermata-03-07-09-54AFAIK there were not changes "recently" here. Which versions are those screens?

Well, I notice this has been changed since Kali Linux 2021.1. on my Kali linux 2020.4 it was good.

both 5.15.2, and there is no scroll bar at the bottom (in my old kali it has!) image

DrorDvash avatar Mar 07 '22 09:03 DrorDvash

Well, I notice this has been changed since Kali Linux 2021.1.

Unless Kali has changed the source for itself, I don't know how that's possible. It should have a scrollbar and it does with all Qt styles I tested.

tsujan avatar Mar 07 '22 09:03 tsujan

Qterminal versions? I looked at 0.17 and it's ok there too. Test closing qterminal and rename~/.config/qterminal.org/directory , to exclude some personal setting which causes this.

stefonarch avatar Mar 07 '22 09:03 stefonarch

Well, I notice this has been changed since Kali Linux 2021.1.

Unless Kali has changed the source for itself, I don't know how that's possible. It should have a scrollbar and it does with all Qt styles I tested.

On Kali linux 2021.1 release notes they mention they are "Kali-fy" the built-in terminal, so maybe they really modified it? https://www.kali.org/blog/kali-linux-2021-1-release#terminals-tweaks

Qterminal versions? I looked at 0.17 and it's ok there too.

Qt v5.15.2, where did you see 0.17 version? I'm looking at Help -> About page.

Test closing qterminal and rename~/.config/qterminal.org/directory , to exclude some personal setting which causes this.

Tried it, still the same.

DrorDvash avatar Mar 07 '22 09:03 DrorDvash

1 release notes they mention they are "Kali-fy" the built-in terminal, so maybe they really modified it?

That explains it: "Kali-fication" ;)

To know that, you could download and compile the same version of QTerminal from https://github.com/lxqt/qterminal/releases and run it from the build directory without installing it.

tsujan avatar Mar 07 '22 09:03 tsujan

Qt v5.15.2, where did you see 0.17 version? I'm looking at Help -> About page.

We've added the version to the About page recently. It may not be present in your version. But Kali has a package manager; doesn't it? You could check QTerminal's version by using it.

tsujan avatar Mar 07 '22 09:03 tsujan

1 release notes they mention they are "Kali-fy" the built-in terminal, so maybe they really modified it?

That explains it: "Kali-fication" ;)

To know that, you could download and compile the same version of QTerminal from https://github.com/lxqt/qterminal/releases and run it from the build directory without installing it.

  1. how can i find the "build directory" ?
  2. by saying build without installing it you mean to export the qterminal-1.0.0.tar.xz content and run "make" ?

Qt v5.15.2, where did you see 0.17 version? I'm looking at Help -> About page.

We've added the version to the About page recently. It may not be present in your version. But Kali has a package manager; doesn't it? You could check QTerminal's version by using it.

got it -> 0.16.1

DrorDvash avatar Mar 07 '22 10:03 DrorDvash

Open a terminal inside the source direcctory and do

mkdir build && cd build
cmake ..
make

After it's finished, just use this command from inside the same terminal to run it without installation:

./qterminal

Of course, you need the required dev packages for compilation (see https://github.com/lxqt/lxqt/wiki/Building-from-source).

WARNING: Don't install it in this way (do NOT use sudo make install) because, otherwise, you might encounter various kinds of hassles later.

tsujan avatar Mar 07 '22 10:03 tsujan

Excuse me for not understanding you completely, but if qterminal was installed via "apt install qterminal" when you are saying "Open a terminal inside the source directory", where is the source directory ?

running "which qterminal": /usr/bin/qterminal

DrorDvash avatar Mar 07 '22 10:03 DrorDvash

I said above, "you could download and compile the same version of QTerminal from..." Of course, I meant its source.

You need to have some experience in compilation before doing it. If you don't (which seems to be the case), you'd better forget about it; otherwise, you might damage your system.

tsujan avatar Mar 07 '22 10:03 tsujan

Actually, you could do something better: report the issue to Kali.

tsujan avatar Mar 07 '22 10:03 tsujan

Actually, you could do something better: report the issue to Kali.

Just did it: (for anyone who is following this issue also) https://bugs.kali.org/view.php?id=7608 and got answered:

"_We did not modify the source code of the terminal. In Kali 2021.1 we mention that we added the kali color-scheme to some terminals, but never modified the code of qterminal. In fact we don't package the terminal, it comes directly from the debian package ( which is a bit outdated, so maybe that's why they think it's modified)

What I don't understand is why the bookmarks have changed, because there has not been an update in the qterminal package from debian since 2020-12-18. Here are the 2 packages needed for qterminal: http://pkg.kali.org/pkg/qterminal http://pkg.kali.org/pkg/qtermwidget"

@tsujan any ideas ?

DrorDvash avatar Mar 07 '22 11:03 DrorDvash

I think all is done for the moment, except for remembering state (collapsed, detached etc), true?

stefonarch avatar Mar 13 '22 20:03 stefonarch

Yes.

It has room for further improvements but I like it. It's completely usable.

tsujan avatar Mar 13 '22 20:03 tsujan