aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Gadola <giusgadola@gmail.com>2023-03-01 14:22:38 +0100
committerGiuseppe Gadola <giusgadola@gmail.com>2023-03-01 15:08:51 +0100
commitadd39bd3057f1dfa3ad3c5cd5215aba3b1cf182d (patch)
tree0951cfca91648db6211e9149ceaa43667e94b41d
parentdocs(help): auto generate docs (diff)
feat(pets): added dog
-rw-r--r--.gitignore1
-rw-r--r--README.md27
-rw-r--r--lua/pets.lua2
-rw-r--r--lua/pets/animations.lua65
-rw-r--r--lua/pets/commands.lua56
-rw-r--r--lua/pets/pet.lua2
-rw-r--r--lua/pets/utils.lua11
-rw-r--r--media/dog/beige/idle/0_1.pngbin0 -> 603 bytes
-rw-r--r--media/dog/beige/idle/0_2.pngbin0 -> 615 bytes
-rw-r--r--media/dog/beige/idle/0_3.pngbin0 -> 614 bytes
-rw-r--r--media/dog/beige/idle/0_4.pngbin0 -> 598 bytes
-rw-r--r--media/dog/beige/idle/1_0.pngbin0 -> 587 bytes
-rw-r--r--media/dog/beige/idle/1_1.pngbin0 -> 604 bytes
-rw-r--r--media/dog/beige/idle/1_2.pngbin0 -> 605 bytes
-rw-r--r--media/dog/beige/idle/1_3.pngbin0 -> 593 bytes
-rw-r--r--media/dog/beige/liedown/3_3.pngbin0 -> 558 bytes
-rw-r--r--media/dog/beige/pee/3_2.pngbin0 -> 623 bytes
-rw-r--r--media/dog/beige/run/1_4.pngbin0 -> 562 bytes
-rw-r--r--media/dog/beige/run/2_0.pngbin0 -> 573 bytes
-rw-r--r--media/dog/beige/run/2_1.pngbin0 -> 589 bytes
-rw-r--r--media/dog/beige/run/2_2.pngbin0 -> 581 bytes
-rw-r--r--media/dog/beige/run/2_3.pngbin0 -> 591 bytes
-rw-r--r--media/dog/beige/run/2_4.pngbin0 -> 573 bytes
-rw-r--r--media/dog/beige/run/3_0.pngbin0 -> 607 bytes
-rw-r--r--media/dog/beige/run/3_1.pngbin0 -> 567 bytes
-rw-r--r--media/dog/beige/sit/0_0.pngbin0 -> 585 bytes
-rw-r--r--media/dog/beige/walk/3_4.pngbin0 -> 614 bytes
-rw-r--r--media/dog/beige/walk/4_0.pngbin0 -> 585 bytes
-rw-r--r--media/dog/beige/walk/4_1.pngbin0 -> 603 bytes
-rw-r--r--media/dog/beige/walk/4_2.pngbin0 -> 620 bytes
-rw-r--r--media/dog/black/idle/0_1.pngbin0 -> 603 bytes
-rw-r--r--media/dog/black/idle/0_2.pngbin0 -> 611 bytes
-rw-r--r--media/dog/black/idle/0_3.pngbin0 -> 610 bytes
-rw-r--r--media/dog/black/idle/0_4.pngbin0 -> 598 bytes
-rw-r--r--media/dog/black/idle/1_0.pngbin0 -> 587 bytes
-rw-r--r--media/dog/black/idle/1_1.pngbin0 -> 599 bytes
-rw-r--r--media/dog/black/idle/1_2.pngbin0 -> 601 bytes
-rw-r--r--media/dog/black/idle/1_3.pngbin0 -> 593 bytes
-rw-r--r--media/dog/black/liedown/3_3.pngbin0 -> 558 bytes
-rw-r--r--media/dog/black/pee/3_2.pngbin0 -> 620 bytes
-rw-r--r--media/dog/black/run/1_4.pngbin0 -> 554 bytes
-rw-r--r--media/dog/black/run/2_0.pngbin0 -> 562 bytes
-rw-r--r--media/dog/black/run/2_1.pngbin0 -> 577 bytes
-rw-r--r--media/dog/black/run/2_2.pngbin0 -> 567 bytes
-rw-r--r--media/dog/black/run/2_3.pngbin0 -> 584 bytes
-rw-r--r--media/dog/black/run/2_4.pngbin0 -> 565 bytes
-rw-r--r--media/dog/black/run/3_0.pngbin0 -> 607 bytes
-rw-r--r--media/dog/black/run/3_1.pngbin0 -> 567 bytes
-rw-r--r--media/dog/black/sit/0_0.pngbin0 -> 585 bytes
-rw-r--r--media/dog/black/walk/3_4.pngbin0 -> 610 bytes
-rw-r--r--media/dog/black/walk/4_0.pngbin0 -> 585 bytes
-rw-r--r--media/dog/black/walk/4_1.pngbin0 -> 603 bytes
-rw-r--r--media/dog/black/walk/4_2.pngbin0 -> 615 bytes
-rw-r--r--media/dog/brown/idle/0_1.pngbin0 -> 603 bytes
-rw-r--r--media/dog/brown/idle/0_2.pngbin0 -> 615 bytes
-rw-r--r--media/dog/brown/idle/0_3.pngbin0 -> 614 bytes
-rw-r--r--media/dog/brown/idle/0_4.pngbin0 -> 598 bytes
-rw-r--r--media/dog/brown/idle/1_0.pngbin0 -> 587 bytes
-rw-r--r--media/dog/brown/idle/1_1.pngbin0 -> 604 bytes
-rw-r--r--media/dog/brown/idle/1_2.pngbin0 -> 605 bytes
-rw-r--r--media/dog/brown/idle/1_3.pngbin0 -> 593 bytes
-rw-r--r--media/dog/brown/liedown/3_3.pngbin0 -> 558 bytes
-rw-r--r--media/dog/brown/pee/3_2.pngbin0 -> 623 bytes
-rw-r--r--media/dog/brown/run/1_4.pngbin0 -> 562 bytes
-rw-r--r--media/dog/brown/run/2_0.pngbin0 -> 573 bytes
-rw-r--r--media/dog/brown/run/2_1.pngbin0 -> 589 bytes
-rw-r--r--media/dog/brown/run/2_2.pngbin0 -> 581 bytes
-rw-r--r--media/dog/brown/run/2_3.pngbin0 -> 591 bytes
-rw-r--r--media/dog/brown/run/2_4.pngbin0 -> 573 bytes
-rw-r--r--media/dog/brown/run/3_0.pngbin0 -> 607 bytes
-rw-r--r--media/dog/brown/run/3_1.pngbin0 -> 567 bytes
-rw-r--r--media/dog/brown/sit/0_0.pngbin0 -> 585 bytes
-rw-r--r--media/dog/brown/walk/3_4.pngbin0 -> 614 bytes
-rw-r--r--media/dog/brown/walk/4_0.pngbin0 -> 585 bytes
-rw-r--r--media/dog/brown/walk/4_1.pngbin0 -> 603 bytes
-rw-r--r--media/dog/brown/walk/4_2.pngbin0 -> 620 bytes
-rw-r--r--media/dog/gray/idle/0_1.pngbin0 -> 603 bytes
-rw-r--r--media/dog/gray/idle/0_2.pngbin0 -> 615 bytes
-rw-r--r--media/dog/gray/idle/0_3.pngbin0 -> 614 bytes
-rw-r--r--media/dog/gray/idle/0_4.pngbin0 -> 598 bytes
-rw-r--r--media/dog/gray/idle/1_0.pngbin0 -> 587 bytes
-rw-r--r--media/dog/gray/idle/1_1.pngbin0 -> 604 bytes
-rw-r--r--media/dog/gray/idle/1_2.pngbin0 -> 605 bytes
-rw-r--r--media/dog/gray/idle/1_3.pngbin0 -> 593 bytes
-rw-r--r--media/dog/gray/liedown/3_3.pngbin0 -> 558 bytes
-rw-r--r--media/dog/gray/pee/3_2.pngbin0 -> 623 bytes
-rw-r--r--media/dog/gray/run/1_4.pngbin0 -> 562 bytes
-rw-r--r--media/dog/gray/run/2_0.pngbin0 -> 573 bytes
-rw-r--r--media/dog/gray/run/2_1.pngbin0 -> 589 bytes
-rw-r--r--media/dog/gray/run/2_2.pngbin0 -> 581 bytes
-rw-r--r--media/dog/gray/run/2_3.pngbin0 -> 591 bytes
-rw-r--r--media/dog/gray/run/2_4.pngbin0 -> 573 bytes
-rw-r--r--media/dog/gray/run/3_0.pngbin0 -> 607 bytes
-rw-r--r--media/dog/gray/run/3_1.pngbin0 -> 567 bytes
-rw-r--r--media/dog/gray/sit/0_0.pngbin0 -> 585 bytes
-rw-r--r--media/dog/gray/walk/3_4.pngbin0 -> 614 bytes
-rw-r--r--media/dog/gray/walk/4_0.pngbin0 -> 585 bytes
-rw-r--r--media/dog/gray/walk/4_1.pngbin0 -> 603 bytes
-rw-r--r--media/dog/gray/walk/4_2.pngbin0 -> 620 bytes
-rw-r--r--pets.gifbin3533041 -> 3552110 bytes
100 files changed, 66 insertions, 98 deletions
diff --git a/.gitignore b/.gitignore
index 238d11c..ecbc12f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
vendor/plenary.nvim
+media/*.sh
diff --git a/README.md b/README.md
index 570f297..7b9e863 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,4 @@
# pets.nvim
-> ⚠️⚠️⚠️ Currently the plugin is not working and is searching for new assets. See #26
Pets.nvim is a plugin that provides the missing core functionality of showing little animal friends inside your editor.
It relies on the [kitty graphics protocol](https://sw.kovidgoyal.net/kitty/graphics-protocol/) and [hologram.nvim](https://github.com/edluffy/hologram.nvim) to be able to display images in a terminal window.
@@ -47,13 +46,13 @@ require("pets").setup({
This is the default configuration:
```lua
{
- row = 1, -- the row (height) to display the pet at (must be at least 1 and at most 10)
+ row = 1, -- the row (height) to display the pet at (higher row means the pet is lower on the screen), must be 1<=row<=10
col = 0, -- the column to display the pet at (set to high number to have it stay still on the right side)
speed_multiplier = 1, -- you can make your pet move faster/slower. If slower the animation will have lower fps.
- default_pet = "cat", -- the pet to use for the PetNew command
+ default_pet = "dog", -- the pet to use for the PetNew command
default_style = "brown", -- the style of the pet to use for the PetNew command
- random = false, -- wether to use a random pet for the PetNew command, ovverides default_pet and default_style
- death_animation = true, -- animate the pet's death, set to false to feel less guilt
+ random = true, -- wether to use a random pet for the PetNew command, ovverides default_pet and default_style
+ -- death_animation = true, -- animate the pet's death, set to false to feel less guilt -- currently no animations are available
popup = { -- popup options, try changing these if you see a rectangle around the pets
width = "30%", -- can be a string with percentage like "45%" or a number of columns like 45
winblend = 100, -- winblend value - see :h 'winblend' - only used if avoid_statusline is false
@@ -68,16 +67,16 @@ This is the default configuration:
- If the pet is not at the height you desire change the `row` option (higher row means the pet is displayed lower on the screen)
- If you're seeing a square around the pets, try setting `avoid_statusline` to `true`. If you're still seeing it
- try setting `winblend` to 0 or using a custom highlight group as shown [above](#-Configuration).
+ try setting `winblend` to 0 or using a custom highlight group as shown [above](#-Configuration) and in #8.
+- If you don't see the pet at all checkout the [limitations](#-Limitations) and try changing the row value.
## 🐾 Available pets
-- cat:
- - black
- - red
+- dog:
- brown
- - dark_grey
- - light_grey
+ - black
+ - gray
+ - beige
## 📑 Usage - commands
@@ -101,7 +100,9 @@ and shares all of its limitations. Here are the most significant ones:
## 👏 Credits
-All the beautiful cat assets were designed by [SeethingSwarm](https://seethingswarm.itch.io/catset)
+The dog assets were created by [NVPH Studio](https://nvph-studio.itch.io/dog-animation-4-different-dogs). All the details about the license
+can be found [here](https://creativecommons.org/licenses/by-nd/4.0/#).
+The old cat assets were designed by [SeethingSwarm](https://seethingswarm.itch.io/catset).
<!-- panvimdoc-ignore-start -->
## 🙏 Acknowledgements
@@ -109,7 +110,7 @@ All the beautiful cat assets were designed by [SeethingSwarm](https://seethingsw
A big thanks to everyone that helped, helps or will help the project!
<a href="https://github.com/giusgad/pets.nvim/graphs/contributors">
- <img src="https://contrib.rocks/image?repo=giusgad/pets.nvim" />
+ <img src="https://contrib.rocks/image?repo=giusgad/pets.nvim"/>
</a>
<!-- panvimdoc-ignore-end -->
diff --git a/lua/pets.lua b/lua/pets.lua
index a2b3b81..6703a3d 100644
--- a/lua/pets.lua
+++ b/lua/pets.lua
@@ -9,7 +9,7 @@ M.options = {
row = 1, -- the row (height) to display the pet at
col = 0, -- the column to display the pet at (set to high numeber to have it stay stil at the right)
speed_multiplier = 1,
- default_pet = "cat",
+ default_pet = "dog",
default_style = "brown",
random = true,
death_animation = true,
diff --git a/lua/pets/animations.lua b/lua/pets/animations.lua
index b413578..37d0f27 100644
--- a/lua/pets/animations.lua
+++ b/lua/pets/animations.lua
@@ -10,7 +10,7 @@ local lines = {}
local listdir = require("pets.utils").listdir
local sleeping_animations = { "idle", "sit", "liedown" }
-local function get_sleeping_animation()
+local function get_sleeping_animation() -- TODO:
return sleeping_animations[math.random(#sleeping_animations)]
end
@@ -18,6 +18,7 @@ end
-- @param type,style type and style of the pet
-- @param popup the popup where the pet is displayed
-- @param user_opts table with user options
+-- @param state table with the current plugin state (sleeping, paused, hidden)
-- @return a new animation instance
function M.Animation.new(sourcedir, type, style, popup, user_opts, state)
local instance = setmetatable({}, M.Animation)
@@ -45,17 +46,28 @@ function M.Animation.new(sourcedir, type, style, popup, user_opts, state)
-- setup frames
for _, action in pairs(instance.actions) do
- local current_actions = {}
+ local current_frames = {}
for _, file in pairs(listdir(sourcedir .. action)) do
local image = require("hologram.image"):new(sourcedir .. action .. "/" .. file)
- table.insert(current_actions, image)
+ table.insert(current_frames, image)
end
- instance.frames[action] = current_actions
+ instance.frames[action] = current_frames
end
+
+ -- setup next_actions
+ instance.next_actions = {
+ idle = { "sit", "liedown", "walk", "run", "pee" },
+ liedown = { "sit", "idle" },
+ pee = { "idle", "sit" },
+ run = { "walk", "idle" },
+ sit = { "walk", "liedown", "pee" },
+ walk = { "run", "idle" },
+ }
+
return instance
end
-function M.Animation:start_timer()
+function M.Animation:start_timer(interval)
if self.timer ~= nil then
self:stop_timer()
end
@@ -68,7 +80,6 @@ function M.Animation:start_timer()
end
function M.Animation:stop_timer()
- print()
if self.timer == nil then
return
end
@@ -83,6 +94,7 @@ function M.Animation:start()
if self.timer ~= nil then -- reset timer
self.timer = nil
end
+ self.repetitions = 0
if self.state.sleeping then
self.current_action = get_sleeping_animation()
@@ -101,7 +113,6 @@ end
-- @function called on every tick from the timer, go to the next frame
function M.Animation:next_frame()
- self.frame_counter = self.frame_counter + 1
-- pouplate the buffer with spaces to avoid image distortion
if self.popup.bufnr == nil or not vim.api.nvim_buf_is_valid(self.popup.bufnr) then
return
@@ -112,15 +123,20 @@ function M.Animation:next_frame()
else
self.current_image:delete(0, { free = false })
end
- if self.frame_counter > #self.frames[self.current_action] then -- true every 8 frames
- M.Animation.set_next_action(self)
+ if self.frame_counter > #self.frames[self.current_action] then -- what to do when current frames end
+ self.repetitions = self.repetitions + 1
+ -- if the animation lasted at least 8 frames go to the next one else repeat it (useful for 1 or 4 frames animations)
+ if self.repetitions * #self.frames[self.current_action] >= 8 then
+ M.Animation.set_next_action(self)
+ self.repetitions = 0
+ end
if self.dead then
- M.Animation.stop_timer(self)
+ self:stop()
return
end
- self.frame_counter = 1
+ self.frame_counter = 1 -- reset the frame counter
end
- -- frames contains the images for every action
+ -- the frames table contains the images for every action
local image = self.frames[self.current_action][self.frame_counter]
M.Animation.set_next_col(self)
local ok = pcall(image.display, image, self.row, self.col, self.popup.bufnr, {})
@@ -138,6 +154,7 @@ function M.Animation:next_frame()
end
end
self.current_image = image
+ self.frame_counter = self.frame_counter + 1
end
-- @function decide which action comes after the following
@@ -151,15 +168,6 @@ function M.Animation:set_next_action()
self.current_action = "die"
return
end
- local next_actions = {
- crouch = { "liedown", "sneak", "sit" },
- idle = { "idle_blink", "walk", "sit" },
- idle_blink = { "idle", "walk", "sit" },
- liedown = { "sneak", "crouch" },
- sit = { "idle", "idle_blink", "crouch", "liedown" },
- sneak = { "crouch", "walk", "liedown" },
- walk = { "idle", "idle_blink" },
- }
if self.state.sleeping then
-- If the animation isn't currently a sleeping animtion, put the pet in it, otherwise loop the animation
if not vim.tbl_contains(sleeping_animations, self.current_action) then
@@ -167,7 +175,8 @@ function M.Animation:set_next_action()
end
else
if math.random() < 0.5 then
- self.current_action = next_actions[self.current_action][math.random(#next_actions[self.current_action])]
+ self.current_action =
+ self.next_actions[self.current_action][math.random(#self.next_actions[self.current_action])]
end
end
end
@@ -180,11 +189,9 @@ function M.Animation:set_next_col()
else
self.col = M.base_col
end
- elseif self.current_action == "sneak" or self.current_action == "crouch" then
+ elseif self.current_action == "run" then
if self.col < self.popup.win_config.width - 8 then
- if self.frame_counter % 2 == 0 then
- self.col = self.col + 1
- end
+ self.col = self.col + 2
else
self.col = M.base_col
end
@@ -195,11 +202,7 @@ function M.Animation:stop()
if self.current_image then
self.current_image:delete(0, { free = false })
end
- if self.timer then
- self.timer:stop()
- self.timer:close()
- self.timer = nil
- end
+ self:stop_timer()
end
function M.Animation:set_state(new_state)
diff --git a/lua/pets/commands.lua b/lua/pets/commands.lua
index 33edb14..336a816 100644
--- a/lua/pets/commands.lua
+++ b/lua/pets/commands.lua
@@ -2,11 +2,7 @@ local pets = require("pets")
local utils = require("pets.utils")
vim.api.nvim_create_user_command("PetsNew", function(input)
- vim.notify(
- "Pets is currently searching for new assetes due to licensing issues with the previous ones,\nif you still have them please remove them or buy the asset pack. See #26 on github if you want to suggest anything.",
- vim.log.levels.INFO
- )
- --[[ local pet, style = pets.options.default_pet, pets.options.default_style
+ local pet, style = pets.options.default_pet, pets.options.default_style
-- validate the pets and style options
if not utils.validate_type_style(pet, style) then
@@ -14,15 +10,15 @@ vim.api.nvim_create_user_command("PetsNew", function(input)
end
if pets.options.random then
- local styles = utils.available_pets["cat"]
- pet, style = "cat", styles[math.random(#styles)]
+ local styles = utils.available_pets["dog"]
+ pet, style = "dog", styles[math.random(#styles)]
end
- pets.create_pet(input.args, pet, style) ]]
+ pets.create_pet(input.args, pet, style)
end, { nargs = 1 })
vim.api.nvim_create_user_command("PetsNewCustom", function(input)
- --[[ local args = vim.split(input.args, " ", { trimempty = true })
+ local args = vim.split(input.args, " ", { trimempty = true })
if #args ~= 3 then
utils.warning("Inccorect number of arguments!\nUSAGE: PetsNewCustom {type} {style} {name}")
return
@@ -31,60 +27,32 @@ vim.api.nvim_create_user_command("PetsNewCustom", function(input)
if not utils.validate_type_style(type, style) then
return
end
- pets.create_pet(name, type, style) ]]
- vim.notify(
- "Pets is currently searching for new assetes due to licensing issues with the previous ones,\nif you still have them please remove them or buy the asset pack. See #26 on github if you want to suggest anything.",
- vim.log.levels.INFO
- )
+ pets.create_pet(name, type, style)
end, { nargs = 1, complete = utils.complete_typestyle })
vim.api.nvim_create_user_command("PetsKillAll", function()
- -- pets.kill_all()
- vim.notify(
- "Pets is currently searching for new assetes due to licensing issues with the previous ones,\nif you still have them please remove them or buy the asset pack. See #26 on github if you want to suggest anything.",
- vim.log.levels.INFO
- )
+ pets.kill_all()
end, {})
vim.api.nvim_create_user_command("PetsKill", function(input)
- -- pets.kill_pet(input.args)
- vim.notify(
- "Pets is currently searching for new assetes due to licensing issues with the previous ones,\nif you still have them please remove them or buy the asset pack. See #26 on github if you want to suggest anything.",
- vim.log.levels.INFO
- )
+ pets.kill_pet(input.args)
end, {
nargs = 1,
complete = utils.complete_name,
})
vim.api.nvim_create_user_command("PetsList", function()
- -- pets.list()
- vim.notify(
- "Pets is currently searching for new assetes due to licensing issues with the previous ones,\nif you still have them please remove them or buy the asset pack. See #26 on github if you want to suggest anything.",
- vim.log.levels.INFO
- )
+ pets.list()
end, {})
vim.api.nvim_create_user_command("PetsPauseToggle", function()
- -- pets.toggle_pause()
- vim.notify(
- "Pets is currently searching for new assetes due to licensing issues with the previous ones,\nif you still have them please remove them or buy the asset pack. See #26 on github if you want to suggest anything.",
- vim.log.levels.INFO
- )
+ pets.toggle_pause()
end, {})
vim.api.nvim_create_user_command("PetsHideToggle", function()
- -- pets.toggle_hide()
- vim.notify(
- "Pets is currently searching for new assetes due to licensing issues with the previous ones,\nif you still have them please remove them or buy the asset pack. See #26 on github if you want to suggest anything.",
- vim.log.levels.INFO
- )
+ pets.toggle_hide()
end, {})
vim.api.nvim_create_user_command("PetsSleepToggle", function()
- -- pets.toggle_sleep()
- vim.notify(
- "Pets is currently searching for new assetes due to licensing issues with the previous ones,\nif you still have them please remove them or buy the asset pack. See #26 on github if you want to suggest anything.",
- vim.log.levels.INFO
- )
+ pets.toggle_sleep()
end, {})
diff --git a/lua/pets/pet.lua b/lua/pets/pet.lua
index f767ed0..99f0053 100644
--- a/lua/pets/pet.lua
+++ b/lua/pets/pet.lua
@@ -47,7 +47,7 @@ function M.Pet:kill()
self.animation:stop()
self.popup:unmount()
end
- if self.death_animation then
+ if self.death_animation and self.animation.frames["die"] ~= nil then
self.animation.dying = true
else
self.animation:stop()
diff --git a/lua/pets/utils.lua b/lua/pets/utils.lua
index dbf1191..68ea6b1 100644
--- a/lua/pets/utils.lua
+++ b/lua/pets/utils.lua
@@ -3,20 +3,15 @@ M.available_pets = {}
-- list all files in a directory
-- source: https://stackoverflow.com/a/11130774
-function M.listdir(directory, suppress)
- suppress = suppress or false
+function M.listdir(directory)
local i, t, popen = 0, {}, io.popen
local pfile
- if suppress then
- pfile = popen('/bin/ls -a "' .. directory .. '" 2>/dev/null')
- else
- pfile = popen('/bin/ls -a "' .. directory .. '"')
- end
+ pfile = popen('/bin/ls -a "' .. directory .. '"')
if pfile == nil then
error("Error getting assets for specified pet")
end
for filename in pfile:lines() do
- if filename ~= "." and filename ~= ".." then
+ if filename ~= "." and filename ~= ".." and not vim.endswith(filename, "sh") then
i = i + 1
t[i] = filename
end
diff --git a/media/dog/beige/idle/0_1.png b/media/dog/beige/idle/0_1.png
new file mode 100644
index 0000000..5eb5da0
--- /dev/null
+++ b/media/dog/beige/idle/0_1.png
Binary files differ
diff --git a/media/dog/beige/idle/0_2.png b/media/dog/beige/idle/0_2.png
new file mode 100644
index 0000000..855b581
--- /dev/null
+++ b/media/dog/beige/idle/0_2.png
Binary files differ
diff --git a/media/dog/beige/idle/0_3.png b/media/dog/beige/idle/0_3.png
new file mode 100644
index 0000000..bd9bad5
--- /dev/null
+++ b/media/dog/beige/idle/0_3.png
Binary files differ
diff --git a/media/dog/beige/idle/0_4.png b/media/dog/beige/idle/0_4.png
new file mode 100644
index 0000000..9d5446b
--- /dev/null
+++ b/media/dog/beige/idle/0_4.png
Binary files differ
diff --git a/media/dog/beige/idle/1_0.png b/media/dog/beige/idle/1_0.png
new file mode 100644
index 0000000..9225d68
--- /dev/null
+++ b/media/dog/beige/idle/1_0.png
Binary files differ
diff --git a/media/dog/beige/idle/1_1.png b/media/dog/beige/idle/1_1.png
new file mode 100644
index 0000000..df44c26
--- /dev/null
+++ b/media/dog/beige/idle/1_1.png
Binary files differ
diff --git a/media/dog/beige/idle/1_2.png b/media/dog/beige/idle/1_2.png
new file mode 100644
index 0000000..7790856
--- /dev/null
+++ b/media/dog/beige/idle/1_2.png
Binary files differ
diff --git a/media/dog/beige/idle/1_3.png b/media/dog/beige/idle/1_3.png
new file mode 100644
index 0000000..829d42d
--- /dev/null
+++ b/media/dog/beige/idle/1_3.png
Binary files differ
diff --git a/media/dog/beige/liedown/3_3.png b/media/dog/beige/liedown/3_3.png
new file mode 100644
index 0000000..40ae849
--- /dev/null
+++ b/media/dog/beige/liedown/3_3.png
Binary files differ
diff --git a/media/dog/beige/pee/3_2.png b/media/dog/beige/pee/3_2.png
new file mode 100644
index 0000000..d4ec27b
--- /dev/null
+++ b/media/dog/beige/pee/3_2.png
Binary files differ
diff --git a/media/dog/beige/run/1_4.png b/media/dog/beige/run/1_4.png
new file mode 100644
index 0000000..338d0de
--- /dev/null
+++ b/media/dog/beige/run/1_4.png
Binary files differ
diff --git a/media/dog/beige/run/2_0.png b/media/dog/beige/run/2_0.png
new file mode 100644
index 0000000..7c2be3b
--- /dev/null
+++ b/media/dog/beige/run/2_0.png
Binary files differ
diff --git a/media/dog/beige/run/2_1.png b/media/dog/beige/run/2_1.png
new file mode 100644
index 0000000..c3aafd8
--- /dev/null
+++ b/media/dog/beige/run/2_1.png
Binary files differ
diff --git a/media/dog/beige/run/2_2.png b/media/dog/beige/run/2_2.png
new file mode 100644
index 0000000..5e73bf3
--- /dev/null
+++ b/media/dog/beige/run/2_2.png
Binary files differ
diff --git a/media/dog/beige/run/2_3.png b/media/dog/beige/run/2_3.png
new file mode 100644
index 0000000..5b5066e
--- /dev/null
+++ b/media/dog/beige/run/2_3.png
Binary files differ
diff --git a/media/dog/beige/run/2_4.png b/media/dog/beige/run/2_4.png
new file mode 100644
index 0000000..77b7aa8
--- /dev/null
+++ b/media/dog/beige/run/2_4.png
Binary files differ
diff --git a/media/dog/beige/run/3_0.png b/media/dog/beige/run/3_0.png
new file mode 100644
index 0000000..e93086b
--- /dev/null
+++ b/media/dog/beige/run/3_0.png
Binary files differ
diff --git a/media/dog/beige/run/3_1.png b/media/dog/beige/run/3_1.png
new file mode 100644
index 0000000..548d30a
--- /dev/null
+++ b/media/dog/beige/run/3_1.png
Binary files differ
diff --git a/media/dog/beige/sit/0_0.png b/media/dog/beige/sit/0_0.png
new file mode 100644
index 0000000..96bb49c
--- /dev/null
+++ b/media/dog/beige/sit/0_0.png
Binary files differ
diff --git a/media/dog/beige/walk/3_4.png b/media/dog/beige/walk/3_4.png
new file mode 100644
index 0000000..34f5726
--- /dev/null
+++ b/media/dog/beige/walk/3_4.png
Binary files differ
diff --git a/media/dog/beige/walk/4_0.png b/media/dog/beige/walk/4_0.png
new file mode 100644
index 0000000..3998a60
--- /dev/null
+++ b/media/dog/beige/walk/4_0.png
Binary files differ
diff --git a/media/dog/beige/walk/4_1.png b/media/dog/beige/walk/4_1.png
new file mode 100644
index 0000000..ca0773b
--- /dev/null
+++ b/media/dog/beige/walk/4_1.png
Binary files differ
diff --git a/media/dog/beige/walk/4_2.png b/media/dog/beige/walk/4_2.png
new file mode 100644
index 0000000..44bd640
--- /dev/null
+++ b/media/dog/beige/walk/4_2.png
Binary files differ
diff --git a/media/dog/black/idle/0_1.png b/media/dog/black/idle/0_1.png
new file mode 100644
index 0000000..0b7019b
--- /dev/null
+++ b/media/dog/black/idle/0_1.png
Binary files differ
diff --git a/media/dog/black/idle/0_2.png b/media/dog/black/idle/0_2.png
new file mode 100644
index 0000000..5b7178f
--- /dev/null
+++ b/media/dog/black/idle/0_2.png
Binary files differ
diff --git a/media/dog/black/idle/0_3.png b/media/dog/black/idle/0_3.png
new file mode 100644
index 0000000..70bf1ac
--- /dev/null
+++ b/media/dog/black/idle/0_3.png
Binary files differ
diff --git a/media/dog/black/idle/0_4.png b/media/dog/black/idle/0_4.png
new file mode 100644
index 0000000..9624437
--- /dev/null
+++ b/media/dog/black/idle/0_4.png
Binary files differ
diff --git a/media/dog/black/idle/1_0.png b/media/dog/black/idle/1_0.png
new file mode 100644
index 0000000..0915e25
--- /dev/null
+++ b/media/dog/black/idle/1_0.png
Binary files differ
diff --git a/media/dog/black/idle/1_1.png b/media/dog/black/idle/1_1.png
new file mode 100644
index 0000000..0337c8c
--- /dev/null
+++ b/media/dog/black/idle/1_1.png
Binary files differ
diff --git a/media/dog/black/idle/1_2.png b/media/dog/black/idle/1_2.png
new file mode 100644
index 0000000..cde0a16
--- /dev/null
+++ b/media/dog/black/idle/1_2.png
Binary files differ
diff --git a/media/dog/black/idle/1_3.png b/media/dog/black/idle/1_3.png
new file mode 100644
index 0000000..a033895
--- /dev/null
+++ b/media/dog/black/idle/1_3.png
Binary files differ
diff --git a/media/dog/black/liedown/3_3.png b/media/dog/black/liedown/3_3.png
new file mode 100644
index 0000000..3a16659
--- /dev/null
+++ b/media/dog/black/liedown/3_3.png
Binary files differ
diff --git a/media/dog/black/pee/3_2.png b/media/dog/black/pee/3_2.png
new file mode 100644
index 0000000..0938d1e
--- /dev/null
+++ b/media/dog/black/pee/3_2.png
Binary files differ
diff --git a/media/dog/black/run/1_4.png b/media/dog/black/run/1_4.png
new file mode 100644
index 0000000..6550e8e
--- /dev/null
+++ b/media/dog/black/run/1_4.png
Binary files differ
diff --git a/media/dog/black/run/2_0.png b/media/dog/black/run/2_0.png
new file mode 100644
index 0000000..a2232c9
--- /dev/null
+++ b/media/dog/black/run/2_0.png
Binary files differ
diff --git a/media/dog/black/run/2_1.png b/media/dog/black/run/2_1.png
new file mode 100644
index 0000000..6140227
--- /dev/null
+++ b/media/dog/black/run/2_1.png
Binary files differ
diff --git a/media/dog/black/run/2_2.png b/media/dog/black/run/2_2.png
new file mode 100644
index 0000000..d8961bb
--- /dev/null
+++ b/media/dog/black/run/2_2.png
Binary files differ
diff --git a/media/dog/black/run/2_3.png b/media/dog/black/run/2_3.png
new file mode 100644
index 0000000..f4cebda
--- /dev/null
+++ b/media/dog/black/run/2_3.png
Binary files differ
diff --git a/media/dog/black/run/2_4.png b/media/dog/black/run/2_4.png
new file mode 100644
index 0000000..0c35d03
--- /dev/null
+++ b/media/dog/black/run/2_4.png
Binary files differ
diff --git a/media/dog/black/run/3_0.png b/media/dog/black/run/3_0.png
new file mode 100644
index 0000000..83311e7
--- /dev/null
+++ b/media/dog/black/run/3_0.png
Binary files differ
diff --git a/media/dog/black/run/3_1.png b/media/dog/black/run/3_1.png
new file mode 100644
index 0000000..9058bf4
--- /dev/null
+++ b/media/dog/black/run/3_1.png
Binary files differ
diff --git a/media/dog/black/sit/0_0.png b/media/dog/black/sit/0_0.png
new file mode 100644
index 0000000..db36048
--- /dev/null
+++ b/media/dog/black/sit/0_0.png
Binary files differ
diff --git a/media/dog/black/walk/3_4.png b/media/dog/black/walk/3_4.png
new file mode 100644
index 0000000..5a578ef
--- /dev/null
+++ b/media/dog/black/walk/3_4.png
Binary files differ
diff --git a/media/dog/black/walk/4_0.png b/media/dog/black/walk/4_0.png
new file mode 100644
index 0000000..6f41b9b
--- /dev/null
+++ b/media/dog/black/walk/4_0.png
Binary files differ
diff --git a/media/dog/black/walk/4_1.png b/media/dog/black/walk/4_1.png
new file mode 100644
index 0000000..d631822
--- /dev/null
+++ b/media/dog/black/walk/4_1.png
Binary files differ
diff --git a/media/dog/black/walk/4_2.png b/media/dog/black/walk/4_2.png
new file mode 100644
index 0000000..69e1104
--- /dev/null
+++ b/media/dog/black/walk/4_2.png
Binary files differ
diff --git a/media/dog/brown/idle/0_1.png b/media/dog/brown/idle/0_1.png
new file mode 100644
index 0000000..835f541
--- /dev/null
+++ b/media/dog/brown/idle/0_1.png
Binary files differ
diff --git a/media/dog/brown/idle/0_2.png b/media/dog/brown/idle/0_2.png
new file mode 100644
index 0000000..f8b16b4
--- /dev/null
+++ b/media/dog/brown/idle/0_2.png
Binary files differ
diff --git a/media/dog/brown/idle/0_3.png b/media/dog/brown/idle/0_3.png
new file mode 100644
index 0000000..233971f
--- /dev/null
+++ b/media/dog/brown/idle/0_3.png
Binary files differ
diff --git a/media/dog/brown/idle/0_4.png b/media/dog/brown/idle/0_4.png
new file mode 100644
index 0000000..ede94d4
--- /dev/null
+++ b/media/dog/brown/idle/0_4.png
Binary files differ
diff --git a/media/dog/brown/idle/1_0.png b/media/dog/brown/idle/1_0.png
new file mode 100644
index 0000000..2c67815
--- /dev/null
+++ b/media/dog/brown/idle/1_0.png
Binary files differ
diff --git a/media/dog/brown/idle/1_1.png b/media/dog/brown/idle/1_1.png
new file mode 100644
index 0000000..e2b1d2f
--- /dev/null
+++ b/media/dog/brown/idle/1_1.png
Binary files differ
diff --git a/media/dog/brown/idle/1_2.png b/media/dog/brown/idle/1_2.png
new file mode 100644
index 0000000..4add2fd
--- /dev/null
+++ b/media/dog/brown/idle/1_2.png
Binary files differ
diff --git a/media/dog/brown/idle/1_3.png b/media/dog/brown/idle/1_3.png
new file mode 100644
index 0000000..d8714f0
--- /dev/null
+++ b/media/dog/brown/idle/1_3.png
Binary files differ
diff --git a/media/dog/brown/liedown/3_3.png b/media/dog/brown/liedown/3_3.png
new file mode 100644
index 0000000..2920aae
--- /dev/null
+++ b/media/dog/brown/liedown/3_3.png
Binary files differ
diff --git a/media/dog/brown/pee/3_2.png b/media/dog/brown/pee/3_2.png
new file mode 100644
index 0000000..e3c43f1
--- /dev/null
+++ b/media/dog/brown/pee/3_2.png
Binary files differ
diff --git a/media/dog/brown/run/1_4.png b/media/dog/brown/run/1_4.png
new file mode 100644
index 0000000..7109878
--- /dev/null
+++ b/media/dog/brown/run/1_4.png
Binary files differ
diff --git a/media/dog/brown/run/2_0.png b/media/dog/brown/run/2_0.png
new file mode 100644
index 0000000..0f32498
--- /dev/null
+++ b/media/dog/brown/run/2_0.png
Binary files differ
diff --git a/media/dog/brown/run/2_1.png b/media/dog/brown/run/2_1.png
new file mode 100644
index 0000000..ac6d602
--- /dev/null
+++ b/media/dog/brown/run/2_1.png
Binary files differ
diff --git a/media/dog/brown/run/2_2.png b/media/dog/brown/run/2_2.png
new file mode 100644
index 0000000..ae0a9a5
--- /dev/null
+++ b/media/dog/brown/run/2_2.png
Binary files differ
diff --git a/media/dog/brown/run/2_3.png b/media/dog/brown/run/2_3.png
new file mode 100644
index 0000000..a679a53
--- /dev/null
+++ b/media/dog/brown/run/2_3.png
Binary files differ
diff --git a/media/dog/brown/run/2_4.png b/media/dog/brown/run/2_4.png
new file mode 100644
index 0000000..2269eea
--- /dev/null
+++ b/media/dog/brown/run/2_4.png
Binary files differ
diff --git a/media/dog/brown/run/3_0.png b/media/dog/brown/run/3_0.png
new file mode 100644
index 0000000..ca4d016
--- /dev/null
+++ b/media/dog/brown/run/3_0.png
Binary files differ
diff --git a/media/dog/brown/run/3_1.png b/media/dog/brown/run/3_1.png
new file mode 100644
index 0000000..86e03f4
--- /dev/null
+++ b/media/dog/brown/run/3_1.png
Binary files differ
diff --git a/media/dog/brown/sit/0_0.png b/media/dog/brown/sit/0_0.png
new file mode 100644
index 0000000..3e686ac
--- /dev/null
+++ b/media/dog/brown/sit/0_0.png
Binary files differ
diff --git a/media/dog/brown/walk/3_4.png b/media/dog/brown/walk/3_4.png
new file mode 100644
index 0000000..6cd3f75
--- /dev/null
+++ b/media/dog/brown/walk/3_4.png
Binary files differ
diff --git a/media/dog/brown/walk/4_0.png b/media/dog/brown/walk/4_0.png
new file mode 100644
index 0000000..d76695d
--- /dev/null
+++ b/media/dog/brown/walk/4_0.png
Binary files differ
diff --git a/media/dog/brown/walk/4_1.png b/media/dog/brown/walk/4_1.png
new file mode 100644
index 0000000..3ccfdeb
--- /dev/null
+++ b/media/dog/brown/walk/4_1.png
Binary files differ
diff --git a/media/dog/brown/walk/4_2.png b/media/dog/brown/walk/4_2.png
new file mode 100644
index 0000000..9c95bc9
--- /dev/null
+++ b/media/dog/brown/walk/4_2.png
Binary files differ
diff --git a/media/dog/gray/idle/0_1.png b/media/dog/gray/idle/0_1.png
new file mode 100644
index 0000000..aa75a78
--- /dev/null
+++ b/media/dog/gray/idle/0_1.png
Binary files differ
diff --git a/media/dog/gray/idle/0_2.png b/media/dog/gray/idle/0_2.png
new file mode 100644
index 0000000..de884dd
--- /dev/null
+++ b/media/dog/gray/idle/0_2.png
Binary files differ
diff --git a/media/dog/gray/idle/0_3.png b/media/dog/gray/idle/0_3.png
new file mode 100644
index 0000000..24b19bc
--- /dev/null
+++ b/media/dog/gray/idle/0_3.png
Binary files differ
diff --git a/media/dog/gray/idle/0_4.png b/media/dog/gray/idle/0_4.png
new file mode 100644
index 0000000..7c36020
--- /dev/null
+++ b/media/dog/gray/idle/0_4.png
Binary files differ
diff --git a/media/dog/gray/idle/1_0.png b/media/dog/gray/idle/1_0.png
new file mode 100644
index 0000000..4811b87
--- /dev/null
+++ b/media/dog/gray/idle/1_0.png
Binary files differ
diff --git a/media/dog/gray/idle/1_1.png b/media/dog/gray/idle/1_1.png
new file mode 100644
index 0000000..b11f7d4
--- /dev/null
+++ b/media/dog/gray/idle/1_1.png
Binary files differ
diff --git a/media/dog/gray/idle/1_2.png b/media/dog/gray/idle/1_2.png
new file mode 100644
index 0000000..fe14200
--- /dev/null
+++ b/media/dog/gray/idle/1_2.png
Binary files differ
diff --git a/media/dog/gray/idle/1_3.png b/media/dog/gray/idle/1_3.png
new file mode 100644
index 0000000..31e604a
--- /dev/null
+++ b/media/dog/gray/idle/1_3.png
Binary files differ
diff --git a/media/dog/gray/liedown/3_3.png b/media/dog/gray/liedown/3_3.png
new file mode 100644
index 0000000..0bad3bf
--- /dev/null
+++ b/media/dog/gray/liedown/3_3.png
Binary files differ
diff --git a/media/dog/gray/pee/3_2.png b/media/dog/gray/pee/3_2.png
new file mode 100644
index 0000000..d1f43d4
--- /dev/null
+++ b/media/dog/gray/pee/3_2.png
Binary files differ
diff --git a/media/dog/gray/run/1_4.png b/media/dog/gray/run/1_4.png
new file mode 100644
index 0000000..3697af1
--- /dev/null
+++ b/media/dog/gray/run/1_4.png
Binary files differ
diff --git a/media/dog/gray/run/2_0.png b/media/dog/gray/run/2_0.png
new file mode 100644
index 0000000..00a55f9
--- /dev/null
+++ b/media/dog/gray/run/2_0.png
Binary files differ
diff --git a/media/dog/gray/run/2_1.png b/media/dog/gray/run/2_1.png
new file mode 100644
index 0000000..839f7fe
--- /dev/null
+++ b/media/dog/gray/run/2_1.png
Binary files differ
diff --git a/media/dog/gray/run/2_2.png b/media/dog/gray/run/2_2.png
new file mode 100644
index 0000000..3601b80
--- /dev/null
+++ b/media/dog/gray/run/2_2.png
Binary files differ
diff --git a/media/dog/gray/run/2_3.png b/media/dog/gray/run/2_3.png
new file mode 100644
index 0000000..3a751bc
--- /dev/null
+++ b/media/dog/gray/run/2_3.png
Binary files differ
diff --git a/media/dog/gray/run/2_4.png b/media/dog/gray/run/2_4.png
new file mode 100644
index 0000000..c2a2948
--- /dev/null
+++ b/media/dog/gray/run/2_4.png
Binary files differ
diff --git a/media/dog/gray/run/3_0.png b/media/dog/gray/run/3_0.png
new file mode 100644
index 0000000..7e5372a
--- /dev/null
+++ b/media/dog/gray/run/3_0.png
Binary files differ
diff --git a/media/dog/gray/run/3_1.png b/media/dog/gray/run/3_1.png
new file mode 100644
index 0000000..121865b
--- /dev/null
+++ b/media/dog/gray/run/3_1.png
Binary files differ
diff --git a/media/dog/gray/sit/0_0.png b/media/dog/gray/sit/0_0.png
new file mode 100644
index 0000000..c72a3e8
--- /dev/null
+++ b/media/dog/gray/sit/0_0.png
Binary files differ
diff --git a/media/dog/gray/walk/3_4.png b/media/dog/gray/walk/3_4.png
new file mode 100644
index 0000000..78cb976
--- /dev/null
+++ b/media/dog/gray/walk/3_4.png
Binary files differ
diff --git a/media/dog/gray/walk/4_0.png b/media/dog/gray/walk/4_0.png
new file mode 100644
index 0000000..8167d91
--- /dev/null
+++ b/media/dog/gray/walk/4_0.png
Binary files differ
diff --git a/media/dog/gray/walk/4_1.png b/media/dog/gray/walk/4_1.png
new file mode 100644
index 0000000..fc70de3
--- /dev/null
+++ b/media/dog/gray/walk/4_1.png
Binary files differ
diff --git a/media/dog/gray/walk/4_2.png b/media/dog/gray/walk/4_2.png
new file mode 100644
index 0000000..ca92d52
--- /dev/null
+++ b/media/dog/gray/walk/4_2.png
Binary files differ
diff --git a/pets.gif b/pets.gif
index 03a2d21..a6b8482 100644
--- a/pets.gif
+++ b/pets.gif
Binary files differ