Searching We.Love.Privacy.Club

Twts matching #nature
Sort by: Newest, Oldest, Most Relevant

Canonical’s Upcoming AI Tool: Talk to Ubuntu Instead of Typing
This week the Ubuntu desktop’s director of engineering announced they’re bringing speech-to-text dictation to Ubuntu Desktop, aiming for an experience “that feels like a natural part of the desktop while respecting user privacy and running entirely on local hardware.”

“Speech recognition has become a common feature on modern platforms, and we think it … ⌘ Read more

⤋ Read More
In-reply-to » Every now and then, I think that I have carefully proof-read my message enough times and hit the "Add message" button in tt. But then, in the message tree, I spot another missed typo. My process is then to go to my twtxt.txt and fix it by hand. However, I still have to clean up tt's cache. This is rather tidious:

@lyse@lyse.isobeef.org

Now I’m curious how movwin deals with that. ;-)

Focus handling? I hardly remember, lol. 😅 Did that 6 months ago and haven’t touched it since. Let’s see.

The core main loop gets keyboard/mouse events from curses. At this level, the main loop only knows about exactly one widget, so it passes the event to that widget (whatever that is, doesn’t matter – they all inherit from the Widget base class, it could be a Window, a WindowManager, or an Edit box directly).

The outermost widget is usually a WindowManager. It implements a few hotkeys of its own, like switching to another window. If none of those hotkeys match, it passes the event to the currently focused window.

Same story here: Window implements some hotkeys (like opening the menu bar). If none of those match, then … the magic happens.

Each Window acts as a focus manager. It can descend into its child widget hierarchy and collect all child widgets in a depth-first search. They are collected into a flat list. Each Window then has an attribute _focus_position, which is an index into that list. Pressing Tab or Shift+Tab increases or decreases that index and that allows you to select the next/previous focusable widget in the current window.

Eventually, Window passes the input event to the currently focused widget.

Usually on initialization, the application can ask a Window object to focus a certain widget. The file selection dialog does that, for example, because the “natural” focus order would be to focus the Edit box at the top of the window first – but that’s not what the user wants, the Table showing the list of files should be focused.

If no widget ever feels responsible for handling a certain input event, then there’s a global unhandled_input callback that the application can provide (same as in urwid).

I think that’s it.

Hm, that’s more complicated than I remembered, but apparently it works fine, because I completely forgot about this. 😅 All I did in the last few months was make new classes that inherit from Widget, like the new Table class or Edit or HexEdit or whatever, and if they want to get input events, then they must implement the methods input_key() or input_mouse().

Does this answer your question? 😅 (I admit that I didn’t exactly understand your scenario, so I just went ahead and rambled about my implementation. 😅)

⤋ Read More
In-reply-to » Every now and then, I think that I have carefully proof-read my message enough times and hit the "Add message" button in tt. But then, in the message tree, I spot another missed typo. My process is then to go to my twtxt.txt and fix it by hand. However, I still have to clean up tt's cache. This is rather tidious:

Getting the vim key bindings to work for focus switching in this modal dialog took me forever. Only cursors and (Shift+)Tab are supported out of the box. I absolutely understand that, it’s fine. I installed an input handler on the dialog, but the focus always stayed the same.

After two wasted hours, I was in despair to copy the tview.Modal into my own code base. Of course, I had to fix all the private tview field accesses first. But even installing the input handler directly on the buttons themselves did not work. Even though, the handler was definitely executed, the focus did not shift. Forcing redraws as a last resort also did not work.

Looking through all the messy chained input handling, I eventually stumbled across another place in the tview.Form, which is internally used by tview.Modal. This messed around with app focus receptions and input handlers. This gave me the idea to make the tview.Application refocus my modal dialog after I told the modal dialog which button to select. And would you look at that, this did the trick! I haven’t completely figured out what is going on exactly, but I could get rid of my Modal clone again.

I always go through hell with focus handling in tview. Each and every time. It just does not feel natural to me. Complete brainfuck to wrap my head around. The Urwid API felt sooo much more refined, it never was an issue. It just works. In fact, I cannot think of any other TUI library that has remotely the same pain level when it comes to focusing widgets as tview.

Now I’m curious how movwin deals with that. ;-)

⤋ Read More

Find Your Friends Director, Bella Thorne, Sophia Ali, & Chloe Cherry Talk NSFW Thriller Movie
Find Your Friends director Izabel Pakzad and stars Bella Thorne, Chloe Cherry, and Sophia Ali spoke about the bold thriller movie, which is Pakzad’s directorial debut. The four women discussed the film’s party scenes, its intense final act, and its propulsive nature. Also featuring Helena Howard and Zion Moreno, it is now streaming on Shudder. […]

The post [ … ⌘ Read more

⤋ Read More

How Mexican World Cup Stadiums Achieved FIFA’s Environmental Certifications
Venues hosting the 2026 World Cup must meet high standards to obtain environmental certifications, but FIFA also requires that they use natural grass, which is water-intensive to maintain. ⌘ Read more

⤋ Read More

Humans Prefer To Walk Anticlockwise, Scientists Find
fjo3 shares a report from The Guardian: Tests reveal that when people are ambling about, they have a natural tendency to turn to the left and walk in an anticlockwise direction. “If you simply ask someone to start walking, whether they are wandering around a museum, a supermarket, or even an empty room, it is surprisingly likely that they will drift counterclockwise,” … ⌘ Read more

⤋ Read More

Playing Cassie Was ‘So Freeing,’ Sydney Sweeney Wants That Freedom in Next Roles
Sydney Sweeney recently revealed that she enjoyed playing Cassie in Euphoria. She also shared that the “freeing” nature of the role inspired her to approach future acting parts similarly. What Sydney Sweeney will carry from Euphoria to her next roles Sydney Sweeney recently sat down for an interview where she reflected on her time playing […]

The post [Playing Cassie Was ‘So Freeing,’ Sydney Sweeney … ⌘ Read more

⤋ Read More

**Turquie: «La nature du régime politique est en train de changer» **
Alors que le dirigeant du principal parti d’opposition vient d’être destitué, le chercheur Yohanan Benhaïm décrit la dérive suivie par le pouvoir présidentiel de Recep Tayyip Erdoğan. Il analyse également le positionnement de la Turquie dans la recomposition en cours du Moyen-Orient. ⌘ Read more

⤋ Read More

LNG project advances but power bill levy ruled out
The Government says it is moving to the next stage of building a liquefied natural gas import facility, but it will not be funded through a levy on power bills.

Energy Minister Simeon Brown said officials were still working on how the import infrastructure would be paid for, “including engaging with the gentailers on a fair funding model”. ⌘ Read more

⤋ Read More

QuiznessDesk, Wednesday, June 03
New Zealander Taika Waititi has only directed one film that he did not write. It was a Marvel Cinematic Universe film. What’s the film?
The Ural Mountains form a natural border between which two continents?
The Barbary lion went extinct in the wild around how many years ago? 80, 120, or 200?
What “C” peak in Queenstown, New Zealand, is a skiing mountain, whose name is the same as a crown that is commonly worn by lesser royalties, such as those with peerage?
In … ⌘ Read more

⤋ Read More

«L’esprit critique» expositions: peluches, pensées visuelles et art «crip»
Le podcast culturel de «Mediapart» discute de l’invitation faite par le musée de la Chasse et de la Nature à la plasticienne Annette Messager, de la rétrospective du peintre Henry Taylor au musée Picasso et de la proposition «Normes Corps» au Palais de Tokyo. ⌘ Read more

⤋ Read More