Set it to only 1 instance for okular pdf reader on manjaro kde, remember last position, alternative way to be more efficient

I need to match 100 over audio mp3 with 100 over pdf , so that the mp3 recording is match the content of the pdf because the person who did the recording didn’t name the recordings the right way.

when i click a pdf file on dolphin, it opens up an okular which block dolphin file list, hence i have to move the okular to another monitor and let it stays open… when i clicked the 2nd pdf, it opens another instance of okular and still the same position that block dophin file list… every new instance of okular opened and stays on top of dolphin file list…
Q1. Is there no way for apps to remember it last location ?
Q2. Is there way for me to set the okular window position when it opens up so won’t block my view of dolphin file list ?
Q3. Where to setup okular so that it only open 1 instance instead of multiple instances ?

Is there way to make my work speedier ? like maybe search a content of the pdf files to match to the recorded mp3 ?

Thanks

Resize both windows so that they can be shown side by side.

System Settings → Workspace → Window Management → Window Placement

Click on the Advanced tab. :arrow_down:

  1. Window Placement: change to Smart

  2. Tick the box labeled “Allow apps to remember the positions of their own windows, if they support it.”

You can do this by creating a special window rule for Okular. :arrow_down:

System Settings → Workspace → Window Management → Window Rules

However, I strongly suspect that Okular will not accept that, because it was not designed with that type of usage in mind.

By the way, you can also use the window rules to force an application to always show its windows on the same monitor.

1 Like

Can you show me how to do that ?
What should i select in window class (application) *what does this means ? *

What to select in windows types ? Is there somewhere i can know how each of those “windows” looks like ?

What does is “windows class” in “Match whole windows class” ?
Wow, this alone is kind of complicated… Any tutorial with regarding this ? i think i might be able to use this kind of stuff… might be good …

screenshot - how come there is no “smart” option?

You can set rules for the whole application ─ including all of its dialog windows ─ or just for a particular type of windows, e.g. the main window, or a dialog window, or a specific type of dialog windows (like e.g. the file open/save dialog), and so on.

In the event of Okular, I think it’s pretty evident which ones you need to check from that list in the screenshot.

You can also have the system automatically detect the window properties for any given window rule, but then the application must already be open.

You then right-click the window title bar and you choose “More Actions”, and then “Configure Special Application Settings” or “Configure Special Window Settings”, depending on what you want. You’ll then see a button labeled Detect Window Properties.

It’s the “Minimal Overlapping” option. It used to be called “Smart”.

I have found out that okular has “open new file in tab” setting. Hence that solve the “remember last location” issue and “open only 1 instance” issue.


This screenshot shows that i got 2 screen, and although i have force okular to be onto screen1 instead of screen 0, it still happily staying on screen 0…

**is there any cli to refresh or restart display manager or something that might caused it to “not obeying the settings” ?

I tried to set a rule for okular window:
my work flow:
launch okular
system setting> windows management > window rules > add new > detect window properties instantly > [clicked on okular window ] > [add in the properties as shown on screen shot] > apply

I have tried many times… initially it works, manage to "force it to display on screen 0 or screen1 as i wish when i click “apply” button. with immediate effect…

Somehow the setting was gone after i exited…
Hence i tried the same thing again 2nd time, but this time it doesn’t work… , the position, screen … none works.

Is there way to do this in cli ? because working in gui is such a pain… a lot of KDE GUI is not stable, i believed.

I’m afraid this will most likely be an upstream bug. There are yet other settings in Plasma that are apparently also not being saved ─ or may possibly be overridden by something else ─ between logins, and/or that are not having any effect whatsoever.

Upstream bugs are unfortunately beyond our ability to fix. Believe me, I’m just as frustrated as you over some of these bugs. :man_shrugging:

Ok. Understood. Thank you.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.