toothbrush,
@toothbrush@lemmy.blahaj.zone avatar

Don’t most desktop environments already have this?

If you want to include this as an option when right clicking the desktop, you will probably need to patch this into the DE of your choice, however I think at least KDE has an option for custom right click actions.

ScottE,

Yep, all desktop environments have this - whatever text editor is handy. :⁠-⁠)

MrOzwaldMan, (edited )

I see, I didn’t know KDE had that, does KDE allow java apps to be used as the right click action? As for GNOME, I’m still trying to figure it out.

Until then, I will post the link to the app in the future. It needs some beautification, and quality of life changes so you and the others can use it as you use sudo apt update and upgrade to update your PCs.

toothbrush,
@toothbrush@lemmy.blahaj.zone avatar

Yes, it works with any command.

leopold, (edited )

For KDE right click menus, you need to use service menus: develop.kde.org/docs/apps/dolphin/service-menus/

These are used by Plasma and most KDE apps that deal with files.

Krusader has a more powerful system for this called UserActions, but they’re exclusive to Krusader and afaik Krusader is also compatible with service menus, so these are much less portable: docs.kde.org/trunk5/en/…/useractions.html

yianiris,
@yianiris@kafeneio.social avatar

A window manager is enough with any customizable drop menu, can open a file manager of choice, create a folder or file, no desktop is needed.

worker ~/.Desktop

or whatever filemanager one is using

@toothbrush @MrOzwaldMan

QuazarOmega,

Don’t most desktop environments already have this?

An environment agnostic tool isn’t a bad thing though, it already exists as PinApp, though I’m guessing OP is doing this more as a learning project

MrOzwaldMan,

Damn, i didn’t know this existed. Welp, at least I know how to manipulate the system from code.

QuazarOmega,

Don’t be discouraged, doing something from scratch is always a great learning opportunity and even if this isn’t the first iteration of such a tool there is room improvement, for instance, I don’t think any of the tools that allow creation .desktop shortcuts interface with any context menu as yours would do in the future, so that could be a cool feature to show off!

QuazarOmega,

That’s neat

make this appear when right-clicking. Any idea how I can achieve that?

Right clicking where exactly? If you mean the desktop, then I imagine you’ll likely need a GNOME Shell or Nautilus extension

MrOzwaldMan,

An application and programs that use shell as their application, for example, IntelliJ IDEA use ‘idea.sh’ to run the IDE, so it would be useful for people to right-click and just create the ‘.desktop’ file right away.

QuazarOmega,

Yes, but on what environment are you going going to right click in? The desktop? The file manager?
That’s what I’m asking

MrOzwaldMan,

File managers, because that’s where the applications are. As for desktop, I will give the option for that one or more users who do that.

QuazarOmega,

I see, then yes, as others have suggested the Nautilus extension is what you’re looking for

Cwilliams,

No offense, but why Java?

skullgiver,
@skullgiver@popplesburger.hilciferous.nl avatar

Easy to make, cross platform GUI toolkit.

I dislike the look of standard Java applications myself, but it still makes a lot of sense for a quick form based application like this.

vredez,

Why do you need cross platform availability, if .desktop files are (mostly) Linux only?

skullgiver,
@skullgiver@popplesburger.hilciferous.nl avatar

I believe some BSDs use it too, and WSL2 will make Linux applications automatically appear on Windows, so editing desktop files may be useful there too. Plus, you don’t need to deal with different architectures (aarch vs amd64).

Blaiz0r,

Write with what you know

ulkesh,
@ulkesh@beehaw.org avatar

Because despite the popular bandwagon belief, there’s nothing wrong with using Java. It’s just a tool, like so many others.

This is like saying, “Why that Philips head screwdriver? Why not this other Philips head screwdriver?”

MrOzwaldMan, (edited )

Because that’s what I learned from Uni, didn’t want that skill to go to waste. I was thinking about how it would be easier to make the apps (plain applications that use executables and shell to run) .desktop file without any hassle (for new Linux users).

Also, Python was two semesters ago, so I forgot all about it.

isVeryLoud,

Learn Kotlin, it’s adjacent and better.

skullgiver,
@skullgiver@popplesburger.hilciferous.nl avatar

I believe this tool will allow you to register an action in nautilus for your desktop file.

MrOzwaldMan,

Does it allow java applications to be used as an ‘action’?

skullgiver,
@skullgiver@popplesburger.hilciferous.nl avatar

I don’t see why not. The example config file has a whole bunch of complex commands, far more than just the java --jar you need to run a Java application.

MrOzwaldMan,

Great! This is going to be my first time doing this, hopefully this comes to everybody’s machine as default.

MrOzwaldMan,

How do I integrate gtk and qt, so both GNOME and KDE users can use this?

iuselinux,
@iuselinux@lemmy.world avatar

That’s quite useful i guess

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #