πŸ”’
❌
Es gibt neue verfΓΌgbare Artikel. Klicken Sie, um die Seite zu aktualisieren.
Heute β€” 11. Januar 2026Haupt-Feeds

I Thought This Wikipedia App for Linux was Pointless (I Was Wrong)

08. Januar 2026 um 04:05
Von: Sreenath


I don't need to tell you that this application is for the people who enjoy the free and open knowledge provided by Wikipedia.

Γ„ltere BeitrΓ€geHaupt-Feeds

How I Configure Polybar to Customize My Linux Desktop

22. September 2025 um 13:33
Von: Sreenath
How I Configure Polybar to Customize My Linux Desktop

Most major Linux desktop environments like GNOME, KDE Plasma, and Xfce come with their own built-in panels for launching apps, switching workspaces, and keeping track of what’s happening on your system.

How I Configure Polybar to Customize My Linux Desktop
Example of top panel in Xfce

One of the best things about Linux is the freedom to customize, and there are plenty of alternatives out there if you want something more flexible or visually appealing for your panel.

Polybar is a standout choice among these alternatives. It’s a fast, highly customizable status bar that not only looks great but is also easy to configure.

If you’re running an X11-based setup, such as the i3 window manager or even Xfce, Polybar can really elevate the look of your desktop, help you keep essential info at your fingertips, and make better use of your screen space.

How I Configure Polybar to Customize My Linux Desktop
Example of Polybar in Xfce

We used Polybar in our Xfce customization video and this is from where we got the idea to do a detailed tutorial on it.

In this guide, we’ll build a sleek Polybar panel just like the one featured in our Xfce customization video above. Along the way, you’ll get a solid introduction to the basics of Polybar customization to help you tailor the panel to your own style and workflow.

🚧
This article is not trying to take over the place of Polybar Wiki. You can and should read the wiki while customizing Polybar. This article tries to act as a helper companion for beginners to get started.

Installing Polybar

πŸ’‘
Most tweaks here are done through the config file at user level. If you get easily overwhelmed and don't like to troubleshoot and fix much, you should probably create a new user account. Or, you could try these things in a fresh system on a VM or on a spare machine. This way, you won't impact your main system. Just a suggestion.

Polybar is a popular project and is available in the official repositories of most major Linux distributions, including Ubuntu, Debian, Arch Linux, Fedora, etc.

If you are a Debian/Ubuntu user, use:

sudo apt install polybar

For Arch Linux users,

sudo pacman -S polybar

In Fedora Linux, use the command:

sudo dnf install polybar

Once you install Polybar, you can actually use it with the default config by using the command:

polybar

Add it to the list of autostart applications to make the bar automatically start at system login.

Initial configuration setups

Let's say you don't want the default config and you want to start from scratch.

First, make a directory called polybar in your ~/.config directory.

mkdir -p ~/.config/polybar

And then create a config file called config.ini for Polybar in this location.

touch config.ini

Now, you have an empty config file. It's time to 'code'.

Config file structure

Polybar config file has a structure that makes things works easier and cleaner.

The whole config can be divided broadly intro four parts.

  • Colors: Define the colors to use across polybar
  • Bar: Define the properties of the whole bar.
  • Modules: Individual bar modules are defined here.
  • Scripts: This is not inside the config, but external shell and other scripts that enhance the Polybar functionality.

Define the colors

Let me share how I am customizing my desktop Linux with the awesome Polybar. This could work as a beginner's guide to understanding Polybar configuration.It is not convinient to write all the colors in hex code separately. While this is good during rough coding, it will create headaches later on, when you want to change colors in bulk.

You can define a set of general colors in the beginning to make things easier.

See an example here:

[colors]
background = #282A2E
window-background = #DE282A2E
background-alt = #373B41
border-color = #0027A1B9
foreground = #C5C8C6
primary = #88c0d0
secondary = #8ABEB7
alert = #A54242
disabled = #707880
aurora-blue = #27A1B9
aurora-orange = #FF9535
aurora-yellow = #FFFDBB
aurora-green = #53E8D4
aurora-violet = #8921C2
nord-background = #4c566a

The common definition syntax is explained above. Now, to refer to any color in the list, you can use:

key = ${colors.colorvariable}

For example, if you want to set the foreground color in a module, you will use:

foreground = ${colors.foreground}
πŸ’‘
If you intend to change the entire color palette of the bar, all you have to do is create a new color palette and paste it in the config. No need to change individual colors of all modules and sub-items.

Setting the bar

In simple words, this is the panel appearing in the bar. The one that contains all other modules.

Polybar allows you to have multiple bars. Perhaps that's the reason why it is called 'polybar'. These bars can be named separately in the config file, with their own set of modules.

The bar is placed, defined with the syntax:

[bar/<barname>]
option = value
option = value


[bar/<barname2>]
option = value
option = value

Let’s say I am creating a top bar and a bottom bar, my simple syntax will be:

[bar/mytopbar]
options = values

[bar/mybottombar]
options = value

There will be plenty of options and values to use that you will see later in this tutorial.

Now, if you want to open only the top bar, use:

polybar mytopbar

Configure the bar

You have seen the general syntax of the bar that mentions options and values. Now, let’s see some options.

I am giving you a code block below, and will explain with the help of that.

monitor = HDMI-1
width = 100%
height = 20pt
radius = 5
fixed-center = true
background = ${colors.window-background}
foreground = ${colors.foreground}
line-size = 3pt
border-size = 2.5pt
border-color = ${colors.border-color}
padding-left = 0
padding-right = 0
module-margin = 1
separator = "|"
separator-foreground = ${colors.disabled}
font-0 = "JetBrains Mono:size=10;3"
font-1 = monospace;2
font-2 = "FiraCode Nerd Font:size=11;2"
font-3 = "Symbols Nerd Font:size=20;4"
modules-left = mymenu ewmh
modules-center = date temperature pacupdate
modules-right = pulseaudio memory cpu eth magic-click sessionLogout
enable-ipc = true

The main options that you may take a closer look are:

  • monitor: As the name suggests, this decides on which monitor you want the Polybar. Use the xrandr command to get the name of the display. If you are using a multi-monitor setup, you can define a second bar, placing it on the second monitor and so on.
  • separator: This is the separator used to separate the modules appearing in Polybar. You can use any item here, including Nerd font items (given the nerd font is installed on the system.).
  • font-n: These are fonts to be used in the bar. The number corresponding refers to fallback fonts. That is, if the one mentioned first is not available, the other is used. Take special care to the Nerd fonts we have set at font-2 and font-3. This will be explained in a later section.
  • modules-left, modules-center, modules-right: Keys used to arrange the modules in the bar. Place the module names on any of this section, then that appears in that part of the bar.
  • enable-ipc: Enable Inter-process communication. This allows scripts or external apps to send commands (like module updates or bar reloads) to Polybar in real time.

The above-mentioned options are enough for a working bar. The rest are mostly self-explanatory. You can read more about other options and more help from the official wiki of Polybar.

Modules

Now that you have placed the bar, it's time to start adding the items.

If you have looked at the above piece of script, you would have noticed that there are some entries in the modules-left, modules-center, and modules-right keys. They are mymenu ewmh, date temperature pacupdate, and pulseaudio memory cpu eth magic-click sessionLogout respectively.

These are calling modules to the bar and placing them in the required position.

In order to call them to the bar, they need to be defined; like what to display at that position. So, our next part is defining the modules.

The general syntax for a module will be

[module/MY_MODULE_NAME]
type = MODULE_TYPE
option1 = value1
option2 = value2
...

Here, MY_MODULE_NAME can be found on the Polybar Wiki, that explains modules. For example, refer to the CPU module wiki in Polybar.

How I Configure Polybar to Customize My Linux Desktop
Getting Module Name

The type here will be:

type = internal/cpu
🚧
I will be using several modules here, that will create a fine panel for a beginner. You should read the wiki for more modules and customizations as required for your needs.

Add Workspaces

Workspaces is a great way to increase productivity by avoiding cluttered windows in front of you. In Polybar, we will be using the emwh module to get workspaces in the panel.

Let's see a sample config:

[module/ewmh]
type = internal/xworkspaces
icon-0 = 1;
icon-1 = 2;󰚒
icon-2 = 3;
icon-3 = 4;ξ°•
icon-4 = 5;
icon-5 = 6;
icon-6 = 7;
icon-7 = 8;ο“˜
icon-8 = 9;ο„œ
icon-9 = 10;
format = <label-state>
format-font = 2
#group-by-monitor = false
#pin-workspaces = false
label-active = %icon%
label-active-background = ${colors.background-alt}
label-active-forground = #00000000
label-active-padding = 2
label-occupied = %icon%
label-occupied-padding = 1
label-urgent = %icon%
label-urgent-background = ${colors.primary}
label-urgent-padding = 1
label-empty = %icon%
label-empty-foreground = ${colors.disabled}
label-empty-padding = 1

We have already seen what type is in the previous section.

In workspaces, you should be able to see icons/numbers for each workspace. These icons are defined in the icon-n key. The n here corresponds to the workspace number.

For desktops like Xfce, the number of workspaces available is managed by the desktop. So, if you are adding icons for 5 workspaces, make sure you have created 5 workspaces in the system settings.

For example, in Xfce, you can search for Virtual Desktops in the menu and set the number of workspaces available in the system.

The format options tells the bar what to show for which workspace. We have set it as label-state. This means, we will define some states (active, empty, occupied, urgent) for the workspaces and the display will be according to that.

The format-font = 3 tells the polybar to use which font. Here, I have specified 3, that will refer to font-3 defined in the bar section. That is Symbols Nerd Font:size=20;4. Since I have pasted the nerd font logo from nerd fonts, this will be better to display them properly.

Look at the code below:

label-active = %icon%
label-active-background = ${colors.background-alt}
label-active-forground = #00000000
label-active-padding = 2

This sets the value %icon% when the workspace is active. When Polybar sees the %icon%, it will swap this with the icons defined above. That is icon-N. The rest options are visual changes for each of the state, like background color, foreground color, etc.

If you are using nerd fonts for this, these fonts will change their color according to the set foreground color.

Similar is done as needed for other states like empty, urgent, etc. It is up to your creativity to assign what values to these states to make it visually pleasing.

0:00
/0:06

Switch Workspaces in Polybar

What is the time now?

A panel without a date is useless! Let's add a date block to Polybar.

The type we use for a date module is:

type = internal/date

We need to format it, so that it looks better. So, take a look at the sample code below:

[module/date]
type = internal/date
interval = 1.0
time = %I:%M %p
date = %d-%m-%Y
date-alt = "%{F#FF9535}%Y-%m-%d %I:%M:%S %p%{F-}"
label = %date% %time%
label-font = 5
label-foreground = ${colors.aurora-yellow}
format = 󱑂 <label>
format-prefix-font = 2

First is the refresh rate. We set the click to refresh every second with the interval = 1.0. The value is in seconds.

Next, define what to show with the time key. It has to be in a format strftime. You can read the full format specification in the man page here.

For now, we are using the format %I:%M %p, that will show the time as 12:30 PM.

We are going a bit further to show you that there are more with date module.

Use the date key to set the date format. I am using the format %d-%m-%Y, which will output 25-07-2025.

The date-alt key can be used to show another date format when you click on the date module in the bar.

πŸ’‘
You can remember like this; if there is anΒ altΒ in the name of a key, then it define an action that is available upon clicking that module.

The syntax %{F#RRGGBB} in Polybar is used to set the foreground color dynamically within the module’s label or format string. This is like <span> tag in the HTML codes.

So this will tell Polybar β€œfrom here on, use this foreground (text) color,” and once the %{F-} is spotted, reset it to general flow, or what was before.

So, according to the code, when we click on the date module, it will show the detailed date format as %Y-%m-%d %I:%M:%S %p, which in real world, 2025-07-25 12:30:25 PM.

0:00
/0:07

Showing date in Polybar with an alternate format

The label = %date% %time%, make sure the bar will show date and time properly.

The format = 󱑂 <label> will show the date with a preceding nerd font icon.

It is in the format key, you add icons/glyphs to appear on the bar most of the time.

How do I change the volume?

Most common way to change the volume in most system is to scroll on the volume button on panel. This is possible with Polybar as well.

Let's see a code for the module:

[module/pulseaudio]
type = internal/pulseaudio
format-volume-prefix-foreground = ${colors.primary}
format-volume = <label-volume> <ramp-volume>
label-volume = %percentage%%
use-ui-max = false
click-right = pavucontrol
label-muted = " Mute"
label-muted-foreground = ${colors.disabled}
format-muted = <label-muted>
format-muted-prefix = 󰝟
format-muted-prefix-font = 2
format-muted-padding = 1

; Ramp settings using <ramp-volume> used for Pulseaudio
ramp-volume-0 = 󰝟
ramp-volume-1 = ▁
ramp-volume-2 = β–‚
ramp-volume-3 = β–ƒ
ramp-volume-4 = β–„
ramp-volume-5 = β–…
ramp-volume-6 = β–†
ramp-volume-7 = β–‡
ramp-volume-8 = β–ˆ
ramp-volume-font = 2

As you expected, type = internal/pulseaudio is the module type.

The next entry to look is format-volume. Here, we see a new item called <ramp-volume>. And if you look further down the code, you can see I have defined 9 levels (0 to 8) of ramp.

This ramp-<item> is available in some other module also. So, understanding it here is better to use them as required. For example, the cpu module give a ramp-coreload, memory module gives ramp-used and ramp-free, etc.

It shows a visual volume indicator (like volume bars or icons) depending on the number of ramp levels. For example, in the above volume, the 100% volume level is divided into 9 equal ranges. So, when the volume is increased, an appropriate bar is shown.

0:00
/0:10

Change the volume with ramps

Another useful options are the mouse-click items. Generally, you have three of them available:

  • click-left
  • click-middle
  • click-right

It is not limited to pulseaudio, you can use it in some other modules also. For that, refer to the wiki page.

Tray

Many apps needs an active tray module to work. Discord, Spotify, Ksnip, Flameshot, all provides a close to tray option as well.

In Polybar, you will be using the tray module for this purpose.

[module/tray]
type = internal/tray

format-margin = 8px
tray-spacing = 8px

It has several option you can try, in the official wiki. Rewriting them here is not an efficient way, since a bare module serves most purposes.

🚧
In Linux systems, only one panel can take the tray. So, you only needed to add it in one tray. Similarly, in Xfce and other distros, which by default offers a panel with tray, using theΒ trayΒ module will not work properly.

Scripts and Custom Module

This is not the scope of this article to explain bash shell scripts/ python scripts. But we will see custom modules in Polybar, that you can use to extend the function to next level.

But, with Polybar, you can create shell scripts and then use it at places in modules. For example, take a look at the code below, that defines a custom module to show any package update available in Arch Linux:

[module/pacupdate]
type = custom/script
exec = /home/$USER/.config/polybar/pacupdates.sh
interval = 1000
label = %output%
format-font = 3
click-left = notify-send "Updates:" "$(checkupdates)"

As you can see, I got the type as custom/script from the wiki for scripts.

Check the exec field. It points what to execute in the module. This can either be a simple command or point to the path to a script. Here, I pointed it to a script called pacupdates located on my ~/.config/polybar/ directory.

The contents of the script is available in our GitHub repo. What it does is check and tell whether any package update is available.

0:00
/0:06

A custom script that will print what updates is available in the system when clicked on it

This is not an in-built module in Polybar. We have created it. With that, let's see a general syntax for custom modules:

[module/MODULE_NAME]
type = custom/script
exec = COMMAND_OR_SCRIPT_PATH
interval = SECONDS
label = %output%
format = <label>
format-prefix = "ICON_OR_TEXT "
format-prefix-font = FONT_INDEX
click-left = COMMAND_ON_LEFT_CLICK
click-right = COMMAND_ON_RIGHT_CLICK
click-middle = COMMAND_ON_MIDDLE_CLICK

The %output% value to the label (if you remember, you have seen %icon% earlier) refers to the output of the exec field.

We have seen other values in various other sections above.

Before we finish, take a look at one more custom module example, which when clicked opens rofi:

[module/mymenu]
type = custom/text
format = <label>
format-padding = 2
label = "%{F#1A1B26}ξ‰Ώ  Menu%{F-}"
click-left = /home/sreenathv/.config/polybar/rofi.sh
format-background = ${colors.aurora-blue}
How I Configure Polybar to Customize My Linux Desktop
Menu Button (Click to enlarge the image)

Do not forget to add these to the tray after defined otherwise they won't appear.

Wrapping Up

Apart from the modules we discussed, there are many other modules that you can use. We have provided a ready to use Polybar config with several scripts in out GitHub page.

Take a look at the lines on code in that files and get a better grasp of Polybar config.

I hope you liked this detailed guide to Polybar customization. If you have any questions or suggestions, please leave a comment and I'll be happy to answer them.

14 Themes for Beautifying Your Ghostty Terminal

08. September 2025 um 04:42
Von: Sreenath
14 Themes for Beautifying Your Ghostty Terminal

Ghostty has recently emerged as a highly popular terminal emulator, gaining a strong following among developers and power users alike. This rapid rise can be attributed to its impressive performance and a rich feature set, like leveraging GPU acceleration for incredibly fast rendering and a smooth user experience, even with demanding tasks.

Performance is one thing. Ghostty also comes with a comprehensive theming system, offering a vast collection of built-in themes, which can also be previewed even before you apply them. That's cool. That's a really cool feature.

After fiddling with Kitty terminal, I am exploring Ghostty terminal these days and decided to share some of my exploits on It's FOSS.

And hence this article, where I'll show how you can change themes in the Ghostty terminal, even the external ones. Later, I'll share some of my favorite Ghostty themes that will make your terminal both aesthetically pleasing and extremely readable.

But first, learn to preview a theme in Ghostty

Ghostty has a neat theme preview system built-in. Open the terminal and run:

ghostty +list-themes

This opens the theme preview, from which you can note the name of a theme you like. You cannot set a theme from here but if you have the name, you can use it in the config as I show in the next section.

0:00
/0:13

Use the / key to start a search. Press Ctrl+C to close the theme preview.

πŸ’‘
you can also use another terminal emulator to preview Ghostty themes.

Next, learn to change themes in Ghostty

Ghostty has relatively straight-forward text-based configuration. All you need is a configuration file called config at ~/.config/ghostty.

Create this file if it does not exist.

mkdir -p ~/.config/ghostty
nano ~/.config/ghostty/config

Add the name of the theme of your choice in the following manner:

theme = "<name-of-the-theme>"

Save the file. Restart the Ghostty terminal to see the theme effect.

Quotes are needed for themes that have spaces in their names. An example:

theme = "Apple Classic"

Let's see it in action where I change the Ghostty theme to Apple Classic.

0:00
/0:21
πŸ’‘
You can also set light and dark theme choices so that it changes with your system theme:

theme = dark:ayu,light:ayu_light

What about external themes?

Didn't spot the theme of your choice in Ghostty built-in? You can download a color scheme of your choice or create one from scratch!

The condition is that the theme files should be present in the ~/.config/ghostty/themes directory.

Once the theme file is placed in its location, open the Ghostty config file and add the line in the same manner:

theme = "<theme-file-name>"
🚧
Avoid using external theme configs file blindly. Because, themes can modify any Ghostty options.

Restoring the default theme

Don't like the theme you changed to and want to go back to the original default theme instead of trying random themes until you find a suitable one? All you have to do is to revert the changes you made earlier.

How do you do that? Just remove the theme = theme-name from the ~/.config/ghostty/config file. Or, just comment it out by adding # in front of that line.

Cool Ghostty Themes

Now that you are familiar with the basics, let's see some cool Ghostty themes I like and perhaps you can give them a try.

1. Monokai Classic

Monokai Classic is a visually pleasing color scheme that is pretty popular among developers. If you like colored terminals with syntax highlighting and fun Linux tools such as eza, Monokai Classic is a must-checkout theme.

14 Themes for Beautifying Your Ghostty Terminal
Monokai Classic

Theme code:

theme = "Monokai Classic"

2. Monokai Pro

Yes, when it comes to standout colors, Monokai variants just excel. No wonder developers often use these themes frequently. Monokai Pro is an enhanced version of the classic Monokai theme with refined colors and improved contrast for professional development work.

14 Themes for Beautifying Your Ghostty Terminal
Monokai Pro

Theme code:

theme = "Monokai Pro"

3. ayu

A minimalist dark theme with subtle red and blue accents, designed for extended coding sessions with reduced eye strain. If you use prompts like Starship or tools like Ohmyzsh, this theme does a pretty good job with the colors.

14 Themes for Beautifying Your Ghostty Terminal
ayu

Theme code:

theme = ayu

4. GitHub Dark Default

For those who use GitHub so often and love the default color schemes used in GitHub, this is a nice choice to consider. The scheme focuses on better contrast, and the dark mode blends pretty neatly with the rest of the colors.

14 Themes for Beautifying Your Ghostty Terminal
GitHub Dark Default

Theme code:

theme = GitHub-Dark-Default

5. Catppuccin Mocha

Who doesn't love the Catppuccin themes? What makes Catppuccin special is its consistency across development tools; you can theme your entire workflow with matching colors, creating a cohesive and calming development environment.

In Ghostty, you can install this theme with just one line in your config.

If you are using Starship, go for the Catppuccin Mocha preset.

14 Themes for Beautifying Your Ghostty Terminal
Catppuccin Mocha

Theme code:

theme = catppuccin-mocha

6. Desert

Desert is not a super dark theme; it is more like a warm dark theme with a matching color palette. You still get pretty neat contrast colors for better syntax highlighting and readability. The Starship Gruvbox prompt theme is a perfect prompt match for this theme.

14 Themes for Beautifying Your Ghostty Terminal
Desert

Theme code:

theme = Desert

7. Nordfox

Nord theme has a special fan following! Like Catppuccin, the Nord color scheme also has a wide presence across many tools. So, if you are one looking to build a unique work environment, Nordfox is an interesting choice.

14 Themes for Beautifying Your Ghostty Terminal
Nordfox

Theme code:

theme = nordfox

8. Adwaita Dark

If you are a GNOME user, this can be the best theme to choose for a cohesive desktop experience. Given you like Vanilla GNOME, this theme will match your system perfectly and look consistent across all your applications.

14 Themes for Beautifying Your Ghostty Terminal
Adwaita Dark

Theme code:

theme = "Adwaita Dark"

9. Synthwave

A fun, dark theme with some bright neon color palettes. It's perfect if you want your terminal to look cool while coding games or creative projects.

14 Themes for Beautifying Your Ghostty Terminal
Synthwave

Theme code:

theme = synthwave

10. Ayu Light

The light version of the ayu theme. It has clean whites and soft colors that work well in bright rooms or during daytime coding.

14 Themes for Beautifying Your Ghostty Terminal
ayu_light

Theme code:

theme = ayu_light

11. Primary

A simple, clean light theme focused on clarity. It's great for reading documentation or any work where you need crystal-clear text. It is challenging to create a perfectly read-friendly light theme, and Primary has done a fantastic job with the color choices.

14 Themes for Beautifying Your Ghostty Terminal
primary

Theme code:

theme = primary

12. Tinacious Design Light

This is some creative color choice to select. Especially the blue ones, which, if not chosen correctly, can easily make text unreadable in a white background. But this theme has all done well with the colors. It should be one of the choices for bright theme lovers!

14 Themes for Beautifying Your Ghostty Terminal
Tinacious Design (Light)

Theme code:

theme = "Tinacious Design (Light)"

13. Catppuccin Latte

Light or dark, Catppuccin is unavoidable. Latte is the only light theme variant from Catppuccin, and to me, this appears to have more identifiable colors than the dark one. Each color is perfectly visible in all cases. I suggest you use the Catppuccin starship preset theme along with this for a proper terminal experience.

14 Themes for Beautifying Your Ghostty Terminal
Catppuccin Latte

Theme code:

theme = catppuccin-latte

14. One Half Light

A balanced light theme that's bright but not harsh. The colors are chosen carefully so you can read for long periods without eye strain.

14 Themes for Beautifying Your Ghostty Terminal
OneHalfLight

Theme code:

theme = OneHalfLight

Wrapping Up

Ghostty provides plenty of built-in themes, as you can see from the first section. You can set any theme, even a custom-designed one.

Most of the themes provided by Ghostty are beautiful-looking, and if you scroll through them one at a time, you can find some eccentric color choices as well!

If you are a Kitty user, you may recall the kitten themes command to get a similar interactive theme selector. But, in Kitty, you can easily press enter on a theme to modify the config and apply the theme. That handy feature is absent here, unfortunately.

I let you experiment with Ghostty themes and if you are interested, you can also explore some beautiful themes for VS Code 😸

Adding Grouped Items in Waybar

17. Januar 2025 um 04:37
Von: Sreenath
Adding Grouped Items in Waybar

Waybar is the perfect top panel program for Wayland systems like Hyprland, Sway, etc.

It offers many built-in modules and also allows the user to create custom modules to fill the panel.

We have already discussed how to configure Waybar in a previous tutorial.

πŸ“‹
I recommend you to go through the article first. It should make things easy to understand as you read on.

In this article, let's learn some eye-candy tricks to make your Hyprland user experience even better.

0:00
/0:11

Hardware Groups with Waybar with group module.

Grouping modules in Waybar

Those who went through the wiki pages of Waybar, may have seen a module called group. Unlike other modules (memory, cpu, etc.), this group module allows you to embed more pre-built modules inside it.

This is shown in the above video.

So, what we are doing here is grouping related (or even unrelated, as you like) modules inside a group.

Writing a sample group module

Usually, all modules should be defined and then called in the top bar on respective places as you require.

This is applicable to the group as well. Let's make one:

Step 1: Start with framework

First, define the group with a name and the structure:

"group/<groupname>": {
	----,
	----
}

The group module definition should be wrapped between the parentheses.

For example, I am creating a group called hardware to place CPU, RAM (memory), and Temperature modules.

🚧
The modules like cpu, memory, etc., that we need to add to a group should be defined separately outside the group definition. These definitions are explained in the Waybar article.

So, I will start the group definition at the end of my ~/.config/waybar/config.jsonc file:

"group/hardware": {
	----,
	----
}
🚧
In the JSONC files, never forget to add a comma to the end of previous module (},), if it is not the last item.

Step 2: Add an orientation

You already know that Waybar allows you to place the bar on the top, bottom, left, or right of the screen. This means, you can place your bar either vertically (left/right) or horizontally (top/bottom).

Therefore, you may need to specify an orientation for the group items using the key orientation.

"group/hardware": {
	"oreintation": "horizontal",
}

I am using a bar configured to appear at the top of the screen. Therefore, I chose β€œhorizontal” orientation. The value for orientation can be horizontal, vertical, orthogonal, or inherit.

Step 3: Add a drawer effect

With orientation set, let's make the groups a bit neat by hiding all items except one.

The interesting part is, when you hover over this unhidden item, the rest of the modules inside the group will come out with a nice effect. It is like collapsing the items at once under one of the items, and then expanding.

The keyword we use in the configuration here is β€œdrawer”.

"group/hardware": {
	"oreintation": "horizontal",
	"drawer": {
		---
	},
}

Inside the drawer, we can set the transition duration, motion, etc. Let's go minimal, with only setting the transition duration and transition motion.

"group/hardware": {
	"oreintation": "horizontal"
	"drawer": {
		"transition-duration": 500,
		"transition-left-to-right": false
	},
}

If we set the transition-left-to-right key to false, the first item in the list of modules (that we will add in the next section) will stay there, and the rest is expanded.

Likewise, if left to default (true), the first item and the rest will all draw out.

Step 4: Add the modules

It's time to add the modules that we want to appear inside the group.

"group/hardware": {
	"oreintation": "horizontal",
	"drawer": {
		"transition-duration": 500,
		"transition-left-to-right": false
	},
	"modules": [
		"custom/hardware-wrap",
		"cpu",
		"memory"
		"temperature"
	]
}

Here, in the above snippet, we have created four modules to appear inside the group hardware.

πŸ“‹
The first item inside the module key will be the one visible. The subsequent items will be hidden and will only appear when hovered over the first item.

As said earlier, we need to define all the modules appearing inside the group as regular Waybar modules.

Here, we will define a custom module called custom/hardware-wrap, just to hold a place for the Hardware section.

So, outside the group module definition parenthesis, use the following code:

"custom/hardware-wrap": {
	"format": Hardware
	"tooltip-format": "Hardware group"
} 

So, when "custom/hardware-wrap" is placed inside the group module as the first item, only that will be visible, hiding the rest (cpu, memory, and temperature in this case.).

Step 5: Simple CSS for the custom module

Let's add a CSS for the custom module that we have added. Go inside the ~/.conf/waybar/style.css file and add the lines:

#custom-hardware-wrap {
     box-shadow: none;
     background: #202131;
         text-shadow: none;
     padding: 0px;
     border-radius: 5px;
     margin-top: 3px;
     margin-bottom: 3px;
     margin-right: 6px;
     margin-left: 6px;
     padding-right: 4px;
     padding-left: 4px;
     color: #98C379;
}

Step 6: Add it to the panel

Now that we have designed and styled the group, let's add it to the panel.

We know that in Waybar, we have modules-left, modules-center, and modules-right to align elements in the panel.

Let's place the new Hardware group to the right side of the panel.

"modules-right": ["group/hardware", "pulseaudio", "tray"],

In the above code inside the ~/.config/waybar/config.jsonc, you can see that, I have placed the group/hardware on the right along with PulseAudio and system tray.

Adding Grouped Items in Waybar
Hardware Group Collapsed
Adding Grouped Items in Waybar
Hardware Group Expanded

Wrapping Up

Grouping items is a handy trick, since it can create some space to place other items and make the top bar organized.

If you are curious, you can take a look at the drawer snippet given in the group page of Waybar wiki. You can explore some more customizations like adding a power menu button.

Taking Screenshots in Hyprland

16. Januar 2025 um 15:06
Von: Sreenath
Taking Screenshots in Hyprland

Hyprland is a highly customizable Wayland tiling compositor known for its eye-catching aesthetics and impressive performance. With such a high degree of customization, one important feature that many users seek is the ability to take screenshots.

Whether for sharing on social media or saving essential screen details for future reference, capturing your screen is an essential task.

In this article, we will explore various methods to set up screenshot functionality on your Hyprland installation.

First Option: Grimblast

Grimblast is an official Hyprland screenshot utility offering various options.

It is a shell script, that uses tools like grim and slurp to take screenshots.

Installing Grimblast

Before installing Grimblast, we need to get the required dependencies. On Arch Linux, use the following command:

sudo pacman -Syu jq grim slurp wl-clipboard libnotitfy hyprpicker
πŸ“‹
For other distributions, you should check the official program pages for installation instructions.

Grimblast is not available in the package manager of applications. To install, first go to the official repo of the project and go to the grimblast folder.

Taking Screenshots in Hyprland
Click on grimblast

Here, go to the script file 'grimblast' and click on it to access.

Taking Screenshots in Hyprland
Click on grimblast script file

Here, click on the download icon on the top-right corner of the code page to start downloading it.

Taking Screenshots in Hyprland
Download grimblast script
πŸ“‹
You should keep an eye on the project for updates/commits.

Once downloaded, go to the download location and give it execution permission.

chmod +x ./grimblast

Now, copy the file to a directory that is in your PATH.

sudo cp ./grimblast /usr/local/bin/

Using Grimblast

Grimblast has several useful options. We will be taking a look at some items in the table below:

Command Description
grimblast save active Save the screenshot of active window
grimblast save area Save the screenshot of a rectangular area selectable with mouse.
grimblast --notify copy active|area|output|screen Take the screenshot of respective area and copy it to clipboard and notify the user.
grimblast --cursor copysave area Copy the screenshot of the selected window area along with cursor to the clipboard. Also save the image to Pictures directory.

Grimblast supports the following area of screenshots:

  • active: Current active window.
  • screen: All visible outputs.
  • output: Currently active output/monitor.
  • area: Manually selected rectangular area/window.

1. Open the image in an editor

Grimblast supports opening the screenshot in a selected image editing application. By default, this is set as GIMP.

So, if you have GIMP installed, you can use the command:

grimblast edit area

The above command will take a screenshot of an area and open it in GIMP.

If you are using another image editor like Photoflare, you can use that program by configuring the GRIMBLAST_EDITOR environment variable.

On your ~/.config/hypr/hyprland.conf file, use the following line:

env = GRIMBLAST_EDITOR,photoflare

That's it. Now, when a screenshot is taken, it is opened in the selected editor.

2. Move the screenshot area

While taking region screenshots, you can move the screenshot view port. For this, when the screenshot key is pressed, and a region is selected, hold down the Space key without releasing the mouse click.

Now, without releasing the mouse click, drag the mouse to move around the screenshot area.

You can release the space key, and continue the resizing of the screenshot as well.

3. Add Grimblast Keybindings

You should be using Grimblast only through keybindings.

On Hyprland configuration file, add the line:

bind = , PRINT, exec, grimblast copysave area
bind = $mainMod_SHIFT, PRINT, exec, grimblast copysave output

The above command will save a screenshot of the selected area or window to ~/Pictures directory when you hit the PrtScr key. It will also be copied to your clipboard. The Super + SHIFT + PrtScr key will save a screenshot of currently active output, with the same will be copied to clipboard as well.

Second Option: Hyprshot

Hyprshot is an exclusive screenshot utility designed specifically for Hyprland.

It is a straightforward tool that does exactly what it's meant for: taking screenshots.

If you have read through the GitHub page of this tool, you will realize that it is primarily a shell script that serves as a wrapper around tools like grim, slurp, and others to take screenshots in Wayland environment. Furthermore, it is specially tailored to work with Hyprland, which is the most important thing here.

Installing Hyprshot

Before installing Hyprshot, first we need to get the dependencies. On Arch Linux, use the following command:

sudo pacman -Syu jq grim slurp wl-clipboard libnotitfy hyprpicker

Once the dependencies are installed, let's install Hyprshot:

yay -S hyprshot

If you are using any other distribution, go to the official GitHub page of Hyprshot and download the release file.

Once done, extract the archive file, and you will get a shell script file called hyprshot. Go inside the extracted location and make this script file executable:

chmod +x ./hyprshot>

Now, copy this file to a directory in your PATH to make it available everywhere.

sudo cp ./hyprshot /usr/local/bin/

That's it!

Setting Hyprshot

Once installed, it's time to configure. Open your hyprland.conf file using any of your favorite text editor.

nano ~/.config/hypr/hyprland.conf

Inside this file, go to the end and add a key binding for Hyprshot. To make everything look neat, we will create a section using comment called Hyprshot Screenshots.

# Hyprshot Screenshots
bind = , PRINT, exec, hyprshot -m region
bind = $mainMod_SHIFT, PRINT, exec, hyprshot -m window

Here, we have set two keybindings with the values. To take a screenshot of a rectangular region:

hyprshot -m region
πŸ’‘
While selecting a region, without releasing the mouse left-click press the space and drag the mouse. This will move the selection area. A video is shown in the Grimblast section.

And to take the screenshot of an open window, you type in:

hyprshot -m window

There are other options available with Hyprshot, let's take a brief look:

Option Description
hyprshot -m window Take the screenshot of open window.
hyprshot -m region Take the screenshot of a rectangular region.
hyprshot -m output Take the screenshot of a selected display/monitor.
hyprshot -m active Take the screenshot of an active window.
--clipboard-only Use this option with other options to not save the image, but only copy to clipboard.

Did you know you can also freeze the screen?

An interesting use-case that you can pull off is to freeze the screen while taking a screenshot. For this to work, you should have hyprpicker installed.

Once you have Hyprshot and Hyprpicker, you can use the -z option to freeze the screen.

For example, to take the screenshot of a rectangular region with screen frozen, use the command:

hyprshot -zm region

To add this to the Hyprland config, use the keybinding command:

bind = , PRINT, exec, hyprshot -zm region

For those who only need to add it to the clipboard without saving, use:

bind = , PRINT, exec, hyprshot -zm region --clipboard-only
πŸ’‘
If you have a notification daemon like dunst is running, Hyprshot will notify you about the screenshot.

Third Option: Flameshot

Flameshot is a great screenshot taking utility for Linux. But the default package available in the repos of distribution works mainly on Xorg-based distributions.

But, you can use the git version of Flameshot in Wayland-based systems like Hyprland. Let me tell you how.

Install Flameshot

First, remove any other Flameshot instance installed on your system (this is applicable for Arch users):

sudo pacman -Rs flameshot

Next, install the git version of Flameshot from the AUR. We will recommend using an AUR helper like yay to install the package.

yay -S flameshot-git

Wait for some time to compile the program and installation process to complete.

Once completed, you can open Flameshot from your app menu:

Flameshot offers better screenshot options compared to other items mentioned here. But, you should keep in mind that Flameshot is developed mainly for Xorg sessions, and the packaged versions may not work properly in Hyprland.

So, try out Flameshot as an experiment if you do not like the first two options.

Wrapping Up

While starting with Hyprland can be challenging for new users, you can do a great deal of things with ease, as mentioned above.

πŸ’¬ How do you take screenshots on Hyprland? Let me know your thoughts in the comments below!

I Feel Like a Hacker Using These Cool Linux Terminal Tools

14. Januar 2025 um 12:12
Von: Sreenath
I Feel Like a Hacker Using These Cool Linux Terminal Tools

I found it cool enough to watch someone, often portrayed as a hacker, use the Linux terminal, especially in the movies. What if I try to become one of the super cool hackers from the Hollywood movies? 😎

Now that I'm older, I'm no longer fooled by those movie skits 😌 But, I'm still a kid at heart, and I want others to think that I am a secretive hacker when they see me using the terminal.

To pursue that, I started exploring a list of cool Linux terminal tools that I can use for the job.

If I can feel like a hacker with these tools, you can too! Let's give them a try!

πŸ’‘
You can use CTRL+C to exit the terminal after running these tools.

1. genact

Do you often feel like all you do in the terminal is run update commands, with nothing impressive to show off? Don’t worryβ€”genact is here for you!

0:00
/1:02

Running genact in a terminalRunning genact in a terminal

This little command will fill package download, network and other entries to your terminal. Those watching will think you are compiling some great programs.

You can install this from the Ubuntu Snap store or grab the prebuilt binary for genact from the official GitHub repository as per your CPU architecture.

If you downloaded the binary, open a terminal in the downloaded directory, and give the file execution permission with the following command:

chmod +x ./genact-file-name

The file name will look like genact-1.4.2-x86_64-unknown-linux-gnu

Next, execute it using:

./genact-file-name

2. Cmatrix

Anyone who has seen The Matrix movie cannot forget the iconic effect of characters raining down the screen. With CMatrix, you can recreate this mesmerizing display right in your terminal.

0:00
/0:09

Cmatrix command running in terminal.

You can install Cmatrix from the official repository of most Linux distributions. For instance, here's the command for Ubuntu-based distributions:

sudo apt install cmatrix

Now, just run it using the command:

cmatrix

For more fun, you can pair it with other fun terminal tools like lolcat, one of the fun ASCII art tools.

3. Hollywood

Hollywood is that command which will make others think that your system has been hacked my someone.

It will burst a huge text and animation effects on your terminal, where regular keyboard entries will do nothing. For a minute, I forgot I had to stop it to continue writing the article, it looked so cool! 😎

To install hollywood on Ubuntu, use the command:

sudo apt install hollywood

4. TEXTREME

Do you want a text editor that will show all types of fancy animation for character entry and deletion?

Textreme is for you.

This is not a regular text editor, where you will code swiftly, but a cool fancy text editor, that gives a festive party vibe while you write something.

You can grab an executable binary from the official website. And, extract the tar file and double-click on the file to start the editor.

5. No More Secrets

No More secrets will show an encrypt/decrypt effect for everything piped into it. It tries to recreate the famous data decryption effect seen on screen in the 1992 hacker movie Sneakers.

There are no release files for this package. So, you need to compile it from GitHub.

Make sure you have git and essential build tools like make installed. Then use the following commands to proceed:

git clone https://github.com/bartobri/no-more-secrets.git
cd ./no-more-secrets
make nms
make sneakers
sudo make install

This will install two tools, no-more-secrets or nms and sneakers.

Sneakers

Sneakers recreates the movie clip for you. Once the command completes printing encrypted characters, press any key to start the decrypting effect.

No More Secrets

Pipe any text output to this command and see the effect for yourself. If you would rather not press a key to start decryption, use:

cat agatha.txt | nms -a

This will print the contents of the file in encrypted form and then automatically start to decrypt it and show the original content.

You can experiment with it to show different colors as well!

6. Cool Retro Term

Sometimes the feeling of a hacker or a whiz comes from retro tools. This is one of the super cool terminal emulators that helps achieve what we want here.

You can install the Cool Retro Term terminal emulator application on Ubuntu using the command:

sudo apt install cool-retro-term

Next, open the terminal from your Activities Overview or app menu:

Do not forget to right-click on the terminal and explore the settings. There are more effects waiting!

I Feel Like a Hacker Using These Cool Linux Terminal Tools
Cool Retro Term Settings

7. gping

Did you ever use the Ping command to check whether you have an active internet connection? Or to check whether a site is up and running?

The ping command is just a text command, where you need to look at the values to get the picture. You can do the same, but have some aesthetically pleasing outputs (graph) using gping.

Install GPing on Ubuntu using the command:

sudo apt install gping
0:00
/0:43

Gping command

8. Bpytop

Bpytop is a htop alternative that prints system information neatly. You can use this command to make someone think that you're monitoring super serious aspects of your computer.

To install it, use the command:

sudo apt install bpytop
0:00
/0:30

Bpytop command with options

When it comes to Linux terminal tools, there are endless options from various individual developers.

Here, I have shared the ones that I tried to make myself look like a hacker to anyone who observes me when I use the computer πŸ˜„

You can also choose to explore some terminal emulators or system monitoring tools to have fun with:

Top 14 Terminal Emulators for Linux (With Extra Features or Amazing Looks)
Want a terminal that looks cool or has extra features? Here are the best Linux terminal emulators you can get.
I Feel Like a Hacker Using These Cool Linux Terminal ToolsIt's FOSSAnkush Das
I Feel Like a Hacker Using These Cool Linux Terminal Tools

πŸ’¬ What is your favorite on the list? Do you have some fun tools that I missed listing here? Do share your thoughts in the comments below.

  • Es gibt keine weiteren Artikel
❌