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

Remember window position/size across program restarts #122

Open
kargaroc opened this issue Feb 10, 2018 · 15 comments
Open

Remember window position/size across program restarts #122

kargaroc opened this issue Feb 10, 2018 · 15 comments

Comments

@kargaroc
Copy link

kargaroc commented Feb 10, 2018

It would be really great if LXImage could remember the position and size of the window across program restarts.
Windows image viewers like Irfanview already have this capability too.

Expected Behavior

You move the window to your preferred position, and resize it to what you're comfortable with. Close the program, open it back up, and it's where you left it.
The window position/size is stored in the config files somewhere.

Current Behavior

Currently, if you do the above, than the window opens at a default position and size, often spanning multiple monitors if you have such a setup.

@fnzen
Copy link
Contributor

fnzen commented May 14, 2018

I looked into how this could be implemented:
Currently the lximage-qt window is shown centered on the current screen, this is implemented in MainWindow::updateUI.

In my opinion there are two ways to implement this:

  • Remove the code in MainWindow::updateUI to center the and always save the position. After the implementation also testing in a multiwindow setup is important.
  • Add a new preferences entry "save window position on exit". This entry either saves the position on exit or keeps the current behaviour to center the window. This is the solution I would prefer.

Other image viewers like gwenview or gnome image viewer also do not save the position. In KDE there is the possibility to save the position for each window, implemented as a feature in KDE directly.

Any thoughts on this?

@tsujan
Copy link
Member

tsujan commented May 15, 2018

@fnzen Saving the size and position of windows is possible. The question is why to do so? For a file manager or text editor it's sometimes good to save and restore the size but not position. For a notes manager, it's good to save and restore both of them.

However, an image viewer should show images as clearly as possible on start-up and, IMO, the current behavior of lximage-qt is the best: centering the image and resizing it appropriately.

@fnzen
Copy link
Contributor

fnzen commented May 15, 2018

@tsujan OK, that's the third way, which is also for the reasons you described reasonable behaviour.

If the feature is not desired to be implemented, I would then suggest to close the issue or set it to something like WontFix?

@Chiitoo
Copy link
Contributor

Chiitoo commented Dec 12, 2018

@tsujan,

For a file manager or text editor it's sometimes good to save and restore the size but not position.

Out of curiosity, why do you feel it's not good to save position for these?

I, for one, definitely want them to open at the same position, always (which I can't have with PCManFM-Qt for example, as I can't save its settings using KWin because that will mess up with the desktop due to reasons (I just try not to close the file manager while I'm at the computer, so it's not a huge issue)).

Talking about my preferences here, not what should be the default. :]

However, an image viewer should show images as clearly as possible on start-up and, IMO, the current behavior of lximage-qt is the best: centering the image and resizing it appropriately.

Again, perhaps okay for a default, but not for me. For things that I use often, I want them to be at the same position and size. For most things, if they don't do it themselves, I can do it using KWin, but not always.

For more random and occasional things, I indeed usually prefer the centre.

Just my preferences again though. :]

@tsujan
Copy link
Member

tsujan commented Dec 12, 2018

Out of curiosity, why do you feel it's not good to save position for these?

(1) Good window managers have configurable ways to position windows when they appear. IMO, it's not good to contradict their setting just because we can do so. Contradictions in settings can cause confusion at least. Bad window managers may not have such settings but that isn't our problem.

(2) Not all window managers respect Qt's window positioning. I don't need to say anything about tiling window managers.

(3) IMO, there are some apps that can enforce positions. Of course, there may be no consensus about them. However, most devs and users agree that popup notifications should have a fixed position because the user wants to find and read them as quickly as possible. The same may be true about notes managers and even image viewers when they appear for the first time.

(4) I've contradicted what I said above in one of my apps ;) But LXQt is different; it should have rules to follow and respect other settings if possible.

@tsujan
Copy link
Member

tsujan commented Dec 12, 2018

BTW, lximage-qt's behavior when an image is opened is the same as the old EOG's, which was a well-known image viewer in old times of gnome2. You can call it a tradition ;)

@Chiitoo
Copy link
Contributor

Chiitoo commented Dec 12, 2018

All good reasons, of which I considered at least some. :]

Good defaults are important, but how about having things remembered optionally, if, for example, the window manager just can't do it? I actually forget why I currently have no window manager rules for LXImage-Qt... I'll need to look into it.

For PCManFM-Qt, the reason is that the rules would also apply to the desktop managing process due to the name matching, which makes weird things happen. Perhaps there is a way to match only the file manager windows; I did not research it enough yet, and I digress.

I usually am all for more options, but I can understand that many like to add them very sparingly.

Thanks again!

@jarrard
Copy link

jarrard commented Jan 1, 2020

Just started using LXQT and I am starting to like it, after fixing some missing icon packages and themes that is.

I do wish there was a option to save window size and position because some of my windows are cutting off text within them such as Session Settings. Maybe a right click option in title bar that toggles saying "Remember Aspect" or something.

PS. I'm aware this is a dead open ticket :)

@tsujan
Copy link
Member

tsujan commented Jan 1, 2020

@jarrard The window size of lximage-qt is remembered. Session Settings isn't related to this and there will be no cut text in it if you use the latest LXQt -- probably, the latest git.

@jarrard
Copy link

jarrard commented Jan 1, 2020

@jarrard The window size of lximage-qt is remembered. Session Settings isn't related to this and there will be no cut text in it if you use the latest LXQt -- probably, the latest git.

Cool thanks for letting me know.
The AUR Git is older then the mainline repo version atm.
Maybe that is just because the installer hasn't been updated.
(it just downloads the latest git and applies that version info, ignore dumb me)

@tsujan
Copy link
Member

tsujan commented Jan 1, 2020

This is Session Settings with Breeze and with its minimum window size:

session

If I correctly remember, in older versions, the texts of the left pane might be cut.

@jarrard
Copy link

jarrard commented Jan 1, 2020

Yeah I got the -git version and it looks much better! tho I'm using mutter atm because it works best with a few apps I run.

@tbone2k-git
Copy link

Hello everyone! o)

An option to save / restore the window position would be much appreciated! This is the 10th image viewer I try, basically none of the available options is anywhere near usable for day to day use (unless you are mom and pop maybe). The options I tried go from ugly, slow, no options, crashing, clunky to use to weird fixed hotkeys, extremly slow and silly features like putting emojis onto my photos. What is going on? o)

@tsujan

the current behavior of lximage-qt is the best: centering the image and resizing it appropriately.

I think it is not the best if you try to open images from your file manager and try to use lximage as the previewer / viewer right next to your file managers window. You probably noticed, that basically no file manager on Linux is capable of previewing a simple image directly in it's window - if it does, it is slow as f* because it's using the thumbler service e.g. or the file manager itself is useless or terminal based, which gets you into another world of trouble. I was trying to get around the missing image viewing capabilities of the file managers with lximage-qt, but if this tool (and others) won't even open where I want, I maybe even cannot have that workaround. Please note, I'm not even talking open on "second monitor" or something year 2000+.

An option to "Allow only one instance" would life make much easier as well, if used from scripts or the file manager, I would not need to close all the open image viewer windows manually, when opening another image from the file manager.

I totally get the lightweight idea behind LXQT and so on, but we had lighweight tools and image viewers back in the Amiga days already, they fitted onto 1 floppy disk multiple times, but these were very functional as well. Irfanview on Windows is also lightweight and fast, but it also has a ton of options to make the tool fit your workspace and workflow.

The majority of Linux desktop applications is so lightweight in functionality, that you can't make use of them if you are not a total beginner (meaning first week of owning a computer).

I also went into the Thunar file manager repo these days, trying to find out why this file manager (and all the others) is on a feature level representing the year 1990. One developer said, that there is no need for a button to switch between path entry and path buttons, because you don't manually type paths that often in a GUI file manager. Oh really? What about being able to just copy and paste paths from config files etc.? What is the expected IQ and expertise for Linux Desktop users?

As professional and rich many command line tools are on Linux, as simple and useless is a lot of stuff on the desktop. I don't get it. That said, LXImage-QT is one of the "better" simpler tools, it gets some things right! o) It has a somewhat sensible set of features, although I don't get why the image viewer can resize images and do screenshots, but not remember the viewers window position, which is probably more core functionality than doing image-resizing and screenshooting, for which there are more specific tools out there?!

Sorry for my little rant! o))

I like the Linux idea, but I don't get why everything "desktop" is so darn simple and clunky to use. I'm doing computer stuff for 30+ years, why do I need to spend weeks trying all the Linux file managers? None of them is even on the feature level of Directory Opus v4 made nearly 35 years ago. This is ridiculous, the same goes for image viewers, text editors and so on. Linux life is like stone age it seems. I guess this is because everyone is forking everything to pieces and reinventing even the most basic things again and again, which does not yield any progress, not even after 20 years.

I don't want to offend anyone, I just wanted to tell the Linux world, that there are people who like features in Desktop applications, really! o) I don't care much for fonts and transparency. KDE comes with 900mb of fonts, wow! That's where the priority is, it's not on their core tools like Dolphin, which is (of course) also not made for professionals (that's what their docs are saying, not kidding!). Ok, but then, what is the professional going to use? How do they deal with 10 million files in a 40TB storage system e.g. (peek and poke with ls on the command line or what is their approach?).

Thank you and please don't be offended! o) I had to put my thoughts somewhere, maybe they even help to find a solution to some of the issues mentioned. Have a nice weekend everyone! o)

@stefonarch
Copy link
Member

I think it is not the best if you try to open images from your file manager and try to use lximage as the previewer / viewer right next to your file managers window. You probably noticed, that basically no file manager on Linux is capable of previewing a simple image directly in it's window

What about using "show thumbnails" on the left in LXimage-qt? You can rename and open in other apps and so on.

@tbone2k-git
Copy link

tbone2k-git commented Mar 8, 2024

Hello stefonarch! o)

Yes, you could do that, but that's not really an option if you are dealing with more than 3 images or larger image collections in general. For renaming a list view is more appropriate than a thumbnail view, it is hard to get naming of multiple items correctly if their names do not line up. The name of any image will wrap onto multiple lines in LXimage-qt and I cannot do mass rename there. Using "show thumbnails" also creates a second context. I already have thumbnails, an item in focus and maybe a selection in the file manager, why would I leave that and operate on the same set of files in a second, totally different view?

Don't get me wrong, but renaming directly in LXimage-qt is the "mom and pop" approach, unfortunately it's not the right thing for heavier workloads, thank you for suggesting that nonetheless.

What I am looking for on Linux is a more professional approach in general when it comes to handling files of any kind. Please take a look here, this is Directory Opus file manager on Windows.. it's a blast, it is 50 bucks per license but oh boy is it awesome in so many ways.

2024_03_08_DirectoryOpus_(DOpus)_ShowCase

This program has been gradually pushed forward over the last 30 years, it will take you many years to discover all the things and how it can help you in day to day tasks. This screenshot shows multiple (basic) things I miss in any file manager or image viewer on Linux.

  • editable and clickable path bar at the same time (!)
  • horizontal split (dual pane shown here)
  • viewer panel
  • meta data panel with editing (single or multiple at once)
  • tabs on the left
  • file type specific columns + rating
  • rename with auto completion
  • mass + inline rename
  • your own buttons and menus all around to integrate external tools
  • quick filtering by name, size, whatever
  • select, copy and paste meta data directly from the columns
  • hide specific file types (like all PDFs, when you are renaming DOC files).
  • flat view, stepless zoom for thumbnail view
  • etc..

When I open up Thunar, Dolphin or whatever, it's like time traveling into the past. Look how dense the information and functionality is packed into Directory Opus, you don't have to tighten it up like I did, but it's night and day compared to what Thunar, Dolphin, PCManFM etc. have to offer.

Directory Opus also has an external viewer which can be "connected" to your active selection in the file manager, so you can browse the images in large on the second/third monitor if the embedded preview is to small for your current workflow. This is what I was trying to mimic with the help of an external viewer like LXimage-qt, just to get anywhere in that direction.

The beautiful thing is, with all the features you find in DO, you can handle any kind of file types, you can preview and manage audio, video files or documents this way as well. Now you say Directory Opus is a commercial product, this is true, but it's done by 2 people and it's around for 30+ years. You could expect there exists something close to this on Linux with the many developers and people around working on all the things? For some reason there are free/open-source file managers on Windows which are quite usable, although they are not bleeding edge like Directory Opus is, which even has integrated scripting API and a full GUI editor (think of Qt/GTK) to create your own embedded GUI based tools directly in DO, it's insane. o) The other open source file managers for Windows do implement some basic things at least, like split view, previewing, browsing archives etc., for an emergency use case, they will do. The Linux options still look dull compared to these, for some unknown reason. o(

Ok, this is not an advertisement, I don't have anything to do with the DO developers. I just wanted to make a point and maybe bring a new perspective to how you think and plan the Linux experience. I think it needs some pushing to get the Linux Desktop experience forward. I can write some code and help, but to be honest, whenever I try to clone a repo and "make", things don't work out. Wrong clib version, missing package, mismatch this and that, it does not work out most of the time. Bringing the environment up to the point that I can actually write some code and try some things is hard as well on Linux. Actually it is hard on any platform, but not being very familiar with Linux surely does not help. I'm a noob there, yes, I admit! o)

I even tried to create another file manager for Linux with a customizable layout and preview pane(s) built in. But I don't know, it does not feel right to start another project, just because all the existing ones concentrate on beginners. I mean there are some interesting terminal based solutions out there as well, but nahh, in the terminal, really? Why did someone invent the mouse and resizable pixel based viewports? I guess because it makes life easier for a lot of tasks and you still can gangster-like navigate with the keyboard if you properly implement it. So why on earth use the terminal to manage files, images, documents or even videos in a multi pane / split view on multiple monitors? These tools set their limits right from the start and it's not like there are no terminal based solutions yet.

"Starting from scratch" will never lead to a rich software experience, it just splits up the user base and ends up in many niche applications, which are of little use to someone who is looking for "the big bang" operating system or tool. How many Debian based distros are out there, multiple hundreds! I guess that's where all the developer energy is going, into selfish ego-projects? I don't know.. o)

Ok, that's it for now.. thank you all for taking the time! o)

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

No branches or pull requests

7 participants