- A custom module for the Polybar -
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:
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.
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:
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:
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:
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.