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 - 61 through 75 (of 97 total)
  • Author
    Posts
  • #30376
    Member
    Koo
    Helpful
    Up
    0
    :D

    @skidoo

    Not sure what has been happening lately with my posts. I was just going back and editing my post as found more to add to it which was about the rofi cheeet sheet. But don’t worry I have given up I am happy with what cheeet can do for me and that’s the main thing. Thanks

    T430 i7-3632QM 16gb , antiX-19.2.1-runit_x64-base Hannie Schaft 29 March 2020 , 5.8.16-antix.1-amd64-smp

    #30381
    Moderator
    BobC
    Helpful
    Up
    0
    :D

    Skidoo, I will save what I have and try yours again from scratch.

    I think your idea is slicker for faster machines if you can get it perfected.

    But I think the simple super help hotkey pops up zim when asked to is a good solution for low end machines.

    #30385
    Member
    skidoo
    Helpful
    Up
    0
    :D

    I reckon both (daemon, and hotkey “check which window currently has focus, and popup) have merit and, thankfully, they’re not mutually-exclusive.

    editra (mentioned several posts ago) is now crossed of my list.

    Using zim, you don’t need to care but I’ll mention that both the pluma and geany tabbed editors in 64bit antiX19 have a 50MB memory footprint (due to gtk3 UI) and the version of pluma in buster repository is kinda flaky ~~ I can’t recall ever seeing the version in stretch crash. In 2 days trial use under antiX19, pluma has crashed (segmentation fault) at least a dozen times.

    sudo apt install scite
    It has a 19MB memory footprint
    https://www.scintilla.org/SciTEDoc.html
    ^—– CHECK OUT THE RAFT OF COMMANDLINE OPTIONS IT OFFERS
    sigh. AFAICT, unlike with pluma and geany, you can’t command scite to autocreate a non-existent file.
    scite -check.if.already.open /tmp/crabmonkey.txt
    touch ~/Helpnotes/crabmonkey.txt && scite -check.if.already.open ~/Helpnotes/crabmonkey.txt

    #30463
    Member
    skidoo
    Helpful
    Up
    0
    :D

    asking:

    If the conky output (or text embedded into the wallpaper image) displayed an everpresent message stating
    something like
    “At any time, you can press _____ to view a list of keycombos:actions for the program you are currently using”
    what
    (preferably, but not necessarily, a combo not already assigned in the stock ~/*/keys files)
    what keycombo would you choose to assign to the context-sensitive popup help?

    Also, what do you suggest would be the most clear phrasing for the everpresent message?

    Even if it were not incorporated into antiX, this context-sensitive popup
    would probably be a welcome feature in various respins, for instance
    MX Linux Remix -Disability and Rescue https://forum.mxlinux.org/viewtopic.php?f=94&t=54612
    .
    Once onboard, a user can swap the wallpaper to get rid of the everpresent, in your face, howto find help reminder.

    #30464
    Member
    skidoo
    Helpful
    Up
    0
    :D

    Yeah, as soon as I posted that, I questioned…
    What happens when I press ____ while staring at an empty desktop?
    (no programs launched yet, or all windows minimized)

    Seems like the “how to find help” link must lead to an overview doc ~~ a doc in which the tip “how to popup context-sensitive help” is mentioned.

    #30581
    Member
    skidoo
    Helpful
    Up
    0
    :D

    Earlier I wrote “one size don’t fits all, eh?”

    I’m in the process of revising the script to support dual modes of operation.
    Hopefully the script’s WIP “self-documenting header” adequately conveys what you can expect.

    #!/bin/bash
    ###     place this script at /usr/local/bin/bobHelpnotes, and chmod +x
    ###     (or, alternatively, in some other dir listed in your $PATH)
    ###     If you choose some other filename, you must search/replace
    ###     all instances of "bobHelpnotes" within the script.
    ###
    ### This script monitors Xsession windowchange events and displays 
    ### context-sensitive helpdocs. It strives to provide a desktop-environment-agnostic
    ### solution, and is intended to be launched as a long-running (daemon) process
    ### via session startup file or from commandline.
    ###
    ###   If you would prefer to launch (and/or stop) the script manually, on demand,
    ###   you can create a pair of appropriately pathed ".desktop" launchers:
    ###       Exec=/path/to/YoUrChoSenName
    ###       (or Exec=YoUrChoSenName --onlyknown)(option explained, below)
    ###       and
    ###       Exec=killall YoUrChoSenName
    ###   If the helpnotes script is running and you inadvertently attempt to launch
    ###   a second instance, no harm ~~ the launch attempt will be silently rejected.
    ###
    ### Two modes of operation are available. If "--onlyknown" option is specified,
    ### the (external, configurable) helpviewer is called to load helpdocs only
    ### when a window bearing a known titlestring receives focus. ("Known" meaning
    ### specified within the file ~/.config/Helpnotes/knowntitles)
    ###
    ### Alternatively, if no option is specified, the script ignores windowchange
    ### events when the detected window titlestring of the window gaining focus
    ### matches a previously-blacklisted pattern (~/.config/Helpnotes/ignored_items)
    ### and
    ### calls the external helpviewer to load a matching helpdoc when a pre-existing
    ### matching "knowntitles" helpdoc is present. Otherwise, it will raise a dialogbox
    ### advising that no matching helpdoc yet exists, asking the user how to proceed.
    ######___________________________________________________
    ###   No helpnote yet exists for:
    ###   __sanitized-window_titlestring_here__
    ###
    ###   How would you like to proceed?
    ###
    ###   (·) CREATE and open a helpfile for this exact title
    ###
    ###   ( ) ignore this exact title ALWAYS
    ###
    ###   ( ) OPEN the ignored_items list for editing
    ###
    ###   ( ) other (proceed to next dialog, set a custom ignore rule)
    ###
    ###      tip: can just click outside the dialog to dismiss
    ###            (title will be ignored just this time
    ###             and dialog will ask again next time)
    ###   
    ###                                         (Cancel)  (OK)
    ######___________________________________________________
    ###
    ###        -------- create a custom rule ---------
    ###
    ###   __sanitized-window_titlestring_here__
    ###
    ###   tip:
    ###   You can dragselect, copy, paste from the titletext displayed above.
    ###   If hand-typing, the valid match characters are:
    ###            -_a-zA-Z0-9./
    ###
    ###   ignore endswith [______]
    ###   ignore beginswith [______]
    ###   ignore contains word substring [______]
    ###
    ###                                         (Cancel)  (OK)
    ######___________________________________________________
    ###
    ### NOTE: ESPECIALLY AT THE OUTSET, UNTIL THE ignored_items LIST IS WELL-POPULATED,
    ###       THE REPETETIVE CHORE OF ENGAGING WITH THE POPUP DIALOGS
    ###       CAN BE DISTRACTING AND {INSERT CUSSWORD HERE} ANNOYING.
    ### Toward alleviating this nuisance-like (yet necessary) behavior, this script
    ### can employ a "sleep" command (search in file, below) to extend a delay
    ### between its polling checks. Even after the ignored_items list has been well-populated,
    ### a delay of 3 (seconds) between checks is probably desirable, in order to
    ### disregard any quick back-and-fro windowchange events.
    ###
    ### Before running this script, understand that it provides no "user interface",
    ### aside from the auto-triggered popup dialogs. You are responsible for starting
    ### and stopping the script process (and/or coordinating with any sessionmanager).
    ###  .
    ### After manually editing the ignored_items and/or knowntitles files,
    ### you must (stop and/or) restart this script in order to reload those
    ### edited files. Performing such edits while the script is running
    ### is, of course, inadvisable.
    ###
    ### When this script loads the ignored_items + knowntitles files, it disregards 
    ### any/all lines which contain characters other than
    ###   -_a-zA-Z0-9./  
    ### Also, (as of this writing, subject to change) any line within the 
    ### knowntitles file containing an asterisk * character  will be ignored.
    ###  .
    ### The script will NEVER disturb (sort, delete, replace) lines within
    ### these files; it will only append lines to these files (per user interactions
    ### with the popup dialogs). Actually, in its current forum, the script will
    ### never write to the "knowntitles", period. It is your responsibility to populate
    ### that file ~~ placing one to-be-matched-verbatim windowtitle namestring per line.
    ###  .
    ### With the above in mind, know that you may freely pepper your "knowntitles"
    ### and "ignored_items" files with devnotes. This is especially useful
    ### when maintaining a "ignored_items" list (comments reminding why you
    ### had chosen to ignore suchandsuch, or that you added then later removed
    ### a pattern matching suchandsuch, or that you probably should add an
    ### endswith globbing pattern but have not decided the best pattern to use).
    ###  .
    ### Asterisk is the bash globbing placeholder (wildcard, of zero or NN length)
    ### and is interpreted as such when the script parses "ignored_items".
    ### Any dot (period) character within any ignored_items line is parsed as, 
    ### treated as, a verbatim plaintext character.
    ###
    ###
    ### CONSIDERATIONS IN CHOOSING (AND CALLING) AN EXTERNAL HELPVIEWER PROGRAM:
    ### 
    ### Although the term "helpVIEWER" is mentioned repeatedly here (you may wish
    ### to load browsable PDFs, or html pages), it is probably more ideal to
    ### choose a "viewer" program which loads helpdocs as editable files ~~ so that
    ### you may freely append|revise your helpdocs for any given program, as needed.
    ###
    ### The "zim" (aka "zim wiki") program can be called using a commandline option
    ### which directs it to "open a named node". You might modify this helpnotes script
    ### so that it calls zim (and passes options to zim using zim's expected syntax)
    ###
    ### The "cherrytree" program might have been be my recommended rich-text helpviewer,
    ### BUT it is unsuitable because it cannot be remotely commanded to generate
    ### a new node (matching the passed namestring) if none yet exists. Other folks
    ### have noticed this limitation:  https://github.com/giuspen/cherrytree/issues/552
    ###
    ### If richtext markup is overkill for your (helpdocs, and notekeeping) needs,
    ### a tabbbed text editor can serve well as your "helpviewer". Based on my testing,
    ### I can recommend both "geany" and "scite" as suitable candidates. (Also tested
    ### "pluma" and "editra", and I recommend NOT using these with this script.)
    ###
    ###
    ###  ============= {snip} =============
    #30584
    Member
    skidoo
    Helpful
    Up
    0
    :D

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

    #30585
    Member
    skidoo
    Helpful
    Up
    0
    :D

    bad bot.
    bad bad bababababbad bot.
    .
    .
    .

    Earlier I wrote “one size don’t fits all, eh?”

    I’m in the process of revising the script to support dual modes of operation.
    Hopefully the script’s WIP “self-documenting header” adequately conveys what you can expect.

    #!/bin/bash
    ###     place this script at /usr/local/bin/bobHelpnotes, and chmod +x
    ###     (or, alternatively, in some other dir listed in your $PATH)
    ###     If you choose some other filename, you must search/replace
    ###     all instances of "bobHelpnotes" within the script.
    ###
    ### This script monitors Xsession windowchange events and displays 
    ### context-sensitive helpdocs. It strives to provide a desktop-environment-agnostic
    ### solution, and is intended to be launched as a long-running (daemon) process
    ### via session startup file or from commandline.
    ###
    ###   If you would prefer to launch (and/or stop) the script manually, on demand,
    ###   you can create a pair of appropriately pathed ".desktop" launchers:
    ###       Exec=/path/to/YoUrChoSenName
    ###       (or Exec=YoUrChoSenName --onlyknown)(option explained, below)
    ###       and
    ###       Exec=killall YoUrChoSenName
    ###   If the helpnotes script is running and you inadvertently attempt to launch
    ###   a second instance, no harm ~~ the launch attempt will be silently rejected.
    ###
    ### Two modes of operation are available. If "--onlyknown" option is specified,
    ### the (external, configurable) helpviewer is called to load helpdocs only
    ### when a window bearing a known titlestring receives focus. ("Known" meaning
    ### specified within the file ~/.config/Helpnotes/knowntitles)
    ###
    ### Alternatively, if no option is specified, the script ignores windowchange
    ### events when the detected window titlestring of the window gaining focus
    ### matches a previously-blacklisted pattern (~/.config/Helpnotes/ignored_items)
    ### and
    ### calls the external helpviewer to load a matching helpdoc when a pre-existing
    ### matching "knowntitles" helpdoc is present. Otherwise, it will raise a dialogbox
    ### advising that no matching helpdoc yet exists, asking the user how to proceed.
    ######___________________________________________________
    ###   No helpnote yet exists for:
    ###   __sanitized-window_titlestring_here__
    ###
    ###   How would you like to proceed?
    ###
    ###   (·) CREATE and open a helpfile for this exact title
    ###
    ###   ( ) ignore this exact title ALWAYS
    ###
    ###   ( ) OPEN the ignored_items list for editing
    ###
    ###   ( ) other (proceed to next dialog, set a custom ignore rule)
    ###
    ###      tip: can just click outside the dialog to dismiss
    ###            (title will be ignored just this time
    ###             and dialog will ask again next time)
    ###   
    ###                                         (Cancel)  (OK)
    ######___________________________________________________
    ###
    ###        -------- create a custom rule ---------
    ###
    ###   __sanitized-window_titlestring_here__
    ###
    ###   tip:
    ###   You can dragselect, copy, paste from the titletext displayed above.
    ###   If hand-typing, the valid match characters are:
    ###            -_a-zA-Z0-9./
    ###
    ###   ignore endswith [______]
    ###   ignore beginswith [______]
    ###   ignore contains word substring [______]
    ###
    ###                                         (Cancel)  (OK)
    ######___________________________________________________
    ###
    ### NOTE: ESPECIALLY AT THE OUTSET, UNTIL THE ignored_items LIST IS WELL-POPULATED,
    ###       THE REPETETIVE CHORE OF ENGAGING WITH THE POPUP DIALOGS
    ###       CAN BE DISTRACTING AND {INSERT CUSSWORD HERE} ANNOYING.
    ### Toward alleviating this nuisance-like (yet necessary) behavior, this script
    ### can employ a "sleep" command (search in file, below) to extend a delay
    ### between its polling checks. Even after the ignored_items list has been well-populated,
    ### a delay of 3 (seconds) between checks is probably desirable, in order to
    ### disregard any quick back-and-fro windowchange events.
    ###
    ### Before running this script, understand that it provides no "user interface",
    ### aside from the auto-triggered popup dialogs. You are responsible for starting
    ### and stopping the script process (and/or coordinating with any sessionmanager).
    ###  .
    ### After manually editing the ignored_items and/or knowntitles files,
    ### you must (stop and/or) restart this script in order to reload those
    ### edited files. Performing such edits while the script is running
    ### is, of course, inadvisable.
    ###
    ### When this script loads the ignored_items + knowntitles files, it disregards 
    ### any/all lines which contain characters other than
    ###   -_a-zA-Z0-9./  
    ### Also, (as of this writing, subject to change) any line within the 
    ### knowntitles file containing an asterisk * character  will be ignored.
    ###  .
    ### The script will NEVER disturb (sort, delete, replace) lines within
    ### these files; it will only append lines to these files (per user interactions
    ### with the popup dialogs). Actually, in its current forum, the script will
    ### never write to the "knowntitles", period. It is your responsibility to populate
    ### that file ~~ placing one to-be-matched-verbatim windowtitle namestring per line.
    ###  .
    ### With the above in mind, know that you may freely pepper your "knowntitles"
    ### and "ignored_items" files with devnotes. This is especially useful
    ### when maintaining a "ignored_items" list (comments reminding why you
    ### had chosen to ignore suchandsuch, or that you added then later removed
    ### a pattern matching suchandsuch, or that you probably should add an
    ### endswith globbing pattern but have not decided the best pattern to use).
    ###  .
    ### Asterisk is the bash globbing placeholder (wildcard, of zero or NN length)
    ### and is interpreted as such when the script parses "ignored_items".
    ### Any dot (period) character within any ignored_items line is parsed as, 
    ### treated as, a verbatim plaintext character.
    ###
    ###
    ### CONSIDERATIONS IN CHOOSING (AND CALLING) AN EXTERNAL HELPVIEWER PROGRAM:
    ### 
    ### Although the term "helpVIEWER" is mentioned repeatedly here (you may wish
    ### to load browsable PDFs, or html pages), it is probably more ideal to
    ### choose a "viewer" program which loads helpdocs as editable files ~~ so that
    ### you may freely append|revise your helpdocs for any given program, as needed.
    ###
    ### The "zim" (aka "zim wiki") program can be called using a commandline option
    ### which directs it to "open a named node". You might modify this helpnotes script
    ### so that it calls zim (and passes options to zim using zim's expected syntax)
    ###
    ### The "cherrytree" program might have been be my recommended rich-text helpviewer,
    ### BUT it is unsuitable because it cannot be remotely commanded to generate
    ### a new node (matching the passed namestring) if none yet exists. Other folks
    ### have noticed this limitation:  https://github.com/giuspen/cherrytree/issues/552
    ###
    ### If richtext markup is overkill for your (helpdocs, and notekeeping) needs,
    ### a tabbbed text editor can serve well as your "helpviewer". Based on my testing,
    ### I can recommend both "geany" and "scite" as suitable candidates. (Also tested
    ### "pluma" and "editra", and I recommend NOT using these with this script.)
    ###
    ###
    ###  ============= {snip} =============
    #30586
    Member
    skidoo
    Helpful
    Up
    0
    :D

    Proofreading the above, I noticed this (now already outdated) but I won’t dare to roll the dice and attempt to edit the prior post.

    ### Actually, in its current forum, the script will
    ### never write to the “knowntitles”, period. It is your responsibility to populate
    ### that file ~~ placing one to-be-matched-verbatim windowtitle namestring per line.

    In response to choosing
    (·) CREATE and open a helpfile for this exact title
    the current version of the script does append knowntitles with a line stating the (sanitized) title namestring

    #30589
    Member
    skidoo
    Helpful
    Up
    0
    :D

    “simple super help hotkey pops up zim when asked to is a good solution for low end machines.”

    Already mentioned that using the long-running script won’t interfere with separately setting, and using, keybind(s) calling “zim -n somepagename”. Here, I’ll just mention that the “memory overhead” is only that of its local bash shell ~~ 2MB or so.

    Also, we’ve discussed the option of matching based on processname… but for this script I’ve ruled out doing so because it lacks the degree of matching granularity to display separate contextual helpnotes for “gimp toolbox window” and “gimp layers window” and “gimp Hue-Saturation” window…

    .

    Jumping between projects, I’m unable to remember per-project (or per item!) details like which font(s) I used, or which enhancements I’ve applied. This script scratches that itch.

    #30615
    Moderator
    BobC
    Helpful
    Up
    0
    :D

    asking:

    If the conky output (or text embedded into the wallpaper image) displayed an everpresent message stating
    something like
    “At any time, you can press _____ to view a list of keycombos:actions for the program you are currently using”
    what
    (preferably, but not necessarily, a combo not already assigned in the stock ~/*/keys files)
    what keycombo would you choose to assign to the context-sensitive popup help?

    Also, what do you suggest would be the most clear phrasing for the everpresent message?

    Even if it were not incorporated into antiX, this context-sensitive popup
    would probably be a welcome feature in various respins, for instance
    MX Linux Remix -Disability and Rescue https://forum.mxlinux.org/viewtopic.php?f=94&t=54612
    .
    Once onboard, a user can swap the wallpaper to get rid of the everpresent, in your face, howto find help reminder.

    YES! In january the Windows 7 cast offs will arrive and wouldn’t it be nice to find a friendly, efficient antiX to migrate to… How about Press Super+F1 for Help

    I have to go work now, but this weekend (probably late tonight I will finish reading the posts here and install your latest and greatest on top of a fresh antiX 19 install and play with it without changing anything….

    #30691
    Moderator
    BobC
    Helpful
    Up
    0
    :D

    Skidoo, I did all the updates to a fresh antiX 19 install, and installed zim. I downloaded the code from pastebin and named it bobHelpnotes, changed it to +x, and copied it to /usr/local/bin. I am now running it in a terminal and can see that it noticed I switched windows from roxterm, to firefox to geany, and back to firefox.

    I don’t see where it calls zim, therefore it doesn’t? So I brought up zim and it asks for a directory, so I told it ~/Helpnotes.

    I can see how it expects things to be named and tried creating “pages” matching the sanitized notefile namestring names the script shows in the terminal window, but when I switch to the the zim window it didn’t go to that page.

    What did I miss or goof? The script running is continuously identifying what the current help page would be? But what takes me there?

    • This reply was modified 1 year, 6 months ago by BobC.
    #30697
    Member
    skidoo
    Helpful
    Up
    0
    :D

    Whatever I posted to pastebin, that’s a static page ~~ AFAIK, I can’t go back and revise the content at that URL.
    Since then, I have not pasted/attached/uploaded any later copies of the script.
    In post #30585, I explained what you can expect to find in a forthcoming WIP version (hoping to hear feedback on which details in the header docs seem unclear, or seem like some of the design details seem like anti-features). Although I regret the ensuing confusion, I reckon that by withholding each of the rapid-succession WIP versions, I’m sparing both of us quite a bit of frustration. “Wait, innit supposed to…?” (yeah, that detail is still buggy) or (no, behaving as detailed in the docs, whoops I mean the belatedly updated docs…)

    At the moment, I’m wrestling with how to deal with the beginswith//endswith matching.
    I don’t want you (or me) end-user to care about globbing and bash regex matching,
    so I have the script prepending * to user-supplied “endswith” matchstrings… but it needs to read the asterisk as a literal character when reloading the items list… and then needs to (or would, if I don’t just cave and scratch this feature) apply globbing(?) when matching the string.

    .

    .

    None of the remaining WIP wrinkles are relavent to your apparent intended “–onlyknown” usage, but prior to using the script you will need to edit a few lines to change “geany $notename” to “zim -n $notename”. I have included the following within the current version of the script’s header… but I’ll need to carefully proofread the (now 150+ lines) inline “docs” to check for other discrepancies before uploading a revised “version” of the script. When I upload another smoketesting version, I’ll send a PM or make a followup post.

    
    ######___________________________________________________
    ###
    ###         THIS SCRIPT DEPENDS ON "yad" FOR CREATING POPUPS
    ###         AND (AS SHIPPED) EXPECTS "leafpad" AND "geany" ARE INSTALLED.
    ###         IF YOU WANT TO USE ALTERNATIVE HELPERS, SEARCH IN FILE AND REPLACE THESE.
    ######___________________________________________________
    #30698
    Member
    skidoo
    Helpful
    Up
    0
    :D

    duplicate, triplicate? post removed

    • This reply was modified 1 year, 6 months ago by skidoo.
    #30699
    Member
    skidoo
    Helpful
    Up
    0
    :D

    duplicate post removed

    • This reply was modified 1 year, 6 months ago by skidoo.
Viewing 15 posts - 61 through 75 (of 97 total)
  • You must be logged in to reply to this topic.