It is currently Wed Sep 03, 2014 4:05 am



Welcome
Welcome to antiX-forum.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!


Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Mouse Config
PostPosted: Sat Jun 27, 2009 8:39 am 
Offline

Joined: Sat Sep 29, 2007 8:12 pm
Posts: 1078
Location: California
Hello. After having some success with rewriting the screenshot app, I decided to try and write a mouse config app was well. I patterned it after the rox mouse config utility that you see here:

http://roscidus.com/desktop/Mouse

Here's my version:

Attachment:
mouseconfig.jpg
mouseconfig.jpg [ 137.93 KiB | Viewed 1498 times ]

I'm sure that I can code most of it, but there are some issues:
1. I would rather have sliders for the acceleration options, but I don't know how.
2. I don't know the range of values for threshold or acceleration. And I don't know how values outside of the range are handled.
3. I don't know how to change the pixel size of the cursor. I could swear I found some pages before, but not today; perhaps I'm just using the wrong words in google.
4. I'd like to use the up/down button for adjusting the mouse pixel size, but I don't know how.

Let me know what you think. Any help is appreciated.

BTW To have the mouse acceleration changes be "permanent", an entry needs to made in your ~/.xinitrc file. Haven't tried it yet as I've only created the mouse config window. The only working part is the theme button. Everything else is non-functional a the moment.

Thanks.

john


Top
 Profile  
 
 
 Post subject: Re: Mouse Config
PostPosted: Sat Jun 27, 2009 5:49 pm 
Offline

Joined: Sat Sep 29, 2007 8:12 pm
Posts: 1078
Location: California
I started coding the actions and realized that there were some problems with the acceleration options. Since there were given default values, then every time a user pressed OK, the values would be used even if the user was simply, for example, changing themes. So I had to find a way to disable entry until a user purposefully wanted to change the values. Here's my update:

Attachment:
screenshot.jpg
screenshot.jpg [ 138.3 KiB | Viewed 1494 times ]

So I'm still coding the options, but I don't know how to change the pixel size. Also, I haven't edited ~/.xinitrc. I want to make sure things are working before I edit the file.

john


Top
 Profile  
 
 Post subject: Re: Mouse Config
PostPosted: Sat Jun 27, 2009 6:03 pm 
Offline

Joined: Sat Sep 29, 2007 8:12 pm
Posts: 1078
Location: California
I just realized that the same problem posted previously would apply the pixel size option as well. So I used the same solution: added a checkbox. I also improved the layout a bit (the "restore defaults" checkbox was moved inside the "mouse acceleration" frame). Rather than post a new screenshot, I will code everything except the pixel size option. When the coding is that complete, I will return and post a screenshot.

john


Top
 Profile  
 
 Post subject: Re: Mouse Config
PostPosted: Sun Jun 28, 2009 7:09 pm 
Offline

Joined: Sat Sep 29, 2007 8:12 pm
Posts: 1078
Location: California
I've "finished" coding; i.e. everything is finished except for the pixel size option, which I still don't know how to do. Maybe puppy or dsl has a script I can take a look at.

I've also realized that I need to create check boxes so a user has the option to make the changes permanent; by permanent I mean adding the adding the code to their wm's startup file. This should be easy enough to do for one change, but if the user keeps making changes or wants to revert to default settings, things may get too difficult for me. We'll see.

john


Top
 Profile  
 
 Post subject: Re: Mouse Config
PostPosted: Sun Jun 28, 2009 7:39 pm 
Offline

Joined: Sat Sep 29, 2007 8:12 pm
Posts: 1078
Location: California
As an experiment, I added a line of code to the button layout option. This added the left-hand button layout to ~/.icewm/startup successfully. When I logged out/in to icewm, I had a left-hand button layout. Removing the code or updating it for the user may take some time to figure out.

So now I have a dilemma: Do I find a way to allow for the editing of the startup files each time a user changes their mind? Or do I edit the files for them once and then leave it up to them to edit the files afterwards?

john


Top
 Profile  
 
 Post subject: Re: Mouse Config
PostPosted: Thu Jul 02, 2009 5:57 am 
Offline

Joined: Sat Sep 29, 2007 8:12 pm
Posts: 1078
Location: California
I've been getting some help with some perl scripts that could solve the problem of adding and editing mouse configuration options in the various startup files. I will need some time to get it coded though. Perhaps by the end of the weekend.

john


Top
 Profile  
 
 Post subject: Re: Mouse Config
PostPosted: Sat Jul 04, 2009 10:07 am 
Offline

Joined: Sat Sep 29, 2007 8:12 pm
Posts: 1078
Location: California
I've been able to code the program so that it can make any of the changes on a temporary basis (with the exception of the theme option, that is).

What's been difficult, and may be a show-stopper, is making the changes permanent. I can save the options to a config file such as ~/.icewm/startup, but changing them after that is a problem. I am getting help at mepislovers, but it's becoming clear that I'm out of my league on this one.

So we can still include the app "as is" in a future release; after all, the current mouse config tools behave in the same manner: the theme changer works and makes permanent changes while the mouse config app (button layout only) works but the changes are lost during the next "session." So in the final analysis, we've gained some options but not any functionality.

What are your thoughts on this one? Thanks.

john


Top
 Profile  
 
 Post subject: Re: Mouse Config
PostPosted: Sat Jul 04, 2009 7:21 pm 
Offline
Site Admin
User avatar

Joined: Tue Sep 11, 2007 4:55 pm
Posts: 4782
Location: Greece
We'll use it.
Send me a copy and I'll see if I can find a way to make the changes permanent

_________________
Philosophers have interpreted the world in many ways; the point is to change it.


Top
 Profile  
 
 Post subject: Re: Mouse Config
PostPosted: Sun Jul 05, 2009 6:34 am 
Offline

Joined: Sat Sep 29, 2007 8:12 pm
Posts: 1078
Location: California
That might take a day or two to clean it up a bit. I'm also not at my box right now. I also have some other ideas up my sleeve as I feel a bit rejuvenated.

john


Top
 Profile  
 
 Post subject: Re: Mouse Config
PostPosted: Fri Jul 10, 2009 6:19 am 
Offline

Joined: Sat Sep 29, 2007 8:12 pm
Posts: 1078
Location: California
Hello. Thanks to some help from the mepislovers forum, I got the app mostly complete. To get it working, I had to edit ~/.xinitrc will some initial config options. When you run the mouse script, commands are issued so that you get the changes immediately. The changes also get written to .xinitrc so you'll have the changes available at login. I have also allowed for a "restore defaults" options.

To do:
Allow users to change the cursor size.

john


Top
 Profile  
 
 Post subject: Re: Mouse Config
PostPosted: Sat Jul 11, 2009 9:26 am 
Offline

Joined: Sat Sep 29, 2007 8:12 pm
Posts: 1078
Location: California
The mouse config app is now nearly complete. After several rounds of google searching and looking at the code of similar apps, I finally find a simple and elegant solution: Just add something like this to ~/.Xdefaults

Code:
Xcursor.size: 32

Then log out/in. Simple as that. And comment it out to return to the "default" cursor size (actually xcursor will decide this value if the line is commented out). Now I need to clean up the code - both in terms of documentation and in terms of trying to reuse parts of it so it's not spread out over so many individual scripts. Also, I need to find the basic parameters of mouse acceleration and threshold, as well as some common cursor sizes so I can display them in the window. This will give users some guidance on setting new values.

Any help with finding the "basic" values mentioned above would be appreciated.

Here's a screenshot:

Attachment:
antiXmouse.jpg
antiXmouse.jpg [ 137.85 KiB | Viewed 1382 times ]

john

(So after cleaning up the screenshot and mouse apps, I want to start working on a keyboard app.)


Top
 Profile  
 
 Post subject: Re: Mouse Config
PostPosted: Sat Jul 11, 2009 4:19 pm 
Offline

Joined: Sun Jun 15, 2008 2:56 pm
Posts: 1228
Location: São Paulo / Brazil
Acceleration 2
Threshold 4

(my current settings)

Puppy options for acceleration:
1.0 1.2 1.4 1.6 1.8 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0
Puppy option for threshold:
1 2 3......16


Top
 Profile  
 
 Post subject: Re: Mouse Config
PostPosted: Sat Jul 11, 2009 6:27 pm 
Offline

Joined: Sat Sep 29, 2007 8:12 pm
Posts: 1078
Location: California
Thanks.

john


Top
 Profile  
 
 Post subject: Re: Mouse Config
PostPosted: Sat Jul 11, 2009 6:30 pm 
Offline

Joined: Sat Sep 29, 2007 8:12 pm
Posts: 1078
Location: California
If you would like to test the app, send me a pm with your email address and I'll send it to you. You'll need to:

1. Make all of the scripts executable
2. Copy all scripts to /usr/local/bin
3. Edit your ~/.Xdefaults using the included example
4. Edit your ~/.xinitrc using the included example

Thanks.

john


Top
 Profile  
 
 Post subject: Re: Mouse Config
PostPosted: Sun Jul 12, 2009 1:09 am 
Offline

Joined: Sat Sep 29, 2007 8:12 pm
Posts: 1078
Location: California
Just thought of something: I need to include a notification window that tells a user that the cursor theme has been changed. Also, the config window closes when the new theme is chosen; should it stay open instead? Please let me know.

BTW - these issues do not break the application.

john


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 16 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred