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

  • toothbrush@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    11
    ·
    10 months ago

    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.

    • QuazarOmega@lemy.lol
      link
      fedilink
      arrow-up
      10
      ·
      10 months ago

      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@lemmy.mlOP
        link
        fedilink
        arrow-up
        4
        ·
        10 months ago

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

        • QuazarOmega@lemy.lol
          link
          fedilink
          arrow-up
          5
          ·
          10 months ago

          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!

    • ScottE@lemm.ee
      link
      fedilink
      arrow-up
      7
      ·
      10 months ago

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

    • MrOzwaldMan@lemmy.mlOP
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      10 months ago

      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.

    • yianiris@kafeneio.social
      cake
      link
      fedilink
      arrow-up
      3
      ·
      10 months ago

      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

  • MonkderZweite@feddit.ch
    link
    fedilink
    arrow-up
    10
    ·
    edit-2
    10 months ago

    Btw:

    # convince Java-Apps to use desktop theme and nice font rendering
    export _JAVA_OPTIONS="$_JAVA_OPTIONS \
    	-Dawt.useSystemAAFontSettings=on \
    	-Dswing.aatext=true \
    	-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel \
    	-Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
    
    • Aatube@kbin.social
      link
      fedilink
      arrow-up
      7
      ·
      edit-2
      10 months ago

      They use JavaFX, not swing, and AFAIK JavaFX doesn’t even have a bundled Windows look. Never knew Swing had a GTK look though, that’s nice.

    • MrOzwaldMan@lemmy.mlOP
      link
      fedilink
      arrow-up
      5
      ·
      10 months ago

      I’d recommend converting to Kotlin, which saves a lot on bureaucracy and IntelliJ can easily do

      I’d love to, but my mind, time, and energy is being spent on other studies.

      https://askubuntu.com/questions/431703/how-to-add-open-with-custom-command-option-in-right-click-menu-of-nautilus might have what you want

      Didn’t work, no new option appears after following the steps.

      Also, how’d you get the IntelliJ titlebar to work properly? In the new theme, I get two title bars on my machine.

      Easy, I made a .desktop file for IntelliJ and boom, no double title bars.

        • MrOzwaldMan@lemmy.mlOP
          link
          fedilink
          arrow-up
          2
          ·
          10 months ago

          Hmm, why the bold?

          to distinguish the quote from my reply

          Maybe try https://stackoverflow.com/questions/47235022/add-a-custom-option-in-nautilus-right-click-menu ?

          Will do, i’ll reply if it’ll work or not.

          What did you put in the .desktop file?

          I put the following:-

          [Desktop Entry]
          Name=IntelliJ Idea
          Comment=IDE
          Exec=/home/user/Programs/IntelliJ\ Idea/bin/idea.sh
          Icon=/home/user/Programs/IntelliJ Idea/bin/idea.svg
          Type=Application
          Categories=Development;
          

          basically

          [Desktop Entry]
          Name=<Name that will be seen in the start menu for whatever DE>
          Comment=<Just write anything here>
          Exec=<Your executable or shell application location goes here>
          Icon=<Any icon you want to use>
          Type=Application <this is default, no change here>
          Categories=Development; <There are many categories, they go here>
          

          For ‘Exec’ and ‘Icon’, type the absolute path for both em like the example. As for categories, here they are below:

          • Audio
          • Video
          • Development
          • Education
          • Game
          • Graphics
          • Network
          • Office
          • Science
          • Settings
          • System
          • Utility
          • Other
          • Aatube@kbin.social
            link
            fedilink
            arrow-up
            2
            ·
            10 months ago

            I already have a normal desktop file like yours. I don’t see how replacing it with yours would provide any benefit as the execution arguments are all the same. I guess you won’t be able to help me then.

          • simonced@lemmy.one
            link
            fedilink
            English
            arrow-up
            2
            ·
            10 months ago

            That sample text file, you can save it in the “Template” folder in your home folder, and then you can create a new file from that template with the right click menu > new entry :)

  • QuazarOmega@lemy.lol
    link
    fedilink
    arrow-up
    2
    ·
    10 months ago

    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@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      10 months ago

      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@lemy.lol
        link
        fedilink
        arrow-up
        2
        ·
        10 months ago

        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@lemmy.mlOP
          link
          fedilink
          arrow-up
          2
          ·
          10 months ago

          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@lemy.lol
            link
            fedilink
            arrow-up
            1
            ·
            10 months ago

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

    • Aatube@kbin.social
      link
      fedilink
      arrow-up
      1
      ·
      10 months ago

      If you’re using swing, you can’t, unless you’re willing to use something called SwingWT from twelve years ago.

      • MrOzwaldMan@lemmy.mlOP
        link
        fedilink
        arrow-up
        1
        ·
        10 months ago

        Im using JavaFX, i forgot to type that in the title.

        If it still doesn’t work, i may have to just CSS or show the devs my work and they’ll implement my work in their own way.