Build & Maintain Help Across Desktops

Forum Forums General Tips and Tricks Build & Maintain Help Across Desktops

  • This topic has 101 replies, 6 voices, and was last updated Dec 21-10:27 pm by BobC.
Viewing 15 posts - 46 through 60 (of 97 total)
  • Author
    Posts
  • #30312
    Moderator
    BobC
      Helpful
      Up
      0
      ::

      Skidoo, I was running it from IceWM keys, so I wasn’t seeing the output.

      I tried running it from a terminal, and yes, I did uncomment that first line. I ended up in a loop. I will look at it and try to figure it out. I got it to create a blank note file if one doesn’t exist, or open the existing one, and when I exit zim, exit, but it doesn’t seem to be exiting at that point.

      I’ll work with it and figure it out. It’s just using “consise” syntax from what I read, which I don’t know, but can find on the net.

      Thanks for your efforts, this is just a test laptop, so there is no danger of any harm. I just had to reboot it to get out of the loop.

      PS: So I added an exit 0 down before the end of the loop at the end and that solved the endless loop issue. I guess maybe you were thinking to use it differently than I was. It comes up on screen pretty quickly.

      • This reply was modified 3 years, 5 months ago by BobC.
      • This reply was modified 3 years, 5 months ago by BobC.
      #30317
      Moderator
      Brian Masinick
        Helpful
        Up
        0
        ::

        https://askubuntu.com/questions/34536/using-up-arrow-to-run-previous-command#34541

        “\e[A”: history-search-backward
        “\e[B”: history-search-forward
        “\e[C”: forward-char
        “\e[D”: backward-char

        --
        Brian Masinick

        #30320
        Anonymous
          Helpful
          Up
          0
          ::

          {facepalm}

          …and, to the pedant, skidoo pedagogically promulgated “Perhaps the purported purpose was to be punny

          .

          #30321
          Anonymous
            Helpful
            Up
            0
            ::

            I did uncomment that first line. I ended up in a loop.

            If you saved the script as some filename other than ‘bobHelpnotes’, the “pgrep bobHelpnotes” would miss, eh?

            and when I exit zim, exit

            The intent (for this WIP script) was to create a long-running, daemonlike script ~~ one which continually monitors and will (eventually) automagically, contenxtually, display the helpviewer.

            zim

            tip: Don’t add a line within the do-while loop to launch a helpviewer app.
            Or (maybe you’re curious?) if you do, be prepared to greet the linux kernel OOM mechanism.

            #30322
            Moderator
            BobC
              Helpful
              Up
              0
              ::

              Ok, skidoo, my comments… Just thinking aloud based on testing and having it log the values as it decided the name to look for into a log file, and ending up with multiple files.

              In other words, create one for ROXTerm, one for mc, one for geany, one for fixefox-esr

              It should look for the current process name in a list of do not create raw window notes list
              If not found the first word, sanitized, of the raw window title as the name to look for
              If found then go to that note
              Else create note for first word, sanitized, of raw window title and go to that note
              Else was found in do not create raw window notes list, so look for the first word, sanitized, of the current process name
              If found go to that note
              Else create note for first word, sanitized, of current process name and go to that note

              to sanitize maybe should also include removing ignore words like “python” and stripping off directory names as well as weird characters.

              Helpnotes.log start 2019_12_08__21_35_29
              ...finishing generate_blacklist_arr
              ...starting mainline generate_blacklist_arr
              ...top of read loop
              ...win diff mc [bobc@m2400]:~/bin vs 
              ...shallreject = 0
              ...notename-1 = mc [bobc@m2400]:~/bin
              ...notename-2 = mc__bobc_m2400____bin
              ...current processname: roxterm
              ...raw window title: mc [bobc@m2400]:~/bin
              ...sanitized notefile namestring:  ~/Helpnotes/mc__bobc_m2400____bin
              ...sanitized notefile namestring:  ~/Helpnotes/mc__bobc_m2400____bin
              Helpnotes.log ending 2019_12_08__21_35_45
               
              Helpnotes.log start 2019_12_08__21_42_37
              ...finishing generate_blacklist_arr
              ...starting mainline generate_blacklist_arr
              ...top of read loop
              ...win diff mc [bobc@m2400]:~ vs 
              ...shallreject = 0
              ...notename-1 = mc [bobc@m2400]:~
              ...notename-2 = mc__bobc_m2400___
              ...current processname: roxterm
              ...raw window title: mc [bobc@m2400]:~
              ...sanitized notefile namestring:  ~/Helpnotes/mc__bobc_m2400___
              ...sanitized notefile namestring:  ~/Helpnotes/mc__bobc_m2400___
              Helpnotes.log ending 2019_12_08__21_42_53
               
              Helpnotes.log start 2019_12_08__21_43_36
              ...finishing generate_blacklist_arr
              ...starting mainline generate_blacklist_arr
              ...top of read loop
              ...win diff bobHelpnotes - /home/bobc/testing - Geany vs 
              ...shallreject = 0
              ...notename-1 = bobHelpnotes - /home/bobc/testing - Geany
              ...notename-2 = bobHelpnotes_-__home_bobc_testing_-_Geany
              ...current processname: geany
              ...raw window title: bobHelpnotes - /home/bobc/testing - Geany
              ...sanitized notefile namestring:  ~/Helpnotes/bobHelpnotes_-__home_bobc_testing_-_Geany
              ...sanitized notefile namestring:  ~/Helpnotes/bobHelpnotes_-__home_bobc_testing_-_Geany
              Helpnotes.log ending 2019_12_08__21_43_53
               
              Helpnotes.log start 2019_12_08__22_03_42
              ...finishing generate_blacklist_arr
              ...starting mainline generate_blacklist_arr
              ...top of read loop
              ...win diff Build & Maintain Help Across Desktops – Page 4 – antiX-forum - Mozilla Firefox vs 
              ...shallreject = 0
              ...notename-1 = Build & Maintain Help Across Desktops – Page 4 – antiX-forum - Mozilla Firefox
              ...notename-2 = Build___Maintain_Help_Across_Desktops___Page_4___antiX-forum_-_Mozilla_Firefox
              ...current processname: firefox-esr
              ...raw window title: Build & Maintain Help Across Desktops – Page 4 – antiX-forum - Mozilla Firefox
              ...sanitized notefile namestring:  ~/Helpnotes/Build___Maintain_Help_Across_Desktops___Page_4___antiX-forum_-_Mozilla_Firefox
              ...sanitized notefile namestring:  ~/Helpnotes/Build___Maintain_Help_Across_Desktops___Page_4___antiX-forum_-_Mozilla_Firefox
              Helpnotes.log ending 2019_12_08__22_03_50
              
              #30323
              Moderator
              BobC
                Helpful
                Up
                0
                ::

                I did uncomment that first line. I ended up in a loop.

                If you saved the script as some filename other than ‘bobHelpnotes’, the “pgrep bobHelpnotes” would miss, eh?

                and when I exit zim, exit

                The intent (for this WIP script) was to create a long-running, daemonlike script ~~ one which continually monitors and will (eventually) automagically, contenxtually, display the helpviewer.

                zim

                tip: Don’t add a line within the do-while loop to launch a helpviewer app.
                Or (maybe you’re curious?) if you do, be prepared to greet the linux kernel OOM mechanism.

                Yes, that was where IT wanted to end up. I do understand the idea that you might want a program running in a loop waiting till someone asks for something, but I didn’t figure it out. I was happy to get the right help screen I created onto the screen when I pressed the hotkey. Keep in mind that you probably understand HOW that was going to work, and my scripting knowledge is probably less than 1/10th of yours, so I’m happy if I can make something work, and don’t worry about getting fancy.

                BTW, my idea above maybe should look first for the sanitized raw window name, just in case you created one by hand, even if it was for a program like firefox or geany that you usually wouldn’t want it, as an override.

                #30324
                Member
                ex_Koo
                  Helpful
                  Up
                  0
                  ::

                  skidoo wrote:

                  Koo, I did not intend to run the cheeet program. The github page does contain some useful links to other help (e.g. pdf docs) resources, though. Also, in the /lib directory of the cheeet github project, I found (and reformatted) a list of available mpv keybinds:actions https://pastebin.com/raw/kce7FA9L

                  Thanks for your input I added your kce7FA9L file to the cheeet lib folder after renaming it mpv2 works a treat. I would like to do one for geany as I use it all the time now just don’t have enough time till the Christmas holidays.
                  Thanks Again

                  I don’t think i am using the quote thingy properly..

                  Lucky me I just downloaded the geany manual in text form and it works great including search. Now that’s cheeeting lol

                  This is So Good just put any text file in into the lib folder make sure their are no gaps in the file name and you have instant helps or cheatsheets.

                  debian-install-plus-tips , Linux-Commands , calcurse-keys , ncmpcpp etc. New link to Cheeet (Rofi is Awesome)

                  • This reply was modified 3 years, 5 months ago by ex_Koo.
                  • This reply was modified 3 years, 5 months ago by anticapitalista.
                  #30329
                  Moderator
                  BobC
                    Helpful
                    Up
                    0
                    ::

                    Skidoo, I should try your code again your way if it was working for you.

                    I named is as you did. Was there a particular directory it needed to go into? Obviously needs to be executable. Then execute from roxterm? After that are you saying it automatically switches to help for what window is active? And the I just click the zim window? I didn’t see where it called zim. Maybe I didn’t understand.

                    I am willing to help you perfect it and provide key maps for the programs I would use it for, like IceWM and midnight commander.

                    #30337
                    Member
                    ex_Koo
                      Helpful
                      Up
                      0
                      ::

                      looks like my post got lost maybe spam protection because I kept editing..

                      #30370
                      Anonymous
                        Helpful
                        Up
                        0
                        ::

                        .

                        #30371
                        Anonymous
                          Helpful
                          Up
                          0
                          ::

                          Koo, I noticed that.
                          Forum mainpage showed “last post by: Koo” yet nothing new showed when I revisited the page.

                          Was there a particular directory it needed to go into?

                          Nope.
                          In my use, while tinkering, I’ve chosen a (not in a $PATH directory) so that I am less likely to accidentally launch it. Depending on the current working directory of my terminal, I launch ./scriptname …or /path/to/scriptname

                          BobC, yes my WIP script “it automatically switches to help for what window is active”. (Sorry, using filename//projectname bobHelpnotes was misleading, I wasn’t suggesting it was an exact solution for your goal.) At the moment, I’m jumping between 10 other projects, but I’ll followup and post a link to incrementally changed versions of my script, so’s you can get ideas for what you might want it to, or NOT want it to do, in your version.

                          I am willing to help you perfect it and

                          but one size don’t fits all, eh? If you want to “grow it out”, toward creating a wildly-configurable thingamaBob that suits a variety of real (and/or anticipated) usage preferences… bless your heart.

                          I heard (read) what you wished about “ability to choose: blacklist if first ‘word’ startswith”, but that suggests to me that you would, instead, be better served by adopting whitelisting approach ~~ trigger only for those programs which you have already created a helpdoc.

                          At present, while tinkering with the pastebin WIP script maybe it will be helpful for you to “just forget about” yad. Even set aside which helpviewer you might choose to use for displaying helpdocs. Suppose you wanted galculator (instead of a helpdoc containing a list of keysym:action pairs) to be always open and available when you are using geany. If so, regardless whatever else the script might be doing|monitoring…

                              if [[ $notename == *Geany ]];then
                                galculator
                                continue
                              fi
                              #trainingmode_ask

                          (yes, nested within the while loop, but handled by the continue statement)

                          …it could automagically launch galculator for you. IDK about icewm, but with fluxbox you could (~/.fluxbox/apps) create a rule instructing the window manager to always launch galculator to layer=top, and (one time, in advance) drag galculator to desired screen coordinates and instruct the wm to “Remember” the position
                          .

                          We need to consider the abilities + behavioral quirks of each helper app we choose (e.g. I had ruled out cherrytree for displaying my helptext b/c we cannot pass a node name and trust it “touch” create a non-existent node when necessary). When called, does galculator recognize it’s already running, and allow only one instance of itself? (Yes, it does. I checked before choosing it as the tinker example here.) If it doesn’t, I would probably choose a different helper.

                              ###  The echo lines are useful FOR DEBUGGING
                              echo -e "   raw window title: $now_win"
                              echo -e "   sanitized notefile namestring:  ~/Helpnotes/$notename"
                              #sleep 6  ### adjust to suit. May want to ignore quick back-and-fro windowchange events
                            fi        
                          done

                          Somewhat related: Not present in the version sent to pastebin, I’ve added a sleep command into the foot of the while loop. For logging, or for triggering in general, I will probably want to ignore quick, back-and-fro, windowchange events. The sleep pause also mitigates the consequences of accidentally calling some helper directly from within the while loop thereby spawning buku instances of the helperapp.

                          #30372
                          Anonymous
                            Helpful
                            Up
                            0
                            ::

                            Koo, I noticed that.
                            Forum mainpage showed “last post by: Koo” yet nothing new showed when I revisited the page.

                            Was there a particular directory it needed to go into?

                            Nope.
                            In my use, while tinkering, I’ve chosen a (not in a $PATH directory) so that I am less likely to accidentally launch it. Depending on the current working directory of my terminal, I launch ./scriptname …or /path/to/scriptname

                            BobC, yes my WIP script “it automatically switches to help for what window is active”. (Sorry, using filename|projectname bobHelpnotes was misleading, I wasn’t suggesting it was an exact solution for your goal.) At the moment, I’m jumping between 10 other projects, but I’ll followup and post a link to incrementally changed versions of my script, so you can get ideas for what you might want it to, or NOT want it to do, in your version.

                            I am willing to help you perfect it and

                            but one size don’t fits all, eh? If you want to “grow it out”, toward creating a wildly-configurable thingamaBob that suits a variety of real (and/or anticipated) usage preferences… bless your heart.

                            I heard (read) what you wished about “ability to choose: blacklist if first ‘word’ startswith”, but that suggests to me that you would, instead, be better served by adopting whitelisting approach ~~ trigger only for those programs which you have already created a helpdoc.

                            At present, while tinkering with the pastebin WIP script maybe it will be helpful for you to “just forget about” yad. Even set aside which helpviewer you might choose to use for displaying helpdocs. Suppose you wanted galculator (instead of a helpdoc containing a list of keysym:action pairs) to be always open and available when you are using geany. If so, regardless whatever else the script might be doing|monitoring…

                                if [[ $notename == *Geany ]];then
                                  galculator
                                  continue
                                fi
                                #trainingmode_ask

                            (yes, nested within the while loop, but handled by the continue statement)

                            …it could automagically launch galculator for you. IDK about icewm, but with fluxbox you could (~/.fluxbox/apps) create a rule instructing the window manager to always launch galculator to layer=top, and (one time, in advance) drag galculator to desired screen coordinates and instruct the wm to “Remember” the position

                            .

                            We need to consider the abilities + behavioral quirks of each helper app we choose (e.g. I had ruled out cherrytree for displaying my helptext b/c we cannot pass a node name and trust it “touch” create a non-existent node when necessary). When called, does galculator recognize it’s already running, and allow only one instance of itself? (Yes, it does. I checked before choosing it as the tinker example here.) If it doesn’t, I would probably choose a different helper.

                                ###  The echo lines are useful FOR DEBUGGING
                                echo -e "   raw window title: $now_win"
                                echo -e "   sanitized notefile namestring:  ~/Helpnotes/$notename"
                                #sleep 6  ### adjust to suit. May want to ignore quick back-and-fro windowchange events
                              fi        
                            done

                            Somewhat related: Not present in the version sent to pastebin, I’ve added a sleep command into the foot of the while loop. For logging, or for triggering in general, I will probably want to ignore quick, back-and-fro, windowchange events. The sleep pause also mitigates the consequences of accidentally calling some helper directly from within the while loop thereby spawning buku instances of the helperapp.

                            #30373
                            Anonymous
                              Helpful
                              Up
                              0
                              ::

                              Koo, I noticed that.
                              Forum mainpage showed “last post by: Koo” yet nothing new showed when I revisited the page.

                              Was there a particular directory it needed to go into?

                              Nope.
                              In my use, while tinkering, I’ve chosen a (not in a PATH directory) so that I am less likely to accidentally launch it. Depending on the current working directory of my terminal, I launch ./scriptname …or /path/to/scriptname

                              BobC, yes my WIP script “it automatically switches to help for what window is active”. (Sorry, using filename|projectname bobHelpnotes was misleading, I wasn’t suggesting it was an exact solution for your goal.) At the moment, I’m jumping between 10 other projects, but I’ll followup and post a link to incrementally changed versions of my script, so you can get ideas for what you might want it to, or NOT want it to do, in your version.

                              I am willing to help you perfect it and

                              but one size don’t fits all, eh? If you want to “grow it out”, toward creating a wildly-configurable thingamaBob that suits a variety of real (and/or anticipated) usage preferences… bless your heart.

                              I heard (read) what you wished about “ability to choose: blacklist if first ‘word’ startswith”, but that suggests to me that you would, instead, be better served by adopting whitelisting approach ~~ trigger only for those programs which you have already created a helpdoc.

                              At present, while tinkering with the pastebin WIP script maybe it will be helpful for you to “just forget about” yad. Even set aside which helpviewer you might choose to use for displaying helpdocs. Suppose you wanted galculator (instead of a helpdoc containing a list of keysym:action pairs) to be always open and available when you are using geany. If so, regardless whatever else the script might be doing|monitoring…

                                  if [[ $notename == *Geany ]];then
                                    galculator
                                    continue
                                  fi
                                  #trainingmode_ask

                              (yes, nested within the while loop, but handled by the continue statement)

                              …it could automagically launch galculator for you. IDK about icewm, but with fluxbox you could (~/.fluxbox/apps) create a rule instructing the window manager to always launch galculator to layer=top, and (one time, in advance) drag galculator to desired screen coordinates and instruct the wm to “Remember” the position

                              .

                              We need to consider the abilities + behavioral quirks of each helper app we choose (e.g. I had ruled out cherrytree for displaying my helptext b/c we cannot pass a node name and trust it “touch” create a non-existent node when necessary). When called, does galculator recognize it’s already running, and allow only one instance of itself? (Yes, it does. I checked before choosing it as the tinker example here.) If it doesn’t, I would probably choose a different helper.

                                  ###  The echo lines are useful FOR DEBUGGING
                                  echo -e "   raw window title: $now_win"
                                  echo -e "   sanitized notefile namestring:  ~/Helpnotes/$notename"
                                  #sleep 6  ### adjust to suit. May want to ignore quick back-and-fro windowchange events
                                fi        
                              done

                              Somewhat related: Not present in the version sent to pastebin, I’ve added a sleep command into the foot of the while loop. For logging, or for triggering in general, I will probably want to ignore quick, back-and-fro, windowchange events. The sleep pause also mitigates the consequences of accidentally calling some helper directly from within the while loop thereby spawning buku instances of the helperapp.

                              #30374
                              Anonymous
                                Helpful
                                Up
                                0
                                ::

                                bisketti

                                a throwawy post

                                unable to Submit it after proofreading and editing it

                                #30375
                                Anonymous
                                  Helpful
                                  Up
                                  0
                                  ::

                                  ERROR: Duplicate reply detected; it looks as though you’ve already said that.
                                  ERROR: Duplicate reply detected; it looks as though you’ve already said that.
                                  ERROR: Duplicate reply detected; it looks as though you’ve already said that.
                                  ERROR: Duplicate reply detected; it looks as though you’ve already said that.
                                  ERROR: Duplicate reply detected; it looks as though you’ve already said that.

                                  Koo, I noticed that.
                                  Forum mainpage showed “last post by: Koo” yet nothing new showed when I revisited the page.

                                  Was there a particular directory it needed to go into?

                                  Nope.
                                  In my use, while tinkering, I’ve chosen a (not in a PATH directory) so that I am less likely to accidentally launch it. Depending on the current working directory of my terminal, I launch ./scriptname …or /path/to/scriptname

                                  BobC, yes my WIP script “it automatically switches to help for what window is active”. (Sorry, using filename|projectname bobHelpnotes was misleading, I wasn’t suggesting it was an exact solution for your goal.) At the moment, I’m jumping between 10 other projects, but I’ll followup and post a link to incrementally changed versions of my script, so you can get ideas for what you might want it to, or NOT want it to do, in your version.

                                  I am willing to help you perfect it and

                                  but one size don’t fits all, eh? If you want to “grow it out”, toward creating a wildly-configurable thingamaBob that suits a variety of real (and/or anticipated) usage preferences… bless your heart.

                                  I heard (read) what you wished about “ability to choose: blacklist if first ‘word’ startswith”, but that suggests to me that you would, instead, be better served by adopting whitelisting approach ~~ trigger only for those programs which you have already created a helpdoc.

                                  At present, while tinkering with the pastebin WIP script maybe it will be helpful for you to “just forget about” yad. Even set aside which helpviewer you might choose to use for displaying helpdocs. Suppose you wanted galculator (instead of a helpdoc containing a list of keysym:action pairs) to be always open and available when you are using geany. If so, regardless whatever else the script might be doing|monitoring…

                                      if [[ $notename == *Geany ]];then
                                        galculator
                                        continue
                                      fi
                                      #trainingmode_ask

                                  (yes, nested within the while loop, but handled by the continue statement)

                                  …it could automagically launch galculator for you. IDK about icewm, but with fluxbox you could (~/.fluxbox/apps) create a rule instructing the window manager to always launch galculator to layer=top, and (one time, in advance) drag galculator to desired screen coordinates and instruct the wm to “Remember” the position

                                  .

                                  We need to consider the abilities + behavioral quirks of each helper app we choose (e.g. I had ruled out cherrytree for displaying my helptext b/c we cannot pass a node name and trust it “touch” create a non-existent node when necessary). When called, does galculator recognize it’s already running, and allow only one instance of itself? (Yes, it does. I checked before choosing it as the tinker example here.) If it doesn’t, I would probably choose a different helper.

                                      ###  The echo lines are useful FOR DEBUGGING
                                      echo -e "   raw window title: $now_win"
                                      echo -e "   sanitized notefile namestring:  ~/Helpnotes/$notename"
                                      #sleep 6  ### adjust to suit. May want to ignore quick back-and-fro windowchange events
                                    fi        
                                  done

                                  Somewhat related: Not present in the version sent to pastebin, I’ve added a sleep command into the foot of the while loop. For logging, or for triggering in general, I will probably want to ignore quick, back-and-fro, windowchange events. The sleep pause also mitigates the consequences of accidentally calling some helper directly from within the while loop thereby spawning buku instances of the helperapp.

                                Viewing 15 posts - 46 through 60 (of 97 total)
                                • You must be logged in to reply to this topic.