Compare commits

..

No commits in common. "2166f56d59096c2f8b1f81a58fb313a84fd7a577" and "ccc098d379d566e800ee98ea187637bcf249732d" have entirely different histories.

9 changed files with 50 additions and 64 deletions

View file

@ -143,6 +143,22 @@
"type": "github" "type": "github"
} }
}, },
"fork": {
"locked": {
"lastModified": 1713522785,
"narHash": "sha256-vLlIYWQVDhzEXvmYvtOfLZZkpEgUNZRPfxbDmpNQATA=",
"owner": "teutat3s",
"repo": "nixpkgs",
"rev": "3a083ae7e2b12229f9dd0a3c7b56fcc7d0a4cf5b",
"type": "github"
},
"original": {
"owner": "teutat3s",
"ref": "fix-element-desktop-screen-sharing",
"repo": "nixpkgs",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -249,11 +265,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1713714899, "lastModified": 1713297878,
"narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=", "narHash": "sha256-hOkzkhLT59wR8VaMbh1ESjtZLbGi+XNaBN6h49SPqEc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6143fc5eeb9c4f00163267708e26191d1e918932", "rev": "66adc1e47f8784803f2deb6cacd5e07264ec2d5c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -303,6 +319,7 @@
"deploy-rs": "deploy-rs", "deploy-rs": "deploy-rs",
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"fork": "fork",
"home-manager": "home-manager", "home-manager": "home-manager",
"master": "master", "master": "master",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",

View file

@ -10,7 +10,7 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
master.url = "github:nixos/nixpkgs/master"; master.url = "github:nixos/nixpkgs/master";
#fork.url = "github:teutat3s/nixpkgs/fix-element-desktop-screen-sharing"; fork.url = "github:teutat3s/nixpkgs/fix-element-desktop-screen-sharing";
flake-compat.url = "github:edolstra/flake-compat"; flake-compat.url = "github:edolstra/flake-compat";
flake-compat.flake = false; flake-compat.flake = false;

View file

@ -7,9 +7,10 @@
"modules-center": ["network"], "modules-center": ["network"],
"modules-right": [ "modules-right": [
"sway/language", "sway/language",
"backlight",
"custom/notification",
"pulseaudio", "pulseaudio",
"idle_inhibitor", "idle_inhibitor",
"backlight",
"battery", "battery",
"clock", "clock",
"tray" "tray"

View file

@ -193,7 +193,6 @@ in {
(builtins.readFile ./ui.vim) (builtins.readFile ./ui.vim)
(builtins.readFile ./quickfixopenall.vim) (builtins.readFile ./quickfixopenall.vim)
(builtins.readFile ./lsp.vim) (builtins.readFile ./lsp.vim)
(builtins.readFile ./lastplace.lua)
'' ''
" fzf with file preview " fzf with file preview
command! -bang -nargs=? -complete=dir Files command! -bang -nargs=? -complete=dir Files

View file

@ -106,6 +106,12 @@ imap <c-x><c-l> <plug>(fzf-complete-line)
" Clear quickfix shortcut " Clear quickfix shortcut
nmap <Leader>c :ccl<CR> nmap <Leader>c :ccl<CR>
" Remember cursor position
" Vim jumps to the last position when reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
nmap - :NnnPicker %<CR> nmap - :NnnPicker %<CR>
nmap <leader>n :NnnPicker %<CR> nmap <leader>n :NnnPicker %<CR>
nmap <leader>N :NnnPicker<CR> nmap <leader>N :NnnPicker<CR>

View file

@ -1,47 +0,0 @@
lua <<EOF
-- from https://github.com/neovim/neovim/issues/16339#issuecomment-1348133829
local ignore_buftype = { "quickfix", "nofile", "help" }
local ignore_filetype = { "gitcommit", "gitrebase", "svn", "hgcommit" }
local function run()
if vim.tbl_contains(ignore_buftype, vim.bo.buftype) then
return
end
if vim.tbl_contains(ignore_filetype, vim.bo.filetype) then
-- reset cursor to first line
vim.cmd.normal{'gg', bang = true}
return
end
-- If a line has already been specified on the command line, we are done
-- nvim file +num
if vim.fn.line(".") > 1 then
return
end
local last_line = vim.fn.line([['"]])
local buff_last_line = vim.fn.line("$")
-- If the last line is set and the less than the last line in the buffer
if last_line > 0 and last_line <= buff_last_line then
local win_last_line = vim.fn.line("w$")
local win_first_line = vim.fn.line("w0")
-- Check if the last line of the buffer is the same as the win
if win_last_line == buff_last_line then
-- Set line to last line edited
vim.cmd.normal{[[g`"]], bang = true}
-- Try to center
elseif buff_last_line - last_line > ((win_last_line - win_first_line) / 2) - 1 then
vim.cmd.normal{[[g`"zz]], bang = true}
else
vim.cmd.normal{[[G'"<c-e>]], bang = true}
end
end
end
vim.api.nvim_create_autocmd({'BufWinEnter', 'FileType'}, {
group = vim.api.nvim_create_augroup('nvim-lastplace', { clear = true }),
callback = run
})
EOF

View file

@ -26,7 +26,7 @@
}; };
in in
{ {
#element-desktop = fork.element-desktop; element-desktop = fork.element-desktop;
#vimPlugins = prev.vimPlugins // {inherit (unstable.vimPlugins) nvim-lspconfig;}; #vimPlugins = prev.vimPlugins // {inherit (unstable.vimPlugins) nvim-lspconfig;};
}) })
(import ../pkgs) (import ../pkgs)
@ -34,6 +34,7 @@
(import ./mdbook-multilang.nix inputs) (import ./mdbook-multilang.nix inputs)
(import ./nix-index.nix) (import ./nix-index.nix)
(import ./prr.nix) (import ./prr.nix)
(import ./slack.nix)
(import ./neovim-plugins.nix) (import ./neovim-plugins.nix)
]; ];
}); });

9
overlays/slack.nix Normal file
View file

@ -0,0 +1,9 @@
final: prev: {
# https://askubuntu.com/questions/1490447/slack-with-webrtcpipewirecapture-wyaland-black-screen-sharing-but-works-on-chrom
slack = prev.slack.overrideAttrs (oldAttrs: rec {
postInstall = ''
sed -i -e 's/,"WebRTCPipeWireCapturer"/,"LebRTCPipeWireCapturer"/' $out/lib/slack/resources/app.asar
'';
});
}

View file

@ -3,17 +3,17 @@
{ {
blesh-nvfetcher = { blesh-nvfetcher = {
pname = "blesh-nvfetcher"; pname = "blesh-nvfetcher";
version = "70a325f95882f4850818542fc48b9ebb5db476bb"; version = "27e6309ef2344d37a6cec49f37b958c70f660472";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "akinomyoga"; owner = "akinomyoga";
repo = "ble.sh"; repo = "ble.sh";
rev = "70a325f95882f4850818542fc48b9ebb5db476bb"; rev = "27e6309ef2344d37a6cec49f37b958c70f660472";
fetchSubmodules = true; fetchSubmodules = true;
deepClone = false; deepClone = false;
leaveDotGit = true; leaveDotGit = true;
sha256 = "sha256-AEs6AfeHYjyraSmCmyDiFar+OFt2eurjz1A6mro6iXc="; sha256 = "sha256-Mp/oay4jDpA2UFUpsxaSbgw0gMDtSzVvWezhZ2SOW/E=";
}; };
date = "2024-04-20"; date = "2024-02-06";
}; };
instant-nvim-nvfetcher = { instant-nvim-nvfetcher = {
pname = "instant-nvim-nvfetcher"; pname = "instant-nvim-nvfetcher";
@ -77,15 +77,15 @@
}; };
vimagit-nvfetcher = { vimagit-nvfetcher = {
pname = "vimagit-nvfetcher"; pname = "vimagit-nvfetcher";
version = "fc7eda97da4f8182c8abbe6ea7befbd789b8b935"; version = "06afe48439d0118a77d622ef06eff0f7cd7d62ab";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "jreybert"; owner = "jreybert";
repo = "vimagit"; repo = "vimagit";
rev = "fc7eda97da4f8182c8abbe6ea7befbd789b8b935"; rev = "06afe48439d0118a77d622ef06eff0f7cd7d62ab";
fetchSubmodules = false; fetchSubmodules = false;
sha256 = "sha256-HievBzyVZke4AyCWAL9MlOw65X460cEEeOhwAL2brzs="; sha256 = "sha256-2kugFr32lZINgpmDyfTyBp5lNa2/dculKmcFGa2q/io=";
}; };
date = "2024-03-28"; date = "2024-01-04";
}; };
wik = { wik = {
pname = "wik"; pname = "wik";