Kamis, 21 November 2024

Install and Configure Waybar in Hyprland

Install and Configure Waybar in Hyprland

If you are a regular at various desktop customization communities on the web, then you must have heard of Waybar.

Waybar is a highly configurable Wayland bar for Sway and other Wlroots based compositors.

Install and Configure Waybar in Hyprland
Full Waybar (without CSS). Click to enlarge
Install and Configure Waybar in Hyprland
Full Waybar (With CSS). Click to enlarge

Here's a video that demonstrates Waybar:

In this article, I'll show you the process of installing and configuring Waybar on a Hyprland system.

This does not mean you need to install Hyprland exclusively to continue. You can ignore the Hyprland related part and still get a decent bar for your system.

Installing Waybar in Linux System

If you are an Ubuntu user, Waybar is available in the repos of Ubuntu 20.04 and more. Since Waybar is Wayland, it is better to use it in version 22.04 and above.

To install it, use the command:

sudo apt install waybar

There is a PPA available with more up-to-date packages. To use it, open a terminal and run:

sudo add-apt-repository ppa:nschloe/waybar
sudo apt update
sudo apt install waybar

For other systems like Fedora, Arch Linux, etc., you can use the native package manager to install the latest version of Waybar.

# Fedora systems
sudo dnf install waybar

# Arch Linux Systems
sudo pacman -Syu waybar

Once installed, autostart the bar during system startup.

In Hyprland, you can use the following line in the configuration file .config/hypr/hyprland.conf:

exec-once waybar

Configuring Waybar

Now that you have Waybar installed, let's see the Waybar configuration.

📋
Do NOT edit this file with text editors like Nano with default settings, without JSONC support.

Waybar uses a JSONC (JSON with Comments) to configure its vast array of modules. Before you start to edit the configuration, I advise using a text editor that has JSON support.

I have used VS Code to edit the configuration file.

The Waybar configuration file is present at .config/waybar/cnfig.jsonc.

Items that can be placed on Waybar are available as separate modules. This means that you can handpick the modules and their placement as per your requirement.

A default sample configuration

Let's take a bare minimum sample config provided by Waybar on its wiki page to learn the structure.

{
    "layer": "top",
    "modules-left": ["sway/workspaces", "sway/mode"],
    "modules-center": ["sway/window"],
    "modules-right": ["battery", "clock"],
    "sway/window": {
        "max-length": 50
    },
    "battery": {
        "format": "{capacity}% {icon}",
        "format-icons": ["", "", "", "", ""]
    },
    "clock": {
        "format-alt": "{:%a, %d. %b  %H:%M}"
    }
}

In the above code snippet, you can see several key-value type pairs arranged. Let's understand them:

  • layer: This decided whether the bar goes below a window or the window goes below the bar. It can take bottom/top values.
  • modules-left: Specify what modules should be displayed on the left part of the bar.
  • modules-center: Specify what modules should be displayed on the center part of the bar.
  • modules-right: Specify what modules should be displayed on the right part of the bar.
  • sway/window, battery, clock etc.: Individual module definition.

From this, you get an idea that on the position specification (left/center/right), you specify the name of the modules that you want to appear.

Later, you define those individual modules with available options regarding their appearance.

For example, in “battery” module, you specified that its format should be capacity percentage and an icon. Where you format that icon in format-icon option.

As I said earlier, each item in Waybar is a configurable module. If you visit the Waybar wiki, you will get the entire list of modules available in Waybar in the right sidebar.

If you want to add a custom module, that is not in the default Waybar module, use the format “custom/module_name”. This same name “custom/module_name” will be used at both placing of the element in bar and defining it.

Creating an example Waybar configuration

You have seen the sample config. Now, let's write a sample Waybar configuration from scratch to learn it better.

My requirements in this configuration are:

  1. A menu button to open Wofi launcher (Left side).
  2. A Taskbar that shows the opened windows (Left Side).
  3. Hyprland Workspace switcher with 5 workspaces (Center).
  4. A Clock that will show date when clicked (Center).
  5. A CPU core usage monitor (Right Side).
  6. My system uptime monitor (Right Side).
  7. A network module that show download and upload speed (Right Side).

Let's start the configuration.

Common Waybar settings

In this first block, we will place the bar as the top layer. That is, any window will go down if overlapped. Also, the bar will be placed on the top side of the monitor.

//Make the bar as the top layer.
"layer": "top",

// Make waybar appear at the top of the screen. You can give "bottom/left/right" also as needed.
"position": "top",

Now, let's place the items as per our requirement.

//Define what items should appear in the left part of the waybar.
"modules-left": ["custom/appmenu", "wlr/taskbar"],

//Define the items to appear in the center part of the bar.
"modules-center": ["hyprland/workspaces", "clock"],

//Define items to appear in the right side of the bar.
"modules-right": ["cpu", "user", "network"],

Here, you can see that I used one custom module called custom/appmenu. The purpose of this module is to make Wofi launcher appear when clicked.

That's it. You have now set the common bar settings. It is time to define the individual modules.

Define the Modules

Let's define everything in the order we have created.

App Menu

First, the app menu.

"custom/appmenu": {
                "format": "Menu {icon}",
                "format-icon": "󰻀",
                "rotate": 0,
                "on-click": "~/.config/waybar/runwofi.sh"
        },
Install and Configure Waybar in Hyprland
Waybar Custom Menu Button (CSS Applied)

We define a module in the format specified above. This is a custom module. For custom user-defined module, there are several possible options. Refer to this table to know more about the available options.

In the example, we set a custom text “Menu” using the “format” key. The "{icon}" specified in the format will be configured in the format-icons key. Just paste the icon you want to appear under double quotes in format-icons key.

The “rotate” key is used to specify the text rotation. If it is 90, then the text will appear vertical.

The next step is critical. The “on-click” key defines the action to perform when the module is pressed with one left-click. Here, we have given the location of a shell script “runwofi.sh”. So, when you click on this, that script will be executed.

The content of that executable script is:

#!/bin/bash
wofi --show drun

So, when you click, Wofi is executed.

Taskbar

Let's create a simple task bar. There is a built-in module for a taskbar in Waybar. It also has several possible options.

"wlr/taskbar": {
                "format": "{icon}",
                "tooltip": true,
                "tooltip-format": "{title}",
                "on-click": "activate",
                "on-click-middle": "close",
                "active-first": true
         },
Install and Configure Waybar in Hyprland
Waybar Taskbar (CSS Applied)

Some options are self-explanatory, like the tooltip and its format, where the "{title}" will show the title of the application as a tooltip when hovered. You can use {name} to show the name of the application window instead of title.

The on-click, on-click-middle actions are defined according to what states are available in the taskbar module. Please refer to the Actions subsection of the module in the Waybar Wiki.

We set the option called “active-first” to true. This will bring whatever application currently active to the first entry of taskbar. Just an accessibility option.

Workspaces

Here, we define the workspaces. For Hyprland users, there is this "hyprland/workspaces" module. You can use this.

In Hyprland, before setting workspaces in Waybar, you need to make sure that you have workspaces enabled for the current monitor.

On a terminal, run:

hyprctl monitors

This will list the available monitor with their name. I was using Hyprland on a GNOME Boxes VM. So, my monitor name was Virtual-1. Yours can be DP-1, HDMI-1, etc. Please check them.

See the config below:

"hyprland/workspaces": {
                "format": "{name} : {icon}",
                "format-icons": {
                        "1": "",
                        "2": "",
                        "3": "",
                        "4": "",
                        "5": "",
                        "active": "",
                        "default": ""
                },
        "persistent-workspaces": {
                "Virtual-1": [1, 2, 3, 4, 5]
                }
        },
Install and Configure Waybar in Hyprland
Waybar Hyprland Workspace Switcher (CSS Applied)

Under “persistent-workspaces” option, you will place the number of workspaces to show permanent as an array with monitor name as key. I placed 5 workspaces on my Virtual machine monitor.

Clock

Next is the clock module (example code from Waybar wiki). Look at the snippet below.

    "clock": {
                "format": "{:%I:%M %p}",
                "rotate": 0,
                "format-alt": "{  %d·%m·%y}",
                "tooltip-format": "<span>{calendar}</span>",
                "calendar": {
                        "mode": "month",
                        "format": {
                            "months": "<span color='#ff6699'><b>{}</b></span>",
                        "days": "<span color='#cdd6f4'><b>{}</b></span>",
                            "weekdays": "<span color='#7CD37C'><b>{}</b></span>",
                            "today": "<span color='#ffcc66'><b>{}</b></span>"
                }
            }
    },
Install and Configure Waybar in Hyprland
Clock Module (CSS Applied)

You can refer to the time format specification guide to customize the clock format to your liking.

Here, I have gone for:

  • I : 12 hr clock (Use H for 24-hour clock)
  • M : Minute as a decimal number.
  • p : AM/PM for the 12-hour clock.

Here, we come across another key, format-alt. This key is used to set an alternate format when clicked on that module.

In the above example, I set the format-alt to show a calendar icon followed by the date (Day-Month-Year).

If you refer to the Waybar wiki, you can see a subsection for the Clock module, called calendar. So, under the Clock main module, you can add this calendar as well.

In the sample config, we have added the calendar as a tooltip (tooltip-format key). And as we saw earlier, whatever written inside the curly braces (here, calendar) is expanded in the next step.

💡
Span is an inline format tag. We used this to set the colors to the individual blocks of a calendar.

CPU

Here is a sample code. The concept is similar to what we have seen. But it has a new item to learn.

"cpu": {
                "format": "{icon0} {icon1} {icon2} {icon3}",
                "format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
        },
Install and Configure Waybar in Hyprland
CPU Usage Details (CSS Applied)

In case of CPU, the {iconN} is the Nth CPU core usage. But what we have to learn here is the format-icons.

You can see that the format-icons have been given an array of input (inside closed brackets). Inside the array, we have given 8 different sized blocks. We get a 12.5% increment (100/8). So, whenever a core usage jumps above 12.5%, that block will move to the next size.

This can be used in battery module as well to show different percentages.

I will give the sample code for the next block, network. It uses the same concepts we have seen in earlier sections.

// Define Network

        "network": {
                "tooltip": true,
                "rotate": 0,
                "format-ethernet": " ",
                "tooltip-format": "Network: <big><b>{essid}</b></big>\nSignal strength: <b>{signaldBm}dBm ({signalStrength}%)</b>\nFrequency: <b>{frequency}MHz</b>\nInterface: <b>{ifname}</b>",
                "format-linked": " {ifname} (No IP)",
                "format-disconnected": "󰖪 ",
                "tooltip-format-disconnected": "Disconnected",
                "format-alt": "<span foreground='#99ffdd'> {bandwidthDownBytes}</span> <span foreground='#ffcc66'> {bandwidthUpBytes}</span>",
                "interval": 2
        }
Install and Configure Waybar in Hyprland
Network Module in Waybar (CSS Applied)

Now that, we have made our simple Waybar config. Save the configuration file.

🚧
Do not forget to close the main curly brace with the '}' in the end.

You have a fully working Waybar at the top now. Reboot your system or relogin to see the effect.

Theme the Waybar

Throughout the above section, you have seen how to configure the modules in Waybar. Whoever completed the above config will get the Waybar in its default theme.

But Waybar is even more customizable. Even better, it relies on CSS to style the look.

Style file should be present as ~/.config/waybar/style.css.

It is out of scope of this tutorial to teach you each CSS module. Instead, I will tell you how to access each module in CSS.

First, go to the Waybar Wiki.

Here, inside each module, at the very bottom, there is this "Style" section. You can see what tag is used to access that module in CSS.

Install and Configure Waybar in Hyprland
Battery Module CSS Tags

From the above screenshot, #battery is used to access the main battery module, while there are several other styles, that you can theme in the CSS.

Install and Configure Waybar in Hyprland
Robinhuett battery styling

See the Robinhuett CSS file, that customizes different states of the battery?

Let's see some important tags.

CSS Tag Use
window#waybar Main waybar window
.modules-left

.modules-center

.modules-right
Three parts of Waybar
#cpu For CPU module
#clock For Clock module
#workspaces For Hyprland workspaces
#custom-modname

e.g. #custom-appmenu
For Custom modules

Download my config file

You can download the full configuration file and the associated CSS Styles from our GitHub repo.

Once downloaded, paste these files inside the .config/waybar directory.

I have already shown what the final version looks like in the demo video at the beginning of this tutorial.

You can enjoy customizing it even further 😄



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

Rabu, 20 November 2024

FOSS Weekly #24.47: Kernel 6.12, Using Conky, Benchmarking Linux, New AnduinOS Distro and More

FOSS Weekly #24.47: Kernel 6.12, Using Conky, Benchmarking Linux, New AnduinOS Distro and More

Is it possible to consider a Windows-like appearance as a feature? Apparently, so. There is a new Linux distribution that mimics the looks of Windows 11.

Not my thing but see if you find it exciting enough.

A New Linux Distro Has Set Out To Look Like Windows 11: I Try AnduinOS!
We take a brief look at AnduinOS, trying to mimic the Windows 11 look. Is it worth it?
FOSS Weekly #24.47: Kernel 6.12, Using Conky, Benchmarking Linux, New AnduinOS Distro and More

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

  • A new Linux kernel release.
  • openEuler closing 2024 with some big plans.
  • Adding Conky to your customization aspects.
  • Common dual booting issues and their fixes.
  • And other Linux news, videos and, of course, memes!
  • This week's newsletter is supported by ANY.RUN

❇️ Grab Black Friday deal from ANY.RUN 🚀

For individual users: 2 licences for the price of 1.
For teams: Up to 3 licences + TI Lookup basic plan for a year as a gift. 

Learn more about offers and get yours here.

Subscription Plans - ANY.RUN
Interactive malware hunting service. Live testing of most type of threats in any environments. No installation and no waiting necessary.

📰 Linux and Open Source News

openEuler Summit 2024 was a packed one, with the developers revealing their long-term plans.

Open Innovation and Collaboration: Highlights from the openEuler Summit 2024
The openEuler Summit 2024 concluded, here are some of the major announcements in it.
FOSS Weekly #24.47: Kernel 6.12, Using Conky, Benchmarking Linux, New AnduinOS Distro and More

🧠 What We’re Thinking About

Some interesting things to think about when it comes to the open source community.

10 lessons I’ve learned from the open-source community that aren’t about tech
You might think the only lessons to learn from the open-source environment are technical, but you’d be mistaken.
FOSS Weekly #24.47: Kernel 6.12, Using Conky, Benchmarking Linux, New AnduinOS Distro and More

🧮 Linux Tips, Tutorials and More

Conky is a lightweight LUA scripting system that lets you add system stats on your desktop. It's a popular tool for customizing the looks of Linux desktop.

Beginner’s Guide to Install and Use Conky in Ubuntu Linux
Learn all the essentials about using Conky to customize and beautify your Linux desktop.
FOSS Weekly #24.47: Kernel 6.12, Using Conky, Benchmarking Linux, New AnduinOS Distro and More

👷 Maker's and AI Corner

Sometimes a small tweak can make a huge difference.

This Simple Change Improved the Performance of My Homelab Running on Raspberry Pi
My struggling Raspberry Pi got a performance boost by a small change in the memory configuration.
FOSS Weekly #24.47: Kernel 6.12, Using Conky, Benchmarking Linux, New AnduinOS Distro and More

We also took a look at the recently launched Raspberry Pi SD card.


📹 Videos We are Creating for You

I usually prefer making tutorial videos. But this time, I made a 'news' kind of video. Instead of writing an article on what's changed in Archinstall script, I show that in a video. A new format as we try to make more videos for you.


✨ Apps of the Week

Your search for a Notion alternative might end with AFFiNE, go check it out! 😃

AFFiNE: A Truly Wonderful Open Source Notion Alternative With a Focus on Privacy
A solid open source rival to Notion and Miro. Let us take a look!
FOSS Weekly #24.47: Kernel 6.12, Using Conky, Benchmarking Linux, New AnduinOS Distro and More

For Android, we have Seal, a handy app for downloading videos from popular platforms like YouTube.

Seal: A Nifty Open Source Android App to Download YouTube Video and Audio
Download YouTube video/music (for educational purpose or with consent) with this little, handy Android app.
FOSS Weekly #24.47: Kernel 6.12, Using Conky, Benchmarking Linux, New AnduinOS Distro and More

🧩 Quiz Time

This time, we have a wheel spin quiz for Linux commands, read the instructions carefully!

Spin to Uncover The Command: Quiz
Spin the wheel and spot the command!
FOSS Weekly #24.47: Kernel 6.12, Using Conky, Benchmarking Linux, New AnduinOS Distro and More

💡 Quick Handy Tip

In Firefox and other browsers, you can hover on a link, then click and drag it to the tab bar to open it in a new tab. When it is ready to be dropped into the tab bar, you will see a blue line in the tab bar (Firefox-only).

FOSS Weekly #24.47: Kernel 6.12, Using Conky, Benchmarking Linux, New AnduinOS Distro and More

🤣 Meme of the Week

Now, would that be the case with Windows? 🤔

FOSS Weekly #24.47: Kernel 6.12, Using Conky, Benchmarking Linux, New AnduinOS Distro and More

🗓️ Tech Trivia

Douglas Engelbart received US patent 3,541,541 for the computer mouse, called so due to its tail-like cord. The first prototype appeared in 1964 and was demoed in 1968. It became commercially available with the Xerox 8010 Star in 1981. Apple included it with the Lisa in 1983, but it was the Macintosh 128K that made the mouse popular.


🧑‍🤝‍🧑 FOSSverse Corner

Pro FOSSer Daniel shares the latest update on their Linux from scratch project.

Progress Update On My Linux From Scratch Project
SUCCESS!!!Have Gentoo and LFS booting on separate drives, with Gentoo controlling grub and booting first. LFS is booting on my Dell Inspiron 530 machine,with only 4GB of ram and a core2 CPU, so the skipping of the GCC-14.2.0 tests, had no issue for getting LFS to boot. Now comes buiding BLFS!!! Will try to get a photo of the boot menu screen!!!
FOSS Weekly #24.47: Kernel 6.12, Using Conky, Benchmarking Linux, New AnduinOS Distro and More

❤️ With love

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 using Linux 😄



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

Selasa, 19 November 2024

Installing the Much Hyped Hyprland on Linux

Installing the Much Hyped Hyprland on Linux

Hyprland is a dynamic tiling window compositor that is both highly customizable and eye candy.

It is also used the most these days in Linux ricing group. And why not? If you are into customizing the looks of your desktop, Hyprland is surely worth all the hype.

Installing the Much Hyped Hyprland on Linux
Image credit: flick0

In fact, the official Hyprland video provides more detailed visuals:

Now, I am not trying to discourage you, but these things take a lot of effort if you try to configure on your own. Or, you can use the dot files from someone else and get the same look as theirs.

I believe it's a good learning experience but something that should be done on a secondary system. At present, it is not officially supported in VMs but it still worked for most in my testing.

🚧
Hyprland is in highly active development. So, there won't be any one stable version that you can use for years, similar to what Ubuntu and Debian does for GNOME.

Things to note before installing Hyprland

Before starting to install Hyprland, you need to understand a couple of points about stability and compatibility.

  • Hyprland is not a beginner-centric window compositor.
  • It is Wayland-only. So, not all Xorg-only application will work on Hyprland.
  • Nvidia GPUs have limited compatibility due to their proprietary nature.
  • It is not officially supported in virtual machines, but works. So, to get a complete result, you should do it in bare metal.
  • If you are installing on a virtual machine, like VirtualBox, enable 3D Acceleration. Moreover, allow a RAM of at least 4 GB.
🚧
I suggest either you try it in a spare machine first, or keep another stable window manager in the system, so that you don't lose your work while experimenting with Hyprland.

Install Hyprland with Arch Linux using archinstall script

Arch Linux, NixOS and openSUSE Tumbleweed are the most supported distribution when it comes to Hyprland.

In Arch Linux, if you are using the archinstall script, you have an option to select Hyprland as the desktop in Profile → Type → Desktop → Hyprland.

Installing the Much Hyped Hyprland on Linux
Hyprland in Archinstall script

As you can see in the screenshot above, the installer has selected some necessary dependencies for Hyprland to work.

On the next step, it will ask you to have access to hardware. Here, I have gone with Polkit.

Similarly, the greeter will be automatically set to SDDM.

📋
If you are installing Hyprland as the only option, it is better to select SDDM. In case you are installing Hyprland on a GNOME setup, there is no need to install and configure SDDM, as GDM just works fine.

On the additional packages installation prompt, install hyprpaper and waybar. Or do that after install and login.

sudo pacman -Syu hydrpaper waybar
📋
Hydrpaper is the wallpaper manager and Waybar is the bar, that host necessary panel buttons.

That's it. You will have a working Hyprland set up.

🚧
Hydrpaper needs to be enabled and configured to get a proper wallpaper to your screen. This will be discussed in another article.

Install Hyprland in base install

If you have installed Arch Linux base installation following our guide, then you need to install the Hyprland separately. To do that, log in to the base install and run the command:

sudo pacman -Syu hyprland hyprpaper xdg-desktop-portal-hyprland waybar wofi kitty sddm

Then enable the SDDM service using:

sudo systemctl enable sddm.service

Now, restart the system and login to Hyprland session.

Install Hyprland in Ubuntu

Hyprland is also available in the default repo of Ubuntu since 24.10 Oracular Oriole. But it is highly not recommended to install Hyprland from this package.

Instead, I will discuss another method, through which you can set up a working Hyprland on Ubuntu.

🚧
Here, I am using Ubuntu 24.0.1 as the distro. The method mentioned below has separate repositories for other versions. Please check you Ubuntu version before continuing.

Things to keep in mind before proceeding

  • You should back up your system and important data before start installing.
  • Ensure an active, uninterrupted internet connection.
  • Version older than 24.04 won't work.
  • Do not install SDDM.

Once you are ready, let's install.

Install Hyprland in Ubuntu 24.04

First, you need to enable the source packages repo in Ubuntu. Search for Software and Updates and open it.

Installing the Much Hyped Hyprland on Linux
Open Software and Updates

Go to the tab and enable the checkbox near sources.

Installing the Much Hyped Hyprland on Linux
Enable Source Code

Click on close, and then use the Reload button. Now, update your system and install all pending updates.

sudo apt update && sudo apt upgrade

We use the Automated Hyprland Installer for Ubuntu to install Hyprland on Ubuntu. This offers a fast method to get started with Hyprland.

🚧
There are methods to build Hyprland from source, but there are many hiccups included, which will put you in a long troubleshooting loop.

Clone the Hyprland installer third-party repository.

git clone -b 24.04 --depth 1 https://github.com/JaKooLit/Ubuntu-Hyprland.git ~/Ubuntu-Hyprland-24.04

Now, move inside the directory and give the installer file (install.sh) execution permission.

cd ~/Ubuntu-Hyprland-24.04
chmod +x install.sh

Run the installer.

🚧
You should NOT run the installer as root.
./install.sh

This will start the installer.

Installing the Much Hyped Hyprland on Linux
Hyprland Installer
🚧
Only Hyprland up to v0.39.1 is compatible with Ubuntu 24.04. This is because of the version of required dependency in the Ubuntu repo remains as is, and Hyprland is a heavily active project, that changes the dependency requirements quite often.

Read the note carefully and proceed by entering y.

Now, some questions will be asked on the topics:

  • NVIDIA GPU: Hyprland may not work properly with NVIDIA, as said in an earlier section.
  • Install GTK Themes for Dark Light function.
  • Configure Bluetooth
  • Install Thunar file manager.
  • Install SDDM: This should be NO (n). Since Ubuntu has GDM and it works well.
  • Install XDG-DESKTOP-PORTAL-HYPRLAND: This should be YES (y).
  • Install ZSH
  • Install nwg-look: This is for GTK Theming. It will take a long time to build. So you can skip (n) this.
  • Installing on Asus ROG Laptops.
  • Preconfigured Dot files: Yes (y), if you don't want to configure the looks from scratch.
Installing the Much Hyped Hyprland on Linux
Installer Queries

When asked, enter the sudo password to start installation.

Sit back and wait, while the installer completes the set-up process.

When asked, “Would you like to try to remove other XDG-Desktop-Portal-Implementations?”, give no.

Similarly, at the last stage, you will be asked to add yourself (the current user) to the input group. This might be necessary for some waybar functionalities.

If you are running in a VM and/or selected dot file install option, you will be asked more configuration options like:

  • Select keyboard Layout
  • Set Monitor resolution
  • Set time format
  • Keep/disable rainbow border animation.

These are shown in the screenshot below.

Installing the Much Hyped Hyprland on Linux
Preset Dot Files

It also provides an option to download more wallpapers, but the size is greater than 600 MB.

Once all queries are answered properly, it will set the configuration accordingly.

Reboot the system.

When the system is rebooted, select the Hyprland session and Log in using your password.

Installing the Much Hyped Hyprland on Linux
Login to Hyprland

You will be logged into the Hyprland desktop session.

Installing the Much Hyped Hyprland on Linux
Ubuntu Hyprland (Click to enlarge the image)

Installing Hyprland in other Distributions

Hyprland is available in the repos of many other Linux distributions like openSUSE, Fedora, etc. The basic installation can be performed on these devices using:

  • In Fedora,
sudo dnf install hyprland

There is also a COPR repository for Fedora users for more updates.

  • In openSUSE
sudo zypper in hyprland

You can read the official detailed installation manual for other distribution.

I'll be covering the waybar configuration and Hyprland customization tips in future articles. Stay tuned and subscribe to our FOSS Weekly newsletter so that you don't miss them.



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

Benchmarking Your Linux System: What, Why and How

Benchmarking Your Linux System: What, Why and How

If you are using Linux on your system, it is a rare phenomenon that your system is not performing well.

But, "how fast?" is a question that we often ask ourselves or wonder when thinking to compare our experiences.

The easy and effective solution to know that is to benchmark your Linux system.

So, how do you do that? Using some benchmarking tools. And, what are the benchmarking tools available on Linux?

Fret not, in this article, I shall guide you with the tools with which you can perform a Linux system benchmark for all kinds of use-cases.

Benchmarking is not the complete story. But, only a part of it when comparing or evaluating the performance of a system.

To ensure your system runs the best, you need the correct drivers, up-to-date software, performance-focused desktop environment, a stable kernel, and a few other things.

How to evaluate the benchmark results?

With every benchmark tool, you end up getting a final score.

The score alone is not meaningful unless you have a comparison in mind.

You can either perform benchmarks on two different systems to measure the performance gap. Or, you can benchmark the same system at different time intervals to check if a configuration/system update impacted the performance in any way.

For example, you benchmark the system right after you set it up for the first time, and then after a few months.

Some tools also provide you with access to a leaderboard chart, where you can see scores of systems with various hardware configurations. You may also find them mention a "baseline" which is a reference score of a particular hardware.

For instance, Geekbench utilizes 2500 as baseline score, which is for an i7-12700 processor. You can know if your CPU performs better or worse accordingly.

In either case, you can check the Geekbench website that ranks all processors, and then compare it against your score.

Benchmarking Your Linux System: What, Why and How

It is recommended to use the same benchmark test/tool when comparing multiple systems.

4 tools that can help you benchmark your Linux computer

Some benchmarking tools are open source, while a few are not. Some are available as a standalone tool for a quick check, and some help you take an in-depth analysis of your system (which is not needed for everyone).

I list the best ones to help you get the job done.

📋
Most of the benchmarking tools are CLI-based.

1. UnixBench

Benchmarking Your Linux System: What, Why and How
Key Features:

• Traditional test
• Open Source
• Easy to Use

One of the most traditional open source benchmark suite is UnixBench.

It is derived from the original BYTE UNIX benchmark app built back in 1983, and has been maintained over the years with several revisions. It may not be the most modern solution out there, but it performs essential tests that have been long proven to be indicators of performance.

You get around ten different tests which include basic 2D/3D graphics, process creation, string handling, floating-point operations, file copy, and a couple of others.

It is alright if you do not understand the meaning of the tests it performs. All you need to know is that it performs a type of stress test of your entire system (not just a part of it). So, the results will depend on the operating system, libraries, hardware, and compiler.

Once installed, you just have to run it by typing the following command:

ubench

Here's how the results look:

As you can see in the screenshots, as the test progresses (and completes), you can head to the mention directory (usr/lib/unixbench/results) to get the details. You should find HTML and log files, access what you are comfortable with.

Benchmarking Your Linux System: What, Why and How

You can install it via AUR for Arch Linux. And, for Ubuntu-based distros, it is available as a Snap.

💭
UnixBench could be an older generation of benchmarking tests, but it has its benefits of technical testing and being an open source tool. No options to fiddle around, just type in one command after installation to start benchmarking, it is that easy!

2. Geekbench

Benchmarking Your Linux System: What, Why and How
Key Features:

• Modern benchmark suite
• Cross-Platform
• Proprietary
• Uploads results to Geekbench website directly

If you want a modern tool to benchmark your entire system and do not mind if it is not open source, Geekbench is one of the most popular option.

There is no binary available for Linux distros. However, you just have to download a tar.gz file and run the executable via the terminal (no need of sudo) using the following command inside the extracted folder:

./geekbench_x86_64

It worked like charm for me.

It will automatically start running single-core, and multicore tests like Ray Tracer, File Compression, HTML5 browser test, PDF Renderer, and several others. In my testing, it took around 2–5 minutes to complete.

All you have to do is click on the URL provided to check your results.

💭
Geekbench testing requires an active internet connection unless you have its Pro edition. So, it uploads the results to its website, and gives you a URL to check the result. It is a neat experience if you do not mind uploading your results.

3. Hardinfo2

Benchmarking Your Linux System: What, Why and How
Key Features:

• Graphical User Interface
• Open Source
• Easy to Use

Hardinfo2 is a multipurpose tool with which you can get essential information on your system's network, firmware, and hardware. And, of course, it lets you run benchmarks.

Unlike the above two tools, it does not perform a complete benchmark, but allows you to choose what to test (CPU/Memory/Storage/Graphics).

And, it is a complete GUI program. So, you do not need type any commands. Just head to the test you want to perform, and once it is done, it will show you the result along with a reference ranking compared to other hardware.

You can decide to generate a report for all the benchmarks you perform (HTML file) and access it separately.

I installed it via AUR on Arch Linux. You can find it in your default Linux repositories. In either case, you can build it from source using the instructions on its GitHub page.

💭
Hardinfo2 is a wondering GUI-focused benchmarking tool. The tests finish up fast, and it is easy to test all kinds of parts in your system. Not to forget, you can get essential system information with this tool, so you will want to keep it around after testing.

Suggested Read 📖

9 System Monitoring Tools for Linux That are Better Than Top
Top command is good but there are better alternatives. Take a look at these system monitoring tools that are similar to top, but better than it.
Benchmarking Your Linux System: What, Why and How

4. Phoronix Test Suite

Benchmarking Your Linux System: What, Why and How
Key Features:

• Cross-Platform
• Open Source
• Comprehensive tests for advanced users

One of the most advanced (and useful) benchmark applications is the Phoronix Test Suite. While it is available for all platforms, you can expect the full feature-set on Linux, for which it is tailored for.

It has a massive collection of tools that are installable, as per your requirements. For instance, you can install Geekbench from within the Phoronix Test Suite. Of course, that is a bit redundant in our use-case.

I had to install the suite first, then the test(s) I wanted to perform, and then run them.

The command for installing a test and running it looks like (ignore words with #):

phoronix-test-suite install pts/sysbench #installing 
phoronix-test-suite run pts/sysbench #running

Unfortunately, some tests like pts/browsers failed, while pybench (benchmark inspired by geekbench) and sysbench (open source benchmark) tests worked like charm. If you wish to test various aspects of your system using a set of tools (not just limited to one), Phoronix Test Suite is for you.

Moreover, it makes use of OpenBenchmarking.org to which you can upload your test results, and compare it with great details with other combination of hardware.

You can install the suite via AUR for Arch Linux with phoronix-test-suite as the package name or download the deb package from its GitHub releases for Ubuntu-based distros.

💭
Unlike hardinfo2, it is CLI-based. But, it gives you all kinds of interactive options when you start a test. Things like if you want to save a report, the name of your system, and more. If you follow its documentation correctly, you can perform a comprehensive analysis of your system.

Do you really need benchmarking?

It depends on what you are looking for but benchmarking could give you some ideas about how your computer is performing with the operating system.

For instance, when I switched from Ubuntu to Archcraft, and I noticed a few performance improvements. In my case, there were visual indicators for me to say that.

But, in many scenarios, you cannot easily gauge the difference unless you extensively use/keep track of file extraction times, boot times, CPU performance, and other resource efficiency/usage stats.

Similarly, maybe you are switching to another distro, and want to check the performance difference. Or, perhaps, you just built a new computer, and want to test the waters before you start using it.

Benchmarking Linux can be helpful in such cases.

💬 Do you perform a system benchmark? Let me know your thoughts in the comments below!



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