Compare commits
5
Commits
46172a68f6
...
0b4b5c653c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b4b5c653c | ||
|
|
1b7517ee21 | ||
|
|
26a2d80707 | ||
|
|
2b85285abd | ||
|
|
99550f307c |
No files matched your search
@@ -109,3 +109,8 @@ x-scheme-handler/https=librewolf.desktop;
|
|||||||
x-scheme-handler/prizrak-box=prizrak-box.desktop
|
x-scheme-handler/prizrak-box=prizrak-box.desktop
|
||||||
x-scheme-handler/ror2mm=gale-handler.desktop
|
x-scheme-handler/ror2mm=gale-handler.desktop
|
||||||
x-scheme-handler/gale=gale-handler.desktop
|
x-scheme-handler/gale=gale-handler.desktop
|
||||||
|
x-scheme-handler/clash=flclash-url-handler.desktop
|
||||||
|
x-scheme-handler/clashmeta=flclash-url-handler.desktop
|
||||||
|
x-scheme-handler/flclash=flclash-url-handler.desktop
|
||||||
|
x-scheme-handler/flclashx=flclash-url-handler.desktop
|
||||||
|
x-scheme-handler/clashx=flclash-url-handler.desktop
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
||||||
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
|
"cheatsheet.nvim": { "branch": "master", "commit": "6a5c69d42013331a3eda70b340378f2f912b9a90" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "016802de402556da54c36bd7359b441266b01cdd" },
|
"conform.nvim": { "branch": "master", "commit": "016802de402556da54c36bd7359b441266b01cdd" },
|
||||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||||
"easy-dotnet.nvim": { "branch": "main", "commit": "e698b942a0a91cd5b457b828d16a66b7cb94d732" },
|
"easy-dotnet.nvim": { "branch": "main", "commit": "e698b942a0a91cd5b457b828d16a66b7cb94d732" },
|
||||||
|
|||||||
@@ -10,9 +10,78 @@ local function search_in_root()
|
|||||||
return vim.fn.getcwd()
|
return vim.fn.getcwd()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function parse_cheatsheet(path)
|
||||||
|
local cheats = {}
|
||||||
|
if vim.fn.filereadable(path) ~= 1 then return cheats end
|
||||||
|
for _, line in ipairs(vim.fn.readfile(path)) do
|
||||||
|
line = vim.trim(line)
|
||||||
|
if line ~= "" and not vim.startswith(line, "#") then
|
||||||
|
local desc, code = line:match("^(.-)%s*|%s*(.+)$")
|
||||||
|
if desc and code then
|
||||||
|
table.insert(cheats, { desc, code })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return cheats
|
||||||
|
end
|
||||||
|
|
||||||
|
local function command_palette()
|
||||||
|
local fzf = require("fzf-lua")
|
||||||
|
local plugin = require("lazy.core.config").plugins["cheatsheet.nvim"]
|
||||||
|
local sources = {
|
||||||
|
vim.fn.stdpath("config") .. "/cheatsheet.txt",
|
||||||
|
}
|
||||||
|
|
||||||
|
if plugin then
|
||||||
|
table.insert(sources, plugin.dir .. "/cheatsheets/cheatsheet-default.txt")
|
||||||
|
end
|
||||||
|
|
||||||
|
local lines, lookup = {}, {}
|
||||||
|
for _, path in ipairs(sources) do
|
||||||
|
for _, cheat in ipairs(parse_cheatsheet(path)) do
|
||||||
|
local line = string.format("%-50s %s", cheat[1], cheat[2])
|
||||||
|
if not lookup[line] then
|
||||||
|
table.insert(lines, line)
|
||||||
|
lookup[line] = cheat[2]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function cmdline_part(code)
|
||||||
|
return code:match("^:([^%[{]*)")
|
||||||
|
end
|
||||||
|
|
||||||
|
fzf.fzf_exec(lines, {
|
||||||
|
prompt = "Cheats> ",
|
||||||
|
winopts = { fullscreen = false, height = 0.5, width = 0.7 },
|
||||||
|
actions = {
|
||||||
|
["default"] = function(sel)
|
||||||
|
local code = sel and lookup[sel[1]]
|
||||||
|
if not code then return end
|
||||||
|
local cmd = cmdline_part(code)
|
||||||
|
if cmd then
|
||||||
|
vim.api.nvim_feedkeys(":" .. cmd, "n", false)
|
||||||
|
else
|
||||||
|
vim.fn.setreg("+", code)
|
||||||
|
vim.notify("Copied: " .. code)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
-- Alt-Enter: execute immediately (only for plain commands)
|
||||||
|
["alt-enter"] = function(sel)
|
||||||
|
local code = sel and lookup[sel[1]]
|
||||||
|
local cmd = code and cmdline_part(code)
|
||||||
|
if cmd then vim.cmd(cmd) end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"ibhagwan/fzf-lua",
|
"ibhagwan/fzf-lua",
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
dependencies = {
|
||||||
|
{ "nvim-tree/nvim-web-devicons" },
|
||||||
|
{ "doctorfree/cheatsheet.nvim", lazy = true }
|
||||||
|
},
|
||||||
opts = {
|
opts = {
|
||||||
winopts = {
|
winopts = {
|
||||||
fullscreen = true,
|
fullscreen = true,
|
||||||
@@ -38,27 +107,27 @@ return {
|
|||||||
{
|
{
|
||||||
"<leader>ff",
|
"<leader>ff",
|
||||||
function() require("fzf-lua").files() end,
|
function() require("fzf-lua").files() end,
|
||||||
desc="Find files in project directory"
|
desc = "Find files in project directory"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>fF",
|
"<leader>fF",
|
||||||
function() require("fzf-lua").files({ cwd = search_in_root() }) end,
|
function() require("fzf-lua").files({ cwd = search_in_root() }) end,
|
||||||
desc="Find files in current buffer's directory"
|
desc = "Find files in current buffer's directory"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>fg",
|
"<leader>fg",
|
||||||
function() require("fzf-lua").live_grep() end,
|
function() require("fzf-lua").live_grep() end,
|
||||||
desc="Find by grepping in project directory"
|
desc = "Find by grepping in project directory"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>fG",
|
"<leader>fG",
|
||||||
function() require("fzf-lua").live_grep({ cwd = search_in_root() }) end,
|
function() require("fzf-lua").live_grep({ cwd = search_in_root() }) end,
|
||||||
desc="Find by grepping in current buffer's directory"
|
desc = "Find by grepping in current buffer's directory"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>fc",
|
"<leader>fc",
|
||||||
function() require("fzf-lua").files({cwd=vim.fn.stdpath("config")}) end,
|
function() require("fzf-lua").files({ cwd = vim.fn.stdpath("config") }) end,
|
||||||
desc="Find in nvim config"
|
desc = "Find in nvim config"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>fh",
|
"<leader>fh",
|
||||||
@@ -130,5 +199,10 @@ return {
|
|||||||
end,
|
end,
|
||||||
desc = "Live grep the current buffer",
|
desc = "Live grep the current buffer",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"<leader>fp",
|
||||||
|
command_palette,
|
||||||
|
desc = "Find command",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
discord-patch || echo "discord-patch failed, launching unpatched" >&2
|
||||||
|
exec env LIBVA_DRIVER_NAME=nvidia NVD_BACKEND=direct /usr/bin/discord \
|
||||||
|
--ozone-platform=wayland --use-gl=angle --disable-gpu-sandbox "$@"
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
name="va-api-hevc-patch"
|
||||||
|
base="${XDG_CONFIG_HOME:-$HOME/.config}/discord"
|
||||||
|
marker="VaapiOnNvidiaGPUs"
|
||||||
|
|
||||||
|
for asar in "$base"/app-*/resources/app.asar; do
|
||||||
|
[ -f "$asar" ] || continue
|
||||||
|
grep -q "$marker" "$asar" && continue
|
||||||
|
|
||||||
|
echo "$name: patching $asar"
|
||||||
|
work=$(mktemp -d)
|
||||||
|
npx --yes @electron/asar extract "$asar" "$work"
|
||||||
|
|
||||||
|
perl -0pi -e 's/\Qapp.commandLine.appendSwitch("disable-features",disabledFeatures.join(","))\E/app.commandLine.appendSwitch("disable-features",[...disabledFeatures,"UseChromeOSDirectVideoDecoder"].join(","))/' "$work/bundle.js"
|
||||||
|
perl -0pi -e 's/\Qelectron.app.commandLine.appendSwitch("enable-features","DocumentPolicyIncludeJSCallStacksInCrashReports")\E/electron.app.commandLine.appendSwitch("enable-features","DocumentPolicyIncludeJSCallStacksInCrashReports,VaapiOnNvidiaGPUs,VaapiIgnoreDriverChecks,PlatformHEVCDecoderSupport,AcceleratedVideoDecodeLinuxGL")/' "$work/bundle.js"
|
||||||
|
|
||||||
|
if ! grep -q 'UseChromeOSDirectVideoDecoder' "$work/bundle.js" || ! grep -q "$marker" "$work/bundle.js"; then
|
||||||
|
echo "$name: patterns not found, leaving $asar untouched" >&2
|
||||||
|
command -v notify-send >/dev/null && notify-send "Discord patch failed" "Discord's code changed, update $name"
|
||||||
|
rm -rf "$work"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -f "$asar.bak" ] || cp "$asar" "$asar.bak"
|
||||||
|
npx --yes @electron/asar pack "$work" "$asar"
|
||||||
|
rm -rf "$work"
|
||||||
|
done
|
||||||
+1
-1
@@ -3,7 +3,7 @@ Name=Discord
|
|||||||
StartupWMClass=discord
|
StartupWMClass=discord
|
||||||
Comment=All-in-one voice and text chat for gamers that's free, secure, and works on both your desktop and phone.
|
Comment=All-in-one voice and text chat for gamers that's free, secure, and works on both your desktop and phone.
|
||||||
GenericName=Internet Messenger
|
GenericName=Internet Messenger
|
||||||
Exec=env LIBVA_DRIVER_NAME=nvidia NVD_BACKEND=direct /usr/bin/discord --ignore-gpu-blocklist --use-gl=angle --use-angle=gl --enable-features=WaylandWindowDecorations,AcceleratedVideoDecodeLinuxGL,VaapiOnNvidiaGPUs --ozone-platform-hint=auto --url -- %u
|
Exec={{ .chezmoi.homeDir }}/.local/bin/discord-launch --url -- %u
|
||||||
Icon=discord
|
Icon=discord
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=Network;InstantMessaging;
|
Categories=Network;InstantMessaging;
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
Name=OBS Studio (XWayland)
|
||||||
|
Comment=OBS Studio running through XWayland (XCB)
|
||||||
|
Exec=env QT_QPA_PLATFORM=xcb obs
|
||||||
|
Icon=com.obsproject.Studio
|
||||||
|
Terminal=false
|
||||||
|
Categories=AudioVideo;Recorder;Player;
|
||||||
|
StartupNotify=true
|
||||||
@@ -1,26 +1,26 @@
|
|||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBaeEZQVlVNY0xveFRPRE0z
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBFTVNWQkdXcE1BclRwSnMv
|
||||||
cHR5ZUppYmdzR1U2dzFLOEp3N1BCZFl1NEdvClRmODZaWGZ6MVAvOVlWQklKV2J2
|
eHpmWllSYlFNajVjRmltK2krbGV2N0grU2lJCm5Ca05pKzdjRnVFRDdGZFdDc2h0
|
||||||
bXFaY0pUWkoyMmdvaGd3SEEwd3Z1UTAKLS0tIGhicy9vSjNxZW9iMXFleWZMcDhl
|
L0x2bWxscnNDcVprOWhwazFsak9tME0KLS0tI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/TPqmPrYpZaRCq6sNL
|
2elJ7cH/ZYF2fR9tNohwcQYAgZ5CU1nq0kTh6vUn7qMmLPlCLX72vIw6D3NvVa0V
|
||||||
pu65nZPoxFGmGwe0zfStvjImU619PN8u89DP2ehumbZD2HkjrMGG3ThEOOmcgk1b
|
hYpu+HHImKCzX9MAqotb2xkFc6/5RUBrzskxGIeOgFX/nE1wyKQT7uWhdS6CBJgg
|
||||||
e45kMJog/RU9naUjOUzRvqCUGlOcoKmEzg8HIXhkOwX2jeOmrW24aayVM0CS6CK7
|
SvK3tm0VkzclKtVWpEKwri+9X8i2/hR1alpv1AkiCriGInHE7U33iqkNXeOSq3r+
|
||||||
A5X7ZRuA3/4ZsgiSOm7rBK5Ed/Xq3ae6cY2ALRpCFoISEiVS2GkUu0rbnVp6j5eE
|
FKTdWfBEv/SDZjzWrHssSL9Wl1Xifeya3NhirbUIh32FN56ZbSUvNBbq52fhR59i
|
||||||
WNE5khpmv85A45p0x2c7t5y7bbcNFaVj0fM5/XCn4R6INIjyOKovkziShpYr5PAK
|
MMOJ7XwdovPzVbJjbxKduo7/s+Z8surgIjOuEhNcIGImUM/xh1H0S8fUbYgy36r3
|
||||||
0T6Udx+N856da3h8
|
UZ/LDhmKzghpRxrDWYukGQ==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
Reference in new issue
Block a user