8000 Replace `Vitals` with `TopHat` by Kasui92 · Pull Request #245 · omacom/omakub · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Aug 30, 2026. It is now read-only.

Replace Vitals wit 8000 h TopHat - #245

Merged
dhh merged 1 commit into
omacom:masterfrom
Kasui92:tophat
Aug 22, 2024
Merged

dhh merged 1 commit into
omacom:masterfrom
Kasui92:tophat

Conversation

@Kasui92
@Kasui92 Kasui92 commented Aug 8, 2024
Copy link
Copy Markdown
Contributor

Since Vitals installation has been disabled for Intel processors, I think TopHat can be a great replacement as a monitoring extension.

I searched for TopHat issues to see if anyone reported any malfunctions with Intel processors, similar to the one highlighted, but found nothing.

I made TopHat as similar as possible to the default Vitals configuration.

@dhh
dhh commented Aug 12, 2024
Copy link
Copy Markdown
Collaborator

I like that idea. Can you post a screenshot of what it looks like when it's just showing the default download speed?

Sorry, something went wrong.

@Kasui92
Kasui92 commented Aug 13, 2024
Copy link
Copy Markdown
Contributor Author

I like that idea. Can you post a screenshot of what it looks like when it's just showing the default download speed?

@dhh
Sure!

This is the freshly installed default version of the extension.
immagine

This is the version with only the network monitor, without icons and other resources monitor. Unfortunately it is not possible to show ONLY the download speed.
immagine
immagine

@Kasui92
Kasui92 commented Aug 13, 2024
Copy link
Copy Markdown
Contributor Author

now uses bits as a unit of measurement to improve readability

immagine

@italopenaforte
Copy link
Copy Markdown

I have installed using the script in my old laptop and is working flawless.

@LorenzoMugnai
Copy link
Copy Markdown

Hi, I love this idea to use TopHat.

In my own setup, I’ve already implemented something similar where the TopHat metrics colour adjusts dynamically based on the active Gnome theme.

Here’s how I’ve integrated it in theomakub/themes/set-gnome-theme.sh :

# Set TopHat color based on the current theme
color="#1dacd6" 
case $$OMAKUB_THEME_COLOR in
    "'purple'")
        color="#924d8b"
        ;;
    "'red'")
        color="#e92020"
        ;;
    "'blue'")
        color="#208fe9"
        ;;
    "'sage'"|"'bark'")
        color="#78ab50"
        ;;
    "'magenta'")
        color="#e920a3"
        ;;
    *)
        ;;
esac
gsettings set org.gnome.shell.extensions.tophat meter-fg-color "$color"

This is how it now looks like

Screenshot from 2024-08-14 14-30-45

@dhh
dhh commented Aug 14, 2024
Copy link
Copy Markdown
Collaborator

Can you add a migration script so folks will get this installed and vitals removed on the next upgrade?

@italopenaforte
Copy link
Copy Markdown

Nice touch @LorenzoMugnai, was not aware that can be done.

@LorenzoMugnai
Copy link
Copy Markdown

Nice touch @LorenzoMugnai, was not aware that can be done.

Thank you! I'm glad you found it helpful. This project has been a great learning experience for me as well.

For my setup, I primarily use numeric mode, so I've disabled the charts using the following commands:

gsettings set org.gnome.shell.extensions.tophat cpu-display numeric
gsettings set org.gnome.shell.extensions.tophat mem-display numeric

However, it's good to know that if I decide to enable the charts, they integrate nicely with the system. Additionally, I've disabled the animations with:

gsettings set org.gnome.shell.extensions.tophat show-animations false

Now you have all my settings in case you'd like to integrate them into your setup.

I hope it helps!

@Kasui92
Kasui92 commented Aug 15, 2024 •
Copy link
Copy Markdown
Contributor Author

@LorenzoMugnai
Yours is a very interesting addition, especially to maintain coherence with the chosen theme.

I took this opportunity to also add extensions theming to Omakub, maybe in the future it will be useful to have it ready, and then I added TopHat metrics color management to this system.

Anyway, by default metrics are disabled.

@dhh
Obviously with your approval!

@Kasui92
Kasui92 commented Aug 16, 2024
Copy link
Copy Markdown
Contributor Author

@dhh

Can you add a migration script so folks will get this installed and vitals removed on the next upgrade?

Here it is!

# Uninstall Vitals
if [ -n "$(gnome-extensions list | grep Vitals@CoreCoding.com)" ]; then
    gnome-extensions uninstall Vitals@CoreCoding.com
fi

# Install TopHat
gext install tophat@fflewddur.github.io

sudo cp ~/.local/share/gnome-shell/extensions/tophat@fflewddur.github.io/schemas/org.gnome.shell.extensions.tophat.gschema.xml /usr/share/glib-2.0/schemas/
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/

# Configure TopHat
gsettings set org.gnome.shell.extensions.tophat show-icons false
gsettings set org.gnome.shell.extensions.tophat show-cpu false
gsettings set org.gnome.shell.extensions.tophat show-disk false
gsettings set org.gnome.shell.extensions.tophat show-mem false
gsettings set org.gnome.shell.extensions.tophat network-usage-unit bits

# Set TopHat metrics color to match the theme
THEME_NAMES=("Tokyo Night" "Catppuccin" "Nord" "Everforest" "Gruvbox" "Kanagawa" "Rose Pine")
THEME=$(gum choose "${THEME_NAMES[@]}" "Default" --header "Choose your theme" --height 10 | tr '[:upper:]' '[:lower:]' | sed 's/ /-/g')

if [ -n "$THEME" ] && [ "$THEME" != "default" ]; then
  source $OMAKUB_PATH/themes/$THEME/extensions.sh
fi

@gregmolnar
Copy link
Copy Markdown
Contributor

@Kasui92 Can you save that snippet into the migrations folder like the existing ones?

@Kasui92
Kasui92 commented Aug 22, 2024
Copy link
Copy Markdown
Contributor Author

@gregmolnar Done!

Comment thread themes/set-gnome-extensions-theme.sh Resolved
@dhh
dhh merged commit eec9020 into omacom:master Aug 22, 2024
@dhh
dhh commented Aug 22, 2024
Copy link
Copy Markdown
Collaborator

We're missing a dependency. I just ran the migration and got this:

image

@Kasui92
Kasui92 commented Aug 22, 2024
Copy link
Copy Markdown
Contributor Author

@dhh
My bad!
I did not include these libraries installation in the migration file:

gir1.2-gtop-2.0 
gir1.2-clutter-1.0

I included them in the installation process, but I didn't pay attention to them during the migration.

This should be added before the TopHat installation process, in the file:

# Install Tophat libraries
sudo apt install -y gir1.2-gtop-2.0 gir1.2-clutter-1.0

I have the commit on this branch, but the PR is closed. Shall I open a new one?

@dhh
dhh commented Aug 22, 2024
Copy link
Copy Markdown
Collaborator

Ah yes. Please do open another PR 👍

@dhh
dhh commented Aug 22, 2024
Copy link
Copy Markdown
Collaborator

(Worked after installing the dependency 👍)

burno-lima pushed a commit to burno-lima/omakdot that referenced this pull request May 15, 2026
Replace `Vitals` with `TopHat`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

0