Commit Graph

117 Commits

Author SHA1 Message Date
Carsten Haitzler 3519ab0f91 cleaner code - move file cp to own func etc. 2024-04-30 17:27:50 +01:00
Carsten Haitzler f603296834 remove command and undef macro in fs.c 2024-04-30 15:03:30 +01:00
Carsten Haitzler f4b20c1fd8 handle errs properly in fs code without logic holes 2024-04-30 14:46:11 +01:00
Carsten Haitzler 9413ca2e62 fix err handling to contain correct operation 2024-04-30 09:55:30 +01:00
Carsten Haitzler 887f89748c remove some more debug printfs 2024-04-29 19:24:30 +01:00
Carsten Haitzler 90f0005bcd remove some more comments 2024-04-29 19:23:42 +01:00
Carsten Haitzler cfac7a7e4b remove debug/comments not needed 2024-04-29 19:22:25 +01:00
Carsten Haitzler 575fbfa026 move fs working code into fs.c and make it also do rm and cp 2024-04-29 19:14:25 +01:00
Carsten Haitzler 9489a8b691 actually make mv work fully 2024-04-28 20:03:19 +01:00
Carsten Haitzler b876965918 share error handling in central func
so - too much error handling all over the place - massive switch/cse
blocks. not sustainable. handle all errors in one place. less code. yay!
2024-04-25 07:44:27 +01:00
Carsten Haitzler f918c86d25 more work on mv impl 2024-04-23 19:44:43 +01:00
Carsten Haitzler 0b9c076b6b fix fs scan 2024-04-16 20:41:22 +01:00
Carsten Haitzler de7f9a21a3 more work on mv - file count scan, status infra etc
also clean up some #includes we dont need... get this into git so it
isnt lost
2024-04-11 10:01:45 +01:00
Carsten Haitzler 2410abae9d build again - io put in some as yet "in thought" code 2024-04-01 22:08:46 +01:00
Carsten Haitzler 72fea7759a more work on meta stuff and comments and mv 2024-03-26 08:30:48 +00:00
Carsten Haitzler 06cea493e8 policy change and work with where file meta info is stored
so i've been thinking... yes it's annoying but there are reasons.
it's a balance. time to change this as well as centralize it

meta info is stuff like the xxx.meta.efm files that can store icon x,y
and width x height (and any number of other things - they are .ini style
files). thumbnails are extra meta files that contain relevant info
that is auto-generated by efm's default backend. they can be large but
as it's auto-generated they are xxx.thumb.efm in these separate files

efm2 will now, if you own the dir and can write to it, store metadata
in /path/to/dir/.efm/xxx.*.efm - so either xxx.meta.efm or xxx.thumb.efm
with xxx being the matching filename in the dir. yes - this means efm
will create .efm dirs in dirs you own. first - it's a hidden dir - what are
you doing listing ALL files all the time and seeing it? dot files are
hidden by default and convention for a reason. to allow extra metadata
to live in your fs without you seeing it all the time! secondly - the
data has to go somewhere and 'find ~/ -name .efm -delete' is about as
easy (for such advanced users who are doing ls -a opr using find etc.)
as 'rm -rf ~/.e/e/efm/*' if you want to nuke the metadata.

now why do this? the principle of least surprise. you are a regular joe
user who uses a filemanager and then you run some tool (from the gui)
to zip/tar up some dir tree then unpack it somewhwre else... if efm
doesnt store the data in that tree then then unpacked files lose their
metadata. "suprise" for a user that they lost data they see visually.
surprising the user less if possible by design is a good thing.
creation of magic files automatically is also highly common - vim and
emacs save new file~ files - and people accept it because it's been
that way forever.. so a .efm dir is definitely directly in keeping
with history, precedent and the principle of least surprise. not to
mention .git, CVS and .svn dirs too.

there is a long history of this elsewhere too. windows has Thumbs.db
files. Macos has .DS_Store. AmigaOS had filename.info files. Good old
xv had .xvpics dirs. it's almost expected. the reason this is done is
to keep the metadata alongside the files where possible for least
surprise.

efm can also store it in ~/.e/e/efm/meta/ too. it will do this when
the above conditions are not met (you don't own the dir or you cannot
write to it). as the decision is made in one place with one function
to decide if you can write, this is a single point now where policy
could change this and ONLY EVER write metadata in ~/.e/e/efm/mneta no
matter if you can write or not. but that'd have to be an opt-in as it
then increases surprise loss of data for users as above. and i'ts a
"deal with it later" thing.

note - it may seem silly now like "just for some stupid thumbnails" or
"stupid x/y location i never use". this WILL be used for more later.
e.g. flagging files and/or dirs for use with rsync tooling later to
sync files/dirs or syncthing or backup tools to auto-backup changes
and so on etc. - actual functionality where you want more and more
metadata stored in your filesys5tem so tools know what to do with your
files.

if i could use xattrs for this... i would. but i can't. they don't
port between filesystems. they can't be set on symlinks and more. if
i could use xattrs - you'd never SEE this data and wouldn't complain
but as xattrs are limited this has to be stored in actual files. efm
will "enforce" hiding of these dirs as they are highly advanced stuff
in there and the only way you should (unless you like living on the
cmdline and poking around) deal with these is via the efm ui
(implicitly as you browse about and do things). if you live on a
cmdline and like to poke - you can.

oh .. i forgot.. this also adds the initla "mv" implementation... it
doesn't handle all errors and cases yet... no status info and so on...
2024-03-24 22:38:21 +00:00
Carsten Haitzler 6c06a10ba5 now spin up sub-opens for drop over and pass in dnd cmd
now if u drop over a dir in a dir a sub-open process will spin up to
handle that sub dir and be passed relevant dnd cmd's

right now the open doesnt DO anything ... but there are just some
XXX's there left to fill in the doing.

also the sub-opens don't know when to close/end - there is a XXX for
that.
2024-03-08 12:50:32 +00:00
Carsten Haitzler 5661ec1913 add core of sub-open to default open to handle cnp/dnd over icons 2024-03-05 13:05:29 +00:00
Carsten Haitzler 73ddc5bf6d code polishing as i move on... 2024-02-21 18:25:03 +00:00
Carsten Haitzler 11178c5ae6 more work in glueing actions together wtih cleaning 2024-02-15 22:48:38 +00:00
Carsten Haitzler 63b5f107fe fix sorting
nocae by default. fix dir sortign where ome are links to dirs
2024-01-23 20:49:16 +00:00
Carsten Haitzler c8499de1a5 restore detail plain text fields... 2024-01-23 20:29:09 +00:00
Carsten Haitzler 2d76eb5847 go to a tradidional multi-object build and no include of c src
this undoes some early hacking about i did to be cleaner
2024-01-23 19:37:26 +00:00
Carsten Haitzler c18e82e017 more cmds noted 2024-01-04 17:22:02 +00:00
Carsten Haitzler c263d34cc3 note more commands in cmd.h 2024-01-04 17:20:08 +00:00
Carsten Haitzler 38f52a4a99 fix file mod during list and thumb gen in some more real life testing... 2024-01-04 17:03:29 +00:00
Carsten Haitzler bd6ba1effe move comment to be correct - commands not handled 2023-12-29 14:17:45 +00:00
Carsten Haitzler f117be39dc move prototypes to private.h 2023-12-28 14:30:26 +00:00
Carsten Haitzler d5109ca872 we can finally navigate to child dirs and parent dirs... 2023-12-27 21:22:42 +00:00
Carsten Haitzler 577bacfd04 remove use misc ifdef - too many 2023-12-26 23:33:04 +00:00
Carsten Haitzler 1ebe1fa70c formatting cleaner 2023-12-19 12:07:43 +00:00
Carsten Haitzler 9636398ac3 update todo 2023-12-19 12:07:34 +00:00
Carsten Haitzler 2526305e90 add file-detail updater command to more optimally update 2023-12-14 18:50:38 +00:00
Carsten Haitzler aee281bc32 detail view - allow detail items to update not just create 2023-12-02 16:00:12 +00:00
Carsten Haitzler 33b9b7c906 fix missing command in batch! 2023-11-06 11:03:19 +00:00
Carsten Haitzler d9b57e9045 printf-- 2023-11-06 07:29:39 +00:00
Carsten Haitzler 2d6d9422bf graphs - support multi graphs per cell and gfix vertical inversion of val 2023-11-05 20:20:00 +00:00
Carsten Haitzler ad6f12665a add bar graph object and code to handle this in custom details 2023-11-04 20:45:21 +00:00
Carsten Haitzler b3c2931d58 sort - handle if fields are not all there 2023-10-27 16:26:12 +01:00
Carsten Haitzler 98096356d6 fix bug where we sorted non-file-add cmd's 2023-10-27 11:42:03 +01:00
Carsten Haitzler 1d0f397f9e formatting 2023-10-27 11:21:36 +01:00
Carsten Haitzler 4ecd905f79 raise items so slider indicators are visible 2023-10-26 18:49:52 +01:00
Carsten Haitzler 6557aae759 custom detailview - add sliders+range sliders 2023-10-26 18:38:22 +01:00
Carsten Haitzler 2187a7df14 add segmentctl and hoversel details 2023-10-24 18:04:42 +01:00
Carsten Haitzler 9a35313327 share more code in funcs for detail view 2023-10-24 08:02:04 +01:00
Carsten Haitzler d1aa1a6635 bash backend - handdle nil lines better 2023-10-23 21:59:17 +01:00
Carsten Haitzler b9fe017968 i can set col width already - todo remove 2023-10-23 00:37:22 +01:00
Carsten Haitzler c3436cc997 add button details 2023-10-23 00:21:58 +01:00
Carsten Haitzler 7b83f16e4e detailview - do more item types 2023-10-20 19:48:44 +01:00
Carsten Haitzler 6b9cc3fa07 add custom detail view progress type 2023-10-17 20:34:59 +01:00