Closed m-fonseca closed 2 years ago
Thank you for the PR!
But I think it's better to just write it like this:
- if display_server == 'x11' then
+ if display_server == 'x11' or display_server == 'tty' then
cmd_check = 'xclip -selection clipboard -o -t TARGETS'
cmd_paste = 'xclip -selection clipboard -t image/png -o > \'%s\''
elseif display_server == 'wayland' then
cmd_check = 'wl-paste --list-types'
cmd_paste = 'wl-paste --no-newline --type image/png > \'%s\''
- elseif display_server == 'tty' then
- cmd_check = 'xclip -selection clipboard -o -t TARGETS'
- cmd_paste = 'xclip -selection clipboard -t image/png -o > \'%s\''
end
@m-fonseca Can you test my change?
Works as I'd expect.
merged
Hello, this is a small fix that allowed this plugin to work in my environment. Thank you for the plugin!
If you don't start X with a display manager like gdm, and just use startx or similar, it seems your XDG_SESSION_TYPE will be 'tty', which causes an error. This adds a case to handle tty.