wezterm icon indicating copy to clipboard operation
wezterm copied to clipboard

fix(flatpak): Remove cwd from desktop entry

Open briandipalma opened this issue 1 year ago • 2 comments

cwd provided from desktop entry overrides Lua configured cwd so you end up with different behaviour when you launch from DE launcher and from running flatpak run ....

I'm guessing this is the file that's used to create the flatpak desktop entry.

briandipalma avatar Feb 12 '24 11:02 briandipalma

Thanks for diving in! Can you explain more about what you're trying to resolve here?

wez avatar Feb 12 '24 13:02 wez

I installed the flatpak today and started configuring wezterm: https://github.com/briandipalma/iac/blob/main/dotfiles/wezterm/wezterm.lua#L9

But this line was not having any effect

config.default_cwd = wezterm.home_dir .. "/dev/iac"

when I ran the flatpak from the desktop environment launcher (Pop_OS/GNOME). Yet it did work when I ran the flatpak from the command line with flatpak run org.wezfurlong.wezterm. So obviously I went to dig into the desktop file which is what the launcher uses. I noticed the --cwd and from what I can tell in the documentation that flag overrides the config file. So I guessed that was the problem. Deleting it fixed the problem.

Do we need to specify --cwd in the desktop file? I would have thought that, based on the documentation, wezterm would open up in the users home directory as fallback anyway.

briandipalma avatar Feb 12 '24 19:02 briandipalma