add panel buttons to tint2

Instructional HowTo section


Locked
User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

add panel buttons to tint2

Post by wiak »

I added two new facilities to my WD_Arch64 system today:

1. Toggle between two different screen resolutions (relatively low resolution and medium). I toggle to low when I want to quickly make text more readable (meaning larger looking text) for my poor eyes.
2. Already had this facility - save RAM changes to disk (i.e. like save2flash) but implemented user interface more conveniently per the below.

For case 1, I wrote a simply if...then...else toggle script to run either of two xrandr commands (one for low res and one for medium).
For case 2, using a simple script to rsync back to disk only items that have changed in main filesystem.

But main thing was that I am using a nice facility of tint2 (using its properties setup window), which makes it easy to add buttons to the panel area (which is where the clock is). At the moment I'm simply using simple text "T_D" for Toggle Display resolution, and wd_s for the rsync save. Later I'll probable add icons insteads (if I can be bothered).

Anyway, to toggle screen resolution (between low and medium, and back again) I simply need to left click the T_D tint2 panel button (using mouse) and to rsync changes from RAM to disk I just need to click on wd_s button whenever I wish. Proving very handy. (The also shown 59% is charging battery indicator - also provided by tint2)

wiak

Attachments
T_D_and_wd_s_tint2_buttons.png
T_D_and_wd_s_tint2_buttons.png (73.48 KiB) Viewed 1409 times

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

Re: add panel buttons to tint2

Post by wiak »

And for network load, use:

Code: Select all

pacman -Sy bwm-ng

bwm-ng is very small and gives Rx and Tx stats for all network interfaces.

And can have result appear on tint2 panel using tint2 Executor:

https://gitlab.com/o9000/tint2/-/blob/m ... d#executor

Code: Select all

execp = new
execp_command = stdbuf -oL bwm-ng -o csv -t 1000 | stdbuf -oL awk -F ';' '/total/ { printf "Net: %.0f Mb/s\n", ($5*8/1.0e6) }'
execp_continuous = 1
execp_interval = 1

Simplistic, but do you really need more? Personally, I don't bother with network load monitoring at all so each to their own... (I have slow rural broadband so do limit bandwidth of all devices in the house via the router configs though...)

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
rockedge
Site Admin
Posts: 5711
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1990 times
Been thanked: 2097 times
Contact:

Re: add panel buttons to tint2

Post by rockedge »

I think I'll borrow this and see if I can get something similar to go in WeeDog-Void....that's how much I like it.

I actually need to find away to credit everyone from and including my very first exposure to a real computer by my math teacher in 7th grade for the code I write.
(in class one day broke out a brief case that contained an acoustic coupler and called and connected to a mainframe at Penn State University. that could freaking SPEAK on the phone right from his desk in class.....mind blowing and this is 1974-75 and I just had watched the movie "Colossus, The Forbin Project")

Nothing I EVER have written isn't based on something someone else wrote. So here's to you Mr. Nager (math) Mr. Pizone (the high school computer science teacher) and the school's principle's secretary (who let me hang around the Teletype 33 terminal in the office of the Junior High after school) and of course Mr Way, the head of the new computer department who allowed me access after school and gave me rides when it rained to at least the exit ramp at the halfway point on a long walk home from school in the dark. All of them directly showed me what programming is or bent rules to allow me to practice feverishly at 13 years old the HAL 9000 that I believed was behind that old Teletype 33 chugging away printing on rolls of yellow paper ready to discover a new universe....Cyberspace and the ARPANET........

And to those upperclassmen that let me watch over their shoulders and put up with an endless stream of questions from 13-14 year old me. Those guys actually would break into the high school at night to use the PDP-11/70.... (there is a sort routine I use to this day that I was shown by one of those upperclassmen..later he became a big shot at PIXAR and is a biggie at Disney these days...)

User avatar
rockedge
Site Admin
Posts: 5711
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1990 times
Been thanked: 2097 times
Contact:

Re: add panel buttons to tint2

Post by rockedge »

Mr. Way explained to me RAM and how it works on a ride to the ramp once......and the concept of a "data file"...

User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

Re: add panel buttons to tint2

Post by wiak »

rockedge wrote: Wed Jun 23, 2021 12:41 pm

that old Teletype 33 chugging away printing on rolls of yellow paper ready to discover a new universe....Cyberspace and the ARPANET........

And to those upperclassmen that let me watch over their shoulders and put up with an endless stream of questions from 13-14 year old me. Those guys actually would break into the high school at night to use the PDP-11/70.... (there is a sort routine I use to this day that I was shown by one of those upperclassmen..later he became a big shot at PIXAR and is a biggie at Disney these days...)

Slightly later than you describe, 1979, I had actually left my electronics engineering job in industry and taken a teaching qualification and for a few years was a high school teacher (starting 1979) Maths and Physics. However, during that time I bought a Compukit UK101 computer kit, which needed all soldered together and put that in a wooden case - end result looked like many a PC today except it only had 8 kBytes RAM... but its 2kBytes ROM included a small Microsoft BASIC interpreter (so could write computer games/graphics via Poke to screen and Peek to detect collisions and so on). Anyway, one of my keen students was caught one weekend on the computer - he had broken in through a skylight window in the school roof into the store room of my Physics lab (which also stored the UK101)... he was caught by the janitor noticing a light on. Lucky for him he only suffered a major telling-off by the school headmaster (personally I found it quite amusing, but didn't let the boy know that of course). I also purchases an ancient teletype (big heavy clunky black thing with an enormous power supply), which I intended to interface for some purpose or other I cannot remember (and I never got round to that because some other computer kits took up my interest, being a assembler programmed MK14 (kit to solder) followed by a Sinclair ZX80 or maybe it was ZX81 (kit to solder), and finally a BBC Acorn, which came before UK's school-adopted BBC microcomputer). I became pretty good at 6502 programming (assembler) at that time - self taught just by reading the instruction set... Later I designed and programmed a digital oscilloscope 10 MHz bandwidth via a fast A to D convertor on BBC microcomputer, including Fast Fourier Transform spectrum as well as normal scope type display - a hospital medical research lab ended up using that and a hydroelectric power generating company was also interested in it for monitoring and optimising cycles/generation - nobody paid me for it though - usual story I suppose (I didn't even know for a year that the hospital was using it - their medical technicians had copied the circuit and software when I loaned it to them for tests - I can't say I was amused about that.).

https://en.wikipedia.org/wiki/Compukit_UK101
https://en.wikipedia.org/wiki/MK14
https://en.wikipedia.org/wiki/ZX81
https://en.wikipedia.org/wiki/Acorn_Atom
https://en.wikipedia.org/wiki/BBC_Micro

All that work changed my future life - moved to New Zealand, lecturing in electronics when microprocessor use/interfacing/programming became big part of that, and started using and programming and interfacing to IBM PC clones at a Polytechnic, and designing and programming Z80 microprocessor circuit boards (assembly language via the PC) and also 8051 microcontroller (assembler) and also started to program a lot in Pascal. DIdn't learn C till years later, for data comms network TCP/IP protocol tuning purposes and never business computing... At least I made some money/career from it eventually - though always in Tertiary education and research groups thereafter and never back to industry.

But yes, all goes back to that time in small secondary school in the scottish highlands and I often wonder what happened to that boy and what career he ended up with - probably something computer-related...

And for me, career over, but now WeeDogLinux creation keeping me amused - quite a change really.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
rockedge
Site Admin
Posts: 5711
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 1990 times
Been thanked: 2097 times
Contact:

Re: add panel buttons to tint2

Post by rockedge »

Due to unforeseen circumstances at 17 I ended up in the Air Force trained and working on the MA-1 weapon controls system on the F-106 Delta Dart a year later....A punk rocker in the military..not a great fit at times but I made it with an honorable discharge and a job well done. I got out and in civilian life no one thought my training and experience repairing and programming one of the world's most advance computer systems stuck into an aircraft that can fly Mach 2.4 counted for much and I ended up as janitor at Philips Medical Systems killing time in the research and dev department "cleaning" stuff so I could be around something cool which was the beginnings of the CAT and MRI scanners while I emptied the trash.

I ended up discouraged and aloof. Then somehow my talents led me into a career as a Gaffer/Electric in the film and television business which I still do on occasion. Never really left my 'hobby' behind though and dabbled with computers when I could.

I see monster potential in WeeDog. In 1979 I had pregnant girlfriend who was my High School's Headmaster's daughter. Did not end well.

User avatar
Grey
Posts: 1984
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 75 times
Been thanked: 355 times

Ah, memories: phones with Z80 CPU

Post by Grey »

Well, since we're having an evening of memories here... :)
In the countries of the former USSR, the most beloved and popular computer was ZX Spectrum. But there were also phones based on the Z80 CPU with indicators and automatic caller ID aka AON. Schoolchildren, students and even serious bearded engineers Image wrote music for these phones and even made demos. Here is an informative article (already translated into English).
And if you are too lazy to read, then here is a video with a demo for such a phone. Don't forget to turn on the sound :) !

Fossapup OS, Ryzen 5 3600 CPU, 64 GB RAM, GeForce GTX 1050 Ti 4 GB, Sound Blaster Audigy Rx with amplifier + Yamaha speakers for loud sound, USB Sound Blaster X-Fi Surround 5.1 Pro V3 + headphones for quiet sound.

User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

Re: Ah, memories: phones with Z80 CPU

Post by wiak »

Grey wrote: Wed Jun 23, 2021 4:31 pm

But there were also phones based on the Z80 CPU with indicators and automatic caller ID aka AON.

Hmmm... interesting article. I should have moved to Russia since designing Z80 based-systems (along with its associated interfacing UART chips and so on) was my 'special' expertise back in the mid-80s. Z80 was great processor. I still have some of the demo Z80 assembler programs I used training students in such programming, but though I created such programs, as an electronics engineer the part of the work I enjoyed best was the address decoding, main system design, plus the electronic hardware interface designs so the resulting Z80-cored boards could input/output to the outside world.

One of the very simple programs I created back then was for 3D rotation of a wire-framed cube on an oscilloscope plus it wrote the word SCOTLAND on the scope screen at the same time. i.e. a vector graphics demo, which connected to the oscilloscope from the output port of the Z80 system via a 3-bit Digital to Analog Convertor (which was nothing but 3 resistors in binary weighted value...).

I still remember the program details and actually recoded it later in high level languages like BBC BASIC, and C for the non-Z80 type systems I was working with later. For Z80 program I simple stored all the vector end-point values in tables and used indirect Z80 Load commands to output them via a loop into the rudimentary DAC.
It was really a simple animation, worked out cube by cube and then the coordinates put in the table (i.e. didn't use auto-calculation via any complex maths transformations).

Just found something similar someone has done on an Arduino on youtube video; pity they don't give the code they used:

https://www.youtube.com/watch?v=7LnsF_tOu4s

Mine was better because of the SCOTLAND!!! (And definitely did not require a complex 12bit DAC). Yeah, that was after I first moved to New Zealand, so annoying my students with my extreme pro-Scotland sentiments - I also had to reduce my use of scottish slang so the Kiwis could understand me - they were lucky I came from a part of Scotland that didn't employ heavy guttural speach forms in its dialect so all I had to do was slow my speech down a bit and articulate syllables more conciously... Fact is I could not myself understand the Kiwi accent at all unless the student speaking was situated near the front of the class - Scots tend to use long-vowels, Kiwis clip everything short... We say 'cAAAAt', they say 'cit', for Pussy cats, at least it sounds something like 'cit' to me.... Years later, after being back in Scotland for years, I returned to work in NZ, and by that time I had moved into a Computer Department teaching Linux and also Data Comms - Internet protocol, routing and so on; that brought a new linguistics issue: in Scotland we pronounce ROUTING as ROOTING, but like in the USA I think, Kiwis have a different meaning for ROOTING so they used to laugh when I was explaining the processes involved... I forced myself to say ROUTING in Kiwi pronounciation for a while, but sometimes by accident but more often on purpose I would often throw in my own correct Scottish pronunciation ROOTING at appropriate points in the discussion. Truth is that Kiwis are cut off from the world more generally (hence low Covid rates) so they haven't a clue how to speak properly yet they are very insulting about Scottish pronunciations, which is ridiculous since we are the UK's foremost expert in speaking english more generally (everyone knows that).

Used similar technique for most other robotics control type programs (traffic lights simulation, stepper motor, and so on - best thing about it was that the end pseudo code and actual code ended up very well organised and readable - i.e. not spaghetti... It has remained a habit that I still try my best to organise my code in as readable/understandable form as possible, though, particularly when a quick fix here at home, I make as many messy hacks as anyone else ;-)

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

Re: add panel buttons to tint2

Post by wiak »

rockedge wrote: Wed Jun 23, 2021 4:09 pm

I see monster potential in WeeDog.

I'll be back working on WeeDogLinux again soon. I'm slowly getting back into it (haven't played chess for a few days now so will get rusty at that soon). I left a major bit of WDL work I was doing half done so main thing will be to work out where I was and then getting on with it...

As for the headmaster's daughter... I've had a few 'didn't end up well' situations too albeit different circumstances - takes a few tries to get some things right it seems (for me at least).

One 'shock' I faced (not that I was at all shocked) on coming to NZ as a youngish guy was that every young person I knew, from all walks of life, seemed to smoke marijuana (and many secretly grew it in wee pots). Of course, faced with the NZ culture, I politely tried it a few times, but obviously didn't inhale (Clinton cough...). However, I doubt any form of smoking is good for ones health so, from that viewpoint, personally think it a mad habit now. However, I also lived in Norway for a while, prior to that, where the word 'og' translates to 'and', which as a marketing idea allows me to present WeeDogLinux as "Weed og Linux" for those users (in NZ, the Land of Oz, California, Arizona, Russia, or wherever) who like to mix both pursuits.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
Grey
Posts: 1984
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 75 times
Been thanked: 355 times

Re: add panel buttons to tint2

Post by Grey »

@wiak I have already shown my "armored" ZX Spectrum on the forum viewtopic.php?p=24623#p24623
There are two to three times more microcircuits than in the original English version - it was very difficult to counterfeit the ULA and a few other components at home :) Therefore, a bunch of simple components "imitate" the work of a complex one. The Soviet industry copied ULA - but it was too late and generally difficult to obtain :) But all this forced to dodge and invent a bunch of "local" bells and whistles. The circuit boards are located "in three floors" - a disk drive controller and a sound coprocessor with printer ports separately.

Fossapup OS, Ryzen 5 3600 CPU, 64 GB RAM, GeForce GTX 1050 Ti 4 GB, Sound Blaster Audigy Rx with amplifier + Yamaha speakers for loud sound, USB Sound Blaster X-Fi Surround 5.1 Pro V3 + headphones for quiet sound.

User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

Re: add panel buttons to tint2

Post by wiak »

Grey wrote: Thu Jun 24, 2021 5:01 am

@wiak I have already shown my "armored" ZX Spectrum on the forum viewtopic.php?p=24623#p24623
There are two to three times more microcircuits than in the original English version - it was very difficult to counterfeit the ULA and a few other components at home :) Therefore, a bunch of simple components "imitate" the work of a complex one. The Soviet industry copied ULA - but it was too late and generally difficult to obtain :) But all this forced to dodge and invent a bunch of "local" bells and whistles. The circuit boards are located "in three floors" - a disk drive controller and a sound coprocessor with printer ports separately.

One thing I miss with PC laptops is that they do not provide simple ports that can immediately be used to control input/output devices simply be memory mapped techniques. Instead you need a special interface addon to, for example, interface to usb and provide the simple ports for connecting leds or switches to etc. I don't have one, but I guess the Raspberry Pi provides that better interfacing capability in more out of the box fashion. For example:

http://exploringrpi.com/chapter6/

https://tutorials-raspberrypi.com/raspb ... io-part-1/

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
wiak
Posts: 3627
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 56 times
Been thanked: 994 times
Contact:

Re: add panel buttons to tint2

Post by wiak »

Grey wrote: Thu Jun 24, 2021 5:01 am

@wiak I have already shown my "armored" ZX Spectrum on the forum viewtopic.php?p=24623#p24623

Yes, I have previously also looked at your "armored" ZX Spectrum post. I like the rugged case it is all built in. Remind me of an old military radio receiver I had in my bedroom when a kid (aerial/antenna was a very long thick copper wire strung between trees - had some home made 'matching'/SWR bridge unit between that and the receiver - my dad usually got me to do the climbing since I was a big of a tree climbing monkey from very early age); I think the old valve receiver was a CR100 MkII (heavy beast: 37kg) - for some reason I remember CR100 name but only have a general memory of what it looked like.

http://www.chavfreezone.me.uk/2020/refu ... cr100.html
https://www.electronics-notes.com/artic ... ceiver.php
https://www.electronics-notes.com/artic ... basics.php
https://www.qsl.net/g4xck/swr.htm

We also had a few similar old WWII combined transmitter/receiver shortwave sets.

Alas that old CR100/2 receiver likely ended up on the dump when my mother sold the house and cleared it out... pain...

We also had a few old motorbikes, including a Velocette water cooled machine (don't know which year or Mk): https://collection.motat.org.nz/objects/8991

But favourite old gear memory is of a 'projection TV' that projected a black and white TV picture onto a screen. Was house in a huge wooden cabinet and the inside valves used to glow super hot and it used very high intensity cathode ray tube and huge lenses for the actual projection. I remember my father got it working and invited all the local kids around to watch an old John Wayne Western (cowboys) movie on a white sheet used as projection screen. Must have broken soon after, cos only remember that one use... Can't have been good for us kids since the special internal crt needed ultra-high 25 kiloVolts for acceleration and generated ozone as a result (and almost certainly Xrays and probably badly shielded)...
https://www.radiomuseum.org/r/saba_tele ... d_p71.html
https://www.youtube.com/watch?v=RopG24KGX_E
https://www.radiomuseum.org/forum/proje ... _sets.html
The projection TV we had looked similar (pretty much identical) to the one in photo below, which is a 1957 Saba Telerama P716 (no inbuilt screen - just used a big white sheet on the wall as I said, so like a cinema experience), but may have been from a different company. Alas that got dumped in the house clearout as well... sad...

Yeah, my dad was in RAF in WWII in 'Signals Core' so after the war was always a keen Amateur Radio guy.

Attachments
d_saba_57_p716_rueck.jpg
d_saba_57_p716_rueck.jpg (32.15 KiB) Viewed 1062 times

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
Grey
Posts: 1984
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 75 times
Been thanked: 355 times

Re: add panel buttons to tint2

Post by Grey »

wiak wrote: Thu Jun 24, 2021 8:23 am

Alas that old CR100/2 receiver likely ended up on the dump when my mother sold the house and cleared it out... pain...

I had a lot of equipment, the body of which can be described with the words "large, wooden and covered with a thick layer of good varnish." But my relatives forced me to throw out almost everything. "This junk takes up a lot of space and the plastic is lighter in weight." I resisted for a long time, but :| ...
After all, many equipment could be used as furniture - I used the TV as a table, and the amplifier and radio as chairs - no problem.

Fossapup OS, Ryzen 5 3600 CPU, 64 GB RAM, GeForce GTX 1050 Ti 4 GB, Sound Blaster Audigy Rx with amplifier + Yamaha speakers for loud sound, USB Sound Blaster X-Fi Surround 5.1 Pro V3 + headphones for quiet sound.

Locked

Return to “HowTo”