Coder Social home page Coder Social logo

hnicke / sodalite Goto Github PK

View Code? Open in Web Editor NEW
18.0 3.0 1.0 1.3 MB

A keyboard-driven, terminal-based file navigator and launcher: Exploration at the speed of thought.

License: GNU General Public License v3.0

Python 90.52% Shell 6.12% Makefile 2.99% Dockerfile 0.37%
keyboard-driven terminal-based file-navigation file-explorer curses-ui

sodalite's Introduction

Check Action Status badge

sodalite: Exploration at the speed of thought

Yet another file explorer

Have you ever played crawl? That's a terminal based roguelike dungeon crawler.
What makes it stand out is it's extremely efficient menu navigation philsophy.

dcss inventar management

Dungeon Crawl Stone Soup: For selecting an item, press it's automatically assigned key.

After a while, the keys burn into one's muscle memory - using the game's interface feels extremely efficient.
sodalite brings the same feature to your file system: Navigation at the speed of thought.

Navigate the file system

When opening sodalite, you will see the listing of the current directory.
Pressing one of the keys displayed in front of the entries will navigate there.

directory pane

Assign the most intuitive and/or reachable keys to your most frequently used entries, and stick with this assignment. Once setup, and muscle memory kicks in, all directories will be reachable in a blink of an eye!

When navigating to a plain text file, a file preview is shown:

file preview

Installation

Linux

Debian-based Distros (e.g., Ubuntu)
# add apt key and repository http://debian.hnicke.de/repo/
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5B08767916BCFCE7
echo "deb [arch=amd64] http://debian.hnicke.de/repo/ unstable main" | sudo tee /etc/apt/sources.list.d/sodalite.list
sudo apt-get update

# install
sudo apt install sodalite
Arch Linux

AUR package sodalite:

yay -S sodalite

Getting started

Check out the manpage for detailed usage information.

FAQ

The default 'open' hook doesn't work / launches weird programs :(

Most probably it is not sodalite's fault, but your mime default application list isn't configured correctly. Run the following command to find the associated application for given file:

xdg-mime query default $(xdg-mime query filetype <file>)

In order to change the default application for a files mime type, run:

xdg-mime default <desktop> $(xdg-mime query filetype <file>)

Replace <file> with the file you're trying to open and <desktop> with name of the desktop entry file of your new default app. If you're not sure what's the name of the desktop entry of a specific app, look for it in /usr/share/applications.

Alternatively you can edit the mime app list manually: $HOME/.config/mimeapps.list

Or learn more about mime.

Changelog

Don't miss out on what has changed: Read the changelog.

Contributing

Do you want to contribute to the project? Check out the developer guide.

License

See copyyright.

sodalite's People

Contributors

actions-user avatar hnicke avatar scoopex avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

sahwar

sodalite's Issues

See frequent entries as list

Top x frequently used items are displayed in a list.

Possible implementation:

  • upon startup, most x frequently used entries are queried from db
  • in a special directory, symbolic links to these entries are created
  • special directory is accessible via shortcut (e.g., ,)

Application crashes when a directory does not exist

What happened:
  1. Opened sodalite in a specific dir.
  2. Changed branch. The specific dir and its parent do not exist anymore
  3. go_to_parent: crashes
Possible solution:

Before visiting a directory (I think from history), check if it exists. If not,
go to grandparent, etc && notify user!

Use [count] for go_to_parent built-in

normal.go_to_parent [n].

Navigates to nth parent.
E.g., pressing 4. equals cd ../../../..

[] bracket notation means optional (like in regular expressions)

Reflect external file system changes

Whenever the current entry is modified from outside of sodalite, reflect these changes.

Possible implementation:

  • make use of inotify
    • subscribe to current entry
    • handle every event accordingly

Bookmarks

It shall be possible to

  • add current entry to bookmarks
  • show bookmarks

Implementation:

  • bookmarks is a concrete directory
  • bookmarking an entry creates a symlink in that dir

Caveeats:

  • how to handle name conflicts?

End user documentation:

normal.go_to_bookmarks '

Navigate to the bookmark directory.

normal.toggle_bookmark ^

Add the current entry to bookmarks.
If the current entry is already bookmarked, remove from bookmarks.

Persistent navigation history

The navigation history shall be persistent between sessions. This is really helpful for following use case:

  1. user is in starting dir x
  2. User launches sodalite
  3. user navigates to target dir y
  4. user quits sodalite
  5. user does some work in target dir y
  6. user relaunches sodalite
  7. user navigates back in history to get back to x

navigation hooks

add navigation hooks:

  • they work similar as action hooks.
  • can be specified in config
  • in contrast to action hooks they don't get triggered by an action, but whenever a specified dir is traveled to
  • basically, its consist out of:
    • corresponding dir
    • hook
    • description
  • whenever a hook is triggered, there should be some sort of notification

When is this handy?

  • ctags
  • some sort of project specific stuff / cleanup / build instructions

Write manpage

Write a manpage listing all supported features / keybindings

  • also add to installer

Tabbing

Implement tabbing:

  • each tab has own navigation history
  • tabs can get changed with shortcuts, e.g.:
    • <M-[1-9]> to access tab [1-9]
    • <M-[hl]> tab left / tab right

Missing data dir makes application crash on startup

Traceback (most recent call last):
  File "/home/heiko/dev/sodalite/bin/../sodalite/main.py", line 6, in <module>
    from core.config import Config
  File "/home/heiko/dev/sodalite/sodalite/core/config.py", line 6, in <module>
    from util import environment
  File "/home/heiko/dev/sodalite/sodalite/util/environment.py", line 20, in <module>
    os.mkdir(user_data)
FileNotFoundError: [Errno 2] No such file or directory: '/home/heiko/.local/share/sodalite/'

Restructure project

As this project slowly is leaving its proof of concept phase, the code needs to be refactored heavily.

Upcoming tasks:

  • Enhance data model

    • add file permissions directly to entry
  • Decouple GUI and core: Design slim interface

  • Divide core into several classes (extract both file access and db access)

  • refactor action hooks

  • refactor gui
    -[ ] use suitable framework to decouple gui from logic - might use RxPy

Make hook visiblity optional

Add possibility in the configuration file to declare visibility of a hook.

Implementation:

  • if label is omitted, hook shall not get displayed

Sorting entries

Make it possible to sort entries.
Sort criteria:

  • name
  • creation date
  • smart (smart equals the current way of sorting entries)

Allow input for custom hooks

When executing a hook, the user shall be able to supply input at runtime.

  • $1, $2, etc can be used in hooks as input placeholders
  • when executing the hook, user must supply the values (via commandline?)

Not yet sure:

  • supply label for each input in hook definition? This label can then be displayed
    in commandline

Change cwd when triggering actionhook

Currently, when triggering an actionhook which exits sodalite, the current working directory is not changed.

Expected behaviour: Change working dir to current entry. If current entry is file, change working dir to parent dir.

No licence specified

There is no licence specified. AFAIK, in most countries this equals "all rights reserved".

Add vim-like bookmarks

Idea:

  • Press ^M to toggle 'new-bookmark'-mode, followed by any navigation key; stores current entry with given key as bookmark
  • Press ' followed by a navigation key to travel to this bookmark
    • if bookmark does not exist, print message (like "bookmark not found")
    • after pressing ', display list of bookmarks (in popup?)

Improve shell integration

Supplied shell integration shall handle paths which are files and not directories.

[ -f <path> ] && cd $(dirname <path>)

Architecture

  • find suitable architecture
  • refactor current codebase to reflect chosen architecture

'Go to parent' shall differ from 'Go to previous'

Currently, pressing . navigates to the previous directory.
Actually, the semantics of . should be cd ...
But when the last visited entry was a symlink, the previous entry does differ from the parent entry.

Current functionality of . shall be triggered with BACKSPACE and its semantics shall be: Go to previous, whereas . shall truly mean go to parent.

Entry color shall reflect file type and frequency

For better orientation, the color of entries (in the UI) shall reflect:

  • its filetype
    • dir
    • file
    • link
    • executable
  • its frequency
    • the more frequent (relative to other entries in the current dir), the brighter the color

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.