1
0
Fork 0

various changes I don't remember lol

This commit is contained in:
Peter Domínguez 2025-10-30 08:28:48 -04:00
parent 07a879aad3
commit 06508d53ac
19 changed files with 90 additions and 90 deletions

View file

@ -1,4 +1,4 @@
#? Config file for btop v. 1.4.0
#? Config file for btop v. 1.4.4
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
@ -150,7 +150,7 @@ background_update = True
custom_cpu_name = ""
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
#* Begin line with "exclude=" to change to exclude filter, otherwise defaults to "most include" filter. Example: disks_filter="exclude=/boot /home/user".
#* Only disks matching the filter will be shown. Prepend exclude= to only show disks not matching the filter. Examples: disk_filter="/boot /home/user", disks_filter="exclude=/boot /home/user"
disks_filter = ""
#* Show graphs instead of meters for memory values.
@ -210,6 +210,9 @@ net_sync = True
#* Starts with the Network Interface specified here.
net_iface = ""
#* "True" shows bitrates in base 10 (Kbps, Mbps). "False" shows bitrates in binary sizes (Kibps, Mibps, etc.). "Auto" uses base_10_sizes.
base_10_bitrate = "Auto"
#* Show battery stats in top right if battery is present.
show_battery = True
@ -226,6 +229,9 @@ log_level = "WARNING"
#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards.
nvml_measure_pcie_speeds = True
#* Measure PCIe throughput on AMD cards, may impact performance on certain cards.
rsmi_measure_pcie_speeds = True
#* Horizontally mirror the GPU graph.
gpu_mirror_graph = True

View file

@ -42,7 +42,8 @@
{
"type": "gpu",
"key": " {#32}󰍹 {#39}Graphics {#33}-",
"format": "{2}"
"format": "{2}",
"hideType": "integrated"
},
{
"type": "memory",

View file

@ -222,6 +222,7 @@ bind = $mainMod, P, exec, $menu
bind = $mainMod, F, fullscreen
bind = $mainMod, C, exec, galculator
bind = $mainMod CTRL, T, exec, steam
bind = $mainMod, R, exec, retroarch --appendconfig /home/peter/.config/retroarch/config/retroarch.cfg
bind = $mainMod CTRL, Y, exec, heroic
bind = $mainMod, N, exec, dunstctl context
bind = $mainMod CTRL, U, exec, [workspace special:scratchpad silent] signal-desktop --ozone-platform-hint=auto --enable-features=UseOzonePlatform,WaylandWindowDecorations

View file

@ -19,7 +19,7 @@ ScrollBar = "#44475A"
Button = "#282A36"
DisabledButton = "#1E1F29"
Selection = "#44475A"
#Primary = "#BD93F9"
Primary = "#BD93F9"
Focus = "#BD93F9"
Separator = "#44475A"
Foreground = "#F8F8F2"

View file

@ -14,7 +14,7 @@
"output": "DP-2",
"layer": "top",
"modules-left": ["hyprland/workspaces", "hyprland/mode"],
"modules-center": ["group/statistics", "group/status", "custom/pacman", "group/networks", "bluetooth", "group/audio-player"],
"modules-center": ["group/statistics", "group/status", "temperature", "custom/pacman", "group/networks", "bluetooth", "group/audio-player"],
/* "modules-right": ["tray", "custom/scratchpad-indicator", "pulseaudio",], */
"modules-right": ["group/taskbar", "group/group-power"],
@ -45,7 +45,6 @@
"orientation": "inherit",
"modules": [
"group/playing",
"cava"
]
},
"group/playing": {
@ -87,27 +86,6 @@
"on-click": "exec ~/.bin/sh/dunstaudio.sh play_pause",
"on-click-right": "exec ~/.bin/sh/dunstaudio.sh next_track",
"on-click-middle": "exec ~/.bin/sh/dunstaudio.sh prev_track",
},
"cava": {
"cava_config": "/home/peter/.config/cava/config",
"framerate": 240,
"autosens": 1,
"bars": 6,
"lower_cutoff_freq": 50,
"higher_cutoff_freq": 10000,
"method": "pipewire",
"source": "auto",
"stereo": true,
"reverse": false,
"bar_delimiter": 32,
"monstercat": false,
"waves": false,
"noise_reduction": 0.77,
"input_delay": 2,
"format-icons" : ["<small>▁</small>", "<small>▂</small>", "<small>▃</small>", "<small>▄</small>", "<small>▅</small>", "<small>▆</small>", "<small>▇</small>", "<small>█</small>" ],
"actions": {
"on-click-right": "mode"
}
},
"group/statistics": {
"orientation": "inherit",
@ -115,8 +93,7 @@
"custom/gpu-usage",
"cpu",
"memory",
"group/disks",
"temperature"
"group/disks"
]
},
"custom/pacman": {

View file

@ -51,7 +51,8 @@ status = f"{status[:16]}.." if len(status) > 17 else status
# status code
status_code_class = html_data("#regionHeader").attr("class")
status_code = str(status_code_class).split(" ")[2].split("-")[2]
#status_code = str(status_code_class).split(" ")[2].split("-")[2]
status_code = "default"
# status icon
icon = (

View file

@ -294,7 +294,7 @@ window#waybar.hidden {
border-radius: 10px;
transition: none;
color: #50fa7b;
background: #282a36;
background: transparent;
}
#custom-power {
margin-top: 6px;

View file

@ -21,7 +21,7 @@ run = "plugin chmod"
desc = "Chmod on selected files"
```
Make sure the <kbd>c</kbd> => <kbd>m</kbd> key is not used elsewhere.
Note that, the keybindings above are just examples, please tune them up as needed to ensure they don't conflict with your other commands/plugins.
## License

View file

@ -1,4 +1,4 @@
--- @since 25.5.28
--- @since 25.5.31
local selected_or_hovered = ya.sync(function()
local tab, paths = cx.active, {}
@ -22,7 +22,8 @@ return {
local value, event = ya.input {
title = "Chmod:",
position = { "top-center", y = 3, w = 40 },
pos = { "top-center", y = 3, w = 40 },
position = { "top-center", y = 3, w = 40 }, -- TODO: remove
}
if event ~= 1 then
return

View file

@ -34,6 +34,9 @@ run = "git"
## Advanced
> [!NOTE]
> The following configuration must be put before `require("git"):setup()`
You can customize the [Style](https://yazi-rs.github.io/docs/plugins/layout#style) of the status sign with:
- `th.git.modified`

View file

@ -1,10 +1,11 @@
--- @since 25.5.28
--- @since 25.5.31
local WINDOWS = ya.target_family() == "windows"
-- The code of supported git status,
-- also used to determine which status to show for directories when they contain different statuses
-- see `bubble_up`
---@enum CODES
local CODES = {
excluded = 100, -- ignored directory
ignored = 6, -- ignored file
@ -26,6 +27,8 @@ local PATTERNS = {
{ "[AD][AD]", CODES.updated },
}
---@param line string
---@return CODES, string
local function match(line)
local signs = line:sub(1, 2)
for _, p in ipairs(PATTERNS) do
@ -41,9 +44,12 @@ local function match(line)
else
return code, path
end
---@diagnostic disable-next-line: missing-return
end
end
---@param cwd Url
---@return string?
local function root(cwd)
local is_worktree = function(url)
local file, head = io.open(tostring(url)), nil
@ -64,6 +70,8 @@ local function root(cwd)
until not cwd
end
---@param changed Changes
---@return Changes
local function bubble_up(changed)
local new, empty = {}, Url("")
for path, code in pairs(changed) do
@ -79,6 +87,10 @@ local function bubble_up(changed)
return new
end
---@param excluded string[]
---@param cwd Url
---@param repo Url
---@return Changes
local function propagate_down(excluded, cwd, repo)
local new, rel = {}, cwd:strip_prefix(repo)
for _, path in ipairs(excluded) do
@ -95,7 +107,12 @@ local function propagate_down(excluded, cwd, repo)
return new
end
---@param cwd string
---@param repo string
---@param changed Changes
local add = ya.sync(function(st, cwd, repo, changed)
---@cast st State
st.dirs[cwd] = repo
st.repos[repo] = st.repos[repo] or {}
for path, code in pairs(changed) do
@ -108,16 +125,29 @@ local add = ya.sync(function(st, cwd, repo, changed)
st.repos[repo][path] = code
end
end
ya.render()
-- TODO: remove this
if ui.render then
ui.render()
else
ya.render()
end
end)
---@param cwd string
local remove = ya.sync(function(st, cwd)
---@cast st State
local repo = st.dirs[cwd]
if not repo then
return
end
ya.render()
-- TODO: remove this
if ui.render then
ui.render()
else
ya.render()
end
st.dirs[cwd] = nil
if not st.repos[repo] then
return
@ -131,9 +161,11 @@ local remove = ya.sync(function(st, cwd)
st.repos[repo] = nil
end)
---@param st State
---@param opts Options
local function setup(st, opts)
st.dirs = {} -- Mapping between a directory and its corresponding repository
st.repos = {} -- Mapping between a repository and the status of each of its files
st.dirs = {}
st.repos = {}
opts = opts or {}
opts.order = opts.order or 1500
@ -174,6 +206,7 @@ local function setup(st, opts)
end, opts.order)
end
---@type UnstableFetcher
local function fetch(_, job)
local cwd = job.files[1].url.base
local repo = root(cwd)

View file

@ -12,7 +12,7 @@
### Yazi package manager
```bash
ya pack -a ndtoan96/ouch
ya pkg add ndtoan96/ouch
```
### Git
@ -43,8 +43,12 @@ prepend_previewers = [
{ mime = "application/x-bzip2", run = "ouch" },
{ mime = "application/x-7z-compressed", run = "ouch" },
{ mime = "application/x-rar", run = "ouch" },
{ mime = "application/x-xz", run = "ouch" },
{ mime = "application/vnd.rar", run = "ouch" },
{ mime = "application/x-xz", run = "ouch" },
{ mime = "application/xz", run = "ouch" },
{ mime = "application/x-zstd", run = "ouch" },
{ mime = "application/zstd", run = "ouch" },
{ mime = "application/java-archive", run = "ouch" },
]
```
@ -56,7 +60,7 @@ If you want to change the icon or the style of text, you can modify the `peek` f
For compession, add this to your `keymap.toml`:
```toml
[[manager.prepend_keymap]]
[[mgr.prepend_keymap]]
on = ["C"]
run = "plugin ouch"
desc = "Compress with ouch"
@ -73,7 +77,7 @@ To decompress with `ouch`, configure the opener in `yazi.toml`.
```toml
[opener]
extract = [
{ run = 'ouch d -y "%*"', desc = "Extract here with ouch", for = "windows" },
{ run = 'ouch d -y %*', desc = "Extract here with ouch", for = "windows" },
{ run = 'ouch d -y "$@"', desc = "Extract here with ouch", for = "unix" },
]
```

View file

@ -126,6 +126,7 @@ function M:entry(job)
title = "Create archive:",
value = default_name .. "." .. default_fmt,
position = { "top-center", y = 3, w = 40 },
pos = { "top-center", y = 3, w = 40 },
})
if name_event ~= 1 then
return
@ -136,6 +137,7 @@ function M:entry(job)
local confirm, confirm_event = ya.input({
title = "Overwrite " .. output_name .. "? (y/N)",
position = { "top-center", y = 3, w = 40 },
pos = { "top-center", y = 3, w = 40 },
})
if not (confirm_event == 1 and confirm:lower() == "y") then
return

View file

@ -42,6 +42,8 @@ desc = "Maximize or restore the preview pane"
You can replace `preview` with `current` or `parent` to toggle the other panes.
Note that, the keybindings above are just examples, please tune them up as needed to ensure they don't conflict with your other commands/plugins.
## Advanced
In addition to triggering the plugin with a keypress, you can also trigger it in your `init.lua` file:

View file

@ -1,4 +1,4 @@
--- @since 25.5.28
--- @since 25.5.31
--- @sync entry
local function entry(st, job)

View file

@ -1,3 +1,4 @@
--- @since 25.5.31
--- @diagnostic disable: undefined-global, undefined-field
--- @alias Mode Mode Comes from Yazi.
--- @alias Rect Rect Comes from Yazi.
@ -1316,7 +1317,7 @@ return {
Progress.partial_render = function(self)
local progress = cx.tasks.progress
if progress.total == 0 then
return { config_paragraph(self._area) }
return config_paragraph(self._area)
end
local gauge = ui.Gauge():area(self._area)
@ -1332,11 +1333,9 @@ return {
end
local left = progress.total - progress.succ
return {
gauge
:percent(percent)
:label(ui.Span(string.format("%3d%%, %d left", percent, left)):style(th.status.progress_label)),
}
return gauge
:percent(percent)
:label(ui.Span(string.format("%3d%%, %d left", percent, left)):style(th.status.progress_label))
end
if display_header_line then
@ -1347,7 +1346,7 @@ return {
return {
config_paragraph(self._area, left_line),
ui.Text(right_line):area(self._area):align(ui.Text.RIGHT),
right_line:area(self._area):align(ui.Align.RIGHT),
}
end
@ -1373,8 +1372,8 @@ return {
return {
config_paragraph(self._area, left_line),
ui.Text(right_line):area(self._area):align(ui.Text.RIGHT),
table.unpack(Progress:new(self._area, right_width):redraw()),
right_line:area(self._area):align(ui.Align.RIGHT),
table.unpack(ui.redraw(Progress:new(self._area, right_width))),
}
end
@ -1423,6 +1422,8 @@ return {
end
end
table.insert(childrens, Modal:new(self._area))
self._children = childrens
end
end,