ci: format
This commit is contained in:
parent
e9d5587430
commit
b4645fbf29
4 changed files with 25 additions and 3 deletions
|
|
@ -2,7 +2,8 @@ vim.pack.add({
|
||||||
'https://github.com/tpope/vim-fugitive',
|
'https://github.com/tpope/vim-fugitive',
|
||||||
})
|
})
|
||||||
|
|
||||||
function _G._fugitive_stl() -- selene: allow(global_usage)
|
-- selene: allow(global_usage)
|
||||||
|
function _G._fugitive_stl()
|
||||||
local s = vim.fn.FugitiveStatusline()
|
local s = vim.fn.FugitiveStatusline()
|
||||||
return s ~= '' and s .. ' ' or ''
|
return s ~= '' and s .. ' ' or ''
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,7 @@
|
||||||
pkgs.nixfmt
|
pkgs.nixfmt
|
||||||
pkgs.pre-commit
|
pkgs.pre-commit
|
||||||
pkgs.nodePackages.prettier
|
pkgs.nodePackages.prettier
|
||||||
|
pkgs.shfmt
|
||||||
pkgs.stylua
|
pkgs.stylua
|
||||||
pkgs.selene
|
pkgs.selene
|
||||||
];
|
];
|
||||||
|
|
|
||||||
14
scripts/ci.sh
Executable file
14
scripts/ci.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
nix fmt
|
||||||
|
git diff --exit-code -- '*.nix'
|
||||||
|
nix develop --command deadnix --fail --no-lambda-pattern-names -- **/*.nix
|
||||||
|
nix develop --command statix check
|
||||||
|
|
||||||
|
nix develop --command stylua --check config/nvim
|
||||||
|
git ls-files '*.lua' | xargs nix develop --command selene --display-style quiet --config config/nvim/selene.toml
|
||||||
|
|
||||||
|
nix develop --command shfmt -i 2 -d scripts/ config/claude/hooks/guard.sh
|
||||||
|
|
||||||
|
nix develop --command prettier --check .
|
||||||
10
scripts/ctl
10
scripts/ctl
|
|
@ -120,8 +120,14 @@ audio)
|
||||||
--mesg="$header" --mesg-mode=expand \
|
--mesg="$header" --mesg-mode=expand \
|
||||||
--font="monospace:size=12" --width="$fw")
|
--font="monospace:size=12" --width="$fw")
|
||||||
rc=$?
|
rc=$?
|
||||||
[ "$rc" = 11 ] && { wpctl set-volume "$node" 5%+ --limit 1.0; continue; }
|
[ "$rc" = 11 ] && {
|
||||||
[ "$rc" = 12 ] && { wpctl set-volume "$node" 5%-; continue; }
|
wpctl set-volume "$node" 5%+ --limit 1.0
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
[ "$rc" = 12 ] && {
|
||||||
|
wpctl set-volume "$node" 5%-
|
||||||
|
continue
|
||||||
|
}
|
||||||
[ -z "$choice" ] && exit 0
|
[ -z "$choice" ] && exit 0
|
||||||
wpctl set-default "$choice"
|
wpctl set-default "$choice"
|
||||||
break
|
break
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue