SNApP (System Nonsuch ApP)

Moderator: Forum moderators

User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

stemsee wrote: Sun Oct 16, 2022 11:32 am

S.N.ApP_3.5

Bug fixes:
ap scan results selection had a problem with hidden ssid or no ssid. fixed with printf "%q", and $SSID == $BSSID , upon selection provides a workable display.

Im getting stacked duplicate menus in tray! Have not yet found the cause.
Tray icon gets stuck so that right click doesn't bring up menu without closing main gui and then reopening it .... it never used to do that!

https://drive.google.com/file/d/1cw4TtS ... n__a4fAbuz

User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

S.N.ApP_3.6
Back on track! The dysfunctional traffic function was handicapped by the flag management function! Now resolved with a simple '#' .... alas so much time wasted! Never mind.... Now only to improve the code flow and the function features.

https://drive.google.com/file/d/1s9RiSL ... eip-Pj-Qry

User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

The tray network activity indicator uses about 18% of the cpu. Adding a menu entry to halt trafficfn is simple, its just to remove a flag

Code: Select all

rm -f "$track"/poll

, but really the whole trafficfn needs to do less work per loop! So I will seperate the tasks done by traffic in an effort to optimize code and minimise cpu load.

User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

CPU usage now down to 1% or less as I am not sure how to measure accurately ....

S.N.ApP_3.7
improvements in
1) performance
2) connecting to default and scanned item with existing profiles
3) remastering has better cleaning
4) minor bugs

text file with gdrive link

snapp_3.7_link.txt
(87 Bytes) Downloaded 34 times
User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

S:N:ApP_3.8

Happy Holidays

Bug fixes

link in attachment

snapp-3.8.txt
(66 Bytes) Downloaded 29 times
User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

bookgenfn and bookviewerfn

The bookgenfn function generates an indexed (A0-Z9) list read and write system. I had partially implemented functionality but editing and saving edited indexes was a problem that I had not solved, until last night!

The bookviewerfn generates the index list ready for selection in the yad --list. Selecting an index in the list then shows the corresponding contents which had been sourced from the document, which is a series of defined variables as follows

Code: Select all

A0='Holosophography|
Title: "Creation"

Let there be light! Time extruded creates space. Frequency is the traversing of space by time which manifests energy.
The limits were set and created in the same event.

We measure time relatively. But the heavens ... how do they reference time? 

notes:


'

A1='Holosophography|
Title: ""

notes: 

'

A2='Holosophography|
Title: ""

notes: 

'

The document is sourced and the variables are aliased using ${!LINE} to associate variable contents with selected list index (substitution taught to me by misko). However, editing and saving edits per reference seemed problematic! I sensed there was the possibility of using the same mechanism to 'replace' the definition block to the relevant index in the document. After many experiments I found that I could simply output the $EDITS

Code: Select all

for deal in $(echo {A..Z}{0..3}) # updates entire book
do
	echo -e "$deal='${!deal}'\n" >> "$camino"/books/$book
done

This added the recent indexed definition to the end of the document, and as the document is sourced the last definitions imported have priority. This means a history is automatically maintained. However the document grows exponentially!! And the order of sourcing changes, and so this method is unreliable. So I discovered that I could re-generate the indexed document with edits to a new document without duplicates, using only the latest edits, and then the new document is moved to replace the original document. Probably there are better methods with fewer interim steps i.e. using sed -i to directly update definition blocks in-place, but searching for the index and replacing the block is above my pay grade!

Anyway, now the user can enjoy generating address books, phones books, recipe lists, movie or photo index lists etc etc!

I may simply re-upload 3.8 instead of bumping to 3.9 ... as 3 8s represent absolute perfection.

Last edited by stemsee on Fri Dec 30, 2022 8:05 pm, edited 1 time in total.
User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

Today I decided to separate the bluetooth and wifi scanning functions that are in the tray menu, so that they operate only in the tray menu without affecting the maingui. That means any scan initiated from the tray menu will show results in the tray menu, in the background no flags will be .... err .... flagged! This way the user can be working on a document in the main gui but initiate a scan, wifi or bluetooth only in the tray menu without maingui interruption or subsequent recovery.

User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

S.N.ApP_4.0

-Several Improvements to netlistradiofn (media and radio stream player).
-ffplay volume starts with lower volume.
-SELD & SELF (select Directory & select File) options in list were previously added multiple times.
-Media lists appear quicker and no longer appear in the tray menu.
-Added device encryption (cryptsetup luks*), not for directory or file encryption.
-backup dhcpcd ip assignment in tray menu.

snapp-4.0.txt
(66 Bytes) Downloaded 29 times
User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

S.N.ApP-4.1

Improvements to Bookgen and bookviewer functions.
1) Set index numerical limit 1-9
2) Title: if defined will appear to the right of the index in the list.
3) selecting item in bluetooth scan results in tray will connect to listed device if no key is required.
4) wifi should connect to tray menu item if profile exists
5) Apostrophe in a book will cause problems, so apostrophe will be substituted by ^
Other special characters may also affect function.
6) An index can be copied to another index simply by changing the viewed index in the SSID field, to the desired existing index and clicking ACTION button. After which removing the title definition from the original field gives the entry the appearance of being empty in the list view.
7) List view a book is updated after clicking ACTION button to save edits.
8) When selecting a book index, line and word counts appear in Frequency field.
9) Added a book.png
10) Added wrap to list field to prevent img column from being pushed out of view.

New key words in SSID field:
LIMIT ... sets index limit and writes to snapp settings.
BOOK ... loads book and index from Profiles field.

snapp-4.1-bookindex.png
snapp-4.1-bookindex.png (293.55 KiB) Viewed 5556 times
bookpng.png
bookpng.png (387.08 KiB) Viewed 5543 times
snapp-4.1.txt
(66 Bytes) Downloaded 22 times

: reuploaded

User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

removed index LIMIT functions.....too confusing.

I have added the ability to set any of the 6 bluetooth profiles for bluealsa.
Available BT profiles:
- a2dp-source Advanced Audio Source (LDAC, aptX-HD, aptX, AAC, MP3, SBC)
- a2dp-sink Advanced Audio Sink (AAC, MP3, SBC)
- hfp-hf Hands-Free (v1.7)
- hfp-ag Hands-Free Audio Gateway (v1.7)
- hsp-hs Headset (v1.2)
- hsp-ag Headset Audio Gateway (v1.2)

This should enable web conference calls etc.

update bluealsa D-Bus policy

Code: Select all

<!-- This configuration file specifies the required security policies
     for BlueALSA core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own_prefix="org.bluealsa"/>
    <allow send_destination="org.bluealsa"/>
    <allow send_destination="org.bluealsa.sink" />
	<allow send_destination="org.bluealsa.source" />
  </policy>

  <policy group="audio">
    <allow send_destination="org.bluealsa"/>
  </policy>

</busconfig>
User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

I have added an improvement to do with 'keywords'. The list of keywords is bigger than first envisaged with the result that I cannot remember them all without refer to the help function. To tackle this inconvenience I have changed the SSID field to be :CBE with the list of keywords always available, and no need to type, simply select it and click ACTION.

For Bookviewer/editor....Adding a 'Comment:' field will result in the comment appearing after the Title: in list view. I use this to identify progress in tesol.....'complete' 'partial' 'started' 'needs practice' etc

User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

snapp4.2.png
snapp4.2.png (231.2 KiB) Viewed 5546 times

S.N.ApP-4.2

Has improved network blocks.
the list of functions now have relevant icons appearing in the list Meta tag :img column

snapp4.2-comments.png
snapp4.2-comments.png (277.57 KiB) Viewed 5542 times
User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

S.N.ApP-4.2.sfs

snapp-4.2.txt
(66 Bytes) Downloaded 37 times
User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

I have forked bookviewer and bookgen to their own script stripping away bluetooth and wifi and system configuration options which I felt were not complimentary....also needing more room for the viewer field....the number of fields has been reduced to 7 from 14, allowing adequate room for chapters of text without too much scrolling. Also having added keywords in the SSID field as CBE, I realise that the form is better served with two or three entry fields :CBE with info and data tucked away ready for selection, the ACTION button and the Viewer field. This will give the option of activating at least three different functions simultaneously if desired. This will also increase the area for the viewer field. Without loss of functionality; this increases versatility and usability, though may require a steeper learning curve.

Having discovered the book generator, reader and editor functions invaluably useful I have decided to develope a tool to automate inter device copy and paste, probably as a keyword and dnd to the viewer field for files and folders, plus xclip/xsel/clipit. Together with scp and or bluetooth send, which are both cross platform.

snappbook.png
snappbook.png (305.93 KiB) Viewed 5497 times
User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

Having successfully tested bookviewer with 7 fields, and then using knowledged gained from that experiment and applied to snapp increasing the form to 8 fields, losing frq, DNS, FLAGS, iFace fields, which are folded into the CBE fields.... and 'Create Profile' and 'Preview Profile' buttons which are now implemented with keywords. Also the password field is CBE so doesn't hide the typed password, but may be able to implement that with field type switching.

I have also made the script easier to understand, by renaming the three processing functions; connectfn > doubleclickfn (list), processfn > singleclickfn (list), conpro > actionfn (ACTION button).

So I am happier with fewer fields, more Viewer area and a less busy look! So the next version will bump to 4.8.0 ... the 8 representing the 8 fields. Just need to reassign the lost field variables.

snapp-4.8.0.png
snapp-4.8.0.png (259.63 KiB) Viewed 5478 times
Last edited by stemsee on Mon Jan 23, 2023 1:33 pm, edited 2 times in total.
step
Posts: 510
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 50 times
Been thanked: 179 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by step »

Just curious to know why the five pull-downs are labelled nominative, accusative, dative, ablative, genitive.

User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

step wrote: Sun Jan 22, 2023 8:46 pm

Just curious to know why the five pull-downs are labelled nominative, accusative, dative, ablative, genitive.

... and 'Preposition' ! Pre Position, for keywords such as GAMMAB, set slider first then click ACTION. The other labels are from the latin cases equivalent in English nominative=subject of the verb, accusative=direct object of the verb, dative=indirect object of the verb, ablative=no direct equivalent, the addressed "step, get some work done!", genitive=possessive "the documents belonging to snapp" , the verb, of course is the ACTION .... as an English major, and finding difficulty in giving labels that indicate a purpose yet general enough to cover a variety of purposes, a syntactical and grammatical directive seemed a good idea at the time! I kept the ssid bssid etc field labels as they are 'established' in the code and help! :)

Is it possible to use switching field type to sometimes have the password field change to :H hidden? Is it al possible to have button labels change??

step
Posts: 510
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 50 times
Been thanked: 179 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by step »

stemsee wrote: Mon Jan 23, 2023 10:02 am

Is it possible to use switching field type to sometimes have the password field change to :H hidden?

No. Form fields can't change their type after yad has started.

Is it al possible to have button labels change??

No. Button labels are fixed after yad has started.

However, you could implement a work-around. Split the button field into two fields, one for the label and one for the button icon. Example:
yad --form --field='label!gtk-ok!:FBTN' ''
becomes
yad --form --columns=2 --field='label:RO' 'LBL' --field='!gtk-ok!:FBTN' '@echo 1:changed'

Click the second button to see "LBL" change into "changed".

User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

useful. I want to have a toggle switch which changes . One function that reads a mute switch and then toggles and sends a change to the label, via a case statement indicating mute and unmuted. Or like this

Code: Select all

yad --form --columns=3 --field='!gtk-ok!:fbtn' '@echo 2:changed back' --field=':RO' 'LBL' --field='!gtk-ok!:FBTN' '@echo 2:changed' &

but that's three fields instead of two.

step
Posts: 510
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 50 times
Been thanked: 179 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by step »

Code: Select all

yad --form --columns=2 --field='!gtk-ok!:fbtn' '@sh -c "case %2 in 0) echo 2:1;; 1) echo 2:0;; esac"' --field=':RO' '1' &

Changing 0/1 into application-specific values is left as an exercise to the application developer :)

User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

step wrote: Tue Jan 24, 2023 10:25 pm

Code: Select all

yad --form --columns=2 --field='!gtk-ok!:fbtn' '@sh -c "case %2 in 0) echo 2:1;; 1) echo 2:0;; esac"' --field=':RO' '1' &

Changing 0/1 into application-specific values is left as an exercise to the application developer :)

holy crap! I've never seen a case statement in such a predicament before! ExCelLent!

User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

S:N:ApP-4.8.0

Added to bookviewerfn an indexed entry can be copied to any other index just by changing the index in the ssid field like 'A1' > 'E3' , ACTION. But now I have extended this so that copy to many is possible either by adding spaced entries in ssid field, 'A1 E3 F2 T5 B6' etc. or by stipulating ranges '$(echo {A..A}{0..9}) $(echo {B..E}{1..3}' and both methods can be combined because they will generate a spaced list 'for i in $SSID'. To compliment this powerful feature which is good to repurpose an already generated book, or disastrously erase your life'S work!!....I have implemented a backup of the viewed book.....but only the last edit committed with the ACTION button!

EDIT: nope ranges don't work in situ!
EDIT2: ranges expressed in the form 'echo {A..Z}{0..9}' is just a short form of writing a nested loop. long form would be

Code: Select all

for alphabet in A B C D E F G H I J K L M N O P Q R S T U V W X  Z
do
for number in 0 1 2 3 4 5 6 7 8 9
do
	echo "${alphabet}${number}"
done
done 

So ranges are possible using a range 'indicator' like a dash between and start and end values such as 'B4-C4', for alpha in B C; do for number in 4 5 6 7 8 9 0 1 2 3 4; do echo "$alpha$number";done;done

Last edited by stemsee on Thu Feb 02, 2023 1:05 pm, edited 1 time in total.
User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

added emoji tags in bookviewerfn. by adding an emoji icon name like 'fire, study, happy, sad, heart, love, hate, smiley, inlove, omg, thumbup, worry, lmt, lol' an icon will appear in the img list.

snapp-4.8.0-emoji.png
snapp-4.8.0-emoji.png (258.96 KiB) Viewed 5611 times
User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

more emojis added

snapp-emojis.png
snapp-emojis.png (354.41 KiB) Viewed 5580 times
User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

Added keywords - GENERATE_SMALLBK 'A0-Z0' (26 entries), GENERATE_MEDIUMBK 'A0-Z4' (130 entries), GENERATE_LARGEBK 'A0-Z9' (286 entries). book size is marked and identified by .Sbook .Mbook .Lbook, and remains compatible with .book too, which is an Lbook.

User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

S.N.ApP-4.8.0 fast approaches!

Fixed a number of issues!

1) Book view and create and edit were previously hampered, and could not handle text containing apostrophees, that is no longer the case.

2) Starting up snapp now connects if there is a default profile and if there is not already a default ip route. Stops restarting the same connection needlessly.

3) A couple of Typos ... !

Some functions have been disabled or deleted. Others are still present but not fully implemented due to lack of empirical testing.... no lte dongle etc ...

User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

S.N.ApP-4.8.0 link

S.N.ApP-4.8.0.txt.fake.gz
(66 Bytes) Downloaded 32 times
User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

I have added base64 text encoding to plain text documents and indexed books. The advantages of base64 encoding is that the use of special characters and formatting is better preserved, and adds a level of security or privacy to the book or document, as to the eye it looks like gobble-de-gook.

After creating a base64 encoded book using bookgenfn, choose a keyword GENERATE_SMALLBK64 or converting a plaintext document to base64, 64 is appended to the file name e.g. note > note64. linux.Mbook > linux.Mbook64 and so on.

The keyword which converts an indexed book to base64 is TOBASE64. To convert a plain text document use keyword CONV64. The operation affects the file in the profiles field. These keywords have been added to the keyword list in the SSID field CBE selector.

User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

User avatar
stemsee
Posts: 656
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 0
Has thanked: 160 times
Been thanked: 104 times
Contact:

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

If you install the superb DogRadio V2 by fredx181, viewtopic.php?t=8428 then when using desktopfilefn, radio desktop files from dogradio will be included and will play after a doubleclick.

Another feature I managed to hijack from dogradio v2 is the conky ticker function. It can display radio station name when playing from desktopfiles, and also it can display text from the transdialoguefn gui. Start ticker with cnky_start function, stop with cnky_stop function which affects most recently started instance only.

Screenshot(1).gif
Screenshot(1).gif (165.7 KiB) Viewed 5357 times

This has a lot of potential....for example could use for reminder notifications, Timers ... etc

Also added to tray menu is screenshot with delay, using mtpaint -s.

Post Reply

Return to “Network”