12

From Enaml's docs:

Enaml brings the declarative UI paradigm to Python in a seamlessly integrated fashion. The grammar of the Enaml language is a strict superset of Python. This means that any valid Python file is also a valid Enaml file, though the converse is not necessary true. The tight integration with Python means that the developer feels at home and uses standard Python syntax when expressing how their data models bind to the visual attributes of the UI.

. . .

Enaml’s declarative widgets provide a layer of abstraction on top of the widgets of a toolkit rendering library. Enaml ships with a backend based on Qt5/6 and third-party projects such as enaml-web and enaml-native provides alternative backends.


A maintainer of Enaml has just opened a brainstorm discussion on the next major development goals.

It's a project I've long admired, though rarely used, and I'd love to see it get some attention and a revamp. I think the bar these days has been raised by projects like QML and Slint, which provide a great context in which to set new goals.

[-] Andy@programming.dev 17 points 2 months ago

For me: Wezterm. It does pretty much everything. I don't think Alacritty/Kitty etc. offer anything over it for my usage, and the developer is a pleasure to engage with.

Second place is Konsole -- it does a lot, is easy to configure, and obviously integrates nicely with KDE apps.

Honorable mention is Extraterm, which has been working on cool features for a long time, and is now Qt based.

[-] Andy@programming.dev 20 points 6 months ago

So far, this isn't much of anything.

Telegram already closes public channels reported for copyright violations.

Some excerpts from this post:

Compared to other platforms, we do not see the seriousness of Telegram to cooperate.

. . .

In May 2023, progress appeared to be going in the wrong direction. Telegram was reportedly refusing to cooperate with the Ministry of Communications and Digital on the basis it did not wish to participate in any form of politically-related censorship.

. . .

With no obviously public comment from Telegram on the matter, it’s hard to say how the social platform views its end of what appears to be an informal agreement.

Telegram will be acutely aware, however, that whatever it gives, others will demand too. That may ultimately limit Telegram’s response, whatever it may be, whenever it arrives – if it even arrives at all.

19

cross-posted from: https://programming.dev/post/12688262

Hello!

This is my little Zsh frontend for Python venv and dependency management, as well as pipx-like app installation.

It's not new, but I just made a new release that can use uv as a backend, making it much faster (and hipper, obviously).

If you have zpy installed, you can install uv with the pipz command, and from then on zpy will use uv instead of Python's venv module and pip-tools:

% pipz install uv

If you have any questions, please ask!

I personally use it in combination with mise (for Python runtime management) and flit (for package publishing), but aim to keep it rather agnostic and interoperable.

[-] Andy@programming.dev 19 points 7 months ago

I'll just second the suggestion that KDE Plasma is worth a try, as it's very adaptable once you know what you want. You don't need to install any addons for the functionality you describe, just open the Shortcuts settings, KWin category, and have at it.

14
submitted 8 months ago by Andy@programming.dev to c/kde@lemmy.kde.social

Sorry to make a whole post asking this. I've been asking on Reddit, IRC, Telegram, and the issue tracker, and I haven't been able to elicit a response from someone who is running Plasma 6 with an X11 session.

Can anyone running Plasma 6 with an X11 session please tell me if it's still possible to offset a panel from a neighboring screen edge? e.g. a bottom panel right-aligned, but some distance from the right screen edge?

Thanks for any info!

[-] Andy@programming.dev 13 points 10 months ago

A good live recovery distro that can mount bcachefs is one thing I've been waiting for before using that filesystem for a new install.

That this will have Arch tools (including arch-chroot, probably) makes this even better.

[-] Andy@programming.dev 55 points 11 months ago* (last edited 11 months ago)

No Zsh support for now, and maybe no user fonts?

And a warning: it's got telemetry on by default.

1
submitted 1 year ago* (last edited 1 year ago) by Andy@programming.dev to c/kde@lemmy.kde.social

Hello!

I'm still using X11, and one of the things that's keeping me there is that I make heavy use of a launch-or-focus script, so that I hit a certain hotkey and no matter what a browser/chat/editor/terminal/file-manager/etc. shows up focused on my current desktop.

In the world of Wayland, this isn't so easy. If this can be recreated at all, I think it'll have to be made to rely on some sort of interface to Kwin.

I don't think it's possible now, but might it be in the future?

Here's my script, let's see if the lemmy interface mangles it (EDIT: yes, the last character should be an ampersand, not &):

#!/bin/zsh -ex

# -- Usage --
# ./toggle_window.zsh LAUNCH_CMD [ WM_CLASS [ CHECK_CMD ] ]

# -- Defaults --
# WM_CLASS and CHECK_CMD each default to the value of LAUNCH_CMD

# -- Examples --
# ./toggle_window.zsh dolphin
# ./toggle_window.zsh wezterm-gui org.wezfurlong.wezterm
# ./toggle_window.zsh firefox firefox firefox-bin
# ./toggle_window.zsh \
#   'flatpak run --branch=stable --arch=x86_64 --command=telegram-desktop --file-forwarding org.telegram.desktop' \
#   telegram-desktop telegram-deskto
# Yes, "telegram-deskto" without a final p. Hmm.

# -- Dependencies --
# - procps (pgrep)
# - wmctrl
# - x11-utils (xprop)
# - xdotool

# -- TODO --
# - wayland

launch_cmd=(${(z)1})
wm_class=${2:-$1}
check_cmd=${3:-$1}

if [[ $(xprop -id $(xdotool getactivewindow) WM_CLASS) =~ \"$wm_class\" ]] {
  xdotool getactivewindow windowminimize
} else {
  wmctrl -xR $wm_class || true
}

pgrep -u $USER -x $check_cmd || exec $launch_cmd &
[-] Andy@programming.dev 12 points 1 year ago

Absolutely unaccountable. Is that different where you are?

11

From the docs:


svcs (pronounced services) is a dependency container for Python. It gives you a central place to register factories for types/interfaces and then imperatively acquire instances of those types with automatic cleanup and health checks.

It’s suitable for implementing Inversion of Control using either dependency injection or service location while not requiring global state, decorators, or mangling of function signatures.


Personally I don't know if I will ever need such a tool; I don't really do web framework-y work right now. But I have a ton of respect for Hynek and enjoy his other projects and his blog posts, so if you need something like this I can recommend it on that basis.

54

With the textual-web command you can publish any Textual app on the web, making it available to anyone you send the URL to. This works without creating a socket server on your machine, so you won't have to configure firewalls and ports to share your applications.

[-] Andy@programming.dev 19 points 1 year ago* (last edited 1 year ago)

EDIT: I was thinking of a different distro than OP's


I think I know which distro you reference (are we keeping it a secret for good reason?). If it's the one I'm thinking of, I've also reached out to admins about toxic messaging in the forums, and the response was hostile, dismissive, and disappointing.

Unfortunately, despite being interested in some technical aspects of the distro, I doubt the sanity of some of the team, and don't want to deal with their hostility either.

[-] Andy@programming.dev 11 points 1 year ago

It is possible to argue with a dollar.

[-] Andy@programming.dev 21 points 1 year ago

Apparently it goes toward sending customers "Liberal Moron" shirts instead of their requested designs, and also illegally underpaying employees. So... I doubt it.

[-] Andy@programming.dev 14 points 1 year ago

Since you ask (why not?), check the current top comment. I didn't know about it until today.

19

I'll copy the release notes below. The exciting bit for me is the ability to pipe service output to a log process, such as s6-log.


This is 0.17.0, the first beta release of Dinit! Dinit is now considered feature-complete for the first main release. Development until then will focus on bug fixes, improvements to existing features, and documentation.

Thank you to several new sponsors, as well as existing sponsors, for supporting this release. Current sponsors include github users: brentfrow, brazeon, and q66 (Daniel Kolesa, author of Chimera Linux). Development of Dinit has also received financial support from Artix Linux. I am grateful for all the support, both financial and otherwise, that has been received.

Special thanks to Mobin Aydinfar, who has taken on secondary maintainer duties in the lead-up to this release, including many valuable contributions to getting CI infrastructure up-and-running.

This release includes several new features and fixes. There are also some small incompatibilities with the previous release, see "changes" below.

New features:

  • A "log-type" service setting allows for control over how a service output is processed. A new "buffer" type allows capturing service output to an in-memory buffer; this may be useful for service started early, before any logging daemon is available. The buffer contents can be inspected via a new dinitctl subcommand, "catlog". See dinit-service(5) and dinitctl(8). Other log-type settings are "none", "file" (log to file as in previous versions) and "pipe" which allows piping output to another (process) service - read on for details.
  • Output from a service process can now be chained to another process (in another service). This allows one service to act as a logging agent for another, for example. The consumer service need not be started at the same time as the producer process; the pipe between them can be created early if needed, and will persist if either end dies (so restarting a logging agent without losing log messages should be possible in theory). The "consumer-of" service setting, specified in the consumer, creates the connection between the services; the producer must have log-type of "pipe".
  • New "triggered" service type, similar to "internal" except that it requires an external trigger before it will start (start of a triggered service is delayed until the external trigger is received). One potential use is to start services after hardware device nodes become available (eg, start dhcp client on a network interface once it is available).
  • New "dinictl" subcommand, "signal", to send a signal to a service process. See dinitctl(8). Implemented by James Knippes and Mobin Aydinfar.
  • New "kill-all-on-stop" service option will cause dinit to kill all (other) processes just before stopping the service. This can be used to ensure a cleaner system state and that filesystems can be unmounted (for example). Use with care; see dinit-service(5) for details.
  • The "shutdown" utility now runs (if present) user-provided shutdown hooks; see shutdown(8) for details.
  • New service settings to control service logfile ownership and permissions: logfile-permissions, logfile-uid, and logfile-gid. Note that these have default values, which results in a change in behaviour from previous versions even if they are not specified in a service description (i.e. the logfile ownership and permissions are now always set).
  • A new "--offline" option for dinitctl enables using "enable" and "disable" subcommands to enable/disable services when dinit is not running.
  • "before" and "after" ordering requirements in service descriptions no longer force the named service to be loaded. This means that a service can be "before" another service even if the other service might not be installed, for example.
  • New "dinitctl" subcommands "is-started" and "is-failed", to test for specific service statuses (intended to be useful in scripts, for example). Contributed by Daniel Kolesa.
  • The "dinitctl" utility now supports the "--use-passed-cfd" argument (as for shutdown).
  • A "configure" script to generate suitable build configuration is included. It is used by default when building on not-recognised systems. Contributed by Mobin Aydinfar.
  • Meson build system added (as an alternative to the existing makefile-based build) by Mobin Aydinfar.

Changes:

  • The default is now to restart services automatically (previously required "restart = yes").
  • The permissions/ownership for logfiles has been reworked, see details in "New features" above.
  • Services which specify "run-as" to run as a different user now run with the supplementary groups of that user (this can be disabled at build time by setting USE_INITGROUPS=0). Thanks to Daniel Kolesa.
  • Environment variables from the service-specific environment ("env-file" setting) can now be substituted in many service settings. Variable expansion now supports a limited subset of shell expansions (such as "$(NAME:-word}" and "${NAME:+word}). Behaviour is not identical to shell; see documentation. Implemented by Daniel Kolesa.
  • Environment variable expansion in service descriptions is no longer optional. The "sub-vars" load option no in a service description no longer has any effect, and "no-sub-vars" is no longer recognised at all.
  • "/run/dinit.d" is now included in the default set of directories search for service description files (in system mode).
  • Some service defaults, including automatic restart, can now be configured at build time (contributed by Mobin Aydinfar).

Fixes:

  • A bug in Dasynq which caused out-of-bounds vector access in dinit on shutdown has been fixed.
  • Fixed a dinit bug that could cause communication on a control socket to block indefinitely, which could theoretically cause dinitctl to hang (no cases of dinitctl hanging have been reported by users!).
34
Litestar 2.0 Released (blog.litestar.dev)
submitted 1 year ago* (last edited 1 year ago) by Andy@programming.dev to c/python@programming.dev

Litestar is a powerful, flexible yet opinionated ASGI framework, focused on building APIs, and offers high-performance data validation and parsing, dependency injection, first-class ORM integration, authorization primitives, and much more that's needed to get applications up and running.

https://github.com/litestar-org/litestar/


I am not personally involved in the project, I just like following its development.


I know Medium is annoying, sorry. The content is also copied on Reddit... where you can enjoy such comments as

Why would they waste their time trying to promote to the few people on Lemmy?

😢

[-] Andy@programming.dev 14 points 1 year ago

Many of us don't praise or want titlebars controlled by apps individually, and there are more reasons to keep them separate than just backward compatibility, FWIW.

But if you haven't checked it out lately, you may want to look at the MauiKit/Nitrux stuff.

8
submitted 1 year ago* (last edited 1 year ago) by Andy@programming.dev to c/askandroid@lemdro.id

EDIT: I think I found my answer for my phone at least: https://tabslite.com/

Hello!

I like to find chords for songs to play along with. Most of the time I end up at Ultimate Guitar, but I find their website, especially on mobile, to be hostile, distracting, and a general PITA, to the point that I pledge to never give that business a cent.

Given that, can anyone recommend any tools, sites, or apps to help find, collect, and view chords for songs?

I have some success with smartChord, but my most common actions require lots of fiddling through menus and even then I can't understand how to access saved chords, and every time I leave a song it prompts me about saving changes even though I made no changes, etc.

Thanks for any help!

view more: next ›

Andy

joined 1 year ago