Giter Site home page Giter Site logo

giorgosxou / tuifimanager Goto Github PK

View Code? Open in Web Editor NEW
686.0 7.0 13.0 6.65 MB

A cross-platform terminal-based termux-oriented file manager (and component), meant to be used with a Uni-Curses project or as is.

License: GNU General Public License v3.0

Python 98.28% Nix 1.72%
tui unicurses ncurses pdcurses terminal-based filemanager filemanager-ui terminal termux cross-platform

tuifimanager's People

Contributors

brewingweasel avatar giorgosxou avatar joser93 avatar michaelbelsanti avatar sigmanificient 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  avatar

tuifimanager's Issues

CTRL+C raises auto-search function

just a reminder to return when event is null 0, because i forgot about it and i was wondering why i had this issue lol

just add this line, under the handle_events function

if event == 0: return

Scroll sensitivity

We need a Scroll sensitivity variable, maybe "smoth scrolling" with an offset too?

TUIFIManager does not start in current working directory.

Hello,

I see no reason why TUIFIManager should not start in the current working directory $PWD (os.path.curdir in Python).

Instead, it appears the default is to always start in the user's home directory ($HOME).

Please consider changing the behavior.

Over-lapping files when exiting search mode

Weird Issue resulting in the over-drawing of another icon, when exiting find-mode (in position 0) and then proceeding to move:

Peek 2022-12-12 12-52

it has been fixed, it will not be present in the next release

Adding more file types

I open this issue as I would present a few design a file type i made and may post more of them in the future.
This issue is meant to collect every proposition instead of opening an issue for each

Git keeps corrupting the peek gif

DUE to CRLF replacement in the, git keeps corrupting the Peek.gif file.
From git logs:

warning: in the working copy of 'Peek.gif', CRLF will be replaced by LF the next time Git touches it

Installation with pip is giving an error on pyproject.toml: LICENSE not found.

Running both:
sudo pip3 install tuifimanager --upgrade
pip3 install TUIFIManager --upgrade outputs the same error.

Defaulting to user installation because normal site-packages is not writeable
Collecting TUIFIManager
  Using cached TUIFIManager-2.3.2.tar.gz (41 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      running dist_info
      creating /tmp/pip-modern-metadata-ti7k196i/TUIFIManager.egg-info
      writing manifest file '/tmp/pip-modern-metadata-ti7k196i/TUIFIManager.egg-info/SOURCES.txt'
      listing git files failed - pretending there aren't any
      writing manifest file '/tmp/pip-modern-metadata-ti7k196i/TUIFIManager.egg-info/SOURCES.txt'
      error: [Errno 2] No such file or directory: 'LICENSE'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.


Not sure if its a problem on my end or permission errors because sudo didn't work either. I tried updating my packages, ran pip again and got the same errors.

Platform: Pop!OS 22.04 LTS

ncurses not found but existing on macOS

Installed via:
% pip3 install TUIFIManager --upgrade

Run as:
% tuifi

Got:

goetz@host ~ % tuifi
Traceback (most recent call last):
  File "/opt/homebrew/bin/tuifi", line 5, in <module>
    from TUIFIManager.__main__ import main
  File "/opt/homebrew/lib/python3.10/site-packages/TUIFIManager/__init__.py", line 9, in <module>
    from       .TUIMenu import    *
  File "/opt/homebrew/lib/python3.10/site-packages/TUIFIManager/TUIMenu.py", line 2, in <module>
    import unicurses
  File "/opt/homebrew/lib/python3.10/site-packages/unicurses/__init__.py", line 119, in <module>
    ncurses,panel = get_libncursesw_paths()
  File "/opt/homebrew/lib/python3.10/site-packages/unicurses/__init__.py", line 79, in get_libncursesw_paths
    raise Exception('NCursesNotFound: ' + msg)
Exception: NCursesNotFound: No version of shared-libraries of ncurses found on this system, please try `brew install ncurses` if this won't work please create an issue

goetz@host ~ % brew install ncurses
==> Auto-updated Homebrew!
[…]
Running `brew update --auto-update`...
[…]

Warning: ncurses 6.3 is already installed and up-to-date.
To reinstall 6.3, run:
  brew reinstall ncurses

goetz@host ~ % sw_vers
ProductName:		macOS
ProductVersion:		13.1
BuildVersion:		22C65

… on ARM64.

suffixes and search

just realised how wrong my implementation of search + suffixes was, especially for the component side of the project.

OSError

shell=True , make it a string and maybe remove os.system('clear')

proc = subprocess.Popen([open_with, directory])

recreating the issue, open any file with DEFAULT_OPENER at least on windows

Extracting "ascii images" to files

It would be really nice to have a separation for the ASCII files icons into their own files outside the codebase.

This would make organization easier, adding new files type an easy manner and improve the possibility for customization.
I would think of having metadata along the ascii art, such a the file extensions.

For later on it could be a way to add better / small icons too while keeping the code clean with a simple loader helper

Using a static configuration for the setup process

I noticed that the setup process is pretty simple, and thus setting up a static configuration could be a nice to have.
I'm thinking of using setup.cfg as it is natively supported by setup-tools, but poetry can be a nice alternative too.

Using a dynamic approach is a bit criticized by some as it may lead to ACE at installation. Anyway, it always better to have a clean easy and standard way for the setup.

Display Hidden files after Non-Hidden files

Not sure this is an issue but displaying both hidden and non-hidden files/folders together makes it kinda messy for the user to distinguish.
Normally, non-hidden files are displayed first and then the hidden files at last.
Also, a shortcut can be created to unhide hidden files and to hide again.

Flickering of menu (?)

For some very wierd reason, the issue gets solved the momment I open a file to an external app (it doesn't matter if the external app is a TUI or not), I'm guessing this has to do with the print(BEGIN_MOUSE) in main

\r vs \n vs \r\n etc.

tuifi_Peek 2023-01-05 11-53

CTRL + S is default for stop processing terminal

Just wanted to point out that for a terminal based utility, the default keybinding CTRL +S is highly problematic,
as for most environments it means freeze / don't update / stop scrolling the terminal.
(with CTRL + Q meaning continue / unfreeze / resume scrolling).

Please consider to replace this default binding with something less irritating to most users.

Thanks.

Nix OS support

The package fail to initialize on Nix OS. As no configuration is provided, is make it hard to install properly.

Traceback (most recent call last):
  File "/data/dev/GiorgosXou/TUIFIManager/venv/bin/tuifi", line 5, in <module>
    from TUIFIManager.__main__ import main
  File "/data/dev/GiorgosXou/TUIFIManager/TUIFIManager/__init__.py", line 12, in <module>
    from       .TUIMenu import TUIMenu
  File "/data/dev/GiorgosXou/TUIFIManager/TUIFIManager/TUIMenu.py", line 2, in <module>
    import unicurses
  File "/data/dev/GiorgosXou/TUIFIManager/venv/lib/python3.10/site-packages/unicurses/__init__.py", line 124, in <module>
    lib1 = ctypes.CDLL(ncurses,mode=ctypes.RTLD_GLOBAL)
  File "/nix/store/hhk4wr7hwry854sq69chmrjqyi964p7y-python3-3.10.9/lib/python3.10/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libncursesw.so.6: cannot open shared object file: No such file or directory

Freeze

Randomly freezes when using

python 3.9
tuifi from pipy 1.3.3
unicurses from pipy 2.1.0
ncurses6 6.3-p20220507
alacritty 0.11.0
recording.mp4

Typing support

I'd like to see (maybe add by myself) typing support as it is a good practice and would help to understand a bit more of what is going on, often allowing to spot more complex issues and code simplifying.

What are your thoughts about it?

Using EDITOR instead of tuifi_default_editor

Is there any benefit to using a custom variable for the editor? Using EDITOR will use the correct editor out of the box for most users, since most people heavily using the terminal will have it set. If you want to offer the ability to use an editor other than what EDITOR is set to, perhaps you could check if tuifi_default_editor is set, and otherwise fallback to EDITOR?

Error when starting tuifi

os: Arch GNU/Linux
version: Latest commit from git

When starting TUIFIManager using the command provided from setup.py in a local installation, it crashes with the following error:

(venv) [sigmanificient@Sigmachine TUIFIManager]$ tuifi
Traceback (most recent call last):
  File "/home/sigmanificient/TUIFIManager/venv/bin/tuifi", line 33, in <module>
    sys.exit(load_entry_point('TUIFIManager', 'console_scripts', 'tuifi')())
  File "/home/sigmanificient/TUIFIManager/venv/bin/tuifi", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/sigmanificient/TUIFIManager/TUIFIManager/__init__.py", line 11, in <module>
    from       .TUIMenu import    *
  File "/home/sigmanificient/TUIFIManager/TUIFIManager/TUIMenu.py", line 3, in <module>
    from TUItilities import BEGIN_MOUSE,END_MOUSE
ModuleNotFoundError: No module named 'TUItilities'

This is caused by the line 3 from TUIFile.py:

from TUItilities import BEGIN_MOUSE,END_MOUSE

Hover Effect on Windows

I'm really buffled by the mouse support of PDcurses, wierd stuff happening, where if the bstate is 0 (or even quit the app with bstate 0), then real-time mouse coordinates work fine unitl I click or scroll and the bstate change then I get nothing

Move file to trash instead of deleting

As Brodie Robertson mentioned in his video, I think completely deleting files is not intuitive and makes deleting files unnecessarily stressful. I think a good solution for this would be to instead move the files to ~/.local/share/Trash/ (and the equivalent on other platforms). This way the files would be automatically removed after a certain amount of time on Windows and Mac, (and on linux if the user or another trash program configured it to do so) but if the user accidentally deleted the file they could easily recover it. This would also help when undoing is added.

Add a nox ci for various configuration

The project needs a nox CI to ensure installation is going as planned.

A GitHub action with various configuration (python version and os) would make it easy to sport potential issues.

Vim motions?

Thinking of adding some basic motions, although this is not the priority right now.

Code Formatting

I noticed during my small dig into the source that the formatting is pretty unusual, making it hard to understand a lot of what is happening and how to structure the code i want to add. Moreover, my code editor is going absolutely crazy, with pretty much every line being underlined.

It would be nice to provide a configuration for your code styling via pylint to a similar tooling, or maybe use a more broad formatting like black (mostly based on python pep8) or flake. The second option would allow to use contigeous integration to insure future code to be well formatted and would keep it under close standard to python developers.

What are your thoughts about it?

Deleting in TERMUX

Permisions are limmited in TERMUX when it comes to the access of storage, and send2trash fails to create a trash-folder in the root directory of the emulated or SD storage

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.