README.md
July 16, 2023 ยท View on GitHub
- A custom module for the Polybar -
Table of Contents
Introduction
xxxwindow allows customizing the name of the applications shown in the Polybar, it's a custom module, very similar to the internal xwindow module.
Instead of getting:
It is possible to reduce the name to a much simpler one:
Or even personalize it:
Getting started
Installation
To add the xxxwindow module to the Polybar, simply add the following code to the configuration file of the Polybar.
[module/xxxwindow]
type = custom/script
interval = 0
exec = ~/the/location/where/you/save/the/xxxwindow.sh/file
In the exec section, it is necessary to indicate the location of the xxxwindow.sh file.
Configuration
To avoid the following error:
It is necessary to determine the value of WM_DESKTOP.
To do this, we can run the following command:
sleep 3; xdotool getwindowfocus
Immediately after executing the command, we should move to an empty desktop.
The value we just got, we should replace it here:
Customization
WM_CLASS
If we want to change the name of all the windows belonging to the same process, we must use WM_CLASS.
For example, suppose I want to summarize the name of the different Ghidra windows, to Ghidra.
Instead of having different names, depending on which instance of Ghidra I am in:
I can call them all the same, Ghidra.
To do this, we can run the following command:
xprop WM_CLASS
Then, we will have to click on the program whose name we want to change.
The name we just got, we should replace it here:
Finally, we must enter the custom name we want for that application:
WM_NAME
Unlike WM_CLASS, with WM_NAME we can change the name of a certain window, of a certain process.
For example, suppose I want to change the name of a certain Ghidra window, but not all of them.
To do this, we can run the following command:
xprop WM_NAME
Then, we will have to click on the program whose name we want to change.
The name we just got, we should replace it here:
Finally, we must enter the custom name we want for that application:
Colors
Additionally, we can change the text color of the process name displayed in the Polybar.
To do this we must modify the following value in each of the rules we have created:
The color that we introduce, must be represented in hexadecimal, otherwise, it will not work.