Compare commits
No commits in common. "a5ddc9a68374f6b2a25e62bfa067120507ba4fdb" and "d54b411dcde6c2d8a513dfb63b1993b9bcd1aef7" have entirely different histories.
a5ddc9a683
...
d54b411dcd
3 changed files with 10 additions and 15 deletions
|
@ -41,7 +41,7 @@
|
||||||
"net.ipv4.tcp_fastopen" = 3;
|
"net.ipv4.tcp_fastopen" = 3;
|
||||||
"net.core.rmem_max" = 2500000;
|
"net.core.rmem_max" = 2500000;
|
||||||
"net.core.wmem_max" = 2500000;
|
"net.core.wmem_max" = 2500000;
|
||||||
"vm.overcommit_memory" = lib.mkForce 1;
|
"vm.overcommit_memory" = 1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
(let [mod {}
|
(let [mod {}
|
||||||
wezterm (require :wezterm)
|
wezterm (require :wezterm)]
|
||||||
remote-origin (vim.fn.system "git remote get-url origin")]
|
|
||||||
(match remote-origin
|
|
||||||
(where r (r:find :git.kempkens.io)) (set mod.type :forgejo)
|
|
||||||
(where r (r:find :git.app.nedeco.de)) (set mod.type :gitlab)
|
|
||||||
(where r (r:find :github.com)) (set mod.type :github)
|
|
||||||
_ (set mod.type (or vim.env.REMOTE_REPO_TYPE :default)))
|
|
||||||
|
|
||||||
(fn exe [bin] (vim.fn.exepath bin))
|
(fn exe [bin] (vim.fn.exepath bin))
|
||||||
|
|
||||||
(fn run-cmd [program]
|
(fn run-cmd [program]
|
||||||
|
@ -30,25 +23,25 @@
|
||||||
vim.log.levels.ERROR []))))))
|
vim.log.levels.ERROR []))))))
|
||||||
|
|
||||||
(fn mod.open-repo []
|
(fn mod.open-repo []
|
||||||
(case mod.type
|
(case vim.env.REMOTE_REPO_TYPE
|
||||||
:github nil
|
:github nil
|
||||||
:gitlab (run-cmd [:glab :repo :view :--web])
|
:gitlab (run-cmd [:glab :repo :view :--web])
|
||||||
:forgejo (run-cmd [:tea :open])))
|
:forgejo (run-cmd [:tea :open])))
|
||||||
|
|
||||||
(fn mod.open-merge-request []
|
(fn mod.open-merge-request []
|
||||||
(case mod.type
|
(case vim.env.REMOTE_REPO_TYPE
|
||||||
:github nil
|
:github nil
|
||||||
:gitlab (run-cmd [:glab :mr :view :--web])
|
:gitlab (run-cmd [:glab :mr :view :--web])
|
||||||
:forgejo nil))
|
:forgejo nil))
|
||||||
|
|
||||||
(fn mod.open-ci []
|
(fn mod.open-ci []
|
||||||
(case mod.type
|
(case vim.env.REMOTE_REPO_TYPE
|
||||||
:github nil
|
:github nil
|
||||||
:gitlab (open-split [(exe :glab) :pipeline :ci :view])
|
:gitlab (open-split [(exe :glab) :pipeline :ci :view])
|
||||||
:forgejo nil))
|
:forgejo nil))
|
||||||
|
|
||||||
(fn mod.run-ci []
|
(fn mod.run-ci []
|
||||||
(case mod.type
|
(case vim.env.REMOTE_REPO_TYPE
|
||||||
:github nil
|
:github nil
|
||||||
:gitlab (do
|
:gitlab (do
|
||||||
(run-cmd [:glab :pipeline :run])
|
(run-cmd [:glab :pipeline :run])
|
||||||
|
|
|
@ -151,13 +151,15 @@
|
||||||
;; git
|
;; git
|
||||||
(set mod.git
|
(set mod.git
|
||||||
{:condition heirline-conditions.is_git_repo
|
{:condition heirline-conditions.is_git_repo
|
||||||
:static {:git-repo-icons {:github ""
|
:static {:git-repo-type (or vim.env.REMOTE_REPO_TYPE :default)
|
||||||
|
:git-repo-icons {:github ""
|
||||||
:gitlab ""
|
:gitlab ""
|
||||||
:forgejo ""
|
:forgejo ""
|
||||||
:default ""}}
|
:default ""}}
|
||||||
:init (fn [self]
|
:init (fn [self]
|
||||||
(let [git-status vim.b.gitsigns_status_dict]
|
(let [git-status vim.b.gitsigns_status_dict]
|
||||||
(set self.git-repo-icon (. self :git-repo-icons repo.type))
|
(set self.git-repo-icon
|
||||||
|
(. self.git-repo-icons self.git-repo-type))
|
||||||
(set self.git-head git-status.head)
|
(set self.git-head git-status.head)
|
||||||
(set self.git-added (or git-status.added 0))
|
(set self.git-added (or git-status.added 0))
|
||||||
(set self.git-removed (or git-status.removed 0))
|
(set self.git-removed (or git-status.removed 0))
|
||||||
|
|
Loading…
Reference in a new issue