# MABOX spinner (conky)

**URL:** <https://forum.maboxlinux.org/t/mabox-spinner-conky/2458>\
**Category:** Userland\
**Created:** [February 14, 2026, 6:14pm UTC](https://forum.maboxlinux.org/t/mabox-spinner-conky/2458 "2026-02-14T18:14:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielhb](https://forum.maboxlinux.org/user_avatar/forum.maboxlinux.org/danielhb/32/3941_2.png) [@danielhb](https://forum.maboxlinux.org/u/danielhb)\
**Post date:** [February 14, 2026, 6:14pm UTC](https://forum.maboxlinux.org/t/mabox-spinner-conky/2458/1 "2026-02-14T18:14:00Z")

</div>

Conky animated

The logo:

 ![mabox-logo-circle](https://forum.maboxlinux.org/uploads/default/original/2X/9/9426708942c4ca625be4866252ada8ff7ee17f94.png)

mabox\_spinner\_mbcolors.concyrc:

```auto
conky.config = {
    -- WINDOW
    own_window = true,
    own_window_type = 'desktop',
    own_window_transparent = true, -- Esto es lo importante
    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
    own_window_colour = '#000000',
    own_window_class = 'Conky',
    own_window_title = 'Mabox Spinner',
    
    alignment = 'top_left',
    gap_x = 40,
    gap_y = 150,
    
    minimum_width = 150,
    minimum_height = 150,
    
    -- FONTS
    use_xft = true,
    font = 'Sans:size=10',
    xftalpha = 1,
    override_utf8_locale = true,
    
    -- COLORS
    draw_shades = false,
    draw_outline = false,
    
    -- BORDERS
    draw_borders = false,
    stippled_borders = 0,
    border_inner_margin = 1,
    border_outer_margin = 1,
    border_width = 1,
    
    -- MISC
    background = true,
    use_spacer = 'none',
    no_buffers = true,
    imlib_cache_size = 0,
    
    -- Use double buffer (eliminates flicker)
    double_buffer = true,
    update_interval = 0.03,
    
    lua_load = 'your path/.config/conky/mb-spinner/mabox_spinner.lua',
    lua_draw_hook_post = 'draw_spinner',
}

conky.text = [[
]];

```

mabox\_spinner.lua:

```auto
require 'imlib2'

local image_path = os.getenv("HOME") .. "/.config/conky/mb-spinner/mabox-logo-circle.png"
local angle = 0

function conky_draw_spinner()
    if conky_window == nil then return end
    
    -- Configurar el contexto de Imlib2
    imlib_context_set_display(conky_window.display)
    imlib_context_set_visual(conky_window.visual)
    imlib_context_set_drawable(conky_window.drawable)
    
    -- Cargar la imagen del logo
    local image = imlib_load_image(image_path)
    if not image then
        print("Failed to load image")
        return
    end
    
    imlib_context_set_image(image)
    
    -- Obtener dimensiones originales
    local iw = imlib_image_get_width()
    local ih = imlib_image_get_height()
    
    -- Calcular el tamaño deseado (70% del tamaño de la ventana)
    local scale = 0.7
    local target_size = math.min(conky_window.width, conky_window.height) * scale
    local scale_factor = target_size / math.max(iw, ih)
    local new_w = iw * scale_factor
    local new_h = ih * scale_factor
    
    -- Crear imagen escalada
    local scaled = imlib_create_cropped_scaled_image(0, 0, iw, ih, new_w, new_h)
    
    if not scaled then
        imlib_free_image()
        return
    end
    
    -- Cambiar al contexto de la imagen escalada
    imlib_context_set_image(scaled)
    
    -- Incrementar ángulo (en radianes)
    angle = angle + 0.05
    if angle >= 2 * math.pi then
        angle = 0
    end
    
    -- Crear una imagen rotada desde la escalada
    local rotated = imlib_create_rotated_image(angle)
    
    if rotated then
        imlib_context_set_image(rotated)
        
        -- Obtener dimensiones de la imagen rotada
        local rw = imlib_image_get_width()
        local rh = imlib_image_get_height()
        
        -- Calcular posición central
        local cx = conky_window.width / 2
        local cy = conky_window.height / 2
        
        -- Configurar blend para transparencia
        imlib_context_set_blend(1)
        imlib_context_set_anti_alias(1)
        
        -- Renderizar la imagen rotada en el centro
        imlib_render_image_on_drawable(
            cx - rw/2, -- x
            cy - rh/2 -- y
        )
        
        -- Liberar imagen rotada
        imlib_free_image()
    end
    
    -- Liberar imagen escalada
    imlib_context_set_image(scaled)
    imlib_free_image()
    
    -- Liberar imagen original
    imlib_context_set_image(image)
    imlib_free_image()
end

```

---

<div class="post-metadata">

**Author:** ![danielhb](https://forum.maboxlinux.org/user_avatar/forum.maboxlinux.org/danielhb/32/3941_2.png) [@danielhb](https://forum.maboxlinux.org/u/danielhb)\
**Post date:** [February 14, 2026, 6:32pm UTC](https://forum.maboxlinux.org/t/mabox-spinner-conky/2458/2 "2026-02-14T18:32:49Z")

</div>

You can modify the parameters and the image to suit your preferences.  
I couldn’t get the drag to new position option to work, but I was able to use the selector.

Pueden modificar los parámetros y la imagen para adaptarlos a su gusto.  
No logré que funcione la opción de arrastrar a nueva posición, sí pude con el selector.
