forked from pub-solar/os
1
0
Fork 0

Compare commits

...

3 Commits

Author SHA1 Message Date
teutat3s 2166f56d59
waybar: move backlight module to the right 2024-04-22 14:31:16 +02:00
teutat3s bcfd701a6a
neovim: fix remember cursor position 2024-04-22 14:27:58 +02:00
teutat3s 130c915612
chore: bump flake inputs, remove unneeded
element-desktop + slack overlays, update nvfetcher
2024-04-22 14:26:52 +02:00
9 changed files with 64 additions and 50 deletions

View File

@ -143,22 +143,6 @@
"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": {
"inputs": {
"nixpkgs": [
@ -265,11 +249,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1713297878,
"narHash": "sha256-hOkzkhLT59wR8VaMbh1ESjtZLbGi+XNaBN6h49SPqEc=",
"lastModified": 1713714899,
"narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "66adc1e47f8784803f2deb6cacd5e07264ec2d5c",
"rev": "6143fc5eeb9c4f00163267708e26191d1e918932",
"type": "github"
},
"original": {
@ -319,7 +303,6 @@
"deploy-rs": "deploy-rs",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"fork": "fork",
"home-manager": "home-manager",
"master": "master",
"nix-darwin": "nix-darwin",

View File

@ -10,7 +10,7 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
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.flake = false;

View File

@ -7,10 +7,9 @@
"modules-center": ["network"],
"modules-right": [
"sway/language",
"backlight",
"custom/notification",
"pulseaudio",
"idle_inhibitor",
"backlight",
"battery",
"clock",
"tray"
@ -65,7 +64,7 @@
},
"backlight": {
"device": "acpi_video0",
"format": "<span font='10'> {percent}%</span> {icon}",
"format": "<span font='10'>{percent}%</span> {icon}",
"format-icons": ["", ""]
},
"cpu": {
@ -105,7 +104,7 @@
"pulseaudio": {
"tooltip": false,
"format": "<span font='10'>{volume}%</span> {icon}",
"format-bluetooth": "{volume}% <span font='10'>{icon}</span>",
"format-bluetooth": "{volume}%<span font='10'> {icon}</span>",
"format-muted": "",
"on-click": "pavucontrol",
"format-alt": "{volume}% <span font='10'>{icon}</span>",

View File

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

View File

@ -106,12 +106,6 @@ imap <c-x><c-l> <plug>(fzf-complete-line)
" Clear quickfix shortcut
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 <leader>n :NnnPicker %<CR>
nmap <leader>N :NnnPicker<CR>

View File

@ -0,0 +1,47 @@
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
{
element-desktop = fork.element-desktop;
#element-desktop = fork.element-desktop;
#vimPlugins = prev.vimPlugins // {inherit (unstable.vimPlugins) nvim-lspconfig;};
})
(import ../pkgs)
@ -34,7 +34,6 @@
(import ./mdbook-multilang.nix inputs)
(import ./nix-index.nix)
(import ./prr.nix)
(import ./slack.nix)
(import ./neovim-plugins.nix)
];
});

View File

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