Light weight screenshot and annotate combo

Forum Forums antiX-development Graphics Light weight screenshot and annotate combo

  • This topic has 315 replies, 10 voices, and was last updated Aug 23-5:44 pm by BobC.
Viewing 15 posts - 256 through 270 (of 315 total)
  • Author
    Posts
  • #61974
    Moderator
    BobC

      Ile,

      1. I added a “Save Status” to the Action window
      2. I added your SpaceFM in new window code. Skidoo, does that look ok?
      3. I added logic to shorten the filename to the minute unless a file with that name already exists, in which case I used the longer filename that includes the seconds. The workfile name includes the seconds, and then when I go to save it, I try to use the shorter filename if it won’t cause a duplication.

      anticapitalista or maybe Dave, Could you tell me what you want the default font for text notes added to be, please? If it can’t be a fixed value, could you tell me where I should look for it at?

      See if anyone finds any bugs or inadequacies for this version…

      Daily driver distro https://www.antixforum.com

      #61980
      Anonymous

        To have it open a new window instead of a new tab
        is the task desired, if a spacefm window is already open.
        Can you show how to do this task?

        
        $ spacefm --help
        {snip}
        Application Options:
          -w, --new-window             Open folders in new window
        $ rox-filer --help
        {snip}
          -n, --new		start new copy;

        >>>> fluxbox rox default will not open a spacefm window if there is already a spacefm window

        ???

        a call to “spacefm –new /home/demo” should succeed, or fail, identically regardless which window manager is running. Also, the success of that call would be unaffected by external factors like “ROX is marked as my DEFAULT file manager…”

        #61984
        Moderator
        BobC

          Yes, I would prefer it would open with the default file manager regardless of if a spacefm window was already open. The problem is how do I tell what the default file manager is? I could look at the value, and if rox-filer do this, elseif spacefm do that, and else just open it.

          Daily driver distro https://www.antixforum.com

          #61986
          Anonymous

            anticapitalista or maybe Dave,
            Could you tell me what you want the default font for text notes added to be, please?

            Didn’t like my earlier comment regarding fonts, so now you’re soliciting “second opinions”?
            ;^)

            Your script should not know//care the user’s current desktop theme, HiDPI/scaling preferences, etc.

            If you leave the font unspecified, yad will apply some default, gleaned from somewhere… and that font will be identically “too small” or “too big” or “just right” as the font displayed in any other generic yad -powered UI. That scenario may lead the user to visit “somewhere” and apply a global change. Not your script’s problem, nor responsibility. (Font variability is reason to avoid declaring “non-resizable” for any dialog window).

            #61987
            Moderator
            BobC

              skidoo, Its not that I didn’t “like” your answer, scrot requires a value or it fails. That was why I kept asking…

              Adding note
              scrot -s -q 80 --note "-f '' -x 10 -y 20 -c 255,0,0,255 -t 'Taken by antiXscreenshot 20210619_1306_58'" "/home/bobc/.cache/antixscreenshot/screenshot-20210619_1306_58.jpg"
              Error --note option : Malformed syntax for -f
              

              Would you suggest I default to blank, and if not entered, don’t add note text, even if selected and text is entered?

              PS: I will see if I can find another way to add the note. If not, maybe it’s better to remove the note text functionality rather than having the program fail completely.

              • This reply was modified 2 years, 11 months ago by BobC.

              Daily driver distro https://www.antixforum.com

              #61990
              Member
              Xecure

                The antiX way: use desktop-default-run -fm (file manager):
                desktop-defaults-run -fm /path/to/folder

                To open with the “default” file manager, you could use xdg-open (though you say it doesn’t follow), or mimeopen
                mimeopen /path/to/folder/

                To understand a bit the differences between mimeopen and xgd-open, check this thread where I performed a few tests and recorded the results

                antiX Live system enthusiast.
                General Live Boot Parameters for antiX.

                #61991
                Anonymous

                  aw, it was a question about ANNOTATION font. Sorry, I misread that.
                  {facepalm}

                  The command “fc-list” will output a list of available fonts.
                  Are all of ’em usable by scrot? (idunno)
                  Whatif the user would prefer a font (& size) different from what has been pre-selected?

                  #61992
                  Member
                  Xecure

                    Default fonts (from gtk configuration).
                    From gtk-3
                    DEFAULT_FONT="$(grep "^gtk-font-name" "$XDG_CONFIG_HOME/gtk-3.0/settings.ini" | cut -d"=" -f2)"
                    From gtk-2 configuration:
                    DEFAULT_FONT="$(grep "^gtk-font-name" "$GTK2_RC_FILES" | cut -d"=" -f2)"

                    antiX Live system enthusiast.
                    General Live Boot Parameters for antiX.

                    #61995
                    Member
                    ile

                      Hello BobC
                      whoa skidoo
                      quoting out of context. and thank you for the attention.
                      The comments about fluxbox opening spacefm is contained in comments about a reaction limited to a particular script; the report is about only the reaction to that script.
                      The script is a sneaky way of not needing to know the default file manager; just open a new spacefm if one is running. It works for the cases where spacefm is likely running.

                      When the Action Dialog was hanging around invisible until the window is closed, the new spacefm window would be a benefit. Now the ActionDialog is returning with the file-manager open command in screenshot ActionDialog, so not as important to have separate window, but i want a new window instead of a new tab.

                      scrot note encounters problems with some font names in the scripting. better to pick one that works. offer only those fonts proven to work with note. I think not all fonts work with note.

                      #61996
                      Moderator
                      BobC

                        Skidoo, It might be possible to do it in MTPaint using whatever is their default font, size and color there, paste in the text, and let them drag it where they want it or undo, change it, then repaste it? I haven’t tried anything half interactive like that, though, so it might not be easy, but it would actually be better than the scrot solution, ie totally WYSIWYG. (do you remember that word from the Wang word processors?)

                        Xecure, Would I look to see if there was a value for GTK3, and if not, then look for a GTK2 value? And if neither, then disable notes?

                        Daily driver distro https://www.antixforum.com

                        #61997
                        Moderator
                        BobC

                          Ile, Are you familiar with the KISS principle? We are going to apply it to these notes and file managers, REAL SOON! They are going to go POOF!

                          LOL

                          Daily driver distro https://www.antixforum.com

                          #61998
                          Moderator
                          Brian Masinick

                            skidoo, Its not that I didn’t “like” your answer, scrot requires a value or it fails. That was why I kept asking…

                            Adding note
                            scrot -s -q 80 --note "-f '' -x 10 -y 20 -c 255,0,0,255 -t 'Taken by antiXscreenshot 20210619_1306_58'" "/home/bobc/.cache/antixscreenshot/screenshot-20210619_1306_58.jpg"
                            Error --note option : Malformed syntax for -f
                            

                            Would you suggest I default to blank, and if not entered, don’t add note text, even if selected and text is entered?

                            PS: I will see if I can find another way to add the note. If not, maybe it’s better to remove the note text functionality rather than having the program fail completely.

                            @BobC: I found this in the scrot manpage:

                            NOTE FORMAT
                            The following specifiers are recognised for the option –note:

                            -f ‘FontName/size’
                            -t ‘text’
                            -x position (optional)
                            -y position (optional)
                            -c color(RGBA) (optional)
                            -a angle (optional)

                            I notice that the -f is an AVAILABLE recognized option. What if you simply OMIT -f and only specify the parameters you want to use? Maybe omitting -f from the options will work. Try an experiment without -f and see if that solves the selecting a font issue.

                            • This reply was modified 2 years, 11 months ago by Brian Masinick.

                            --
                            Brian Masinick

                            #62000
                            Member
                            ile

                              Hello BobC
                              Hello Mister Brian
                              notice it does not say (optional) next to font. -f is required.

                              #62001
                              Moderator
                              BobC

                                Good suggestion, Brian, maybe that will end my FONTMARES!

                                Xecure, the mimeopen asked me how to open it, but then opened it in my existing SpaceFM window, changing it from normal to a folder viewer, very strange. But it was nice of you to try 🙂

                                Daily driver distro https://www.antixforum.com

                                #62002
                                Moderator
                                Brian Masinick

                                  Hello BobC
                                  Hello Mister Brian
                                  notice it does not say (optional) next to font. -f is required.

                                  You’re right; I tried it out without a -f at all; the manual says “recognised” (recognized) but they should say REQUIRED.

                                  I don’t know if /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf is universal or not, but it may be one such font that would work; otherwise this is getting to be too much; rip out the note functionality if it is too much trouble because this entire exercise was for “simplicity”. If it gets too big or too complex, is it worth it? That’s for you to decide, not me, but feature creep is sneaky… maybe this is nice but unnecessary?

                                  --
                                  Brian Masinick

                                Viewing 15 posts - 256 through 270 (of 315 total)
                                • You must be logged in to reply to this topic.