u/AwkwardNumber7584

127 post karma · 27 comment karma · joined Dec 2022

AwkwardNumber7584

A one-liner like this helps a lot with aliases.

zsh -ixc : 2>&1 | grep '> alias'

AwkwardNumber7584
  1. With hints like on your video, +yH isn't working, yH, sort of. I didn't manage to see the copy; a lot of runtime errors from your script instead.
  2. Is your script capable of getting virtual text occupying the entire line, starting right from the column 1?
AwkwardNumber7584

I still can't put the cursor "before" the virtual text. The cursor is just sliding over, as always. The +yH or yH shortcut apparently does not make anything.

AwkwardNumber7584

Looks like the exact answer, thanks! I tried to copy your entire source to a separate file virtual-text.lua, to be included into my config for odds and ends. Unfortunately, I have a lot of errors like "Unexpected token '(' " right in the first line. And it seems relevant, too :) The last error is "Unexpected token 'end' ". The last line looks like "end)" which in itself seems odd. Maybe your snippet isn't complete?

What do I have to do next?

My odds and ends config, polish.lua:

-- Spell settings

vim.opt.spelllang = { "ru_ru", "en_us", "es_es" }

-- Neovide settings

vim.g.neovide_scale_factor = vim.g.neovide_min_scale_factor

-- Massive remappings

local scraps = require "aa-scraps"

scraps.kinks() -- Assorted exotics, mostly Insert Mode

scraps.odds() -- AstroNvim standard mappings, Cyrillic

I'm planning to add something like

local vt = require "virtual-text"

...

AwkwardNumber7584

antidote is really fast, thanks! zprof made me think,MISE_TRACE=1 mise hook-env

has shown me that I'd better install whatever is defined in ~/.mise.toml first :)

AwkwardNumber7584

Thanks! Very interesting. If you use dotfiles, do you care to give the link?

AwkwardNumber7584

Thank you very much! I never heard about zprof before. It looks like the culprit is the misterious _mise_hook. On "good" boxes it takes 12.5% of the time (if I understand zprof idea correctly). On the "bad" one it takes 90%.

#ohmyzsh/ohmyzsh path:plugins/mise

Mise plugin is commented out long ago. I can't even remember exactly why. My configuration is automated via dotfiles. My installation script contains what I think to be the complete cleanup.

rm -rf ~/.oh-my-zsh

rm -rf ~/.oh-my-zsh-cache

rm -rf ~/.antidote

rm -rf ~/.cache/antidote

rm -rf ~/.cache/p10k*

# shellcheck disable=SC2086

git clone --depth=1 https://github.com/mattmc3/antidote.git ${ZDOTDIR:-$HOME}/.antidote

Maybe an important detail: ~/.p10k.zsh contains .mise.toml in anchor_files. Perhaps, because I created it long ago and keep it on dotfiles. I removed it from anchor_files experimentally, but _mise_hook won't go away.

AwkwardNumber7584

I tried it. In the end, I disabled all of them. No difference. The box isn't great, but it isn't twenty times slower than the ones where the same setup runs reasonably. Are there any specific requirements or bottlenecks with p10k?

AwkwardNumber7584

I've read the docs carefully and I'm not sure whether the instant prompt is about any prompt appearance or just the console initial load. When I start my terminal, the prompt appears instantly. After any subsequent command, including just Enter, it lags.

~ cat ~/.zshrc ✔ │ 6s

# shellcheck disable=SC1090

# shellcheck disable=SC2296

# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.

# Initialization code that may require console input (password prompts, [y/n]

# confirmations, etc.) must go above this block; everything else may go below.

if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then

source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"

fi

source ~/.antidote/antidote.zsh

# initialize plugins statically with ${ZDOTDIR:-~}/.zsh_plugins.txt

antidote load

# Enable smart cd.

eval "$(zoxide init zsh)"

alias cd=z

[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

# A very special case of IBus (scripted switch).

if [[ "$XDG_CURRENT_DESKTOP" == "GNOME" ]]; then

source ~/.gnome-kbd-lib.sh

fi

source ~/.assorted-helpers.sh

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.

[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

eval "$(mise activate zsh)"

.gnome-kbd-lib.sh and .assorted-helpers.sh contain just some function definitions.

AwkwardNumber7584

No explorable ideas about blink lists, so far. To make the mapping of snippets more palatable: is it possible to map on another key some docstring message instead of pasting the snippet right away?

UPD

The "variable" identifiers, or whatever their proper name, must be ready to change? I can change them, but only by general rename feature.

AwkwardNumber7584

The lists are longish indeed. I scrolled them thoroughly without haste. There are no snippet proposals, unless I'm blind to something.

UPD

There's obviously fuzzy search in action. Maybe some conflict with luasnip?

UPD2

Ctrl+k is already occupied :) . Ctrl+k in Insert Mode shows a shadowy question mark. After mu (two characters inserted) I have this: む.

UPD3

Implemented your idea, according to my lights:

local opts = { noremap = true, silent = true }

vim.keymap.set("i", "<C-l>", function() require("luasnip").expand_or_jump() end, opts)

I'm not sure it's better than proposals from the list at all times, though.

AwkwardNumber7584

You're on the right track, I think :) . :lua require("luasnip").expand() inserts a snippet. There shoud be a normal way...

AwkwardNumber7584

Congratulations! How did you manage the beautiful GUI? There's no kivymd in dependencies.

AwkwardNumber7584

After fooling with ML4W for some time, I removed it from my system. It left my ~/.config directory full of broken symlinks. Removing them took this rm command:

rm ags bashrc dunst gtk-3.0 gtk-4.0 hypr kitty ml4w nwg-dock-hyprland ohmyposh qt6ct rofi vim wal waybar waypaper wlogout xsettingsd zshrc

Also there must be a lot of corrupted *rc files. I'm just interested in a convenient way to get to normal. I mean only desktop visuals.

AwkwardNumber7584

Thanks!

uv tool install --python 3.13 git+... works as expected.

BTW, is this the only way to make the once installed app survive the upgrade of the system python? The trouble with pipx, for instance, is that you have to reinstall everything when the system python gets upgraded.

AwkwardNumber7584

Tnanks! Unfortunately, 2.12.1 doesn't make any difference. I already mentioned that on another box with a very similar configuration (apparently identical where sddm is concerned) everything's OK.

AwkwardNumber7584

/etc> cat sddm.conf

/etc> cat sddm.conf.d/kde_settings.conf

[Autologin]

Relogin=false

Session=

User=

[General]

HaltCommand=/usr/bin/systemctl poweroff

RebootCommand=/usr/bin/systemctl reboot

[Theme]

Current=eucalyptus-drop

[Users]

MaximumUid=60513

MinimumUid=1000

/etc>

sddm.conf is empty. The configs look just like those on another box, where there's no such trouble.

AwkwardNumber7584

I'm struggling yet with jouranlctl. My sessions are sitting there (if I'm looking into the right place):

~> ls /usr/share/wayland-sessions

hyprland.desktop hyprland-uwsm.desktop niri.desktop plasma.desktop

~> ls /usr/share/xsessions

~>

I can't see anything suspicious, but then I don't know where to look.

AwkwardNumber7584

It's Wayland from day one. What journal?

AwkwardNumber7584

FWIW: In my case (EndeavourOS/Arch, DMS niri), the following packages are responsible, more or less: gnome-browser-connector, gnome-desktop-4, gnome-shell, nautilus, xdg-desktop-portal-gnome. If you can get rid of them, one way or another, Google Chrome slips to gtk3 file picker (presumably). No configuration changes.

AwkwardNumber7584

Yes, the underlying junk is everything :) . I use EndeavourOS for everything; I just installed Plasma KDE on another box from scratch, then DMS niri on top. I've got the Google Chrome file picker working properly, without the wrinkle in question. It's also a GNOME dialog, but looks clearly different from the one on my troubled installation. Probably, it's gtk3/gtk4 difference. I've been trying to find any configuration difference, but found none so far.

/usr/share/applications/google-chrome.desktop:

...

Exec=/usr/bin/google-chrome-stable --incognito

There's a bunch of configuration files in /usr/share/xdg-desktop-portal, including niri-portals.conf

On both boxes the files look the same, gtk version never mentioned. GTK_USE_PORTAL is undefined on both boxes, too. I've no idea what else to check.

AwkwardNumber7584

Yes, ps -ef | grep -i ibus gives some output. I can't publish it normally, because I still can't figure out how to insert code snippets here. Triple backtick won't work :)

My startup block is rudimentary:

~/.config/niri> rg spawn-at-startup

user/common.kdl

33:spawn-at-startup "ibus" "start" "--type" "wayland"

config.kdl

115:spawn-at-startup "bash" "-c" "wl-paste --watch cliphist store &"

The latter is a DMS niri default.

https://github.com/AvengeMedia/DankMaterialShell

Everything works just fine, save the minor wrinkle in question.

AwkwardNumber7584

Without GNOME installed, then. What kind of configuration are you using? I use DMS niri, it looks quite simple and works flawlessly, minus the trouble in question :)

AwkwardNumber7584

I tried to follow your hint:

//spawn-at-startup "ibus" "start" "--type" "wayland"

environment {

XDG_CURRENT_DESKTOP "niri"

GTK_IM_MODULE "ibus"

}

IBus won't start. What else could be wrong?

AwkwardNumber7584

I start it in ~/.config/niri/config.kdl like this:

spawn-at-startup "ibus" "start" "--type" "wayland"

It shouldn't make any difference, I suppose. Where did you put your GTK_IM_MODULE line?