Giter Club home page Giter Club logo

Comments (10)

daniyel avatar daniyel commented on May 24, 2024

It says you need to provide -Operation Add and -ThemePartOrName <path_to_xml> parameters.

from conemu-color-themes.

SentinelWarren avatar SentinelWarren commented on May 24, 2024

of which is what i did. the error that i am really concerned about is Exception calling "Save" with "1" argument(s): "Invalid XML document. The document does not have a root element.

from conemu-color-themes.

joonro avatar joonro commented on May 24, 2024

Hi - sorry for the late reply.

Just to clarify, are you saying you are getting this error when you do:

.\Install-ConEmuTheme.ps1 Add -ThemePathOrName themes\oceans16-dark.xml

for example?

If so, could you please check if you have %APPDATA%/ConEmu.xml? I remember ConEmu started using the registry for the settings. Currently you have to have your settings stored at %APPDATA%/ConEmu.xml for this script to work. (I believe you can change this in the settings).

Please let me know if this works.

from conemu-color-themes.

SentinelWarren avatar SentinelWarren commented on May 24, 2024

@joonro ConEmu.xml its there, but its empty!!

from conemu-color-themes.

joonro avatar joonro commented on May 24, 2024

You should create that file - please follow Manually add color schemes and modify the ConEmu.xml file part in the README and try to generate the file.

from conemu-color-themes.

SentinelWarren avatar SentinelWarren commented on May 24, 2024

This is the error i am getting now.

C:\Users\Me\Documents\WindowsPowerShell\ConEmu-Color-Themes\Install-ConEmuTheme.ps1 : You cannot call a
method on a null-valued expression.
At line:1 char:1
+ .\Install-ConEmuTheme.ps1 -Operation Add -ThemePathOrName themes\ocea ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-ConEmuTheme.ps1

from conemu-color-themes.

joonro avatar joonro commented on May 24, 2024

It is hard for me to know what is wrong with the information - you can send me your ConEmu.xml so I can take a look.

from conemu-color-themes.

oneone1995 avatar oneone1995 commented on May 24, 2024

I also encountered the same error because my ConEmu.xml contains Chinese characters.Pls think about this.
Before using the script, there is a line like

<value name="ConsoleFontName" type="string" data='新宋体'/>

and the file encoding is UTF-8, then i got the error such as @SentinelWarren .So i commented this line to use the script, but when i open ConEmu.xml again, i found this line get mojibake.

 <!-- <value name="ConsoleFontName" type="string" data="鏂板畫浣?/> -->

and the file encoding turned to UTF-8 with BOM

I hope you can solve it.

from conemu-color-themes.

sergeevabc avatar sergeevabc commented on May 24, 2024

@joonro, installation via provided powershell script just does not work.

At first, the script seems not to grab provided arguments…

$ Install-ConEmuTheme.ps1 -ConfigPath C:\Far\ConEmu.xml -Operation Add -ThemePathOrName themes\ayu.xml
Supply values for the following parameters:
Operation:

But even after typing arguments manually, the script throws errors…

Operation: Add
ThemePathOrName: themes\ayu.xml
Get-Content : Cannot find path 'C:\Users\Alexander\AppData\Roaming\ConEmu.xml' because it does not exist.
At C:\Far\Install-ConEmuTheme.ps1:59 char:31
+     [Xml]$config = Get-Content <<<<  -Path $ConfigPath
    + CategoryInfo          : ObjectNotFound: (C:\Users\Alexan...ming\ConEmu.xml:String) [Get-Content], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

C:\Far\Install-ConEmuTheme.ps1 : You cannot call a method on a null-valued expression.
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-ConEmuTheme.ps1

from conemu-color-themes.

joonro avatar joonro commented on May 24, 2024

Well, it works for me. In the example below, it correctly identifies the theme was already added to config when I tried to add ayu.xml. Then I successfully removed/added the theme. I used a different -ConfigPath to make sure.

> .\Install-ConEmuTheme.ps1 -ConfigPath C:\Users\Joon\Downloads\ConEmu.xml -Operation Add -ThemePathOrName themes\ayu.xml
C:\Users\joon\Dropbox\Colors\ConEmu\Install-ConEmuTheme.ps1 : Theme was already added to config
At line:1 char:1
+ .\Install-ConEmuTheme.ps1 -ConfigPath C:\Users\Joon\Downloads\ConEmu. ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-ConEmuTheme.ps1

> .\Install-ConEmuTheme.ps1 -ConfigPath C:\Users\Joon\Downloads\ConEmu.xml -Operation Remove -ThemePathOrName themes\ayu.xml

> .\Install-ConEmuTheme.ps1 -ConfigPath C:\Users\Joon\Downloads\ConEmu.xml -Operation Add -ThemePathOrName themes\ayu.xml

from conemu-color-themes.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.