Updated README.md

This commit is contained in:
Ano-sys
2026-08-15 18:54:26 +02:00
parent 9297b4c062
commit 2a360721b6
+18 -2
View File
@@ -3,22 +3,27 @@
> View images fast and without any hocus pocus, sometimes less is better > View images fast and without any hocus pocus, sometimes less is better
## Disclaimer ## Disclaimer
The inspiration was a YouTube video, I've watched the beginning and though to myself that this cannot be that hard to implement. The inspiration was a YouTube video, I've watched the beginning and though to myself that this cannot be that hard to implement.
Of course it is not without usage, I will prepare the app to be hooked in Hyprland to launch the current photo stored in clipboard. Of course it is not without usage, I will prepare the app to be hooked in Hyprland to launch the current photo stored in clipboard.
## Requirements ## Requirements
- SDL3 - SDL3
## Installations ## Installations
> As of now the only like-indented working implementation is for macOS. Wayland ignores the desired window states (resize, position). > As of now the only like-indented working implementation is for macOS. Wayland ignores the desired window states (resize, position).
#### macOS ### macOS
- `brew install sdl3` - `brew install sdl3`
- clone this repo and navigate into it - clone this repo and navigate into it
- `gcc SimpleImageViewer.c -o SimpleImageViewer -Wall -Werror $(pkg-config --cflags --libs sdl3)` or with `clang` - `gcc SimpleImageViewer.c -o SimpleImageViewer -Wall -Werror $(pkg-config --cflags --libs sdl3)` or with `clang`
- additional compiler arguments for ide: `-I/opt/homebrew/include -L/opt/homebrew/lib -Wl,-rpath,/opt/homebrew/lib -lSDL3 ` - additional compiler arguments for ide: `-I/opt/homebrew/include -L/opt/homebrew/lib -Wl,-rpath,/opt/homebrew/lib -lSDL3 `
#### Linux ### Linux
- `sudo pacman -S sdl3 --noconfirm` - `sudo pacman -S sdl3 --noconfirm`
- `gcc SimpleImageViewer.c -o SimpleImageViewer -Wall -Werror $(pkg-config --cflags --libs sdl3) -lm` or with `clang` - `gcc SimpleImageViewer.c -o SimpleImageViewer -Wall -Werror $(pkg-config --cflags --libs sdl3) -lm` or with `clang`
- when using Hyprland, move the scripts folder into your `~/.config/hypr/` - when using Hyprland, move the scripts folder into your `~/.config/hypr/`
@@ -26,3 +31,14 @@ Of course it is not without usage, I will prepare the app to be hooked in Hyprla
- move the `hypr_simpleimageviewer.lua` file into `~/.config/hypr/` - move the `hypr_simpleimageviewer.lua` file into `~/.config/hypr/`
- replace [USER] with your user - replace [USER] with your user
- add `require(hypr_simpleimageviewer)` at the top of your Hyprland config - add `require(hypr_simpleimageviewer)` at the top of your Hyprland config
## Usage
If installed via Hyprland binding, `SUPER + I` is used to parse a file from clipboard (path or binary) as argument into SimpleImageViewer.
Via commandline `./SimpleImageViewer [path_to_image]`.
Mouse-/Keybinds:
- Close: `ESC, Enter, Space`
- Move image: press `right mouse button` and `drag`
- Resize image: `scroll mouse wheel`