Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Added `opts.follow_img_func` option for customizing how to handle image paths.
- Added better handling for undefined template fields, which will now be prompted for.
- Added `opts.wayland` option for Wayland blurry work-around.

### Changed

Expand Down
3 changes: 3 additions & 0 deletions lua/obsidian/commands/open.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ local function open_in_app(client, path)
local run_in_shell = true
if this_os == util.OSType.Linux or this_os == util.OSType.FreeBSD then
cmd = "xdg-open"
if client.opts.wayland == true then
cmd = "obsidian --enable-features=UseOzonePlatform --ozone-platform=wayland"
end
args = { uri }
elseif this_os == util.OSType.Wsl then
cmd = "wsl-open"
Expand Down
2 changes: 2 additions & 0 deletions lua/obsidian/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ local config = {}
---@field ui obsidian.config.UIOpts | table<string, any>
---@field attachments obsidian.config.AttachmentsOpts
---@field callbacks obsidian.config.CallbackConfig
---@field wayland boolean|?
config.ClientOpts = {}

--- Get defaults.
Expand Down Expand Up @@ -65,6 +66,7 @@ config.ClientOpts.default = function()
ui = config.UIOpts.default(),
attachments = config.AttachmentsOpts.default(),
callbacks = config.CallbackConfig.default(),
wayland = false,
}
end

Expand Down