|
@@ -4,7 +4,7 @@ A fork of [discordo](https://github.com/ayn2op/discordo) — a lightweight Disco
|
|
|
|
|
|
|
|
## Changes from upstream
|
|
## Changes from upstream
|
|
|
|
|
|
|
|
-- **Image viewer**: Opens image attachments (jpeg, png, webp, gif) in a configurable viewer (`imv` by default) instead of the browser
|
|
|
|
|
|
|
+- **Image viewer**: Opens image attachments (jpeg, png, webp, gif) in a configurable viewer (`mpv` by default) instead of the browser. On X11, auto-detects terminal window geometry so the viewer opens at the same position and size
|
|
|
- **Save image**: `S` keybind saves the selected message's image attachment to a configurable directory
|
|
- **Save image**: `S` keybind saves the selected message's image attachment to a configurable directory
|
|
|
- **Attachment URL fix**: Links no longer break due to bad newline handling
|
|
- **Attachment URL fix**: Links no longer break due to bad newline handling
|
|
|
- **Tooltip**: `o open` appears in the bottom help bar when a message has attachments or URLs
|
|
- **Tooltip**: `o open` appears in the bottom help bar when a message has attachments or URLs
|
|
@@ -14,11 +14,12 @@ A fork of [discordo](https://github.com/ayn2op/discordo) — a lightweight Disco
|
|
|
### Requirements
|
|
### Requirements
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
|
-sudo pacman -S go imv wl-clipboard
|
|
|
|
|
|
|
+sudo pacman -S go mpv xdotool wl-clipboard
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
- `go` — Go compiler (1.22+)
|
|
- `go` — Go compiler (1.22+)
|
|
|
-- `imv` — lightweight image viewer (Wayland + X11, supports jpeg/png/webp/gif)
|
|
|
|
|
|
|
+- `mpv` — media player used as image viewer (supports jpeg/png/webp/gif with animation)
|
|
|
|
|
+- `xdotool` — used to detect terminal window geometry on X11 (optional, image viewer still works without it)
|
|
|
- `wl-clipboard` — clipboard support on Wayland (skip if using X11)
|
|
- `wl-clipboard` — clipboard support on Wayland (skip if using X11)
|
|
|
|
|
|
|
|
### Build and install
|
|
### Build and install
|
|
@@ -48,8 +49,9 @@ The default config is used if no file exists. See [the default config](./interna
|
|
|
|
|
|
|
|
```toml
|
|
```toml
|
|
|
# External image viewer (must accept a file path as first argument)
|
|
# External image viewer (must accept a file path as first argument)
|
|
|
|
|
+# When set to "mpv", auto-adds --geometry, --force-window, --loop-file flags
|
|
|
# Set to "default" to use xdg-open
|
|
# Set to "default" to use xdg-open
|
|
|
-image_viewer = "imv"
|
|
|
|
|
|
|
+image_viewer = "mpv"
|
|
|
|
|
|
|
|
# Directory for saved images (supports ~/, empty = current directory)
|
|
# Directory for saved images (supports ~/, empty = current directory)
|
|
|
image_save_dir = "~/Pictures/discordo"
|
|
image_save_dir = "~/Pictures/discordo"
|
|
@@ -63,11 +65,9 @@ save_image = "S"
|
|
|
|
|
|
|
|
### Notes
|
|
### Notes
|
|
|
|
|
|
|
|
-- If `imv` installs as `imv-x11` or `imv-wayland` without a plain `imv` binary, create a symlink:
|
|
|
|
|
- ```bash
|
|
|
|
|
- sudo ln -s /usr/bin/imv-wayland /usr/local/bin/imv
|
|
|
|
|
- ```
|
|
|
|
|
-- Alternative viewers: `feh`, `sxiv`, `nsxiv` — set via `image_viewer` in config (note: `feh` lacks WebP support)
|
|
|
|
|
|
|
+- On X11, `xdotool` is used to detect terminal geometry so `mpv` opens at the same position and size as your terminal. Without `xdotool`, `mpv` opens at its default position.
|
|
|
|
|
+- On Wayland, `xdotool` doesn't work — use compositor window rules instead (e.g., sway: `for_window [app_id="mpv"] floating enable, move position center`)
|
|
|
|
|
+- Alternative viewers: `imv`, `nsxiv`, `feh` — set via `image_viewer` in config. Geometry detection only applies to `mpv`.
|
|
|
|
|
|
|
|
## Usage
|
|
## Usage
|
|
|
|
|
|