Skip to content

Saturday, 30 November 2024

Kirigami Addons is a collection of additional components for Kirigami applications. This release brings mostly improvements to the FormCard module.

AboutPage

The about page provided by Kirigami Addons received many improvements. Joshua added icons to all the buttons.

I worked on the component section, which now contains more information about the default components as well as the underlying platform and now has a button to copy all this information to the clipboard. This is super helpful, when writing a bug report. There were also some small bug fixes with, for example, the license dialog being correctly sized.

 

RadioSelector

A new component is the RadioSelector, which is a simple component that allows one to choose an option between two or more choices in a horizontal layout. This is not a new component as it has already been used in Itinerary and Marknote for a long time.

There is also a FormCard version of this, called FormRadioSelectorDelegate.

 

FormPlaceholderMessageDelegate

Another new component is FormPlaceholderMessageDelegate, which is basically a Kirigami.PlaceholderMessage, but instead of putting it in a ListView, this one is to be put inside a FormCard.

FormPlaceholderMessageDelegate for the health certificate
FormPlaceholderMessageDelegate for the health certificate

Other

Volker fixed the Android integration of the date picker. He also added support for static builds (required for iOS and probably hopeful for other platforms).

Claudio fixed various issues with the DatePicker.

Joshua made the caption used in AlbumMaximizeComponent selectable with the mouse. He also fixed the separator for the IndicatorItemDelegate which only appeared after the first item.

I added icon support to FormSwitchDelegate, which is similar to what we already have in FormRadioDelegate and FormCheckDelegate.

Packager Section

Kirigami Addons 1.6.0 was tagged but the tarball are not yet available. I will update this post once it is available.

The first release of OptiImage is finally out! OptiImage is a useful image compressor that supports PNG, JPEG, WebP and SVG file types. It doesn’t do the compression itself but uses various tools like oxipng to do the compression.

OptiImage compressing screenshots
OptiImage compressing screenshots

OptiImage’s settings page
OptiImage’s settings page

Thanks to Mathis Brüchert for his work on the icon and to Soumyadeep Ghosh for a bunch of bug fixes and pushing me to do the release.

Packager Section

OptiImage 1.0.0 was tagged but the tarball are not yet available. I will update this post once it is available.

In the two month since the previous summary KDE Itinerary got a new trip map view, per-trip statistics and better Android integration, and we have been preparing for Transious’ move to MOTIS v2, to just name a few things.

New Features

Trip map

The move to a per-trip timeline view described in the previous issue enables a bunch of new per-trip features.

The first of those is a map view for all activities and locations related to a trip.

Map view showing tram and train paths as lines and pins marking hotels, event venues and restaurants.
Trip map view in Itinerary.

Locations and intermediate stops are interactive and show additional information when clicked.

Trip statistics

Itinerary now also shows a summary of the traveled distance, the estimated CO₂ emission and the total cost for each trip. The cost is based on information extracted from travel documents or manual editing of individual entries, and is automatically converted into your home currency if currency conversions are enabled in the settings.

Part of Itinerary's trip view showing traveled distance, CO₂ emissions and cost.
Trip statistics in Itinerary.

Pre-defined locations for journey searches

All locations involved in the current trip are now added to the location search history for train or bus journey searches. They appear similarly to entries from past searches (but unlike those cannot be deleted).

This avoids having to enter locations again that you’ll likely need in public transport search during a trip.

New timeline layout

There’s ongoing work for an updated timeline layout, in particular for public transport journeys, making the effects of delays and disruptions easier to see. It’s not yet finished and integrated at the time of writing (but might very well be by the time of publishing this post), so this will be covered next time. In the meantime you’ll probably get to see pictures of it in one of the next “This Week in KDE Apps” posts on Planet KDE.

Infrastructure Work

MOTIS v2

Transitous, the community-run free and open public transport routing services used by Itinerary, is preparing to move to the next major version of the routing engine MOTIS.

This meant implementing support for the new MOTIS API in KPublicTransport. The new API provides more control over access and egress modes and transfer times and returns more detailed information for foot paths (more details here).

Map view showing a transfer walking path from one platform to another including floor level changes.
Transfer foot path shown on a map.

MOTIS v2 brings considerable performance improvements for OSM-based routing which should make it viable for Transitous to deploy door-to-door routing rather than just the current stop-to-stop routing. That is also the prerequisite for enabling support for shared vehicle routing eventually.

Android platform integration

There have also been a number of improvements on Android platform integration, most of which not just benefit Itinerary but all KDE Android apps.

  • Fixed the translation lookup order when non-US English is used as one of multiple languages in the system settings.
  • Fixed deploying and loading of Qt’s own translation catalogs.
  • Implemented support for the 24h time format platform settings in locales that usually use a 12h format (CR 600295, available in Qt 6.8.1).
  • Enabled support for app-specific language selection in Android 13 or higher.
  • Foundational work on changing the application language at runtime in Qt and KDE Frameworks. For complete support this is still missing reevaluating locale API related expressions in QML (CR 599626).

There’s some more details in a dedicated post about this.

Matrix session verification

While trip synchronization over Matrix unfortunately didn’t get done after all in time for 24.12, there’s nevertheless progress here.

Most notable is support for Matrix session verification, which is a prerequisite for end-to-end encrypted (E2EE) communication.

Screenshot of Itinerary during the Emoji-based Matrix session verification workflow.
Emoji-based Matrix session verification.

After a fix in libQuotient the trip syncing code can now also handle attached documents, using Matrix’ built-in E2EE file sharing.

Lobbying & Politics

Last week I attended a networking event hosted by DELFI together with a couple of others representing various FOSS and Open Data projects and communities. DELFI is the entity producing Germany’s national aggregate public transport datasets. Those are used by Transitous and thus indirectly by Itinerary, and getting in direct contact with the people working on this is obviously useful.

  • Most of what I heart was sensible and aligns with what we’d like to see as well, e.g. around quality gates for the datasets. One major exception was Deutsche Bahn’s refusal to allow DELFI to publish their realtime data. Coincidentally a new law mandating exactly that just had its first reading in the second chamber of the German parliament that day, so fortunately the pressure to publish this just keeps increasing.
  • Lacking a better “official” channel some of the DELFI teams actually use the community-provided Github issue repositories as feedback channels for data issues. That works, any channel to get fixes upstream is good.
  • The current realtime feed is supposed to cover about 70% of the static data and contain up to 22k concurrent trips according to DELFI, which is very far from what we actually see in Transitous currently. Where exactly that difference comes from isn’t fully understood yet though, but knowing the expectation and having people to talk to should help with resolving that.

This is the first time DELFI ran such an event also open to externals. Good to see some things slowly turning into the right direction after years of pushing by the community. There’s still much more to wish for of course, such as a deeper collaboration/integration between the stop registry and OSM.

Fixes & Improvements

Travel document extractor

  • New or improved extractors for Agoda, Booking.com, Eurostar/Thalys, Flixbus, lu.ma, NH Hotels, NS, planway.com, Renfe, SBB, Thai state railway, Trenitalia and VietJet Air.
  • Support for automatic price extraction from Apple Wallet files that use the currencyCode field.

All of this has been made possible thanks to your travel document donations!

Public transport data

  • Unfortunately Navitia ended their service, so the corresponding backend has been removed. For most affected areas there are fortunately alternatives meanwhile, such as Transitous.
  • Added support for the NS onboard API.
  • Translated backend information are reloaded correctly now when the system language changes.
  • Implausible turns in railway paths found in German GTFS shapes or Hafas responses are now filtered out.
  • The journey query API now has support for indicating a required bike transport, for specifying direct transportation preferences and for returning rental vehicle booking deep links.
  • More Wikidata logo properties are considered for line logos now.

Itinerary app

  • Favorite locations used in a trip are now also part of a trip export.
  • Transfers can now be added in more cases.
  • Statistics also include transfers and live data where available, which should yield more accurate results.
  • Incremental import of multi-traveler reservations has been fixed.
  • The weather forecast on the entire day of departure and day of arrival is now included in the trip timeline.
  • Checking for updates and downloading map data are now per-trip rather than global actions.
  • Added a safety question before clearing the stop search history.
  • Enabled importing GIF images on Android.
  • Fixed importing DB return tickets via the online import.
  • Fixed barcode scanning when using Itinerary as a Flatpak.
  • Fixed display of canceled journeys.
  • Fixed initial Matrix account setup working without needing a restart of the app.
  • A fix for QtLocation map updates sometimes getting stuck until an application restart is still stuck in review (affects not just Itinerary).

How you can help

Feedback and travel document samples are very much welcome, as are all other forms of contributions. Feel free to join us in the KDE Itinerary Matrix channel.

This week there was a flurry of UI polishing work and a nice new feature to go along with the usual background level of bug-fixing. Some of the changes are quite consequential, being minor pain points for years. So hopefully this should be a crowd-pleasing week! If that's the case, consider directing your pleased-ness at KDE's year-end fundraiser! As of the time of writing, we're at 98% of our goal, and it would be amazing to get to 100% by the end of November!

Notable New Features

It's now possible to temporarily disable KWin window rules rather than fully deleting them. (Ismael Asensio, 6.3.0. Link)

Notable UI Improvements

Discover no longer shows you a bunch of irrelevant information about Flatpak runtime packages. (Nate Graham, 6.2.4. Link)

The User Switcher widget now has a more sensible default height, fitting its content better. (Blazer Silving, 6.2.4. Link)

When you've disabled window thumbnails in the Task Manager widget, it now shows normal tooltips for open windows, rather than nothing at all. (Nate Graham, 6.3.0. Link)

Wireless headphones that expose battery information properly (as opposed to headsets, which include a microphone) now get a better icon in the Power and Battery widget and low battery notifications (Kai Uwe Broulik, 6.3.0. Link 1 and link 2)

KWin's Slide Back effect now has a duration that better matches the duration of other effects and animations, and responds more predictably and consistently to non-default global animation speed settings. (Blazer Silving, 6.3.0. Link)

On Ubuntu-based distros, the icon that appears in the System Tray alerting you to a major update available is now symbolic when using the Breeze icon theme, matching other such icons. (Nate Graham, Frameworks 6.9. Link)

Resizing windows for Qt-Quick-based apps should now look significantly better and smoother. (David Edmundson, Qt 6.9.0. Link)

Qt is now capable of displaying color emojis interspersed with black-and-white text when using the default font settings in Plasma. (Eskil Abrahamsen Blomfeldt, Qt 6.9.0. Link)

Notable Bug Fixes

Fixed a case where Plasma could crash when you dismiss a notification about network changes. (Nicolas Fella, 6.2.4. Link)

Fixed a case where KWin could crash after running out of file descriptors when using certain non-Intel GPU drivers. (Xaver Hugl, 6.2.5. Link)

System Settings no longer crashes when you plug in a mouse while viewing the Mouse page. (Nicolas Fella, 6.2.5. Link)

Fixed a strange issue that would cause notifications to be mis-positioned after the first time you dragged any widgets that were on the desktop. This turned out to have been caused by the Plasma config file having old crusty System Tray widgets in it left over from prior Plasma customizations, which were competing for control over the positions of notifications. Now they're cleaned up properly, which also reduces memory usage, removes a ton of cruft in the config file, and may resolve other mysterious and random-seeming issues with notifications being positioned incorrectly. (Marco Martin, 6.2.5. Link 1 and link 2)

Fixed a bug that could make panels in "Fit Content" mode sometimes be too small when Plasma loads. (Niccolò Venerandi, 6.3.0. Link)

Fixed one of the last remaining known bugs relating to desktop icons shifting around: this time due to always-visible panels loading after the desktop and sometimes pushing the icons away. Now that doesn't happen anymore! (Akseli Lahtinen, 6.3.0. Link)

Fixed a regression caused by a change elsewhere in the stack that interacted poorly with some questionable code on our side that caused the highlight effect on the tab bar in the expanded view for the active network in the Networks widget to be invisible. (Harald Sitter, 6.3.0. Link)

Fixed a regression introduced with Frameworks 6.7 that caused many pieces of selected text in Plasma and QtQuick-based apps to become inappropriately de-selected after right-clicking on them. (Akseli Lahtinen, Frameworks 6.9. Link)

Other bug information of note:

Notable in Performance & Technical

Made KWin more robust against apps that send faulty HDR metadata so that it is less likely to crash when encountering this condition. (Xaver Hugl, 6.2.5. Link)

Made Plasma more robust against faulty widgets; now it is more likely to communicate a comprehensible error message rather than crashing. (Nicolas Fella, 6.2.5. Link)

Made Plasma more robust against malformed .desktop files; now it similarly robust against more types of broken files. (Alexander Lohnau, 6.2.4. Link)

How You Can Help

KDE has become important in the world, and your time and contributions have helped us get there. As we grow, we need your support to keep KDE sustainable.

You can help KDE by becoming an active community member and getting involved somehow. Each contributor makes a huge difference in KDE — you are not a number or a cog in a machine!

You don’t have to be a programmer, either. Many other opportunities exist:

You can also help us by donating to our yearly fundraiser! Any monetary contribution — however small — will help us cover operational costs, salaries, travel expenses for contributors, and in general just keep KDE bringing Free Software to the world.

To get a new Plasma feature or a bugfix mentioned here, feel free to push a commit to the relevant merge request on invent.kde.org.

Friday, 29 November 2024

Let’s go for my web review for the week 2024-48.


Are Overemployed ‘Ghost Engineers’ Making Six Figures to Do Nothing?

Tags: tech, algorithm, productivity, business

Can you see this kind of models getting abused quickly? Clearly it says something about the tech industry wanting to reduce costs.

https://www.404media.co/are-overemployed-ghost-engineers-making-six-figures-to-do-nothing/


the tech utopia fantasy is over

Tags: tech, politics

Technology isn’t neutral. It’s impossible to ignore the ideologies of the moguls funding or leading big tech companies. We can’t afford to trust their promises.

https://blog.avas.space/tech-utopia-fantasy/


X’s Objection to the Onion Buying InfoWars Is a Reminder You Do Not Own Your Social Media Accounts

Tags: tech, social-media, twitter, law

Everything is in the title… if you thought you owned anything on those platforms, think twice.

https://www.404media.co/xs-objection-to-the-onion-buying-infowars-is-a-reminder-you-do-not-own-your-social-media-accounts/


Tags: tech, ai, machine-learning, gpt, law, copyright

More shady practices to try to save themselves. Let’s hope it won’t work.

https://arstechnica.com/tech-policy/2024/11/tech-problems-plague-openai-court-battles-judge-rejects-a-key-fair-use-defense/


‘Thirsty’ ChatGPT uses four times more water than previously thought

Tags: tech, ai, machine-learning, gpt, ecology, water

The water problem is obviously hard to ignore. This piece does a good job illustrating how large the impact is.

https://www.thetimes.com/uk/technology-uk/article/thirsty-chatgpt-uses-four-times-more-water-than-previously-thought-bc0pqswdr


Self-Hosting Isn’t a Solution; It’s A Patch

Tags: tech, self-hosting, privacy, gdpr, law, politics, decentralized

Definitely this. Sure we should seek for decentralization, but this is not going to happen or be effective without regulation. Ensuring privacy is a legislative and political problem as much as a technical one.

https://matduggan.com/self-hosting-isnt-a-solution-its-a-patch/


How decentralized is Bluesky really?

Tags: tech, social-media, fediverse, decentralized, bluesky

A long and comprehensive analysis of Bluesky. Also brings interesting critiques about both Bluesky and the Fediverse. Clearly Bluesky as of today is not effectively decentralized and shouldn’t be considered as such.

https://dustycloud.org/blog/how-decentralized-is-bluesky/


Reply on Bluesky and Decentralization

Tags: tech, social-media, bluesky, fediverse, decentralized

The debate about how BlueSky and decentralisation or federation continues. It’s nice to see how civilized the people involved are. This is how we can make progress.

https://whtwnd.com/bnewbold.net/3lbvbtqrg5t2t


So you want to write a KMail plugin?

Tags: tech, kde, documentation

Since the documentation is severely lacking in this area, this ends up being a nice how to. I wish we’d have more like this in the official documentation.

https://datagirl.xyz/posts/kontact_plugin_writing.html


The two factions of C++

Tags: tech, c++, safety, community

It’s clear that a split is forming in the C++ community on how to evolve the language. Could it lead to a full fledged divorce?

https://herecomesthemoon.net/2024/11/two-factions-of-cpp/#fnref:4


if constexpr requires requires { requires }

Tags: tech, c++, metaprogramming, type-systems

Are you confused with the use of requires in C++20? This post might help.

https://www.think-cell.com/en/career/devblog/if-constexpr-requires-requires-requires


Unsafe for work

Tags: tech, rust, safety

Good explanation of what Rust’s unsafe really does.

https://oida.dev/unsafe-for-work/


Mark–Scavenge: Waiting for Trash to Take Itself Out – Inside.java

Tags: tech, java, memory, garbage-collector

Looks like there is a new venue to improve garbage collectors performance. This should be interesting down the line.

https://inside.java/2024/11/22/mark-scavenge-gc/


SLAX: an alternative syntax for XSLT which is tailored for readability and familiarity

Tags: tech, xslt

Tempted to do some XSLT? Did you notice it’s almost 2025? So yeah, just don’t. At least there’s a proper alternative if you still need to process that XML input.

https://github.com/Juniper/libslax/wiki


Petnames: A humane approach to secure, decentralized naming

Tags: tech, security, dns

Interesting approach to have secure and decentralized naming while keeping it human readable.

https://files.spritely.institute/papers/petnames.html


Naming things

Tags: tech, programming, design, craftsmanship

This is a good point. Idiosyncrasies are not necessarily a bad thing for naming things. Natural languages are fickle friends, you might need to rely to specific metaphors in order to disambiguate.

https://wiki.dpk.land/Naming_things


Codin’ Dirty

Tags: tech, programming, complexity, design, tests

Another rebuttal of Clean Code. Most of it makes sense if not overdone. There’s the usual confusion around the “unit tests” term though, so take that section with a pinch of salt.

https://htmx.org/essays/codin-dirty/



Bye for now!

Thursday, 28 November 2024

gcompris 4.3

Today we are releasing GCompris version 4.3.

It contains bug fixes and graphics improvements on multiple activities.

It is fully translated in the following languages:

  • Arabic
  • Bulgarian
  • Breton
  • Catalan
  • Catalan (Valencian)
  • Greek
  • UK English
  • Esperanto
  • Spanish
  • Basque
  • French
  • Galician
  • Croatian
  • Hungarian
  • Indonesian
  • Italian
  • Lithuanian
  • Latvian
  • Malayalam
  • Dutch
  • Norwegian Nynorsk
  • Polish
  • Brazilian Portuguese
  • Romanian
  • Russian
  • Slovenian
  • Albanian
  • Swedish
  • Swahili
  • Turkish
  • Ukrainian

It is also partially translated in the following languages:

  • Azerbaijani (97%)
  • Belarusian (87%)
  • Czech (97%)
  • German (96%)
  • Estonian (96%)
  • Finnish (95%)
  • Hebrew (96%)
  • Macedonian (90%)
  • Portuguese (96%)
  • Slovak (84%)
  • Chinese Traditional (96%)

You can find packages of this new version for GNU/Linux, Windows, Android, Raspberry Pi and macOS on the download page. Also this update will soon be available in the Android Play store, the F-Droid repository and the Windows store.

Thank you all,
Timothée & Johnny

Wednesday, 27 November 2024

The next Kdenlive Café will be on the 3rd of December at 8 PM UTC.

Come chat with the team!

Join us at: https://meet.kde.org/b/far-twm-ebr

The post Kdenlive Café in December appeared first on Kdenlive.

In a recent email, KDABian Leon Matthes highlighted some of his go-to command line tools for everyday use on Unix. His recommendations sparked a lively exchange among our colleagues, each sharing

their own favorite utilities.

Many of these tools offer efficient alternatives to standard Unix programs, speeding up the workflow or otherwise enriching the development experience.

This article aims to serve as a resource for the wider community, encouraging others to explore these tools and upgrade their command line setup for improved productivity.

The following common Unix tools are listed in this document, with their alternatives specified in their respective sections:

Additionally, there are some tools here that do not replace common programs, but are extremely useful when working in a shell environment. These are broken into two broad categories:

Many of these tools can be considered examples of the “rewrite it in Rust” approach (RIIR), which in this document will be denoted with Ferris the crab: 🦀

Finally, there is a bonus Rust crate listed at the end that is helpful for writing CLI programs of your own.

Note: for scripting, stick with standard Unix tools, as they’re more widely distributed and will work in most other Unix environments. The tools in this article are meant to improve quality of life working within your own shell environment on a daily basis.


cd


Python

autojump is an alternative to cd, invoked with the command j. It jumps to what it determines to be the best fit for whatever directory name you give it. For example, j cxx-qt will change directory to the cxx-qt directory, even if it’s nested several levels deep from the current working directory.

If autojump doesn’t prioritize a directory correctly, its priority weight can be increased or decreased. j -i XXX will increase the priority weight of the current working directory by XXX, while j -d XXX will do the opposite and decrease the weight accordingly.

autojump also supports opening a file browser at a matched location rather than cd‘ing into it, by invoking jo rather than j.

Unfortunately, autojump has not been in active development for the past two years, and can break in some environments. The next tool, zoxide, will be more reliable if autojump breaks for you.

Rust

zoxide is a similar program to autojump, actually drawing inspiration from it. Invoked with the command z, it remembers paths that have been visited in the past and matches the best fitting directory. The tool also supports interactive selection of the correct match via the zi command, which uses the tool fzf for fuzzy finding. fzf is listed later in this article.

zoxide can also be used the same way as plain cd, and can target absolute and relative paths. It can be configured to be invoked from the j and ji commands, or even cd to fully replace the cd command.

Finally, it is implemented in Rust, resulting in better performance than autojump.


ls


Rust

lsd is a more feature-rich version of ls, including colors, icons, tree-view, additional formatting, and more. It is also highly configurable through a yaml config file.

Rust

eza is a small, fast ls rewrite that knows about symlinks, extended attributes, and git, and has support for hyperlinks. Similar to lsd, it supports colors and icons, which are configurable with a yaml config file.


man


This project has several clients written in different languages. The most mature client is an npm package.

tldr is an alternative to using man for most common use cases. It is a collection of pages that provides brief descriptions and usage examples for loads of programs, standard Unix and otherwise. It’s much faster if you don’t need to read about every option in detail in order to find the correct way to invoke a command or select the proper option quickly.

For example, if the man page for tar is too long to read when looking for the right option to do something, simply running tldr tar will show a list of examples that will usually have the options you need.

Python

cheat.sh and its associated shellscript cht.sh, provide access to a superpowered aggregation of cheatsheets for programming languages and CLI tools, including tldr pages and other sources.

It has a great system for querying cheatsheets, and you don’t even need to install a tool (though you can), as the query response can be retrieved by curl. It’s also usable inside editors, for easy referencing while programming.

The cheatsheet sources also include StackOverflow answers, which allow for flexible usage like so:

$ cht.sh js parse json

A nice way to use cheat.sh without installing anything is to put the following function in your .bashrc or .zshrc:

function cheat() {
    if ! curl -s "cheat.sh/${*//\ /+}"; then
        echo "Failed to get the cheatsheet" >&2
        return 1
    fi
}

Then you can use it like

$ cheat tar

or

$ cheat cpp number to string

find


Rust

fd is an alternative for many use cases of find.

While it is not as powerful as find, it is designed to be faster and more user-friendly for the majority of find‘s use cases.

No more find -name .rs — just use fd .rs and you’re good to go.

fd is super fast and will search through your entire filesystem in a matter of seconds (Leon recorded 1.4s on his machine with 177GB of files).

By default, fd will not include any hidden files that are ignored by .gitignore, which is very useful as it doesn’t give you any random junk in your build directory and speeds up the search even further.

Use --hidden and --no-ignore (or -H and -I, respectively) to search for everything.

Go

fzf is a fuzzy-finder that can match files, command history, processes, hostnames, bookmarks, git commits, and more, with interactive selection. It’s also usable as a vim or neovim plugin.


grep


Rust

ripgrep (rg as a command) provides an incredibly fast grep alternative with a simpler interface.

Did you ever have to wait for grep to finish searching a directory or had to look up the right options for specific usage? Well, no more! Ripgrep will search the contents of large build directories within milliseconds.

Just running rg Q_PROPERTY will search through the entire current directory if you don’t pipe something into it, which is very convenient and the way it should have been in the first place. The output is also a lot friendlier and easier to read.

Like fd, use --hidden and --no-ignore to search in hidden and ignored directories/files.


cat


Rust

bat, written by the creator of fd, is a superpowered Rust rewrite of cat. It provides syntax highlighting, line numbers, support for displaying non-printable characters, support for showing multiple files at once, and pipes to less by default for large output. It can also be integrated with fzf, find, fd, ripgrep (rg), git show, git diff, man, and more. A tool you’ll read about later in this document, delta, uses bat as a dependency to display diffs.


diff / git diff


Perl

diff-so-fancy is an alternative to vanilla git diff that improves readability, with better formatting, colors, and highlighting. Configure git to use diffsofancy as its pager, and git diff will provide the more readable diffsofancy output.

Rust

delta is an alternative to diffsofancy that’s written in Rust. It includes additional features, like line numbers, syntax highlighting, side-by-side, improved navigation between files in large diffs, hyperlinked commit hashes, improvements for display of git blame and merge conflicts, and the ability to syntax-highlight grep output. delta uses bat under the hood and, as such, they can share color themes.


prompts & shells


Rust

starship is a prompt written in Rust, which can be used with a number of popular shells including bash, zsh, fish, and even Windows shells like cmd and PowerShell.

The prompt is both stylish and informative, providing information like git branch, versioning, and more in the prompt itself. It also indicates the time length of command execution, whenever the run lasts for more than a few seconds — very helpful for gauging the duration of a build. This prompt should be utilized with a NerdFont for icon support.

Starship is also extremely configurable, so any details can be omitted or added; the look and feel of the prompt can be completely customized, etc.

zsh prompts & plugins

zsh

Some shell users argue that switching from bash is definitely worthwhile, with zsh being the favorite choice for many. It’s highly configurable and has a rich plugin ecosystem.

oh-my-zsh is a zsh framework that makes completions, searching in history, the prompt, etc., much nicer than the defaults. It can, of course, be tweaked much further from there. If you find oh-my-zsh to be a bit bloated, there are more lightweight alternatives such as ZimFW or Zinit.

Some zsh plugins can also serve as alternatives to previously mentioned tools. There are quite a few useful plugins listed here (they should work with any plugin manager): https://github.com/unixorn/awesome-zsh-plugins.

Some that stand out include:

  • zsh-vi-mode
    • a proper Vim mode for the terminal, much better than the default one
  • fast-syntax-highlighting
    • nice while-you-type syntax highlighting in the shell
  • fzf-marks
    • alternative workflow to zoxide and similar cd improvements
    • this can also be used with bash
  • zsh-autoenv
    • customize environment variables by directory, similar to the tool direnv mentioned later

Note: If you are interested in switching away from bash but don’t like zsh, consider trying fish.


Update Systems


Rust

topgrade is a tool which conveniently updates several package managers with one command.

Just run topgrade and every package manager under the sun will be updated, one after the other. This even includes flatpaks and updates to your systems package manager, very convenient.


Misc.


Go

direnv is an extension for several common Unix shells, focused on environment management. More specifically, it is intended to unclutter .profile and export different environment variables depending on the current directory.

On each prompt, it checks for the existence of a .envrc file in the current directory, otherwise looking for .env, and loads or unloads environment variables accordingly. It’s a single executable and very fast.

direnv is also extensible with bash files in .config.

C++

blobdrop enables drag-n-drop of files from a terminal window, which can be very convenient when using the command line as a file browser. It was written by fellow kdabian Magnus Gross.


bonus!


Rust

bonus is not quite a tool, but a Rust crate used frequently for writing CLI tools, called clap.

clap is used in the codebases of a majority of the Rust tools in this document, as it’s incredibly useful. It’s the reason most Rust CLI tools have great UX.

Using the derive feature, you can simply mark up a struct of data you need from your command line arguments and clap will generate a beautiful and convenient CLI interface for you. Just take a look at the derive documentation to get an idea of what this looks like.


Other Tools


We hope these tools can improve your workflow, as they certainly make our lives on the command line far more enjoyable.

If you have any additions to this list, feel free to discuss them in the comments.

About KDAB

If you like this article and want to read similar material, consider subscribing via our RSS feed.

Subscribe to KDAB TV for similar informative short video content.

KDAB provides market leading software consulting and development services and training in Qt, C++ and 3D/OpenGL. Contact us.

The post CLI++: Upgrade Your Command Line appeared first on KDAB.

Tuesday, 26 November 2024

Did you know about a small but very useful feature from KDE?

Open krunner via Alt+Space and type qw:KDE to search Qwant for KDE:

Pressing Enter will open up your browser with the specified KDE search on Qwant!

There are a lot of other Web Search Keywords like:

Wikipedia:

Invent:

Translate from English to German on dict.cc

You can find all of them by opening Web Search Keywords on krunner:

Extra: Create your own!

I use often a Fedora tool called COPR, so let’s use it as an example to create our own web search keyword.

Do your search in the webpage:

And now the important part you need:

Now back to the Web Search Keyword settings:

Fill in the data needed taking care of the placeholder for our input!:

Now we have our own Web Search Keyword:

NOTE: for some reason I had to click on Apply and OK until all the different setting windows were closed before the new custom Web Search Keyword worked

And the result:

I hope it’s useful to somebody!

In order to prepare for the Akademy I started some days before to give my Librem 5 ( an Open Hardware Phone) another try and ended up with a non starting Plasma 6. Actually this issue was known already, but hasn't been addressed. In the end I reached the Akademy with my Librem 5 having phosh installed (which is Gnome based), in order to have something working.

I met Bushan and Bart who took care and the issue was fixed two days later I could finally install Plasma 6 on it. The last time I tested my Librem 5 with Plasma 5 it felt sluggish and not well working. But this time I was impressed how well the system reacts. Sure there are some things here and there, but in the bigger picture it is quite useable. One annoying issue is that the camera is only working with one app and the other issue is the battery capacity, you have to charge it once a day. Because of missing a QR reader that can use the camera, getting data to the phone was quite challenging. Unfortunately the conference Wifi separated the devices and I couldn't use KDE Connect to transfer data. In the end the only way to import data was taking five photos from the QR Code to import my D-Ticket to Itinerary.

With a device with Plasma Mobile, it directly was used for a experiment: How well does Dolphin works on a Plasma Mobile device. Together with Felix Ernst we tried it out and were quite impressed, that Dolphin does work very well on Plasma Mobile, after some simple modifications on the UI. That resulted in a patch to add a mobile UI for Dolphin !826.

With more time to play with my Librem 5 I also found an bug in KWeather, that is missing a Refresh option, when used in a Plasma Mobile environment #493656.

Akademy is a good place to identify and solve some issues. It is always like that, you chat with someone and they can tell you who to ask to answer the concrete question and in the end you can solve things, that seems unsolvable in the beginning.

There was also time to look into the travelling app Itinerary. A lot people are faced with a lot of real world issues, when not in their home town. Itinerary is the best traveling apps I know about. It can import nearly every ticket you have and can get location information from restaurant websites and allow routing to that place. It does add many useful information, while traveling like current delays, platform changes, live updates for elevator, weather information at the destination, a station map and all those features with strong focus on privacy.

In detail I found some small things to improve:

  • If you search for a bus ride and enter the correct name for the bus stop, it will still add some walk from and to the station. The issue here is that we use different backends and not all backends share the same geo coordinate. That's why Itinerary needs to add some heuristics to delete those paths. walk to and from the bus stop

  • Instead of displaying just a small station map of one bus stop in the inner city, it showed complete Würzburg inner city, as there is one big park around the inner city (named "Ringpark").

  • Würzburg has a quite big bus station but the platform information were missing in the map, so we tweaked the CSS to display the platform. To be sure, that we don't fix only Würzburg, we also looked at Greifswald and Aix-en-Provence if they are following the same name scheme.

I additionally learned that it has a lot of details that helps people who have special needs. That is the reason why Daniel Kraut wants to get Itinerary available for iOS. As spoken out, that Daniel wants to reach this goal, others already started to implement the first steps to build apps for iOS.

This year I was volunteering in helping out at Akademy. For me it was a lot of fun to meet everyone at the infodesk or help the speakers setup the beamer and microphone. It is also a good opportunity to meet many new faces and get in contact with them. I see also room for improvement. As we were quite busy at the Welcome Event to get out the badges to everyone, I couldn't answer the questions from newcomers, as the queue was too long. I propose that some people volunteer to be available for questions from newcomers. Often it is hard for newcomers to get their first contact(s) in a new community. There is a lot of space for improvement to make it easier for newcomers to join. Some ideas in my head are: Make an event for the newcomers to get them some links into the community and show that everyone is friendly. The tables at the BoFs should make a circle, so everyone can see each other. It was also hard for me to understand everyone as they mostly spoken towards the front. And then BoFs are sometimes full of very specific words and if you are not already deep in the topic you are lost. I can see the problem, on the one side BoFs are also the place where the person that knows the topic already wants to get things done. On the other side new comers join BoFs, are overwhelmed by to many new words get frustrated and think, that they are not welcome. Maybe at least everyone should present itself with name and ask new faces, why they joined the BoF to help them joining.

I'm happy, that the food provided for the attendees was very delicious and that I'm not the only one mostly vegetarian with a big amount to be vegan.

At the conference the KDE Eco initiation really caught me, as I see a lot of new possibilities in giving more reasons to switch to an Open Source system. The talk from Natalie was great to see how pupils get excited about Open Source and also help their grandparents to move to a Linux system. As I also will start to work as a teacher, I really got ideas what I can do at school. Together with Joseph and Nicole, we finally started to think about how to drive an exploration on what kind of old hardware is still KDE software running. The ones with the oldest hardware will get an old KDE shirt. For more information see #40.

The conference was very motivating for me, I also had still energy at the evening to do some Debian packaging and finally pushed kweathercore to Debian and started to work on KWeather. Now I'm even more interested in the KDE apps focusing the mobile world, as I now have some hardware that can actually use those apps.

I really enjoyed the workshop how to contribute to Qt by Volker Hilsheimer, especially the way how Volker explained things in a very friendly way, answered every question, sometime postponed some questions but came back to them later. All in all I now have a good overview how Qt is doing development and how I can fix bugs.

The daytrip to Rothenburg ob der Tauber was very interesting for me. It was the first time I visited the village. But in my memory it feels like I know the village already. I grew up with reading a lot of comic albums including the good SiFi comic album series "Yoku Tsuno" created by the Belgian writer Roger Leloup. Yoku Tsuno is an electronics engineer, raised in Japan but now living in Belgium. In "On the edge of life" she helps her friend Ingard, who actually lives in Rothenburg. Leloup invested a lot of time to travel to make the make his drawings as accurate as possible.

a comic page with Yoko Tsuno in Rothenburg ob der Tauber

In order to not have a hard cut from Akademy to normal life, I had a lunch with Carlos, to discuss KDE Neon and how we can improve the interaction with Debian. In the future this should have less friction and make both communities work together more smoothly. Additionally as I used to develop on KDEPIM with the help of Docker images based on Neon I ask for a meta kf6 dev meta package. That should help to get rid of most hand written lists of dev packages in the Docker file in order to make it more simple for new contributors to start hacking on KDEPIM.

The rest of the day I finally found time to do the normal tourist stuff: Going to the Wine bridge and having a walk to the castle of Würzburg. Unfortunately you hear a lot of car noises up there, but I could finally relaxe in a Japanese designed garden.

Finally at Saturday I started my trip back. The trains towards Eberswalde are broken and I needed to find alternative routing. I got a little bit nervous, as it was the first time I travelled with my Librem 5 and Itinerary only and needed to reach the next train in less than two mins. With the indoor maps provided, I could prepare my run through the train station so I reached successfully my next train.

By the way, also if you only only use KDE software, I would recommend everyone to join Akademy ;)