Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Improve bookmarks panel #886

Closed
stefonarch opened this issue Jan 13, 2022 · 42 comments
Closed

[Feature request] Improve bookmarks panel #886

stefonarch opened this issue Jan 13, 2022 · 42 comments

Comments

@stefonarch
Copy link
Member

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

#789 (comment)

@tsujan
Copy link
Member

tsujan commented Jan 13, 2022

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
Copy link
Member

tsujan commented Jan 13, 2022

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
Copy link
Member

tsujan commented Jan 13, 2022

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

@stefonarch
Copy link
Member Author

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
Copy link
Member Author

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

@tsujan
Copy link
Member

tsujan commented Jan 13, 2022

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

@stefonarch
Copy link
Member Author

Step by step, no hurry.

@tsujan
Copy link
Member

tsujan commented Jan 13, 2022

Step by step, no hurry.

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

@yan12125
Copy link
Member

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!

@stefonarch
Copy link
Member Author

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

@tsujan
Copy link
Member

tsujan commented Jan 30, 2022

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.

@stefonarch stefonarch changed the title [Feature request] Improve bookmarks pane [Feature request] Improve bookmarks panel Feb 20, 2022
@stefonarch
Copy link
Member Author

Still on the wishlist:

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

@tsujan
Copy link
Member

tsujan commented Feb 20, 2022

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
Copy link
Member

tsujan commented Feb 21, 2022

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

This should be easy.

@DrorDvash
Copy link

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.

@stefonarch
Copy link
Member Author

stefonarch commented Mar 7, 2022

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?

@DrorDvash
Copy link

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

@tsujan
Copy link
Member

tsujan commented Mar 7, 2022

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.

@stefonarch
Copy link
Member Author

stefonarch commented Mar 7, 2022

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.

@DrorDvash
Copy link

DrorDvash commented Mar 7, 2022

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.

@tsujan
Copy link
Member

tsujan commented Mar 7, 2022

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
Copy link
Member

tsujan commented Mar 7, 2022

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.

@DrorDvash
Copy link

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

@tsujan
Copy link
Member

tsujan commented Mar 7, 2022

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.

@DrorDvash
Copy link

DrorDvash commented Mar 7, 2022

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

@tsujan
Copy link
Member

tsujan commented Mar 7, 2022

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
Copy link
Member

tsujan commented Mar 7, 2022

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

@DrorDvash
Copy link

DrorDvash commented Mar 7, 2022

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 ?

@stefonarch
Copy link
Member Author

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

@tsujan
Copy link
Member

tsujan commented Mar 13, 2022

Yes.

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

@DrorDvash
Copy link

DrorDvash commented Mar 18, 2022

Hey again, sorry I'm bothering again about this issue, but it's discouraging me. I have tried so many different types of terminals but I am not ready to replace QTerminal.

I tried to install on a variety of types of linux installations, I tried on Kali, Debian Linux 10.10, I tried on Ubuntu and in all of them the column width in the bookmarks window is screwed.

I tried on different computers:

  • win10 (Home PC)
  • mac pro m1
  • 2 different types of laptops with win10

I tried with VMware, Parallels Desktop.
what am I missing?

image

Kali's:
image

@tsujan
Copy link
Member

tsujan commented Mar 18, 2022

what am I missing?

We don't know; the info isn't enough. However, QTerminal 0.14.X and 0.16.X are both outdated. Whether that's the cause or not, I can't be sure.

@tsujan
Copy link
Member

tsujan commented Mar 18, 2022

Here, we're talking about the git QTerminal, whose code will be in QTerminal 1.1.0 in April. Its bookmarks dock has changed a lot. @stefonarch and I couldn't reproduce your issue here. But if you see the same problem when 1.1.0 comes to your distro, please open an issue.

@DrorDvash
Copy link

DrorDvash commented Mar 18, 2022

OMG, so simple...i feel stupid.
if you mark the "Enable bookmarks" -> problem fixed.
if unmarked -> width is smaller.
image

Here, we're talking about the git QTerminal, whose code will be in QTerminal 1.1.0 in April. Its bookmarks dock has changed a lot. @stefonarch and I couldn't reproduce your issue here. But if you see the same problem when 1.1.0 comes to your distro, please open an issue.

Do you have any step by step guide how to install QTerminal 1.0.0 with all dependencies?
I'm installing it on fresh VM's installations, so I don't care about "destroying" them if something happened.

@stefonarch
Copy link
Member Author

if you mark the "Enable bookmarks" -> problem fixed.

What? If "enable bookmarks" is unchecked it should be just impossible to see the bookmarks pane.

@tsujan
Copy link
Member

tsujan commented Mar 18, 2022

if you mark the "Enable bookmarks" -> problem fixed.

If you don't mark that check-box, you shouldn't be able to use bookmarks at all. So, it's about a bug in QTerminal ≤ 0.16. The bug should have been fixed one or two years ago.

Do you have any step by step guide how to install QTerminal 1.0.0 with all dependencies?

The recent changes aren't in 1.0.0 but in git. The wiki explains everything: https://github.com/lxqt/lxqt/wiki/Building-from-source

@tsujan
Copy link
Member

tsujan commented Mar 18, 2022

@stefonarch
It's a fixed bug. I didn't have time to find the commit that fixed it but it should be an old commit.

@stefonarch
Copy link
Member Author

Fo building latest qterminal compiling lxqt-build-tools, qtermwidget and qterminal should be enough, but didn't test.

@stefonarch
Copy link
Member Author

At the end it's clear now. In qterminal 0.17 it's fixed already as you said.

@tsujan
Copy link
Member

tsujan commented Mar 18, 2022

At the end it's clear now.

Yes.

The code isn't beautiful but works fine. Actually, in recent months, I encountered several suspicious code lines in QTerminal and changed some of them — one of them was the source of several bugs (that hidden tool window). Apart from that, the code structure isn't good in some places. At some point, we should clean it up.

@DrorDvash
Copy link

DrorDvash commented Mar 18, 2022

Thanks guys. I used lxqt bash file to build v1.0.0:

  • git clone https://github.com/lxqt/lxqt.git
  • cd lxqt
  • git submodule init
  • git submodule update --remote --rebase
  • remove all repos(sub-modules) from in cmake_repos.list except lxqt-build-tools, qtermwidget, qterminal
  • LXQT_PREFIX=/usr ./build_all_cmake_projects.sh

It worked great.
In April, when 1.1.0 will be ready, what do I need to do in order to update my existing qterminal?

@stefonarch
Copy link
Member Author

You actually have already great part of 1.1.0 now :)
I'm not very experienced but git submodule update --remote --rebase and rebuilding should take in the last changes always.
Be aware that you bypass your package manager this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants