![]() Registered Member ![]()
|
I need something like Klipper's actions, but fully automatic.
For example, it must remove file://, from clipboard, add paste text without it. Before: file:///home/user/text.txt After: /home/user/text.txt Thanks. |
![]() Registered Member ![]()
|
This is more in the nature of a wish but I am not sure that it is practicable - how would the software know when you wanted to edit and when you did not? The easiest way to truncate something like that is to highlight what you want fist and then copy it. Or can you be more specific about what you want done automatically?
John Hudson, proud to be a member of KDE forums since 2008-Oct.
|
![]() Registered Member ![]()
|
It must replace text always.
Something like this:
But it didn't work. Because Klipper didn't have signal like newContentsAdded(). |
![]() Registered Member ![]()
|
Can't you add your script as a new action to Klipper? |
![]() Registered Member ![]()
|
I'm also looking for a way to do this. In my case, I'd like to have "shortcuts" which should allow me to insert text I use often quickly.
Eg. I'm tired of typing "Sehr geehrte Damen und Herren," and look for a faster way. I came up with a script (also below) which looks up a "short code" (eg. "SgDuH") in a "database" and gets the long version. The script works just fine, but how do I make Klipper execute the script automatically, if I eg. add the text "SgDuH" to the clipboard? My Klipper settings: ![]() But it seems like my script isn't called at all (in the real script, I've got some logging and this log isn't created). ================ Update: Okay, it helps quite a bit, to actually ENABLE these actions ![]() It works quite well - but only, if I'm in Kate (or Qt/KDE apps in general?). It does not seem to work, when I copy some text from eg. Firefox. It also works in Chromium. In Kate/Chromium, when I copy the SgDuH text, a popup is shown and I can run my custom action script. ![]() =============== Update #2: I worked a bit on it and got it to work! → http://esisteinfehleraufgetreten.wordpr ... e-klipper/ WARNING!
BUT … it doesn't work so well ![]() But not only MY action started to fire, but also default rules for eg. highlighting "http://Foo.Bar/". Because of that, there's a whole lot of popups like this being shown: ![]() Ie. when a text starting with "http://" is highlighted (eg. in the address bar…), a popup shows. Not so good. Is there a way to forbid THESE popups (for http:// and the like) just for Firefox (and Chrome, Opera, …)? This popup is good and wanted for Konsole, Kate and others, though. =============== Scripts:
|
![]() Administrator ![]()
|
Unfortunately it seems that Klipper does not allow for actions to be disabled depending on the window currently in use - it only allows for all actions to be disabled.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]