Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 20 Aug 2014, 16:38
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Start Leafpad with wordwrap enabled?[SOLVED]
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
greengeek

Joined: 20 Jul 2010
Posts: 2476
Location: New Zealand

PostPosted: Mon 08 Apr 2013, 15:12    Post subject:  Start Leafpad with wordwrap enabled?[SOLVED]  

I would like to force Leafpad to start with wordwrap already enabled but can't find the syntax to do so. Wordwrap is available in the options menu.

I've tried entering the following into a console:
leafpad wrap=1 (which makes a file called "wrap=1")
leafpad wordwrap =1
leafpad wordwrap=true
leafpad option wordwrap=1
leafpad $wrap
leafpad $wrap=1
leafpad --wrap

My google skills are failing me. Is it possible to pass arguments to Leafpad in this way?

Last edited by greengeek on Tue 09 Apr 2013, 13:25; edited 1 time in total
Back to top
View user's profile Send private message 
PaulR

Joined: 04 May 2005
Posts: 242
Location: UK

PostPosted: Mon 08 Apr 2013, 15:20    Post subject:  

Hi greengeek

leafpad --help-all

...seems to say it's not possible Sad

Paul
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2476
Location: New Zealand

PostPosted: Mon 08 Apr 2013, 15:37    Post subject:  

Thanks Paul. - I wonder if there is a way to get a script to pass the required parameters immediately AFTER opening leafpad, even though it appears they can't be passed at the time of initial execution?

Also - I have just noticed that in Precise 5.5 leafpad opens with wordwrap already enabled so I will scout around and see if I can see how that is done.

EDIT :I think I have found how it's done in Precise 5.5

If I open the hidden file /root/.config/leafpad/leafpadrc I see the following:

Code:
0.8.18.1
671
450
Monospace 12
1
0
0
and it seems to be the "1" below "monospace 12" which determines if wordwrap is on or not.

I have just tried modifying this in a different puppy and it works!

There is no doubt some other way this can be achieved too, so any info/guesses welcome!
Back to top
View user's profile Send private message 
PaulR

Joined: 04 May 2005
Posts: 242
Location: UK

PostPosted: Mon 08 Apr 2013, 16:26    Post subject:  

Good find!

Why don't you just read-in/set the word-wrap flag/write out the config file then call leafpad? (You could always rewrite the original values if you wanted to restore the settings).

Paul
Back to top
View user's profile Send private message 
seaside

Joined: 11 Apr 2007
Posts: 886

PostPosted: Mon 08 Apr 2013, 19:02    Post subject:  

For some odd reason, leafpad doesn't seem to make a default config file. However, if you make a blank file named "/root/.config/leafpad/leafpadrc" and then start leafpad and make config changes, those changes are all then saved.

Next time leapad is started all those changed settings are in effect.

Cheers,
s
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2476
Location: New Zealand

PostPosted: Tue 09 Apr 2013, 13:25    Post subject:  

Excellent. Thanks for the tips. I now have leafpad doing what I want. Will mark thread as solved.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0483s ][ Queries: 12 (0.0063s) ][ GZIP on ]