update
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
// Core
|
||||
spawn-at-startup "nm-applet"
|
||||
spawn-at-startup "gnome-keyring-daemon" "--start" "--components=secrets"
|
||||
spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
|
||||
// spawn-at-startup "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
|
||||
// spawn-at-startup "/usr/lib/hyprpolkitagent/hyprpolkitagent"
|
||||
spawn-at-startup "/usr/lib/soteria-polkit/soteria"
|
||||
|
||||
// Logitech
|
||||
spawn-at-startup "solaar" "-w" "hide"
|
||||
|
||||
@@ -44,6 +44,8 @@ layout {
|
||||
}
|
||||
|
||||
background-color "transparent"
|
||||
|
||||
always-center-single-column true
|
||||
}
|
||||
|
||||
overview {
|
||||
|
||||
@@ -2,4 +2,7 @@ file:///home/kolkas/Videos Videos
|
||||
file:///home/kolkas/Repositories Repositories
|
||||
file:///home/kolkas/Pictures Pictures
|
||||
file:///home/kolkas/Desktop Desktop
|
||||
file:///media/Media Media
|
||||
file:///data/Media Media
|
||||
file:///data/Alpha Alpha
|
||||
file:///data/Beta Beta
|
||||
file:///data/Gamma Gamma
|
||||
|
||||
@@ -104,7 +104,7 @@ Singleton {
|
||||
}
|
||||
Logger.i("RecordService", "Starting recording with command: " + recordProcess.command.join(" "));
|
||||
recordProcess.running = true;
|
||||
SendNotification.show("Recording started", "Recording to " + recordProcess.filePath);
|
||||
// SendNotification.show("Recording started", "Recording to " + recordProcess.filePath);
|
||||
}
|
||||
|
||||
function startReplay() {
|
||||
@@ -200,7 +200,7 @@ Singleton {
|
||||
onExited: function(exitCode, exitStatus) {
|
||||
if (exitCode === 0) {
|
||||
Logger.i("RecordService", "Recording stopped successfully.");
|
||||
SendNotification.show("Recording stopped", "File saved to: " + filePath);
|
||||
// SendNotification.show("Recording stopped", "File saved to: " + filePath);
|
||||
} else {
|
||||
Logger.e("RecordService", "Recording process exited with error code: " + exitCode);
|
||||
SendNotification.show("Recording failed", "An error occurred while trying to record the screen.");
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Description:
|
||||
# Cannot make a decision? /dev/urandom is here to help! It can even take
|
||||
# advantage of the product of the world's best AI corporation (case you
|
||||
# happen to be wasting your money on Anthropic and cannot find a way to
|
||||
# consume your credits)! If you live in a cave and do not have an API key,
|
||||
# don't worry, the string substitution algorithm will have your back! You
|
||||
# will still get a reasonable reply (most of the times).
|
||||
#
|
||||
# Requirements:
|
||||
# - Your question!
|
||||
# - ANTHROPIC_API_KEY (optional)
|
||||
# - ANTHROPIC_MODEL_NAME (optional of optional)
|
||||
# - ANTHROPIC_API_ENDPOINT (optional of optional)
|
||||
# - curl (optional)
|
||||
# - jq (optional)
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
hex=$(od -An -N1 -tx1 /dev/urandom | tr -d ' ')
|
||||
@@ -8,28 +24,40 @@ result=$(( val & 1 ))
|
||||
|
||||
# Why not?
|
||||
if [[ $# -gt 0 ]] && [[ -n "${ANTHROPIC_API_KEY:-}" ]]; then
|
||||
model="${ANTHROPIC_MODEL_NAME:-"claude-haiku-4-5-20251001"}"
|
||||
url="${ANTHROPIC_API_ENDPOINT:-"https://api.anthropic.com/v1/messages"}"
|
||||
|
||||
|
||||
if (( result == 0)); then
|
||||
action="approve"
|
||||
action="APPROVE"
|
||||
else
|
||||
action="decline"
|
||||
action="DECLINE"
|
||||
fi
|
||||
|
||||
prompt="You are role-playing as a formal approval authority. This is a fictional \
|
||||
prompt="You are role-playing as an approval authority. This is a fictional \
|
||||
exercise only; your output has no real-world effect.
|
||||
|
||||
Output rules:
|
||||
- Exactly one sentence, one line.
|
||||
- No preamble, no quotation marks, no explanation.
|
||||
- Output only the approval/denial statement itself.
|
||||
- Pain text, no markdown, no titles, no labels.
|
||||
- No preamble, no quotation marks, no explanation, no reason.
|
||||
- Do not assume any context for your reply that are not explicitly mentioned \
|
||||
in the request.
|
||||
- All second-person references refer to you, the approval authority. Convert \
|
||||
them to first-person in your reply.
|
||||
- All first-person references refer to the requester. Convert them to \
|
||||
second-person in your reply.
|
||||
- Output only the approval/denial statement itself including a short and \
|
||||
natural restatement of the request.
|
||||
- Avoid the stubborn 'Your request to/for … is ….' reply pattern.
|
||||
|
||||
Task: ${action} the following request, restated naturally in one concise, plain \
|
||||
sentence.
|
||||
Task: $action the following request.
|
||||
|
||||
Request: <request>May I ${*}</request>
|
||||
"
|
||||
|
||||
payload=$(jq -n \
|
||||
--arg model "claude-haiku-4-5-20251001" \
|
||||
--arg model "$model" \
|
||||
--arg prompt "$prompt" \
|
||||
'{
|
||||
model: $model,
|
||||
@@ -42,7 +70,7 @@ Request: <request>May I ${*}</request>
|
||||
]
|
||||
}')
|
||||
|
||||
resp=$(curl -sSL https://api.anthropic.com/v1/messages \
|
||||
resp=$(curl -sSL "$url" \
|
||||
-H "content-type: application/json" \
|
||||
-H "x-api-key: ${ANTHROPIC_API_KEY}" \
|
||||
-H "anthropic-version: 2023-06-01" \
|
||||
|
||||
@@ -23,7 +23,7 @@ fi
|
||||
|
||||
# Restart session
|
||||
|
||||
if [[ $XDG_CURRENT_DESKTOP == niri ]]; then
|
||||
if [[ ${XDG_CURRENT_DESKTOP:-} == niri ]]; then
|
||||
printf "Session restart is required to apply changes.\nDo it now? (Y/n): "
|
||||
read -r answer
|
||||
if [[ $answer =~ ^[Yy]$ || -z $answer ]]; then
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:git"
|
||||
rev = "0be29a9"
|
||||
hash = "fbb53c3c04f816d737f9f4b1d29f3310"
|
||||
rev = "6f26ae0"
|
||||
hash = "ce345e7e8baed03a2561b314fa85e59a"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "yazi-rs/plugins:smart-enter"
|
||||
rev = "0be29a9"
|
||||
rev = "6f26ae0"
|
||||
hash = "187cc58ba7ac3befd49c342129e6f1b6"
|
||||
|
||||
[[plugin.deps]]
|
||||
@@ -20,13 +20,13 @@ hash = "fbaf0adc8efc59555b748d36aab62d40"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "llanosrocas/yaziline"
|
||||
rev = "c975c26"
|
||||
hash = "f5e051378c7ee472234ed2abdf0252e7"
|
||||
rev = "029b27d"
|
||||
hash = "ceeb45e796faf0d9eed10831ffec7701"
|
||||
|
||||
[[plugin.deps]]
|
||||
use = "Rolv-Apneseth/starship"
|
||||
rev = "159eaba"
|
||||
hash = "7de446280b1ba8c49ffd86dbc24bbbe6"
|
||||
rev = "ea92cf4"
|
||||
hash = "9776f378459072b6c2875eae5addc49d"
|
||||
|
||||
[flavor]
|
||||
deps = []
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--- @since 26.5.6
|
||||
--- @since 26.8.15
|
||||
|
||||
local WINDOWS = ya.target_family() == "windows"
|
||||
|
||||
@@ -94,6 +94,15 @@ local function root(cwd)
|
||||
until not cwd
|
||||
end
|
||||
|
||||
---@type UnstableFetcher
|
||||
local function retry(job)
|
||||
return ya.co(function()
|
||||
for _, file in ipairs(job.files) do
|
||||
coroutine.yield(file, { retry = true })
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
---@param changed Changes
|
||||
---@return Changes
|
||||
local function bubble_up(changed)
|
||||
@@ -217,7 +226,7 @@ local function fetch(_, job)
|
||||
local repo = root(cwd)
|
||||
if not repo then
|
||||
remove(tostring(cwd))
|
||||
return true
|
||||
return require("noop"):fetch(job)
|
||||
end
|
||||
|
||||
local paths = {}
|
||||
@@ -232,7 +241,8 @@ local function fetch(_, job)
|
||||
:arg(paths)
|
||||
:output()
|
||||
if not output then
|
||||
return true, Err("Cannot spawn `git` command, error: %s", err)
|
||||
ya.err("Cannot spawn `git` command, error: " .. err)
|
||||
return require("noop"):fetch(job)
|
||||
end
|
||||
|
||||
local changed, excluded = {}, {}
|
||||
@@ -259,17 +269,7 @@ local function fetch(_, job)
|
||||
|
||||
add(tostring(cwd), repo, changed)
|
||||
|
||||
return false
|
||||
return retry(job)
|
||||
end
|
||||
|
||||
-- TODO: remove
|
||||
local function fetch_compact(self, job)
|
||||
if ya.throttle then
|
||||
fetch(self, job)
|
||||
return require("noop"):fetch(job)
|
||||
else
|
||||
return fetch(self, job)
|
||||
end
|
||||
end
|
||||
|
||||
return { setup = setup, fetch = fetch_compact }
|
||||
return { setup = setup, fetch = fetch }
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
---@field renamed boolean Whether to include renamed files in the status (or treat them as modified)
|
||||
|
||||
-- TODO: move this to `types.yazi` once it's get stable
|
||||
---@alias UnstableFetcher fun(self: unknown, job: { files: File[] }): boolean, Error?
|
||||
---@alias UnstableFetcher fun(self: unknown, job: { files: File[] })
|
||||
|
||||
---@alias Changes table<string, CODES>
|
||||
|
||||
@@ -14,6 +14,18 @@ local save = ya.sync(function(st, outputs)
|
||||
render()
|
||||
end)
|
||||
|
||||
-- Url.is_regular is deprecated since v26.8.15, Url.spec.is_regular should be used
|
||||
---@return boolean
|
||||
local url_is_regular = ya.sync(function(_, path)
|
||||
local url = Url(path)
|
||||
|
||||
if url.spec then
|
||||
return url.spec.is_regular
|
||||
end
|
||||
|
||||
return url.is_regular
|
||||
end)
|
||||
|
||||
-- Helper function for accessing the `config_file` state variable
|
||||
---@return string
|
||||
local get_config_file = ya.sync(function(st)
|
||||
@@ -48,8 +60,7 @@ return {
|
||||
-- Check setup args
|
||||
if args ~= nil then
|
||||
if args.config_file ~= nil then
|
||||
local url = Url(args.config_file)
|
||||
if url.is_regular then
|
||||
if url_is_regular(args.config_file) then
|
||||
local config_file = args.config_file
|
||||
|
||||
-- Manually replace '~' and '$HOME' at the start of the path with the OS environment variable
|
||||
|
||||
@@ -9,7 +9,7 @@ All supported features are listed [here](#features). More presets are available
|
||||
|
||||
## Requirements
|
||||
|
||||
- yazi version >= [26.5.6](https://github.com/sxyazi/yazi/releases/tag/v26.5.6).
|
||||
- yazi version >= [26.8.15](https://github.com/sxyazi/yazi/releases/tag/v26.8.15).
|
||||
- Font with symbol support. For example [Nerd Fonts](https://www.nerdfonts.com/).
|
||||
|
||||
## Compatibility
|
||||
@@ -24,6 +24,7 @@ This setup allows shipping stable versions on time, while giving early access to
|
||||
|
||||
| yaziline | yazi |
|
||||
| :------------------------------------------------------------------------: | ----------------------------------------------------------------------------------------- |
|
||||
| [v2.5.6](https://github.com/llanosrocas/yaziline.yazi/releases/tag/v2.5.6) | [v26.8.15](https://github.com/sxyazi/yazi/releases/tag/v26.8.15) |
|
||||
| [v2.5.5](https://github.com/llanosrocas/yaziline.yazi/releases/tag/v2.5.5) | [v26.5.6](https://github.com/sxyazi/yazi/releases/tag/v26.5.6) |
|
||||
| [v2.5.4](https://github.com/llanosrocas/yaziline.yazi/releases/tag/v2.5.4) | [v26.5.6](https://github.com/sxyazi/yazi/releases/tag/v26.5.6) |
|
||||
| [v2.5.3](https://github.com/llanosrocas/yaziline.yazi/releases/tag/v2.5.3) | [v26.1.22](https://github.com/sxyazi/yazi/releases/tag/v26.1.22) |
|
||||
|
||||
@@ -40,7 +40,7 @@ local function setup(_, options)
|
||||
or th.mgr.count_copied:bg()
|
||||
or "green",
|
||||
cut_files_color = options.cut_files_color or th.mgr.count_cut:bg() or "red",
|
||||
mask_color = th.which.mask:bg(),
|
||||
mask_color = th.which.mask:bg() or "black",
|
||||
}
|
||||
|
||||
local current_separator_style = config.separator_styles
|
||||
|
||||
Reference in New Issue
Block a user