Skip to content

Instantly share code, notes, and snippets.

@febnug
Created November 16, 2026 04:37
Show Gist options
  • Select an option

  • Save febnug/2b263bcf10730d699de4c3a8e4cd5eff to your computer and use it in GitHub Desktop.

Select an option

Save febnug/2b263bcf10730d699de4c3a8e4cd5eff to your computer and use it in GitHub Desktop.
python3 - <<'PY'
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
theme = Gtk.IconTheme.get_default()
theme.set_custom_theme("elementary-xfce")
name = "xfce4-battery-ok-charging"
info = theme.lookup_icon(
name,
24,
Gtk.IconLookupFlags.FORCE_SIZE
)
if info:
print("FOUND:", info.get_filename())
else:
print("NOT FOUND:", name)
PY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment