Compare commits

..

No commits in common. "635eac655bab7f9224ab1e4050a5d2508ea9bc25" and "4836682029bc13d6a72a31674e22f2a1137063d2" have entirely different histories.

11 changed files with 0 additions and 129 deletions

View File

@ -1,7 +0,0 @@
column_width = 100
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferDouble"
call_parentheses = "None"
collapse_simple_statement = "Always"

View File

@ -1,16 +0,0 @@
local create = vim.api.nvim_create_augroup
local define = vim.api.nvim_create_autocmd
local M = {}
create("github_presence_autocmds", { clear = true })
function M.setup()
define({ "BufEnter" }, {
group = "github_presence_autocmds",
pattern = { "*" },
callback = function() require("github_presence.updates").set_status() end,
})
end
return M

View File

@ -1,14 +0,0 @@
local M = {}
M.defaults = {}
local config = {}
function M.setup(user_config)
user_config = user_config or {}
config = vim.tbl_deep_extend("force", M.defaults, user_config)
return config
end
return M

View File

@ -1,13 +0,0 @@
local notify = require "github_presence.notify"
local M = {}
function M.set_status(activity)
if activity == nil then return end
local _ = vim.fn.systemlist(
string.format("github-status --message 'Currently editting: %s'", activity.file)
)
notify.info "set status"
end
return M

View File

@ -1,13 +0,0 @@
local notify = require "github_presence.notify"
local M = {}
function M.setup(options)
require("github_presence.autoload").setup()
require("github_presence.updates").setup()
require("github_presence.config").setup(options)
require("github_presence.timer").start_cron()
end
return M

View File

@ -1,17 +0,0 @@
local M = {}
---@param message string
function M.info(message)
vim.schedule(
function() vim.notify(string.format("[%s]: %s", "github-presence", message), "info") end
)
end
---@param message string
function M.debug(message)
vim.schedule(
function() vim.notify(string.format("[%s]: %s", "github-presence", message), "debug") end
)
end
return M

View File

@ -1,13 +0,0 @@
local github = require "github_presence.github"
local updates = require "github_presence.updates"
return {
start_cron = function()
local timer = vim.loop.new_timer()
timer:start(
1000,
1000 * 60,
vim.schedule_wrap(function() github.set_status(updates.last_activity) end)
)
end,
}

View File

@ -1,19 +0,0 @@
local M = {}
M.last_activity = {}
function M.setup() end
function M.set_status()
local current_buffer = vim.api.nvim_get_current_buf()
local buf_name = vim.api.nvim_buf_get_name(current_buffer)
local file_name = buf_name:match(string.format("^.+%s(.+)$", "/"))
if file_name == nil then return end
if file_name == M.last_activity.file then return end
M.last_activity = {
file = file_name,
set_at = os.time(),
}
end
return M

View File

@ -1,7 +0,0 @@
mutation {
changeUserStatus(input: {}) {
status {
message
}
}
}

View File

@ -1,10 +0,0 @@
mutation ($status: ChangeUserStatusInput!) {
changeUserStatus(input: $status) {
status {
emoji
expiresAt
limitedAvailability: indicatesLimitedAvailability
message
}
}
}