Comments (12)
I see now I left a MUST READ
section above nlay which a user changing the file cannot overlook. One of the lines in it is:
Keep a personal backup (on GitHub Gist maybe?) of this file if you modify it. nlay is OVERWRITTEN during nnn upgrade.
The ask is very straight and blunt - if you are a power user, you handle this yourself.
There are several things to consider:
- overwrite is obviously not desirable
- handling checksums in GNU make is not straightforward
- it's simpler to have a single copy but we can't merge all complex combinations
- if we can't checksum, in every installation we are going to install the new nlay as a backup if the older nlay exists. Regular uses would never notice and miss new stuff in nlay. nnn might break when working with older nlay (hence, I gave higher priority on having stuff working for regular users, not the ones who can actually edit a shell script, however easy it is)
- backing up the older file as a .bak doesn't make sense aesthetically either because nlay is not a config file but an executable script. However, I think this is the sanest approach.
Opinion?
from nnn.
@shaggytwodope @szlin any thoughts on this?
from nnn.
@jarun one method would be to "have our cake and eat it too". In the sense of providing nlay as a default. And possibly something to the effect of ~/.config/nnn/nlay_user
(poor naming choice aside lol). Allowing the created file to take priority over nlay that ships by default (and maybe a fallback should an error occur in users nlay?). This would leave alot of freedom for the user. Just need to be made clear at some stage no support is offered for user edited version.
This would however need to change in how nlay is currently used. What ranger does is it copies the script scope.sh
among other items from /usr/share/ranger/*
to ~/.config/ranger/*
when you run a --flag
to begin customizing said config. While this does begin to complicate things to a degree, it's the only thing that comes to mind currently.
from nnn.
How about an option to use a custom player (nlay)? E.g.
-p /path/to/modified/nlay
?
from nnn.
@jarun I very much like this idea. For one it makes things far far simpler. Permits "power" users to setup things with ease avoiding any funky overwriting issues. I'd suggest making a note somewhere about being able to set a bash alias alias mynnn="nnn -p /path/mystuff/nlay"
.
This makes things very simple as I see it. Just need to make a few notes for users on best practices and use cases. It could be considered to create a modified nlay example and ship in /usr/share/nnn/
.
from nnn.
I very much like this idea
Your comment triggered this. I'm fuzzy. In bed the last 3 days because of fever. So thanks! 👍
It could be considered to create a modified nlay example and ship in
We'll ship nlay as it is today because we need the player in vanilla state. -p
would override it. ;)
from nnn.
Option solution is great; moreover, I think we can also consider to use configuration file such as /etc/nnn/nnn.conf
and thus to solve this issue.
from nnn.
@szlin I would avoid reading a file from disk every time we start (as looong as possible) using options and env variables. Apart from the tiny delay ;), it also leads to the same issues for nlay upgrade we are discussing now.
from nnn.
@jarun Indeed, I/O operation always gets slow; however, the power user can set their own custom player path in nnn.conf
such as nlay_path=/path/to/modified/nlay
to overwrite original one.
This is what I thought and I think it can solve nplay upgrade issue - or did i misunderstand something?
Both option and conf can achieve the goal and choose one of them is enough I think :p
from nnn.
Yes, we would have that too! ;)
An alias as @shaggytwodope mentioned:
alias mynnn="nnn -p /path/mystuff/nlay"
from nnn.
Alias and conf. file are different meanings to me, maybe I am used to conf. way with Debian packaging :D
ref: https://wiki.debian.org/ConfigPackages
from nnn.
Got it now!!! I'll bank on the alias for this case though. :)
from nnn.
Related Issues (20)
- Preview-tui plugin throws syntax error HOT 3
- U+E5FF / / question mark box HOT 4
- NNN_TRASH_CUSTOM setting not working HOT 4
- preview-tabbed - zathura not focusing HOT 2
- Nerd fonts cause misaligned columns in detail mode with names first HOT 5
- nnn compiled with nerdfonts not displaying correctly in WSL HOT 2
- NNN broken on master HOT 3
- 'size missing' when trying to preview-tui in tmux HOT 7
- NNN does not close Tmux pane on opening a file while preview HOT 5
- Can't batch rename files which names start with dash '-' HOT 6
- mv: unrecognized option '--cp' HOT 2
- Icons does not work when NNN is opened with -C option HOT 5
- preview-tui: mpv HOT 11
- Syntax error with prescribed split-pane script HOT 7
- tabs content colorization is not working (zsh+tmux) HOT 3
- preview-tui does not work with tmux 3.4 HOT 1
- Wrong position of previews in 4K monitor with fractional scaling of 1.5
- Files created with `n`, `f` have incorrect permissions HOT 5
- sort order.... whatever it means.. HOT 2
- preview-tui with wezterm: No FIFO available! ($NNN_FIFO='') HOT 2
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 nnn.