Senin, 21 Juli 2025

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks

"If there is a media out there, VLC can play it!". I want to say the same thing about Kitty and its versatility.

If you didn't know already, Kitty is one of the most comprehensive terminal emulators available in Linux.

It offers image support, ligatures, animated cursors, and a whole lot of productivity tweaks. I could write a mini-book if I had to explain each one in full detail.

I am not going to do that. Instead, I'll share some of my favorite features and tweaks I use with Kitty.

Installing Kitty

Since Kitty is a pretty popular terminal emulator, it is available in the default repository of most of the Linux distributions.

In Ubuntu, you can install a slightly older version of Kitty by using the APT command:

sudo apt install kitty

Arch Linux users can install it from the Extra repo:

sudo pacman -S kitty

For Fedora,

sudo dnf install kitty

If you are any other distro user, or your system repo provides an older version of Kitty, use the official pre-built binary from the Kitty team.

curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin

Or, download binary from the GitHub releases page.

1. Generating default config

Kitty offers a huge configuration possibility, but through its config file. This config file should be kitty.conf located in ~/.config/kitty directory.

It is always good to use the default config file and make changes to it rather than creating a config from scratch.

Open Kitty and use the keyboard shortcut CTRL+SHIFT+F2. This will open the Kitty config in a new window. If not present already, it will create one for you and open it.

For me, it opened in the Vi editor. If this is not needed, you can quit the config using the Vi shortcut :q (without any changes).

0:00
/0:11

Open Kitty config file using the shortcut in Kitty. This will open the config file in Vi editor.

Then open it in your favorite command line editor or GUI-based text editors.

nano ~/.config/kitty/kitty.conf

2. Setting a different font

A proper monospace font can increase the terminal aesthetics. Here, we will set the terminal font as JetBrains Mono font.

Before proceeding, make sure the font is installed on your system.

First, list the set of supported fonts using the command:

kitty +list-fonts

From the list, note the exact name of the font you want to use:

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
List Fonts

Now, open Kitty config and scroll down to the line that says font-family. Here, remove the comment in front of the item and change the name as follows:

font-family                "JetBrains Mono"
I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
Set a Font
💡
Kitty supports setting individual font as well, like Bold, Italics, etc.

Setting font alone is not sufficient; you should be able to change the font size as well. Fret not! Kitty has an option here.

Search for font-size. Uncomment the line and change the value to sufficiently large.

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
Font Size

3. Re-setting scrollback

One of the most essential features in a terminal is a sufficiently long scrollback lines.

Many commands like cat, do not use a pager like less to print text. So, if a text has a huge number of lines, more than your scrollback, then the beginning parts of the text will be unreachable.

At the same time, setting a huge scrollback line is also not advised. Since the scrollback lines are stored in RAM, more scrollback lines means more hit on the RAM usage.

A value of 10000 will be good for most users, and a 2000 is also fine for a GUI-only user.

On the Kitty config file, find the line scrollback_lines. By default, the value is 2000.

To change, uncomment the line and add a value, say 5000.

scrollback_lines     5000
I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
Scrollback Lines

The scrollback pager feature in Kitty allows you to open your terminal’s scrollback history in a full-featured pager program (like less or nvim) for easier navigation, search, and copying.

By default, this is disabled. You need to enable it by specifying the value in MB.

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
Scrollback Pager History
💡
Use most instead of less and add colors to your pager system.

4. Hiding mouse on typing (for keyboard addicts)

For terminal power users, the mouse may feel like a distraction. In Kitty, you can play with the mouse presence in several ways. Hiding the mouse immediately when you start typing is my preference.

To get this action, set the mouse_hide_wait variable to a negative value.

mouse_hide_wait    -3.0

If you make this value any positive number, the terminal will wait for that many seconds and then disable the mouse if no mouse action occurred within that time range.

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
Hide Mouse Cursor

In the screenshot above, I set the value to 5.0 seconds. So now, no matter you type or not, the mouse will be disabled if you don't touch your mouse for more than 5 seconds.

Set it to 0 and the mouse won't hide at all.

5. Setting window size

Kitty remembers the window size from the last session by default, so you don't need to resize it every time.

Still, you can set the default window width in Kitty.

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
Window Size

The remember_window_size yes is self-explanatory. The window size will be remembered with Kitty instances.

You can set the initial_window_width/height key to a required size and then disable the remember_window_size so that the new instances always open in the specified size.

This is specifically useful in the next section, where we disable the window decoration and thus you can't resize the terminal with mouse anymore.

6. Hiding window decorations

If you are using tiling window managers like Hyprland, it is good to avoid the title in Kitty. You won't find any serious use for it, because window resizing is done differently in tiling window managers.

Search and locate the hide_window_decorations option. Uncomment the line and change its value to yes from the default no.

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
Hide Window Decorations

7. Customizing the tabs

Like most of the terminal, Kitty offers tabs as well. The difference is that Kitty offers some ways to make the tabs look unique.

Tab bar position

You can use the tab_bar_edge key to specify whether you want the tab list at top or bottom. The default is bottom, and that is fine.

Tab bar style

There are several cool styles available for the tab bar, like fade, slant, separator, powerline, and custom.

We will be going with the powerline, which is pleasing and can be quickly made work. Uncomment the line and change the value.

tab_bar_style powerline

Now, the powerline offers another key called the tab_powerline_style. This can be set to angled, slanted, round.

All these looks cool, but I will be going with round which along with the Catppuccin Starship prompt will look aligned.

tab_powerline_style round
0:00
/0:32

Tabs in Kitty

8. Changing the shell

Most of the Linux distributions come with Bash as the default shell. Many users, on the other hand, love the ZSH shell.

The most common way people follow is to change the system shell. But that applies to all the terminals.

Here comes the use of shell key. You can set a shell for only the Kitty terminal and the rest of the system will use the default bash shell.

For this, first find the command location of your desired shell using the which command:

which zsh

For me, it is /usr/bin/zsh.

Now, search for the shell key in Kitty config.

💡
If you are searching for the shell using the editor's find tool, search for shell ., so that you reach the result directly.

The default value is . which means the user's default shell is used as Kitty shell.

Remove this . and paste the location of your desired shell.

shell /usr/bin/zsh
I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
Change Shell
💡
You can set a default editor as well using the editor key in Kitty configuration file. The procedure is the same as changing shell.

9. Notifying on command finish

With Kitty, you can get a desktop notification when a long-running command finishes up.

For this, uncomment the notify_on_cmd_finish key and set its value to invisible or unfocussed.

I am going with invisible, since, as per manual, it will:

Only send a notification when the window both is unfocused and not visible to the user, for example, because it is in an inactive tab or its OS window is not currently active.
notify_on_cmd_finish invisible

If you are more into detail, set a time limit for the long command.

I am going to set 20 seconds as the duration of a long command.

notify_on_cmd_finish invisible 20
I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
Notify on Command Finish

There is more to explore in this section for you!

10. Changing themes

Kitty offers a huge number of themes. Run this command:

kitten themes

This will download the themes from the repo and display it to you.

Scroll down to see them all. Once you find the perfect one for you, press the ENTER key to apply the theme!

Also, use the / button to start a search.

In the small video below, you can see that I apply Catppuccin theme to Kitty.

Applying theme to Kitty Terminal

Once you have selected the theme, press enter and it asks whether you want to modify the config or add the theme to ~/.config/kitty/themes.

I will press the M key so that the Kitty Config is modified and the theme is set.

11. Animating cursor tail

Latest versions of Kitty support setting a cool cursor animation.

📋
The values for the keys in this section need to be fine tuned as needed for your satisfaction.

To enable it, first search for the key cursor_trail. Uncomment it. I have set a value of 200 for it.

Now, set a value for cursor_trail_decay and cursor_trail_start_threshold as shown in the screenshot below.

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
Cursor Trail Values

Now, reopen Kitty. You can see a cool cursor trail animation when the cursor is moved significantly.

0:00
/0:19

Showing Cursor Trail Animation

12. Automatic dark and light theme change

Kitty supports automatically changing themes according to the system dark and light mode.

🚧
This is supported in Kitty version 0.38+. So, if you are using Ubuntu 24.04 or related system, the default package repo version of Kitty doesn't support this.

For this, first open Kitty and run:

kitten themes

Now, from the list of dark theme, select a dark theme and press enter.

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
Select a dark theme

In the next page, press the D key so that this theme is the default theme for the dark mode.

Now, run the kitten themes command again. This time, select a light theme from the list and press enter. In the next screen, press the L key, to make the selected light theme default for light mode.

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
Set light mode theme

Run kitten themes one more time and select a theme at random, and in the settings screen, press the N key to make it the default in case of no preference.

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
No preference mode theme

That's it. Now, the Kitty will show the theme based on the current system mode.

You can take a look at the ~/.config/kitty folder to make sure that the dark, light, and no-pref mode themes are present as config file.

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
Theme files saved for different modes.

13. Setting a background image

Take the customization to the next level by adding an image as the background for Kitty terminal.

Locate the key background_image in the kitty config file.

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
Background Image and Layout

Set its value as path to the image file. Also, change background_image_layout to a required value, as shown in the screenshot above.

And you can see that my kitty terminal now has an entirely different look that matches the theme of It's FOSS. Good for the social media videos.

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
Set background image

Want to spice up the terminal even more? Let's add a small logo as well!

Make sure you have a small image, say 50x50 sized images. This will make things easy. There is a scale option window_logo_scale, but that may require some trial and error.

Now, in the Kitty config, locate the key window_logo_path. Uncomment it and change its value to the path of the logo file.

Also, fix the position of the logo using the window_logo_position key.

Use the window_logo_alpha key to set a fade to the logo.

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
Set Window Logo

That's it! Save the config file and reopen Kitty to view the result.

I Made Kitty Terminal Even More Awesome by Using These 15 Customization Tips and Tweaks
It's FOSS Logo Applied

15. Setting mouse actions

You can define what the mouse buttons do in Kitty using the mouse_map option in the Mouse Actions section.

The general syntax is:

mouse_map button-name event-type modes action

For example, the default middle-click to paste from selection action is set in Kitty using:

mouse_map middle release ungrabbed paste_from_selection

Kitty offers a wide range of customization, and I have mentioned some of the cool ones that I use regularly.

There are more power user friendly features, like:

  • Keyboard shortcuts mapping.
  • Using Kittens to extend the functionality, etc.

Explore the vast possibilities of Kitty by using it.

Conclusion

You saw a glimpse of customized Kitty terminal in our terminal makeover video first.

We discussed internally and decided to do a dedicated tutorial on customizing Kitty. And hence this article.

I understand that customizing the terminal is not everyone's preference but I like changing things to make them look asthetically pleasing. Kitty is my current favorite, even though I am thinking of using Ghostty.

Please let me know in the comments if you like this article or if you notice any issues with the config changes.



from It's FOSS https://ift.tt/NVG8uqP
via IFTTT

Rabu, 16 Juli 2025

FOSS Weekly #25.29: End of Ubuntu 24.10, AUR Issue, Terminal Tips, Screenshot Editing and More Linux Stuff

FOSS Weekly #25.29: End of Ubuntu 24.10, AUR Issue, Terminal Tips, Screenshot Editing and More Linux Stuff

After Denmark and France, now we have another positive news from Europe as two major open source projects join hands to offer open source alternatives to popular enterprise tools Jira and Confluence.

Europe on a Roll: Plans Open Source Alternative to Confluence and Jira
European organizations are going all in for digital sovereignty with open source tools.
FOSS Weekly #25.29: End of Ubuntu 24.10, AUR Issue, Terminal Tips, Screenshot Editing and More Linux Stuff

Start of something new, something good? I sure hope so.

💬 Let's see what else you get in this edition

  • Ubuntu 24.10 EOL.
  • Bottles project needing help.
  • Commodore making a surprise comeback.
  • And other Linux news, tips, and, of course, memes!

📰 Linux and Open Source News

Ubuntu 24.10 Reaches End of Life: Here’s What to Do Next
It’s the end of the line for Ubuntu 24.10.
FOSS Weekly #25.29: End of Ubuntu 24.10, AUR Issue, Terminal Tips, Screenshot Editing and More Linux Stuff

🧠 What We’re Thinking About

AI slop in vulnerability reports submitted to curl is becoming a big issue.

Death by a thousand slops
I have previously blogged about the relatively new trend of AI slop in vulnerability reports submitted to curl and how it hurts and exhausts us. This trend does not seem to slow down. On the contrary, it seems that we have recently not only received more AI slop but also more human slop. The latter … Continue reading Death by a thousand slops →
FOSS Weekly #25.29: End of Ubuntu 24.10, AUR Issue, Terminal Tips, Screenshot Editing and More Linux Stuff

🧮 Linux Tips, Tutorials, and More

And learn a few things about using the terminal in this article. You might discover something new 😄

19 Basic But Essential Linux Terminal Tips You Must Know
Learn some small, basic but often ignored things about the terminal. With the small tips, you should be able to use the terminal with slightly more efficiency.
FOSS Weekly #25.29: End of Ubuntu 24.10, AUR Issue, Terminal Tips, Screenshot Editing and More Linux Stuff

Desktop Linux is mostly neglected by the industry but loved by the community. For the past 13 years, It's FOSS has been helping people use Linux on their personal computers. And we are now facing the existential threat from AI models stealing our content.

If you like what we do and would love to support our work, please become It's FOSS Plus member. It costs $24 a year (less than the cost of a burger meal each month) and you get an ad-free reading experience with the satisfaction of helping the desktop Linux community.

Join It's FOSS Plus

👷 Homelab and Hardware Corner

Commodore is back from the dead! Well, sort of. Someone has purchased the copyrights and launching new hardware for retro computing fans.

Commodore is Back from the Dead!
80s called, and they want you to know that you can pre-order the latest version of the Commodore.
FOSS Weekly #25.29: End of Ubuntu 24.10, AUR Issue, Terminal Tips, Screenshot Editing and More Linux Stuff

✨ Project Highlight

In the mood for listening to podcasts? Cozy is a nice Linux app for that.

Cozy: A Super Useful Open Source Audiobook Player for Linux
Cozy makes audiobook listening easy with simple controls and an intuitive interface.
FOSS Weekly #25.29: End of Ubuntu 24.10, AUR Issue, Terminal Tips, Screenshot Editing and More Linux Stuff

📽️ Videos I am Creating for You

I explored Gradia, the new screenshot tool everyone in Linuxverse is talking about.

🧩 Quiz Time

Today we have a fun quiz that will tell you what kind of Linux distribution you are.

Which Linux Distro Are You? [Fun Quiz]
You are a person, but still, you could match up with a distro.
FOSS Weekly #25.29: End of Ubuntu 24.10, AUR Issue, Terminal Tips, Screenshot Editing and More Linux Stuff

Are you good with Git? Prove it, or Git good (pun intended).

💡 Quick Handy Tip

On Dolphin file manager, you can quickly find specific files by enabling the filter bar with Ctrl+I or via Edit → Filter. Type text like .mp3 to show only matching files. Press Esc to hide the filter when done.

FOSS Weekly #25.29: End of Ubuntu 24.10, AUR Issue, Terminal Tips, Screenshot Editing and More Linux Stuff

🤣 Meme of the Week

FOSS Weekly #25.29: End of Ubuntu 24.10, AUR Issue, Terminal Tips, Screenshot Editing and More Linux Stuff

🗓️ Tech Trivia

The German Army began using the Enigma machine on July 15, 1928, to send secret messages. It looked like a typewriter but scrambled letters into code. Years later, Alan Turing helped figure out how to break it.

🧑‍🤝‍🧑 FOSSverse Corner

One of our FOSSers is proposing a monthly call for talking about Linux from Scratch, are you interested?

Linux from Source | Who’s up For a Discussion?
I’m considering the idea of possibly having a monthly meeting on Jitsi to discuss aspects of building Linux from source code. It would be somewhat similar to Linux from Scratch or BLFS. It would give members of the group a chance to talk to other people and discuss any issues they may have with building from source. Members could brainstorm what types of applications, configuration settings and/or features they would want in a custom built system. It would be an in depth way to learn more ab…
FOSS Weekly #25.29: End of Ubuntu 24.10, AUR Issue, Terminal Tips, Screenshot Editing and More Linux Stuff

As a member, you can now find sign-in link from the header menu. Makes logging in easier.

FOSS Weekly #25.29: End of Ubuntu 24.10, AUR Issue, Terminal Tips, Screenshot Editing and More Linux Stuff

❤️ With love

Please share it with your Linux-using friends and encourage them to subscribe (hint: it's here).

Share the articles in Linux Subreddits and community forums.

Follow us on Google News and stay updated in your News feed.

Opt for It's FOSS Plus membership and support us 🙏

Enjoy FOSS 😄



from It's FOSS https://ift.tt/ljyHCMt
via IFTTT

Unsure About the Future of Windsurf? Try These Alternative Vibe Coding Editors on Linux

Unsure About the Future of Windsurf? Try These Alternative Vibe Coding Editors on Linux

The rise of AI-powered coding tools has reshaped developer workflows worldwide. Interactive development environments are becoming more intelligent, adapting to how programmers work.

Microsoft is actively evolving VS Code into an AI-first IDE by integrating powerful language models and automation. Meanwhile, Amazon recently launched Kiro, aiming to simplify coding with a fresh approach.

Amidst all this, Windsurf, the most popular AI code editor out there, has found itself in murky waters, with its founders and top talent being poached by Google and its assets being quickly acquired by Cognition.

If all this has made you rethink using Windsurft, then you are not alone. With this list, I will be highlighting some of the most promising AI IDEs and developer tools available for Linux users.

🚧
This list includes both FOSS and non-FOSS apps. We included the latter as they are available for Linux.

1. Zed

Unsure About the Future of Windsurf? Try These Alternative Vibe Coding Editors on Linux

Zed is a fast, open source code editor built with Rust and designed for modern developer workflows. It supports Linux natively and aims for low latency, real-time collaboration features.

Besides core editing, Zed integrates with AI assistants like Copilot, Anthropic, and Gemini, letting you speed up coding with AI-powered completions and code analysis. It also includes native Git support and a built-in terminal for seamless development.

⭐ Key Features

  • Native Linux support
  • AI-powered code completions
  • Written in Rust for performance and safety

2. Cursor

Unsure About the Future of Windsurf? Try These Alternative Vibe Coding Editors on Linux

Cursor is a popular AI-powered code editor built as a fork of VS Code, designed to provide advanced AI-assisted coding features. It integrates AI models for multi-file code understanding, generation, and chat-based support.

Widely adopted by developers seeking a more intelligent IDE experience, Cursor supports Linux natively and offers seamless integration with common development workflows.

⭐ Key Features

  • Native Linux app with regular updates
  • VS Code fork with built-in AI capabilities
  • Advanced multi-file code understanding and generation

3. Flexpilot IDE

Unsure About the Future of Windsurf? Try These Alternative Vibe Coding Editors on Linux

Flexpilot IDE is a free, open source AI-native IDE that’s a fork of VS Code. It supports Linux and lets you choose your own LLM from providers like OpenAI, Anthropic, Google Gemini, Mistral, and local models via Ollama and LMStudio.

It offers features like inline completions, panel chat, multi-file edits, and AI-powered commit messages. Not only that, but it also supports extensions from the VS Code ecosystem, making it easy to adapt to existing workflows.

⭐ Key Features

  • Bring-your-own-LLM
  • Can be used inside a web browser
  • Uses native APis for great extension support
Flexpilot is an Open Source IDE for AI-Assisted Coding Experience 🚀
Flexpilot is almost like VS Code, only a bit better with built-in AI features. Learn why I created it and how you can use it.
Unsure About the Future of Windsurf? Try These Alternative Vibe Coding Editors on Linux

4. Kiro

Kiro is an AI-powered IDE developed by Amazon Web Services (AWS) that focuses on spec-driven development to help development teams quickly move from prototyping to production.

It is powered by Anthropic's Claude Sonnet 4, with Sonnet 3.7 as a backup option. Kiro is also built on an open source VS Code base, allowing it to leverage a solid foundation to support familiar workflows, seamless plugin compatibility, and effortless migration of user settings.

⭐ Key Features

  • Spec-driven development approach
  • Agent Hooks for automation
  • Support for MCP Servers

5. Tabby

Unsure About the Future of Windsurf? Try These Alternative Vibe Coding Editors on Linux

Tabby is an open source, self-hosted AI coding assistant designed to integrate seamlessly into development workflows. It offers features like code completion, an answer engine, and inline chat to help developers write and debug code more efficiently.

In addition to its technical capabilities, Tabby prioritizes transparency and data control.

By enabling users to deploy the assistant on their own local infrastructure or private cloud, Tabby allows organizations and individuals to maintain complete ownership of their code and sensitive information.

⭐ Key Features

  • Self hosted, open source solution
  • AI-powered code completion and contextual suggestions
  • Integrated answer engine and inline chat for quick answers

6. Claudia

Unsure About the Future of Windsurf? Try These Alternative Vibe Coding Editors on Linux

Claudia is a GUI-based toolkit for Claude Code AI development built as a desktop app. It is designed to make working with Claude-powered code assistants approachable and efficient for developers.

It includes essential tools like a visual project browser for organizing sessions with metadata and previews, custom AI agent creation using tailored system prompts, and a session timeline with checkpoints that allow users to branch, save, and review past work using visual diffs.

⭐ Key Features

  • Detailed usage analytics view
  • GUI for Claude Code AI development
  • Built-in tools for creating and editing custom AI agents

7. Warp

Unsure About the Future of Windsurf? Try These Alternative Vibe Coding Editors on Linux

Warp (partner link) is a modern terminal built for teams, designed to improve developer productivity with a powerful and collaborative command-line experience.

Unlike traditional terminals, Warp provides a fast, native UI built in Rust and introduces features like input blocks, autocomplete, and AI command suggestions to streamline workflows and reduce context switching.

It includes built-in support for team collaboration, allowing users to share commands, access reusable workflows, and leverage AI assistance directly in the terminal.

While it was initially focused on the deployments and devops part, with Warp 2.0, it gives you the ability to code directly in the terminal.

⭐ Key Features

  • Fast, native terminal
  • Many collaborative features for teams
  • Command palette and AI auto-completion

8. Tabnine

Tabnine is an AI-powered code completion assistant designed to accelerate and simplify software development while keeping your code private, secure, and compliant. It offers highly personalized, context-aware code completions for snippets, lines, and full functions.

Unlike other coding assistants, Tabnine lets you control where and how it’s deployed, whether SaaS, VPC, or on-premise. This ensures that your intellectual property remains protected without storing or sharing your code externally.

⭐ Key Features

  • Protection from IP liability
  • AI-powered chat assistant to generate code
  • Context-aware AI code completions

Which vibe coding IDE do you think is a worthy Windsurf replacement? Share it in the comments.



from It's FOSS https://ift.tt/haQBkTA
via IFTTT

Senin, 14 Juli 2025

The Curious Case of AUR Updates Fetching 30 GB of Data for Electron

The Curious Case of AUR Updates Fetching 30 GB of Data for Electron

I am using CachyOS on my primary system these days and pretty content with its performance.

Since it is based on Arch Linux, I am using a few software installed from the Arch User Repository (AUR) with Yay AUR Helper.

While updating, it showed me a few packages that required upgrades.

The Curious Case of AUR Updates Fetching 30 GB of Data for Electron

I did not pay attention as there was nothing alarming and pressed the usual enter keys one after another.

Only when it reached a certain stage that I realized that it was taking a lot longer to install these updates. I paid close attention at this stage and noticed an issue.

It was trying to download GBs of data for Electron.

The Curious Case of AUR Updates Fetching 30 GB of Data for Electron
More than 25GB of updates? That's not usual
Since it was fetching electron version 32, getting the binary from AUR itself easily fixed the issue:

yay -S electron32-bin

But there is more to it that I would like to discuss.

What's going on here?

In simpler terms, Elecron is a JavScript framework that builds a graphical interface of an application on top of the Chromium web browser. From VS Code to Discord, tons of popular applications are built on Electron.

When you run these applications, you are basically running a web browser underneath, and not everyone likes that. But it is easier to package an application, and the interface looks modern, and that's why it is popular.

Anyways, it is the functioning of AUR that complicates the issue here. It tries to build all the dependencies of a package.

It seems like at some point in the past, I just pressed enter keys without paying attention and somehow the AUR system thought that it needed to download a specific version of electron as a dependency.

The next problematic thing is that since it tries to build the package from source, it tries to get the entire source code of the Chromium project, which is in GBs.

What should you do in such case?

🚧
I am using electron32 in the example here. Your electron version might be different and thus, you MUST change the commands in the examples here to reflect the correct electron version.

First check what goes on with the troubled electron version. Where was it installed from and which packages require it?

pacman -Qi electron32

It gave me two interesting details. Electron32 came from the 'Extra' (cachyos-extra) repository and it was not required by any packages, not even as an optional dependency.

The Curious Case of AUR Updates Fetching 30 GB of Data for Electron

This was interesting and gave me the idea that perhaps it was of no use getting electron's other version using AUR. So, what I did was to exclude electron from the AUR update.

The Curious Case of AUR Updates Fetching 30 GB of Data for Electron
I entered 4 here to exclude electron from the update

And as I had guessed, rest of the three packages were updated without any issues. I wonder why AUR wanted to get it in the first place.

But your case might not be as smooth as mine and you may actually need to get the electron version it needs. But downloading 30GB of update is surely not the way forward.

Instead of getting the entire source code and then building the binaries from it, you can directly install the binary itself.

So, if it was complaining about elctron32 in my case, I would get the binary in this manner:

yay -S electron32-bin

And as you can see in the image below, it only needed a package of around 100 MB.

The Curious Case of AUR Updates Fetching 30 GB of Data for Electron

I did this for demonstration purpose and since I had an existing electron version from another source, it showed me a potential conflict and asked me to remove the existing electron version.

The Curious Case of AUR Updates Fetching 30 GB of Data for Electron

Once that was done, it installed the electron32-bin package successfully.

Summary

When you are in a situation where AUR is downloading GBs of electron/chromium source code, you should do this:

  • See if you can exclude electron from the AUR update and the rest goes fine.
  • Otherwise, install the binary of the required electron version instead of getting the source code.

Hope this helps some of you awesome readers 😸



from It's FOSS https://ift.tt/Qx63blS
via IFTTT