Skip to content

Latest commit

 

History

History
53 lines (31 loc) · 1.46 KB

icon_theme.md

File metadata and controls

53 lines (31 loc) · 1.46 KB

Class gears.xdg.icon_theme

Exploring icon theme using lgi.Gtk

Dependencies

Gtk+
https://github.com/GNOME/gtk

Usage:

local icon_theme = require("gears.xdg.icon_theme"){"ACYLS", 24}
local icon_path = icon_theme:get_icon_path("folder")

gears.xdg.icon_theme{theme_name, icon_size}    Create new theme object

:get_icon_path (icon_name, fallback_icon_name)    Get icon path by icon name

Constructors

gears.xdg.icon_theme{theme_name, icon_size}

Create new theme object

    Parameters:

  •   theme_name (string)    Icon theme name
  •   icon_size (number)    Preferred icon size

Methods

:get_icon_path(icon_name, fallback_icon_name)

Get icon path by icon name

    Parameters:

  •   icon_name (string)      Icon name
  •   fallback_icon_name (string)   If icon not found, return path to icon with this name

    Returns:

    icon_path (string)     Icon file path or empty string, if no icon was found