diff options
| author | Giuseppe Gadola <giusgadola@gmail.com> | 2023-02-09 01:00:41 +0100 |
|---|---|---|
| committer | Giuseppe Gadola <giusgadola@gmail.com> | 2023-02-10 16:05:59 +0100 |
| commit | 77aa743f67c80e6b29f1eb1946bbd3a9533e49b2 (patch) | |
| tree | 8b925c3b89d66884e02a29e09f2529eb085497be /lua | |
| parent | refactor(animations): animations are now object oriented (diff) | |
refactor: removed old ShowPet function
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/pets.lua | 12 | ||||
| -rw-r--r-- | lua/pets/utils.lua | 11 |
2 files changed, 1 insertions, 22 deletions
diff --git a/lua/pets.lua b/lua/pets.lua index c5ed58e..f8ddb5a 100644 --- a/lua/pets.lua +++ b/lua/pets.lua @@ -1,7 +1,7 @@ local M = {} M.options = { - pet_name = "cat", + pet_type = "cat", pet_style = "brown", offset_rows = 0, offset_cols = 0, @@ -22,16 +22,6 @@ function M.setup(options) require("pets.commands") -- init autocommands end ---[[ This function creates the popup for the image to be displayed and -takes care of calling the utils.ShowPet function.]] -function M.show() - local popup = require("pets.popup").popup - local utils = require("pets.utils") - popup:mount() - - utils.ShowPet(popup.bufnr, M.options.offset_rows, M.options.offset_cols, M.options.pet_name, M.options.pet_style) -end - function M.create_pet(name, type, style) local pet = require("pets.pet").Pet.new(name, type, style) local popup = require("pets.popup").popup diff --git a/lua/pets/utils.lua b/lua/pets/utils.lua index 3e78d61..d436ecd 100644 --- a/lua/pets/utils.lua +++ b/lua/pets/utils.lua @@ -1,16 +1,5 @@ local M = {} -function M.ShowPet(buf, offset_rows, offset_cols, pet_name, pet_style) - local wd = "/mnt/shared/coding/lua/plugins/pets.nvim/media/" -- TODO: adapt to use the correct path when plugin is installed - local sourcedir = wd .. pet_name .. "/" .. pet_style .. "/" - - require("pets.animations").animate(buf, sourcedir) - - -- local image = require("hologram.image"):new(sourcedir .. "8fps/walk/0.png", {}) - -- image:display(1 + offset_rows, 0 + offset_cols, buf, {}) -- TODO: offset option to show the pet at the desired height - return -1 -end - function M.listdir(directory) local i, t, popen = 0, {}, io.popen local pfile = popen('/bin/ls -a "' .. directory .. '"') |