Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl -w
- use Config::Tiny;
- sub readorcreate {
- $Config->{$_[0]} || ($Config->{$_[0]} = {});
- }
- sub configure {
- my $appdata;
- if $OSNAME eq 'MSWin32' {
- $appdata = "$ENV{'APPDATA'}/Nokia";
- } else {
- $appdata = "$ENV{'HOME'}/.config/Nokia";
- }
- my $fname = "$appdata/QtCreator.ini";
- $Config = Config::Tiny->read($fname) || Config::Tiny->new;
- my $debug = readorcreate('DebugMode');
- $debug->{SwitchModeOnExit} = 'true';
- $debug->{UseToolTips} = 'true';
- $debug->{UseToolTipsInLocalsView} = 'true';
- my $keys = readorcreate('KeyBindings');
- $keys->{size} = '12';
- $keys->{'1\ID'} = 'Debugger.DebugWithoutDeploy';
- $keys->{'1\Keysequence'} = 'Alt+F5';
- $keys->{'2\ID'} = 'Git.DiffRepository';
- $keys->{'2\Keysequence'} = 'Ctrl+Alt+Shift+D';
- $keys->{'3\ID'} = 'Git.LogRepository';
- $keys->{'3\Keysequence'} = 'Ctrl+Alt+Shift+L';
- $keys->{'4\ID'} = 'Git.UndoRepository';
- $keys->{'4\Keysequence'} = 'Ctrl+Alt+Shift+U';
- $keys->{'5\ID'} = 'Git.LaunchGitK';
- $keys->{'5\Keysequence'} = 'Ctrl+Alt+Shift+G';
- $keys->{'6\ID'} = 'Git.BranchList';
- $keys->{'6\Keysequence'} = 'Ctrl+Alt+Shift+B';
- $keys->{'7\ID'} = 'Git.ShowCommit';
- $keys->{'7\Keysequence'} = 'Ctrl+Alt+Shift+S';
- $keys->{'8\ID'} = 'Git.AmendCommit';
- $keys->{'8\Keysequence'} = 'Ctrl+Alt+Shift+A';
- $keys->{'9\ID'} = 'TextEditor.DeleteLine';
- $keys->{'9\Keysequence'} = 'Ctrl+D';
- $keys->{'10\ID'} = 'TextEditor.GotoLineStart';
- $keys->{'10\Keysequence'} = 'Alt+Shift+Return';
- $keys->{'11\ID'} = 'TextEditor.GotoLineEnd';
- $keys->{'11\Keysequence'} = 'Shift+Return';
- $keys->{'12\ID'} = 'TextEditor.CompleteThis';
- $keys->{'12\Keysequence'} = 'Shift+Space';
- $Config->{Git}->{TimeOut} = 90;
- if $OSNAME eq 'linux' {
- $Config->{TextEditor}->{FontSize} = 10;
- } elsif $OSNAME eq 'MSWin32' {
- $Config->{TextEditor}->{FontSize} = 11;
- $Config->{TextEditor}->{FontFamily} = 'Consolas';
- }
- my $textDisplay = readorcreate('textDisplaySettings');
- $textDisplay->{ShowWrapColumn} = true;
- $textDisplay->{WrapColumn} = 100;
- $textDisplay->{HighlightCurrentLine2Key} = true;
- $Config->{Plugins}->{ForceEnabled} = 'Todo';
- $Config->{Plugins}->{Ignored} = 'AnalyzerBase, Bazaar, CodePaster, CVS, FakeVim, Madde, Mercurial, Perforce, RemoteLinux, Subversion, Valgrind';
- $Config->write("$fname");
- }
- configure
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement