GithubHelp home page GithubHelp logo

ckardaris / ucollage Goto Github PK

View Code? Open in Web Editor NEW
205.0 6.0 3.0 26.22 MB

An extensible command line image viewer inspired by vim

License: GNU General Public License v3.0

Shell 98.10% Makefile 1.90%
image viewer cli command line ueberzug vim keyboard

ucollage's People

Contributors

ckardaris avatar kevcui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ucollage's Issues

Dynamically adjust rows and columns on window resize

Currently, one can change the amount of rows and columns with +_ and -_.
It would be nice if ucollage could dynamically adjust the amount of rows and columns when resizing the window, to allow for best use of the space in the terminal.

Examples:
May17_144136
May17_144146

[Feature request] Option to load image sorted by modified date

Using ucollage to open all images in a folder, the current behavior is to load all images sorted alphabetically by file name. It would be great to have another option to sort files by modified date, the most recent modified one showing at the first place.

config files

There is any config file to create shortcuts to auto-run scripts or commands?
Also, if I like to start the tool in a specific view mode with say 1 column only is that possible?
Last it allays ask to expand pictures! can this be remove?

No thumbnails are generated

Hello,
recently I've run into the problem that ucollage will stop working after the first time it has been used in a session.
It will start printing out the errors shown below.

Expand caps? (n, Esc: no, N: no to all)montage: unable to open image '/tmp/ucollage/thumbnail-2vLmMsFs.jpg': No such file or directory @ error/blob.c/OpenBlob/3537.
montage:  `/tmp/ucollage/thumbnail-2vLmMsFs.jpg' @ error/montage.c/MontageImageCommand/1786.
cp: cannot stat '/tmp/ucollage/thumbnail-2vLmMsFs.jpg': No such file or directory
file: invalid option -- 'a'
Usage: file [-bcCdEhikLlNnprsSvzZ0] [--apple] [--extension] [--mime-encoding]
            [--mime-type] [-e <testname>] [-F <separator>]  [-f <namefile>]
            [-m <magicfiles>] [-P <parameter=value>] [--exclude-quiet]
            <file> ...
       file -C [-m <magicfiles>]
       file [--help]
file: invalid option -- 'a'
Usage: file [-bcCdEhikLlNnprsSvzZ0] [--apple] [--extension] [--mime-encoding]
            [--mime-type] [-e <testname>] [-F <separator>]  [-f <namefile>]
            [-m <magicfiles>] [-P <parameter=value>] [--exclude-quiet]
            <file> ...
       file -C [-m <magicfiles>]
       file [--help]
montage: unable to open image '/tmp/ucollage/thumbnail-8KA5T96e.jpg': No such file or directory @ error/blob.c/OpenBlob/3537.
montage:  `/tmp/ucollage/thumbnail-8KA5T96e.jpg' @ error/montage.c/MontageImageCommand/1786.
cp: cannot stat '/tmp/ucollage/thumbnail-8KA5T96e.jpg': No such file or directory

Move to next page using arrow keys

An idea for a quality of life improvement:
Currently the user is able to use arrow keys to navigate between the pictures currently shown in the grid.
The user can also switch to the previous/next page using n or p.

Intuitively, I think it would make sense to automatically switch to the next/previous page, when navigating past the borders of the current page, while remaining in the same row from the previous page.

Example:
navigation

When the user is at the rightmost image on the left page, the right-arrow key should switch to leftmost image on the next page, while remaining in the same row as the previous page (In this example, the middle row).
Obviously, the same logic should apply when switching to the previous page.

In my opinion, its good to have both options available:

  • Switch pages with n or p (fast navigation through images, to quickly find one)
  • Automatic page switching with arrow keys (slow navigation, when actually looking at the images)

I hope you don't mind all these suggestion issues ;)

Setting a sort option leads to flickering and does not sort

I have a ~/.config/ucollage/variables with the following options set:

export UCOLLAGE_LINES=5
export UCOLLAGE_COLUMNS=5
export UCOLLAGE_EXPAND_DIRS=1
export UCOLLAGE_SORT=extension
export UCOLLAGE_TMP_DIR=~/.cache/ucollage

All these options behave as expected except the one for sorting, ucollage still seems to sort by the default option. However if I try to set the sort option inside ucollage with the set command to either name, time or size ucollage will start flickering and become unresponsive.
Trying to set the sort option extension will do nothing.
The flickering is to my understanding due to a ton of errors being printed out, here is a small excerpt:

/usr/share/ucollage/src/filelist.sh: line 163: /home/drone/.cache/ucollage/7DjqPH/read_iter: No such file or directory
/usr/share/ucollage/src/filelist.sh: line 138: /home/drone/.cache/ucollage/7DjqPH/image_names.txt: No such file or directory
/usr/share/ucollage/src/filelist.sh: line 139: /home/drone/.cache/ucollage/7DjqPH/images.txt: No such file or directory
/usr/share/ucollage/src/filelist.sh: line 140: /home/drone/.cache/ucollage/7DjqPH/hash.txt: No such file or directory
/usr/share/ucollage/src/filelist.sh: line 141: /home/drone/.cache/ucollage/7DjqPH/dirty: No such file or directory

I have seen these errors differ at times, referencing ImageMagicks Montage tool at times but I can't save these logs as I have to kill the terminal due to all the ffprobe processes ucollage keeps spawning.
Any idea or pointer on how to fix this would be much appreciated.

For completeness sake here are the version infos and installed optional deps:

 ~ 2$ pacman -Qi ucollage
Name            : ucollage-git
Version         : 1.0.1.r0.g0a6003a-1
Description     : Extensible command line image viewer inspired by vim
Architecture    : any
URL             : https://github.com/ckardaris/ucollage
Licenses        : GPL3
Groups          : None
Provides        : ucollage
Depends On      : bc  ueberzug
Optional Deps   : ffmpeg: video thumbnails [installed]
                  imagemagick: image rotation [installed]
                  xclip: clipboard pasting [installed]
Required By     : None
Optional For    : None
Conflicts With  : ucollage
Replaces        : None
Installed Size  : 136,43 KiB
Packager        : Unknown Packager
Build Date      : Fr 15 Apr 2022 00:27:09 CEST
Install Date    : Fr 15 Apr 2022 00:27:16 CEST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : None
~ 2$ pacman -Qi imagemagick
Name            : imagemagick
Version         : 7.1.0.29-1
Description     : An image viewing/manipulation program
Architecture    : x86_64
URL             : https://www.imagemagick.org/
Licenses        : custom
Groups          : None
Provides        : libmagick
Depends On      : libltdl  lcms2  fontconfig  libxext  liblqr  libraqm  libpng  libxml2
Optional Deps   : ghostscript: PS/PDF support [installed]
                  libheif: HEIF support [installed]
                  libjxl: JPEG XL support
                  libraw: DNG support [installed]
                  librsvg: SVG support [installed]
                  libwebp: WEBP support [installed]
                  libwmf: WMF support [installed]
                  libxml2: Magick Scripting Language [installed]
                  libzip: OpenRaster support [installed]
                  ocl-icd: OpenCL support [installed]
                  openexr: OpenEXR support [installed]
                  openjpeg2: JPEG2000 support [installed]
                  djvulibre: DJVU support
                  pango: Text rendering [installed]
                  imagemagick-doc: manual and API docs
Required By     : libvips  zbar
Optional For    : feh  neofetch  pacgraph  python-matplotlib  ucollage-git
Conflicts With  : imagemagick6
Replaces        : imagemagick6  libmagick
Installed Size  : 10,84 MiB
Packager        : Artix Build Bot <[email protected]>
Build Date      : So 27 Mär 2022 19:16:14 CEST
Install Date    : Di 29 Mär 2022 10:58:04 CEST
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

Reloading opened folder(s) inside ucollage

Maybe it's a stupid question, but I can't find a way to reload the folder opened in ucollage without having to close and restart it.
I tried to use loadfiles, but it keeps saying that all the images are already loaded even if I manually pasted a new image in the folder (I tried both the actual folder and /tmp/ucollage).

Am I missing something? Or this is not a pre-implemented feature?

Support for global configuration file

Hello,

I'd like to suggest adding support for a global configuration file (e.g. ~/.config/ucollage/ucollagerc ).
With a configuration file, users would be able to transfer their defaults to other devices.
Here are a couple of things, I'd love to be able to customize in that file:

  • Keybinding remaps
  • Center images in the terminal when opened
  • Specify default image viewer (e.g. maybe people want to use ucollage only for previewing, but want to open the image in e.g. firefox)

Expand directory 'yes' for all

When ucollage is started in a directory with multiple sub-directories, the user is asked if he wants ucollage to expand them, to look for images in them. Currently it is possible to state:

  • n (no, for the current sub-directory)
  • N (no, for all sub-directories)
  • y (yes, for the current sub-directory) (Note: This option is also currently not listed in the prompt)

I feel like a Y option is missing. Basically, yes for all sub-directories.

undocumented Left/Right keys in monocle and default modes doing critical tasks

Hi,
Thank you for this amazing software.

I just testing this and surprised that theLeft key in monocle mode is "Succefully deleting" my pictures! Fortunately, it is only sending them to ./local/share/Trash/ucollage/. I found that this behavior is undocumented and tricky. Left key , for a newcomer, si expected to go to the previous image, but in ucollage it is deleting images and gives /'wrong'/ message: "succefully deleted" which, IMHO, should be more verbose, like: `Image sent to trash folder at "

In default (or grid/thumbnails whatever) mode Left/Right/Down keys ask for input to delete/rename/exectude a command. I think this is confusing and these keys should be kept for navigation as expected on vim/emacs/most softwares.

One more thing, it would be nice if a confirmation message is shown before deleting/moving to trash an image or at least make it configurable.

Keep up the good work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.