GTK/Qt tooltip mods

I’m using the ‘Arc-Dark‘ theme on all GTK2, GTK3, GTK4, Qt5 and Qt6 applications on Arch Linux. It is a very good-looking, dark(ish) low-contrast theme, saving my poor eyes from the glaring white default themes of the mentioned toolkits. The theme has just one little detail I wanted to change: the tooltips are a bit dull looking, and occasionally difficult to discern from the background.

I ended up doing the following modifications:

  1. Fixing GTK3 and GTK4 is easy:
    Just copy the following to .config/gtk-3.0/gtk.css and .config/gtk-4.0/gtk.css

    1. /* Disable ALL the stupid dropshadows */
    2. * {
    3.     border-radius: 0px;
    4.     box-shadow: none;
    5. }
    6. /* Tooltips modification */
    7. tooltip {
    8.     border-radius: 0px;
    9.     box-shadow: none;
    10.  }
    11. tooltip.background {
    12.     background-color: rgba(64, 69, 82, 1.0);
    13.     background-clip: padding-box;
    14.     border: 2px solid rgba(82, 148, 226, 1.0);
    15. }
    16. tooltip.background label {
    17.     padding: 0px;
    18. }
    19. tooltip decoration {
    20.     background-color: transparent;
    21. }
    22. tooltip * {
    23.     background-color: transparent;
    24.     color: #404552;
    25. }

    Unfortunately, it seems that the good old GTK2 does not support setting the color of the tooltip border separately, so GTK2 tooltips are left as they are.

  2. Fixing Qt5 and Qt6 tooltips is a bit more complicated. First, you need to have qt5ct and/or qt6ct installed.
    Copy this to /usr/share/qt5ct/qss/tooltip-awesome.qss and /usr/share/qt6ct/qss/tooltip-awesome.qss

    1. QToolTip{
    2.   background-color: palette(base);
    3.   border-radius: 0px;
    4.   border: 2px solid palette(highlight);
    5.   padding: 0px;
    6.   color: palette(text);
    7. }

    Then, copy the next to /usr/share/qt5ct/qss/traynotification-awesome.qss and /usr/share/qt6ct/qss/traynotification-awesome.qss. This fixes the balloon notification used by some Qt apps.

    1. QBalloonTip{ 
    2.   background-color: palette(highlight);
    3.   border-radius: 0px;
    4.   border: 2px solid;
    5.   padding: 0px;
    6.   color: palette(text);
    7. }

    After that, start qt5ct and/or qt6ct, go to ‘Style sheets’, choose the abovementioned qss files, and click ‘OK’.

Here’s a partial screenshot of the Dolphin file manager using the modified tooltip:

Dolphin part

Posted in Linux | Tagged , , , , | Leave a comment

Mkcert on OpenWrt (MIPS)

Mkcert is a simple, zero-conf tool for making locally-trusted development certificates. It is a very useful helper tool in preventing the browsers from whining about insecure/untrusted connections on LAN-only web interfaces, like those on routers.

I’m using an old(ish) Ubiquiti Edgerouter X-router as my home network firewall/router. The main specs of the Edgerouter X are: MediaTek MT7621 4-core MIPS processor, 250Mb of memory and 250Mb of storage. The original Ubiquiti firmware has already been replaced with OpenWrt some years ago.

There are no official mkcert packages for OpenWrt (as of November 2023), but because mkcert is a Go program, it is very easy to cross-compile it for the MIPS architecture on another Linux device and copy it to the router:

git clone https://github.com/FiloSottile/mkcert.git
cd mkcert/
GOOS=linux GOARCH=mipsle GOMIPS=softfloat go build -o mkcert
scp -O ./mkcert root@192.168.1.1:/root/

Please note the “-O”-switch on the above scp command. OpenWrt’s Dropbear SSH/SCP server supports by default only the older scp protocol, so you need to tell the scp on your Linux box to use that instead of the currently standard sFTP protocol, otherwise the connection will fail.
You may well leave the mkcert binary in the /root directory where it was copied to, just run it as ./mkcert.

Posted in Linux | Tagged , | Comments Off on Mkcert on OpenWrt (MIPS)

Happy Cirno⑨ day!

Today is the ⑨th day of the ⑨th month in the year 2022; that means it’s the Cirno day!

This is my first figure posting in many years (five, actually). Contrary to my usual style of writing these anime etc. figure reviews in my native Finnish and just adding a short English summary, I’m doing the opposite now and writing mostly in English.

I have fallen totally in love with all things Touhou (東方Project): the original games (yes, I’m BAD at playing them…), the spinoff games, the community/fan content – comics, videos, cosplay, games – and especially the wonderful music composed by ZUN itself and the various remixes made by the community. It seems that lately I haven’t been listening much else than Touhou related music. Fact: ZUN (太田 順也, Ōta Jun’ya) is one of the best composers of our time.

Like every Touhou fan, I have my own preferences among the denizens of Gensokyo. I like the Koishi + Kokoro couple, also the arguments between the two idiots Kaguya and Mokou are hilarious. No-one can really avoid liking Marisa… But for some reason or other the dim-witted, stubborn, overconfident, childish ice fairy Cirno seems to always rise above the others. So not to feel all alone during the Covid epidemy I had to somehow get a Nendoroid version of Cirno to stand on top of my desktop computer…

CIRNO IS THE STRON⑨EST!!!

After having graduated from the Perfect Math Class, she has also became an Einstein-grade mathematical genius. Here’s the proof:

∞+1=⑨

Right?


Cirno with her customary overconfident grin and posture.

I AM THE STRONGEST!

Side glance.

Fufufu...

Icy wings.

Admire my wings!

Wait, there’s something interesting between her legs…

Don't look!

IT’S ONLY THE NUMBER ⑨!!! BAKA!!!

Baka!

This Cirno figure is the number 167 of the “Nendoroid”-series manufactured by the Good Smile Company, originally released in August 2011. It’s bit of a shame I didn’t understand to start collecting Touhou Nendoroids back then, nowadays they are quite difficult to find, and being collector’s items, more expensive now than when new.


For those who are uneducated enough to not to be aware of the connection between Cirno and the number ⑨ (nine), please see the explanation in the Touhou Wiki.


…Ja sitten sama suomeksi… no ei, jääköön lyhyeksi yhteenvedoksi:

Tämä on tosiaan ensimmäinen figuuripostaukseni viiteen vuoteen. Tänä aikana minusta on tullut totaalinen Touhou-fani. ZUN’in musiikki ennenkaikkea kiinnostaa, mutta tottakai kaikki muukin Gensokyo’n alueella tapahtuva.

Ylläoleva Cirno-figuuri on GSC’n “Nendoroid”-sarjaa, julkaistu elokuussa 2011.

Posted in Anime | Tagged , , , , | Comments Off on Happy Cirno⑨ day!

Delaying the start of a systemd unit at boot

I’m keeping an eye on what’s going on with my servers via remote Gkrellm system monitors.

I noticed that on one server the hardware sensors seemed to need a bit more time than normal to initialize on boot, so the gkrellmd daemon occasionally missed some sensor information, requiring a manual restart of gkrellmd.service after boot.
The solution was to delay the start of gkrellmd.service on boot, by creating a file gkrellmd.timer in /etc/systemd/system/ (please note that the timer needs to have the same name as the service it controls):

  1. [Unit]
  2. Description=Delay starting of gkrellmd on boot
  3.  
  4. [Timer]
  5. OnBootSec=1min
  6.  
  7. [Install]
  8. WantedBy=timers.target

Then the original service needs to be disabled and the new timer enabled:

systemctl disable gkrellmd.service
systemctl enable gkrellmd.timer
Posted in Linux | Tagged , , | Comments Off on Delaying the start of a systemd unit at boot

Haru desu yo!!!

Lily White does her best to convince us that “Spring is here!!!”, but looking at the temperature outside, it seems that Cirno has been freezing something else beside her usual frogs…

Posted in Uncategorized | Tagged , | Comments Off on Haru desu yo!!!