Comments (2)
This seems pretty reasonable. The goal is essentially that each entry can be dragged out once ("shelf"-style), and the program exits when there are no entries remaining?
I wonder whether this is severable into two parts:
- Once-each mode, where an item is removed from the list once dragged out. Perhaps this is
-1
,--once-each
. - Exit on empty, where the program closes once there are no entries left. Perhaps this is
-X
,--exit-empty
. Arguably we could overload the existing-x
with this meaning, but I imagine someone may have made a menu system or something out of it for which this would be a breaking change.
The mode you want would then be dragon -1 -X file...
. A "shelf" mode, where it starts up and you can drag items in for temporary storage and back out at will, would be dragon -t -k -1
or something.
The shelf may be the only use for -1
without -X
, however, so perhaps this is really two separate modes with some shared functionality: drag-and-remove until exhausted (your proposal), and drag-in-and-out-once (shelf). If there are other use cases for -1
or -X
in the future it would be nice to have them, but I'm unsure whether there are other use cases or functionality where they make sense.
I know there are some others who watch these issues, so they might have comments on that. If you've already implemented this, however, I guess my question is: how straightforward is it to separate those two aspects? The functionality you describe sounds valuable already.
from dragon.
The goal is essentially that each entry can be dragged out once ("shelf"-style), and the program exits when there are no entries remaining?
Exactly that!
Perhaps this is -X, --exit-empty. Arguably we could overload the existing -x with this meaning, but I imagine someone may have made a menu system or something out of it for which this would be a breaking change.
A new flag would be better so as to not break backwards-compatibility
I will make a PR with what I have done already. I don't know much of C, so there might be better ways to do it. If there are, please point them out and I will be more than happy to correct them.
adding a once-each
to my existing solution seems to be quite straight forward.
from dragon.
Related Issues (20)
- is_uri is too lax, e.g. timestamps are false positives HOT 1
- Dragon can't handle combined flags HOT 1
- [FEATURE REQUEST] Add --sticky flag HOT 1
- Mention Arch Linux package in readme HOT 4
- Rudimentary homebrew formula
- only drag files, do not open window HOT 4
- --on-top does not work in Plasma on wayland
- [FR] Add -- option to prevent interpretation of filenames with dashes HOT 2
- [SUGGESTION] Dragging plaintext only
- [FEATURE REQUEST] More appearance customization
- Bash auto completions only show directory names HOT 2
- Option to append more files HOT 4
- Option to remove file from list
- Option to auto-refresh file list
- [QoL]: close on click
- Improvements - imho
- --and-exit does not work on Sway/Wayland
- Multi-select in open window to drag out HOT 6
- Dragon doesnt work on Sway
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dragon.