Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 21 07:44
    sinky commented #347
  • Jan 18 02:43
    nanikanl opened #499
  • Jan 14 17:02
    dozius opened #41
  • Jan 11 16:12
    polyvertex commented #498
  • Jan 11 10:22
    pstefka commented #498
  • Jan 11 08:02
    pstefka opened #498
  • Jan 09 18:31
    qoutofq commented #496
  • Jan 09 18:20
    Kotsuha commented #496
  • Jan 04 16:17
    lucksidedown opened #497
  • Jan 01 03:07
    hced opened #496
  • Dec 30 2020 21:40
    sschuberth synchronize #9
  • Dec 30 2020 21:39
    sschuberth opened #9
  • Dec 30 2020 21:33
    sschuberth opened #8
  • Dec 30 2020 21:19
    sschuberth opened #7
  • Dec 30 2020 21:16
    sschuberth opened #6
  • Dec 30 2020 17:24
    verajosemanuel opened #495
  • Dec 30 2020 17:24
    verajosemanuel opened #494
  • Dec 30 2020 02:02
    hawkDR opened #493
  • Dec 29 2020 10:38
    sschuberth opened #5
  • Dec 29 2020 09:50
    sschuberth commented #171
Steffen Brüheim
@ueffel
or lets say i make a plaintext file by the name of "bla.blub" which has no default application. keypirinha logs an error: "Error: [WinError 1155] No application is associated with the specified file for this operation."
Jean-Charles Lefebvre
@polyvertex
Ah, you mean you want to know if the Edit action uses the editor configured at system level, right?
Well, nope, Edit is a KP action and does not rely on Shell's Edit verb.
Steffen Brüheim
@ueffel
Yeah my point is, that it does not do what it should
Jean-Charles Lefebvre
@polyvertex
Initially (early dev), the Edit action was relying on Shell's edit verb. But while using KP I was getting trouble due to some file types not being associated.
My use case was that I did not like having to configure types association so I went the way it is now.
I understand why it feels counter-intuitive to you.
Not sure what's the best way to circumvent that since one way or another, issue persists
However, if editor is empty, default is to try with Shell's edit verb. As a fallback.
Steffen Brüheim
@ueffel
You dont understand. Does it open the notepad2 if you executing the Edit action from Keypirinha on a file by the name of "not.associated"
ah ok
Jean-Charles Lefebvre
@polyvertex
But bear in mind the edit verb (i.e. at Shell level) is not associated with many types.
(by default)
It's all in the execute_default_action function, in keypirinha_util.py
Steffen Brüheim
@ueffel
ok so the comment to the editor setting I quoted is a bit misleading because I thought that everything would be opened in the notepod2 from keypirinha if I leave the setting unconfigured
Jean-Charles Lefebvre
@polyvertex
Indeed, noted
YoloSwag4Jesus420
@YoloSwag4Jesus420
Hi there, new to keypirinha...can you create keyboard shortcuts for programs, ie hotkey_editor = Alt+T or hotkey_terminal = Alt+Enter (im using windows and i know i can set ctrl alt and a key but i would rather a single button)
YoloSwag4Jesus420
@YoloSwag4Jesus420
don't worry I have found a program for this
Ulrich Thumult
@uthumult_twitter
I'm trying to list PortableApps with filescatalog.ini but its only scanning the root directory, how to get it recursively like the screenshot in §5.2?
[profile/PortableApps]
activate = yes
inherit = ExeOnly
paths = C:\Portable\PortableApps\*
max_depth = 1
filters = ext: .exe
include_hidden = no
include_dirs = no
include_files = yes
# FilesCatalog.FilesCatalog: Profile PortableApps: found 1 item in 0.0 seconds
Steffen Brüheim
@ueffel
The single * does not search recursively. You want to use **
Ulrich Thumult
@uthumult_twitter
@ueffel Thanks!
Clint Priest
@cpriest
@polyvertex Is the matching logic exposed via python at all? I've done some work with fuzzy matching in the past, partial write of my own based off fzf. If it's exposed/alterable in userland where would I look for that?
Jean-Charles Lefebvre
@polyvertex
@cpriest the matching logic is implemented in C++. The matching algorithm itself is (partly) exposed via keypirinha_util.fuzzy_score but not alterable from Python-side. What would you wish to change?
Dror Harari
@DrorHarari_twitter
Hi - new & happy KP user here. Quick question for which I could not find answer in the docs. I come from Launchy and I used to have specific commands that I defined to do specific things (the Runner plugin). Is there a similar way to define such aliases? Thought that after I launch something with KP, I can open the box and say: Alias : SaveLast xyz
Jean-Charles Lefebvre
@polyvertex
@DrorHarari_twitter hi and welcome! Are you maybe referring to the "Custom Commands" feature of the Apps package that allows to define an alias for one or multiple command lines with optionally predefined arguments?
Check out default config of the package for more info.
(this feature has been requested by a former Launchy user actually :) )
Dror Harari
@DrorHarari_twitter
Awesome. Just what I was looking for. BTW, I'm considering writing a package to lookup people's phone# in the office 8-)
Clint Priest
@cpriest
@polyvertex consecutive letter bonuses, capital letter match bonuses for example
Jean-Charles Lefebvre
@polyvertex
@cpriest luckily, those are parts of the implemented tricks already :)
Clint Priest
@cpriest
@polyvertex hmm, how about start of word boundary bonuses, start of capital bonuses? As an example, I type 'ch' looking for "Google Chrome Dev" and it's not even on the first page (of 10), it's closer to the 25th item, being beat out by things such as "RHI3 - Click (With Valid Hash) (Bookmark)"... C and H being 17 characters apart vs ch being 0 apart but 7 characters in.
Is there a way to perhaps expose the bonus values so we could tweak them to suit our own needs?
@polyvertex I can put this in as a request as well in github, but, is it possible to say type 'ch rome dev' bringing chrome near the top, hitting enter and having the 'ch' associated with that item, like it would normally be if I hunted for it and hit enter with just 'ch'?
Jean-Charles Lefebvre
@polyvertex

@cpriest KP already implements the typical bonuses one may want to apply like consecutive chars, word prefix, acronym, full word, full match... So I'm not sure why you get this result in your example. Added that to my to-do list.

Regarding your request, check out #221. Don't be tricked by the description of the feature, I'm not positive yet about the best way to implement it (i.e. GUI, UX, ...), so comments are welcome.

Clint Priest
@cpriest
@polyvertex Awesome, thanks. If you want I can send you examples of these occurances for me, is there a way for me to dump the current result-set to the console? I could attach them to a ticket for reference.
And... Thank you for such a great launcher! Wish I could help w/ the core code, I do plan to make some modifications to the plugins and submit some PR's though.
Jean-Charles Lefebvre
@polyvertex
@cpriest PR's are welcome thanks! Yes it might help to produce more examples if you remember them. Please report them at #320.
Unfortunately there's no way to dump the whole result list at once. You're doomed to make screenshots or write them down manually (and ensure you get the typing right!).
cougarten
@cougarten
@Sergix a late thanks to your reply :) I'll check it out
Dror Harari
@DrorHarari_twitter
Built a new package - https://github.com/DrorHarari/keypirinha-cvt - a universal unit conversion. It's a day old so might be rough - let me know if you find it useful or have ideas for improvement.
Jean-Charles Lefebvre
@polyvertex
@DrorHarari_twitter thanks for this!
Is it me or both °C and °K both have the same scale?
(there's also Units from @ArmaniKorsich, which looks pretty similar!)
Dror Harari
@DrorHarari_twitter
@polyvertex this plugin supports units of many measurement types: Distance, Area, Volume, Mass, Speed, Time, Force, Pressure, Energy, Power, Fuel Consumption, Temperature and Data Size. Moreover, it is all based on a json config file so it can easily be extended to add other conversions. I looked at Units and learn how this plugin system works but in Units, everything is hard coded so to add measurements, one have to change code. I'm still pretty ignorant about the plugin API and have only played with the Distance measurements - some other measurements like the temperature have 'non-standard' aliases that messes them up (plus conversion rule that is not just proportion). As I said, it's day 1...
Jean-Charles Lefebvre
@polyvertex
@DrorHarari_twitter just to clarify, my comment about the Units package was meant as a FYI parenthesis as opposed to something like "someone already did that"! I noticed both packages are designed differently and just look similar feature-wise.
One thing I noticed though is that the scale you used for °K that seems to be equal to °C. So I was wondering if I read the data correctly.
Steffen Brüheim
@ueffel
K and °C scale that same. its just the offset. looks right to me
maybe the offset should be negative?
Dror Harari
@DrorHarari_twitter

@ueffel yes, I grebbed the conversions from the Android app RealCalc (an HP-like RPN calculator) and in converting the XML export to my JSON, I dropped the 'offset' and 'inverse' attributes.

@polyvertex I had some weird issues trying to use the pyparsing package - apparently, the way the plugins get reloaded interfere with the use of super(type,self) that is prevalent in that package. Where is the right place to ask dev-related questions?

Steffen Brüheim
@ueffel
Right here :)
Jean-Charles Lefebvre
@polyvertex

@ueffel ah yep, so I did misinterpret the data ^^

@DrorHarari_twitter mmh I don't know how pyparsing works under the hood so I cannot confirm. FYI, KP does not keep track of dependencies so only package's .py modules are reloaded. Which means in your case that pyparsing does not get re-imported by the interpreter. So for instance, if pyparsing creates global variables (i.e. at module-level) and does not offer a way to clean its internal state, you might get into trouble.

Dror Harari
@DrorHarari_twitter

@polyvertex Well, I guess it is a general Python issue, internally there is a code such as this:

class Literal(Token):
def init( self, matchString ):
super(Literal,self).init()

and it crash on the last line in the super() call saying the second parameter (self) should be an instance of the first (which it is the class). Digging into it, the Python internals have two versions of the Literal class with two IDs (because it was reloaded). So I dumped this and used something simpler.

What is the general rule for adding 3'rd party dependencies to my plugin? (something I might have installed with pip). Are there restrictions to what I can bring (other that issues like above) and where do I put those dependencies?

Jean-Charles Lefebvre
@polyvertex

@DrorHarari_twitter it is a Python issue yes, but only if you consider there's no design flaw in pyparsing.

What is the general rule for adding 3'rd party dependencies to my plugin?

Any pure Python package should do, although the lighter the better obviously. Also, it is good practice to store them in a sub-folder, called lib by convention (like in the TaskSwitcher or Calc package). This is because that way, KP does not have to introspect them at loading time to check if there are some Plugin classes to instanciate. This also makes your code cleaner since you can then use relative import notation as opposed as the absolute one you're currently using in your plugin.

It is also cleaner, but not compulsory, to put data files in a separate sub-folder, like in the URL or WebSuggest package.

ArmaniKorsich
@ArmaniKorsich
@DrorHarari_twitter Yeah I'm just a novice at python and programming in general, it was mostly a tool to help me while I do 3d modelling and cad. Never thought about j-son and config files so if I ever get a chance I might try to redo it. Thank you for making something better!
Dror Harari
@DrorHarari_twitter
@ueffel as this Cvt gets usable, how do I get it listed in you package manager?
Steffen Brüheim
@ueffel
Enter it here:
Dror Harari
@DrorHarari_twitter
I registered but it fails to register - I suspect casing issue (the standard is not clear):
12:18:22.946 Python: AttributeError: 'NoneType' object has no attribute 'name'
12:18:26.660 ** ERROR: PackageControl.PackageControl: Error occurred while executing command 'PackageControl: Install Package'
Traceback (most recent call last):
File "C:\Util\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 215, in on_execute
File "C:\Util\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 457, in _install_package
AttributeError: 'NoneType' object has no attribute 'name'
Steffen Brüheim
@ueffel
hm it worked fine for me. did you run PackageControl: Update Repository List?