hyprland-void-dots/hypr-configs/hyprland/eww/scripts/iconfetch.py
2024-06-27 18:05:57 +03:30

16 lines
358 B
Python
Executable file

#!/usr/bin/env python3
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
import sys
def fetch(icon_name):
icon_theme = Gtk.IconTheme.get_default()
icon = icon_theme.lookup_icon(icon_name, 48, 0)
if icon:
return icon.get_filename()
else:
return
if __name__ == "__main__":
print(fetch(sys.argv[1]))