Dingoonity.org

Dingux (Dingoo Linux) => Development => Topic started by: Stephanie on May 01, 2010, 07:54:06 pm

Title: Is dmenu still alive?
Post by: Stephanie on May 01, 2010, 07:54:06 pm
I've been using dmenu since I started using Dingux (a whole two weeks or so, hehe) and I rather like its simplicity and straightforwardness. I've downloaded the latest sources and found there are improvements in there that were added since 0.6 was released. I've also made a few improvements of my own, or at least, changes that I feel are improvements.

I just noticed though that the last changes in the svn were back in December; it looks like it was somewhat active then just suddenly stopped. Has dmenu been dropped or abandoned? I've read that it was thought to be responsible for some of the SD corruption issues, and that some folks didn't like it, but I'm very happy with it. I hope it isn't dead.

Thanks!
Title: Re: Is dmenu still alive?
Post by: ddragoonss on May 01, 2010, 08:52:28 pm
The SD card corruption plus it's very hard to configure than gmenu, but I think the "in each 3 weeks need to reformat and copy all files to SD" is the main dmenu problem.
If gmenu was in there previously maybe dingux would have a native storage option, but just speculating.
Title: Re: Is dmenu still alive?
Post by: Stephanie on May 01, 2010, 09:26:44 pm
So you're saying that dmenu is more or less dead then? That's too bad. I'll continue to use it though, and continue to try to improve it, at least for myself.

I'm working to eliminate the file corruption problem. It seemed from what I've read & experienced, that it mainly occurs when there is a crash or forced reboot, and the corruption tended to hit the /dmenu directory and contents, or at least start from there. Consequently I'm moving all the little writes and reads into /tmp which also seems to eliminate the occasional little slowdown or hiccup when playing games. /tmp is mounted as tmpfs so writes to it don't impact the SD card at all.

I'm also trying to add a MHz display so you can see what the current clock speed is. :)

Cheers!
Title: Re: Is dmenu still alive?
Post by: santino on May 01, 2010, 11:24:03 pm
The corruption was more about the kernel. Since the RTC kernel I had no more problems with filesystemcorruption. You always have to shut it down properly then you wont have any problems.
Title: Re: Is dmenu still alive?
Post by: Stephanie on May 02, 2010, 12:17:04 am
Oh interesting.... I have had the dmenu directory / contents corrupt twice on me when I had a crash or segfault last week, but it hasn't happened since I started working on it.

I just finished getting the clockspeed display working, so I'm a bit pumped about that. :D

There's just one more minor inconvenience I want to chase down wrt the dmenu.ini file, then I'll be quite happy with it!

Cheers!
Title: Re: Is dmenu still alive?
Post by: kswildside on May 02, 2010, 04:17:32 am
If you could making adding apps easier with out ini chanes that would rock
Title: Re: Is dmenu still alive?
Post by: Stephanie on May 02, 2010, 04:39:44 am
Well... I can envision how that should be implemented, but I think it blows away my meagre c skills.  :-\

I can imagine an internal command to add an item... like a screen where you select which menu the item goes into, then a browser-type window to select the executable, then another browser-type window to select the icon... then with that info you could build the cfg entry... then you could load in the appropriate cfg file and append that entry to the end of it, write the file back out, then probably have to restart dmenu to have it load in the new cfg file.

Imagining it and doing it though are two very different things. And to make it perfect, you'd really want to be able to put the new menu item wherever you want, not just at the bottom. And if you could do that, then you might want the ability to re-order them, delete entries, and so on.

The extra wrench in the works is that the cfg files are theme-specific, so if you did all that to add a new menu item, then you changed themes, the new item wouldn't appear -- it would be only in the theme you had been using when it was added.

Is it really that big a deal for folks to edit the .cfg files?  ;)

Title: Re: Is dmenu still alive?
Post by: joyrider on May 02, 2010, 02:07:57 pm
you could check if dmenu is writing to the sd card somewhere in the code, if it is be sure to call "sync" which will force the cache to be written to the card. gmenu2x does this as does the rtc kernel when calling shutdown. (shutdown calls sync). It might be a reason why there is less corruption.
Title: Re: Is dmenu still alive?
Post by: Stephanie on May 02, 2010, 03:58:06 pm
The way dmenu works is when you select a program to run, it creates a script called .next and the dmenu binary exits, and the .next script is called. The current release 0.6 also makes a snapshot of the screen and saves that to .screen which it then reads back and displays when dmenu is loading up. Version 0.6 also appears to write the dmenu.ini file every time dmenu quits (i.e. every time you launch something).

The latest build available on the svn had changed so that there is no longer a .screen created, instead a loading.png is used as a loading screen. I've moved the .next file to /tmp so that it's not affecting the sd card, and finally, I've eliminated the unecessary writes to dmenu.ini - it should only write that file if there was a change, i.e. the theme or background was changed.

I'm pretty certain now that the version I'm working on doesn't do any writing to the sd card at all, unless of course you change a setting that requires writing the dmenu.ini file.

I'd like to contact the maintainers but I couldn't see any email addresses at the google code site. I've left some comments on the issues page, but I guess if they aren't checking that then there's no way to get in touch with them.
Title: Re: Is dmenu still alive?
Post by: rookie1 on May 06, 2010, 04:36:06 pm
Hi Stephanie, sorry for responding late. Do you mind sending me a diff with your changes? If you don't mind, I'd like to take a look at your changes before committing them to svn. If you are working on a svn copy, simply run 'svn diff > your_change.diff' at the dmenu directory will create a diff file called 'your_change.diff'. You can post it in this thread.
Title: Re: Is dmenu still alive?
Post by: Stephanie on May 06, 2010, 06:52:45 pm
Hi rookie1 thanks for the response! I've got a few things to tidy up -- some experimentation I was doing that didn't work out, but I'll get that diff created & posted shortly.

Cheers!
Title: Re: Is dmenu still alive?
Post by: darfgarf on May 06, 2010, 07:55:34 pm
(if you're thinking of improving dmenu, a function to create shortcuts without editing any config files, in the way that gmenu and dinguxmb can would be the only thing holding dmenu back still, assuming the corruption/etc can be fixed that is  :P)
Title: Re: Is dmenu still alive?
Post by: Stephanie on May 06, 2010, 08:08:14 pm
But I like mucking around with cfg and ini files! :P

Seriously though, DDU asked the same thing... I can envision a way to do it but it's currently beyond my skills to implement. I'm just happy to have gotten the CPU clock speed on the onscreen display. I haven't had any corruption issues since making the other minor changes, so with any luck that's been fixed. I think part of that problem was kernel related, and the RTC/power-off kernel helps a great deal, then removing almost all the dmenu-related writes to the SD card have hopefully removed any other chances of a crash introducing corruptions.

Three other ideas I have been toying with were adding an 'about' screen to display the version number and some other brief info, adding a config screen to modify the ini file from within dmenu (like toggling the OSD info for instance), and finally doing something to make the currently-selected icon more noticable. Not animated per se, but maybe having it scale up a little or scale up and down sort of pulsate, so it's blatantly obvious that this is the active icon. If anyone is familiar with flashcarts on the Nintendo DS, the Acekard does that with the icon that is currently highlighted and it is a good but not overwhelming way to call attention to it. It'd probably be less overhead than the way the native firmware shows the pulsing rings.

Cheers!
Title: Re: Is dmenu still alive?
Post by: darfgarf on May 06, 2010, 08:41:57 pm
I can envision a way to do it but it's currently beyond my skills to implement.

then just ask in irc or something, i could do it given time and the drive to do it, but too busy to commit to anything except the odd bit of help here and there at the moment  ;D
Title: Re: Is dmenu still alive?
Post by: Stephanie on May 06, 2010, 09:55:59 pm
rookie1 - getting the diff was a lot easier than I thought it would be! :) 

Quick run-down of the changes I've made, based on the R240 code:

* Removed the loading status bar from the loading screen. This increased loading speed noticably.
* When the backlight is turned off after the dim timeout, the next keypress will turn the backlight on but will not be processed - i.e. if you press A when the screen is dark, it won't immediately launch whatever icon was active when the dimmer came on. (was driving me crazy hehe)
* Added the option to display the clock speed in MHz as part of the on screen display.
* Added the setting "SpeedDisp = true/false" in the dmenu.ini file for controlling display of the clock speed.
* Moved all transient writes from the dmenu active directory to /tmp (.tmp, .next, .screen)
* Disabled dmenu writing dmenu.ini every time it closes; dmenu.ini is written to when the theme, background or font colour is changed.

That's everything, I think...

You can see an image of the menu with the clockspeed displayed here:
(http://planetstephanie.net/blog/wp-content/uploads/2010/05/dingux2-525x242.jpg)

Cheers!
Title: Re: Is dmenu still alive?
Post by: rookie1 on May 08, 2010, 03:22:25 pm
Hi Stephanie, thanks for the diff. I've tested it on my linux pc and everything is working fine. Unfortunately I don't have time to test on my Dingoo yet. Your changes are committed in svn (r241).

Are you planning to continue working on dmenu? If yes, I can add you as one of the project committers.
Title: Re: Is dmenu still alive?
Post by: Stephanie on May 08, 2010, 04:25:31 pm
Hi rookie1,

Yes I am going to continue working on dmenu. It sounds like the biggest request people have is a way to add programs from within dmenu itself, and while that's a huge challenge (for me) I would like to give it a shot. I also wanted to add a way to toggle some of the other ini settings from within dmenu itself, like the OSD / watch and so forth.

I've got some ideas on how to implement it all, though it will take me some time.

Thanks very much!

-Stephanie
Title: Re: Is dmenu still alive?
Post by: kswildside on May 09, 2010, 04:19:05 am
Stephanie you rock and if you get it as good as Gmenu I will be switching to it
Title: Re: Is dmenu still alive?
Post by: xdpirate on May 09, 2010, 05:55:00 am
Stephanie you rock and if you get it as good as Gmenu I will be switching to it
Yeah probably me too, I like the native-style that dmenu uses for its interface, though i use gmenu2x now because of its ease of setting up new links etc.
Title: Re: Is dmenu still alive?
Post by: darfgarf on May 09, 2010, 10:44:25 am
add me to the list of dmenu-likers, my main problem apart from the corruption/etc, is there's no way to configure it without a computer, and no decent file browser (but i haven't used it in a while :P)

gmenu is great, but doesn't feel like you're using a dingoo, and grid view for loads of shortcuts gets cluttered
Title: Re: Is dmenu still alive?
Post by: Stephanie on May 09, 2010, 02:43:04 pm
Wow now the pressure is on!  :)

Well here's my plan...

Hold select & press start, to open a little dialog window with a few options:

The about option will list stuff like the current version, along with maybe some system data like free memory, space on the sd card, et cetera.

The dmenu settings option will open a little menu with options for changing theme, wallpaper, font colour, along with toggling the various on-screen-displays (battery, sound, time, clockspeed) -- essentially, everything in the dmenu.ini file should be configurable from within dmenu.

The add shortcut here option will open a screen where you need to put in the settings for the new shortcut. There will be some limitations, at least at first... but I picture using the file selector to navigate to where the executable is, then the file or image selector to pick an icon, a checkbox to say if it needs a file selector or not. Getting the name value, I'm not sure about. Maybe just use the name of the executable, till I can figure out the keyboard stuff.  When finished, it would have to insert the shortcut into the appropriate cfg file.

The edit shortcut would use the same screen as above but let you modify it and re-save it. The current shortcut is the one that is 'active' on the screen when you hit the select+start buttons.

The delete shortcut would ask for confirmation, then would remove the current shortcut from the appropriate cfg file. As above, 'current' means the one that is 'active' when the function is triggered.

The quit option just terminates the current dmenu session.

So that's my plan... it'll be a big challenge but I'm sure it is all possible. So far, the only thing actually in place is I've got the select button set as a 'modifyer' now, and select+start activates the quit function.

I'm going to start with getting the dialog window with the options to come up, then the about, settings & quit options, and then tackle the shortcut functions.

Cheers!

p.s. I just realized, there will need to be a 'move shortcut' function as well, so you can move them around. :)
Title: Re: Is dmenu still alive?
Post by: darfgarf on May 09, 2010, 02:49:11 pm
sounds like a plan, better get learning how to use sdl  ;D

move shortcut would be the icing on the cake
by quit do you mean shutdown? as if you quit, the main script will just relaunch dmenu
Title: Re: Is dmenu still alive?
Post by: Stephanie on May 09, 2010, 02:54:06 pm
Adding reboot and shutdown options would be a good idea too.

By quit I just meant quit dmenu. In version 0.6 just pressing select will quit dmenu. It gets relaunched immediately of course, because inittab respawns the /boot/local/sbin/main script which in turn launches dmenu. 

I just figured, the option exists now so I'd leave it there, but relocate it.
Title: Re: Is dmenu still alive?
Post by: rookie1 on May 21, 2010, 03:13:09 pm
Hi Stephanie, finally got some time to test your changes on my dingoo. A quick question, in conf.c, function conf_unload (line 321 - 325), you have commented out the block which saves the config file. This causes the volume and brightness settings not being saved. I'm wondering why you have commented this out. Any particular reason?
Title: Re: Is dmenu still alive?
Post by: Stephanie on May 21, 2010, 03:22:41 pm
Hi Stephanie, finally got some time to test your changes on my dingoo. A quick question, in conf.c, function conf_unload (line 321 - 325), you have commented out the block which saves the config file. This causes the volume and brightness settings not being saved. I'm wondering why you have commented this out. Any particular reason?

I commented that block out for now because it was writing out the ini file every time dmenu shut down; like every time a game or app was launched, dmenu was writing to the ini file even if there were no changes. Ideally it should only write that file if there are changes to it, which isn't going to be difficult to implement. In the short term though I was mostly trying to cut down writes to the SD card.

Cheers!
 
Title: Re: Is dmenu still alive?
Post by: Stephanie on May 22, 2010, 06:09:47 pm
Just a quick update, I've fixed this in my working code now. I defined a value conf_changed in conf.c and reference it in main.c, if either the brightness or sound volume are changed then conf_changed is set to 1.

I've uncommented the code block in conf.c and added the conditional, if (conf_changed == 1) before the file write, so the dmenu.ini file is only written out during shutdown if the volume or brightness have been changed. (as you know the ini file is written immediately when the background, theme, or font colour are changed.)

Cheers!
Title: Re: Is dmenu still alive?
Post by: rookie1 on May 27, 2010, 02:05:40 pm
Hi Stephanie, finally got around to add you in the project. Now you should be able to commit to svn. Please let me if you encounter any problem.
Title: Re: Is dmenu still alive?
Post by: Stephanie on May 27, 2010, 03:35:57 pm
Thanks very much! I've been busy with the 64MB version of Dingux but with that now just about finished, I'm looking forward to getting back at dmenu.

Cheers!
Title: Re: Is dmenu still alive?
Post by: rookie1 on May 27, 2010, 04:27:08 pm
Just a quick update, I'm working on menu animations. Have committed a change to have animated (smooth) scrolling for the main menu. Still pondering how to do it for the menu items (vertical scroll). It might be a good idea to sync up your local copy before making modifications.
Title: Re: Is dmenu still alive?
Post by: xdpirate on May 27, 2010, 05:56:53 pm
Steph and rookie1 - Dream Team!

Looking forward to seeing an improved dmenu! (Gmenu2x just looks too.. gp2x..) :)
Title: Re: Is dmenu still alive?
Post by: ruffnutts on June 04, 2010, 10:37:13 pm
Stephanie you are unreal lol - any chance of TV -out on dingux?  ;)
Title: Re: Is dmenu still alive?
Post by: quadomatic on June 06, 2010, 09:24:48 am
(Gmenu2x just looks too.. gp2x..) :)

Heh, that's one of the big draws for me, aside from it being incredibly convenient.
Title: Re: Is dmenu still alive?
Post by: Stephanie on June 06, 2010, 04:33:20 pm
Just a quick update, I'm working on menu animations. Have committed a change to have animated (smooth) scrolling for the main menu. Still pondering how to do it for the menu items (vertical scroll). It might be a good idea to sync up your local copy before making modifications.

The animations look good. Hope I don't sound picky but is it possible to speed them up just a tad? It feels a bit 'slower' though it is prettier.

I've just synced up and committed the stuff I've been working on, which admittedly isn't much lately. I've got the OSD text now matching the user's chosen font colour (rather than just white), and I'm hoping to get the OSD icons to do the same, so that the user can have the whole display match their desired colour. I also incorporated the fix so that volume / brightness changes are saved, and found and removed a stray write to dmenu/.tmp (changed it to /tmp/.tmp) so that should be the last of the extra writes to the sd card.

Oh and I added a shutdowndelay option, like the one in the native firmware. If it's set to more than 0 seconds, then if you are idling in dmenu for shutdowndelay seconds, the Dingoo will power off (unless it is currently charging). It defaults to 0 seconds so it's disabled by default.

For what it's worth, I haven't had a single corruption issue since the loading screen was added and the .next was moved to /tmp - that's over a month or so I think. I think/hope that is entirely fixed now.

Cheers!
Title: Re: Is dmenu still alive?
Post by: kmilloz on June 06, 2010, 08:19:36 pm
Stephanie you are unreal lol - any chance of TV -out on dingux?  ;)
http://dingoo-scene.blogspot.com/2010/06/wow-dingux-gets-tv-out-support.html  see this...
Title: Re: Is dmenu still alive?
Post by: rollo on June 12, 2010, 12:52:05 am
Stephanie
I'm dmenu-liker too
Can you upload some files in your dmenu to display cpu clock?
I can't compile
Sorry for my poor English
Title: Re: Is dmenu still alive?
Post by: sirpicklesiv on August 22, 2015, 02:59:13 am
Hi Stephanie, sorry for responding late. Do you mind sending me a diff with your changes? If you don't mind, I'd like to take a look at your changes before committing them to svn. If you are working on a svn copy, simply run 'svn diff > your_change.diff' at the dmenu directory will create a diff file called 'your_change.diff'. You can post it in this thread.
I hate to bring up something that seems dead, but the last changes on the Google code site two days after you posted this. Does that fix all the problems listed in this forum post?