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 - 31 through 45 (of 97 total)
  • Author
    Posts
  • #30267
    Anonymous
      Helpful
      Up
      0
      ::

      accessed by the context of what screen you are asking for help from, filtered to eliminate necessary nonsense (ie python in the window name or command string for example), all combined should result in a very usable system that could work on any desktop.

      Careful ~~ “on any desktop” hints that you expect it to remain accurate within the desktop session of any ol’ window manager.

      keycodes {—- hardware
      keysyms + modifiers, those are marshalled (?) by the X server’s xbk component
      and
      https://en.wikipedia.org/wiki/X_Window_System_core_protocol#Mappings
      (page section: Mappings)
      The keycodes{–}keysyms mapping table and modifier mappings are dynamic, are fluid, and (potentially) are everchanging moment-to-moment throughout a session.

      a paraphrased excerpt from the wikipedia page:

      When a key is pressed or released, the server sends events of type KeyPress or KeyRelease
      to the appropriate clients. These events contain:
      — the keycode of the pressed key
      — the current state of the modifiers (Shift, Control, etc.) and mouse buttons

      Translation from keycode to keysym.
      The server therefore sends the keycode and the modifier state without attempting to
      translate them into a specific character. It is a responsibility of the client to do this conversion.

      X client applications only request the X server keycodes{–}keysyms mapping table and use it for decoding the
      keycode and modifiers field of a key event into a keysym. However, clients can also change this mapping at will.
      Similarly, the lists of _modifier_ mappings is maintained by the X server but can be changed by every client.

      Said again, worded differently:
      at each EVENT occurrence, each of the registered listeners has an opportunity to handle
      (CONSUME and/or modify, or ignore) TRAP the event. The event is usually CONSUMED before reaching,
      and frequently without ever reaching the lesser-priority listeners.

      The window manager defers to (is a lesser priority) while any application window holds focus
      and each application usually does consume nearly all of the non-modifier-ized keysym events.
      Further, when applications launch child windows, often the child is granted “modal” superpriority
      (the parent window may trap/ignore any keysym events not consumed by the child).

      In regard to “expect it to remain accurate within the desktop session of any ol’ window manager”
      I say, no, that’s an overreaching expectation.
      Too many wildcard factors exist, for example:
      What if, during a window_manager_XYZ, ‘sloppy mouse focus’ is in effect?

      related reading:
      https://askubuntu.com/questions/26056/where-are-gnome-keyboard-shortcuts-stored
      https://wiki.ubuntu.com/Keybindings
      https://unix.stackexchange.com/questions/319787/how-does-the-linux-kernel-handle-keyboards-inputs-outputs
      https://unix.stackexchange.com/questions/116629/how-do-keyboard-input-and-text-output-work

      ______________________
      I’ve only ever kicked the tires of blender. Unreal Editor 2 is the closest app I can equate to blender’s UI and UX (user experience).
      Ctrl+Shift+up/down : adjusts POV along the Z-axis
      Wait, don’t jot that down in yer handy-dandy notes!
      That keycombo performs that action ONLY while you’re using viewport mode suchandsuch. As you traverse between the various viewport modes, Ctrl+Shift+up/down may have no effect (and, dammit, there’s not visual cue, nothing to indicate that action is currently “greyed out”). In other viewport modes, Ctrl+Shift+up/down repositions the currently-selected object within the scene. My point here is that “per application” static (graphical or physical) kb overlays can still fall short (and may, at a given moment, represent inaccurate “help”)

      #30268
      Moderator
      BobC
        Helpful
        Up
        0
        ::

        Skidoo, yes, your warnings are valid, and I will likely be temporarily puzzled when a key that I’m expecting to work won’t because some other program grabbed it, but that I know of, there isn’t a way to ask it what program will grab a specific modified key, and kick back documentation in abbreviated and detailed form of what it will do as a result. I’m not expecting that much.

        My problems are things like that I just never can remember what key tells mc to look back one line in its history for what I typed so it can do it for me again, or what key it was will pop up the search files window, or what key tells IceWM to take the active window and move it to the next desktop, for example.

        I guess I’m just tired of forgetting, and having to go hunt for things like that, only to have to go hunt for it again 6 weeks later when I need it again.

        You have given me plenty of ammo to play with. If I can’t find a decent way to generate a pic, I guess I won’t have one, and need to use a table instead, and I’d still be better off than hunting the same keys from the help text once every month or two. Thanks very much for your investigative and creative efforts, which are now also available for some other people looking to solve those same problems another day as well.

        🙂

        #30269
        Anonymous
          Helpful
          Up
          0
          ::

          (another rambling post, drafted before I noticed your latest which hints that you’re all-talked-out regarding this topic.)

          filtered to eliminate necessary nonsense (ie python in the window name or command string for example)

          Have you tried using the keybinded processname one-liner I previously posted?
          I didn’t expect that would turn up (m)any results which beg filtering.
          ### get the PROCESS NAME associated with the currently-focused window
          cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm

          For me, bent on tracking exact window TITLES, yes adding filter rules may be an ongoing chore.
          BTW, here’s a copy of the WIP script:
          https://pastebin.com/raw/jiR68jCH

          Ironically, it self-evidently underscores the point — I’m prone to continually jotting voluminous notes.
          One of my motivations for creating the helper is toward avoiding placement of “way too many” inline comment lines within my code. Another idea I have in mind
          is to replace the echo’ed debugging output with periodically logged-to-disk timestamped lines, as fodder for a timetracking program.

          Across the past day or so, I’ve been leaving the script running continually.
          Here’s a snippet from its current (while I’m typing this post) output:

          current processname: lxterminal
             raw window title: LXTerminal
             sanitized notefile namestring:  ~/Helpnotes/LXTerminal
          current processname: geany
             raw window title: bobHelpnotes - /tmp - Geany
             sanitized notefile namestring:  ~/Helpnotes/bobHelpnotes_-__tmp_-_Geany
          current processname: firefox-esr
             raw window title: Build & Maintain Help Across Desktops – Page 3 – antiX-forum - Mozilla Firefox
             sanitized notefile namestring:  ~/Helpnotes/Build___Maintain_Help_Across_Desktops___Page_3___antiX-forum_-_Mozilla_Firefox

          With the context-sensitive helper running, while working in the “bobHelpnotes – /tmp – Geany” window
          ~/Helpnotes/bobHelpnotes_-__tmp_-_Geany.txt
          will automatically be present and accessible for adding related notes (as a helper window at the right-hand side of my 16:9 display, or attach an additional display and pin the helper window to another workspace)

          Anticipating that I’ll later search the notes content via recoll, I’m not planning too much fuss toward filtering/truncating the individual note filenames. I’ll log the full window titlestrings and use separate script (probably python) when crafting filtering rules. Hmm, endswith(‘_-_Mozilla Firefox’) be useful (enlighting) if generating timetracking reports.

          #30270
          Anonymous
            Helpful
            Up
            0
            ::

            Koo wrote:

            The program I use can be found here on github named cheeet works well with i3wm as I use rofi as a launcher.

            Github cheatsheet

            404 not found
            but I searched “cheet” and found the following:
            https://github.com/Mrmachine3/cheeet
            an intro ‘splainer, snipped from the linked page:
            “I find rofi could help me do that, just write them into files and then use rofi to query.
            So I wrote a litte script and a concise rofi theme.”

            #30276
            Moderator
            BobC
              Helpful
              Up
              0
              ::

              Skidoo, I had gotten sidetracked onto the tangent of displaying the keyboard as a pic, and while I still think that would be optimal, it probably wouldn’t be worth doing if it needs to be created for each program by hand.

              I need to spend time working with the toys you created, and put it to use on a simple scale and then try it on a 2nd desktop to see what problems I find when doing that, probably starting with fluxbox or jwm on antiX, and then one of the other distros like debian under IceWM to see if it will adapt well, and can i get myself to use it.

              #30283
              Member
              ex_Koo
                Helpful
                Up
                0
                ::

                @Skidoo

                Sorry the link to has changed I can no longer edit my post Thanks for the heads up with the new link.
                cheeet sheet New link

                If you have changed the way it works or rewrote it could you make it available please. Thanks

                #30285
                Moderator
                BobC
                  Helpful
                  Up
                  0
                  ::

                  I didn’t get the same results. Maybe I did something wrong. It created the directories and file, but I now have 5 instances of it running and no messages or output anywhere. I do have both cherrytree and zim installed but I didn’t see any reference to them.

                  I was actually able to get some insight by creating a debug scriptfrom the original xdotool post, and maybe will just build that into your pastebin one since I don’t understand it, in order to make sense of it.

                  I’ll have to figure out the code. I am not at that level with bash scripting, and literally need to go line by line, parameter by parameter, because there are so many things I don’t know vs so few that I do. Another good use for it would be to have a page for bash scripting to be able to figure out what code syntax should do.

                  #30293
                  Anonymous
                    Helpful
                    Up
                    0
                    ::

                    .

                    #30301
                    Moderator
                    Brian Masinick
                      Helpful
                      Up
                      0
                      ::

                      For those who have a difficult time remembering a lot of different keystrokes, just pressing either the up arrow ( to go back to previous commao) or the down arrow to return to a more recent command, that alone is worth it.

                      Once you retrieve a command, there are plenty of additional commands to edit the current line or navigating through command history, but the arrow keys – up and down to retrieve commands – and left and right arrows to move within a previous command line – are sufficient to do quite a bit.

                      When you get curious you can try more, or just keep it simple and those few navigating arrows will save you some typing.

                      --
                      Brian Masinick

                      #30302
                      Anonymous
                        Helpful
                        Up
                        0
                        ::

                        (spamfilter is fighting me, struggling to make this pass muster so it will post)
                        forward-slash tmp now triggers the spamfilter?
                        any ampersand in the post will be converted to ampersand-amp-semicolon.
                        Later, if edited, the forum software chokes if it finds any occurrences of ampersand-amp-semicolon ???

                        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

                        BobC, I checked, copypasted from pastebin.com, and launched it from terminal prompt. It behaved as intended.
                        ============= As is, the WIP (aside from creating a placeholder config dir+file) does nothing more than print echo msgs to terminal
                        re: ” I now have 5 instances of it running ”
                        Yep. Dawg only knows why I pasted a copy in which line 1 is outcommented
                        if [ ! -n “$(pgrep bobHelpnotes)” ]; then echo “already running”; exit 1; fi
                        ————————-^ /somepath/bobHelpnotes is the location of the WIP script on my machine

                        …but I’ve been running with that line outcommented, and haven’t wound up with multiple concurrent copies running.

                        The flow for not-yet-written (maybe later today) part is:

                        if titlestring is blacklisted, continue (meaning skip, iterate the while loop)
                        elseif a matching ~/Helpnotes/$notename exists,
                        load it into the (TBD: hardcoded, or specified via config) helpviewereditor program
                        else
                        raise a yad dialogbox

                        The yad dialog will state “No helpfile for this exists yet. Create one?”
                        and will provide Y/N buttons, along with a checkbox [] add this item to blacklist

                        if N —-} continue
                        elseif checkbox was ticked —} addtoblacklist_and_reload()
                        else —} touch ~/Helpnotes/$notename && helpviewereditor ~/Boonotes/${notename}& disown

                        #30303
                        Anonymous
                          Helpful
                          Up
                          0
                          ::

                          yes, THIS time ’round, the post was rejected due to
                          any ampersand in the post will be converted to ampersand-amp-semicolon.
                          Later, if edited, the forum software chokes if it finds any occurrences of ampersand-amp-semicolon

                          Dammit, my forehead is about out space to fit any more “forum quirks” reminder notes stapled there.

                          #30305
                          Moderator
                          Brian Masinick
                            Helpful
                            Up
                            0
                            ::

                            By the way, I am not trying to minimize the great work already done here or the suggestions expressed. I am simply reminding anyone who is overwhelmed with the tools that the simple command line has decent editing, even without the use of the sophisticated editing commands.

                            --
                            Brian Masinick

                            #30306
                            Anonymous
                              Helpful
                              Up
                              0
                              ::

                              just pressing either the up arrow

                              Wait, now I’m rilly confoozed. Ain’t it the ↑ UP key what makes ya go forward?

                              btw i alreddy learnt the hard way DONT NEVER push dat DOWN button !

                              .

                              #30307
                              Moderator
                              Brian Masinick
                                Helpful
                                Up
                                0
                                ::

                                Skidoo, you have been very helpful and patient with the tips you are sharing. I hope that the forum management software doesn’t impede too many of your excellent tips.

                                --
                                Brian Masinick

                                #30308
                                Moderator
                                Brian Masinick
                                  Helpful
                                  Up
                                  0
                                  ::

                                  just pressing either the up arrow

                                  Wait, isnt the ↑ UP key what makes ya go forward?

                                  Up arrow goes back in command line history. (Previous commands)

                                  I’ll get on the computer tomorrow and if I made a mistake I will correct it.

                                  • This reply was modified 3 years, 5 months ago by Brian Masinick.
                                  • This reply was modified 3 years, 5 months ago by Brian Masinick.

                                  --
                                  Brian Masinick

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