It is currently Sun May 19, 2019 10:04 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [Tool] ChangeTheme color switcher
PostPosted: Mon May 06, 2019 2:46 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Dec 23, 2003 3:54 am
Posts: 1597
ChangeTheme is a tool for "instantly" switching the color theme of the PureBasic IDE, faster than going through the Preferences window. You can link it to a menu item or keyboard shortcut.

Run:
ChangeTheme <no parameters> = open a browse dialog, activate file if chosen
or
ChangeTheme <theme file> = activate the specified *.prefs file (as exported from IDE)

What it does:
- loads the colors
- tries to close the IDE, or else prompts you to close it
- writes the colors to your IDE preferences file
- re-launches the IDE

Please try it out and submit suggestions!

Source and Windows exe on GitHub

Written for quick switching of the Solarized light and dark color themes


Top
 Profile  
Reply with quote  
 Post subject: Re: [Tool] ChangeTheme color switcher
PostPosted: Wed May 15, 2019 12:07 pm 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5803
Location: Wales, UK
Sounds really nice kenmo.

I think there might be a psychological issue though - we spend so much time getting the look just right, people don't want to try your switcher in case something goes wrong?

What if it made a backup preferences file of the IDE first? That would give people more confidence to try it?

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Tool] ChangeTheme color switcher
PostPosted: Wed May 15, 2019 1:14 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Apr 26, 2003 2:15 pm
Posts: 795
Location: Cuernavaca, Mexico
Ideasvacuum,

I've lost some templates and pref settings due to file corruption in the past
(it's really time consuming to rebuild these from scratch)
so I make a backup copy often (usually after I've made some changes to a template, etc.)

Code:
If CopyDirectory("C:\Users\Bob H\AppData\Roaming\PureBasic", "F:\Latest Home\PureBasic\Bobs Template Backup Folder", "", #PB_FileSystem_Recursive|#PB_FileSystem_Force)
     Debug "Great...You made a backup copy of your Prefs files as well as your Templates!"
Else
     Debug "████ Something went wrong! ████"
EndIf

_________________
- It was too lonely at the top.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Tool] ChangeTheme color switcher
PostPosted: Wed May 15, 2019 2:12 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Apr 26, 2003 2:15 pm
Posts: 795
Location: Cuernavaca, Mexico
Thanks kenmo... great addition and it works like a charm.

Now I can experiment without fear of 'redoing' all colors. :D

I took one of your prefs files, modified it with my present settings and saved it as 'BluebStyle.prefs'
This one seems easier on my eyes.. but maybe I'm jaded.

Using your tool I can switch back and forth at will... nice.

Code:
; Blueb's Color Theme for PureBasic IDE
;
;   Adapted for PB by Ryan Touk
;   http://grudlux.com/
 
[Sections]
IncludeColors = 1
 
[Colors]
ASMKeywordColor = 255
ASMKeywordColor_Used = 1
BackgroundColor = 14150650
BackgroundColor_Used = 1
BasicKeywordColor = 8388608
BasicKeywordColor_Used = 1
CommentColor = 32768
CommentColor_Used = 1
ConstantColor = 128
ConstantColor_Used = 1
LabelColor = 8421504
LabelColor_Used = 1
NormalTextColor = 4210816
NormalTextColor_Used = 1
NumberColor = 8388608
NumberColor_Used = 1
OperatorColor = 8388608
OperatorColor_Used = 1
PointerColor = 12615808
PointerColor_Used = 1
PureKeywordColor = 16711680
PureKeywordColor_Used = 1
SeparatorColor = 8388608
SeparatorColor_Used = 1
StringColor = 33023
StringColor_Used = 1
StructureColor = 12615808
StructureColor_Used = 1
LineNumberColor = 7303023
LineNumberColor_Used = 1
LineNumberBackColor = 15263976
LineNumberBackColor_Used = 1
MarkerColor = 11184640
MarkerColor_Used = 1
CurrentLineColor = 16777215
CurrentLineColor_Used = 1
SelectionColor = 4237800
SelectionColor_Used = 1
SelectionFrontColor = 0
SelectionFrontColor_Used = 1
CursorColor = 0
CursorColor_Used = 1
Debugger_LineColor = 16771304
Debugger_LineColor_Used = 1
Debugger_LineSymbolColor = 16771304
Debugger_LineSymbolColor_Used = 1
Debugger_ErrorColor = 255
Debugger_ErrorColor_Used = 1
Debugger_ErrorSymbolColor = 255
Debugger_ErrorSymbolColor_Used = 1
Debugger_BreakPointColor = 11184640
Debugger_BreakPointColor_Used = 1
Debugger_BreakpoinSymbolColor = 11184640
Debugger_BreakpoinSymbolColor_Used = 1
DisabledBackColor = 16777215
DisabledBackColor_Used = 1
GoodBraceColor = 8388608
GoodBraceColor_Used = 1
BadBraceColor = 255
BadBraceColor_Used = 1
ProcedureBackColor = 1677721
ProcedureBackColor_Used = 1
CustomKeywordColor = 16744448
CustomKeywordColor_Used = 1
Debugger_WarningColor = 33023
Debugger_WarningColor_Used = 1
Debugger_WarningSymbolColor = 33023
Debugger_WarningSymbolColor_Used = 1
IndentColor = 32768
IndentColor_Used = 1
ModuleColor = 0
ModuleColor_Used = 1
SelectionRepeatColor = 11009968
SelectionRepeatColor_Used = 1
PlainBackground = 15138790
PlainBackground_Used = 1
ToolsPanel_FrontColor = 0
ToolsPanel_FrontColor_Used = 1
ToolsPanel_BackColor = 15786973
ToolsPanel_BackColor_Used = 1

_________________
- It was too lonely at the top.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Tool] ChangeTheme color switcher
PostPosted: Wed May 15, 2019 4:33 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Dec 23, 2003 3:54 am
Posts: 1597
IdeasVacuum wrote:
What if it made a backup preferences file of the IDE first? That would give people more confidence to try it?


It already does a simple version of that:
Code:
;- Back up existing Prefs file
If (#True)
  CopyFile(PrefsFile, PrefsFile + ".backup")
EndIf


But of course I'm open to smarter backup and other suggestions.
The code is small enough you can check out what it's doing:
https://github.com/kenmo-pb/tools/blob/ ... geTheme.pb


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


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

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye