Pokemon-Terminal
Pokemon-Terminal copied to clipboard
Added compatibility with xfce4-terminal
It should work if the xfce4-terminal config files are stored at ~/.config/xfce4/terminal/terminalrc
I had to had a bash script named "xfce4TerminalChangeBackground.sh" since I never really used python before, so I didn't know how to do replace the line containing the path to the background image in the terminalrc config file in python.
If someone knows how to replace a line from a file in python, feel free to remove this script.
there's already an implementation at #67, but I'm not fan of both methods of setting the file (calling shell scripts/commands where it could be done in pure python)
you should also check out how they detect xfce4 terminal. Calling ps recursively is a really ugly hack imo.
I managed to change the file completely in python.
I didn't find a way to detect the the xfce4 terminal.
Maybe you could ask the user to enter which terminal he's using at the first launch and then store it in a config file or something?
Seems fine to me. Although I'm no Python expert so someone better than me might want to take a look.
To detect xfce4-terminal you can use the following from #67:
def is_available():
return "xfce4-terminal" in os.environ.get('COLORTERM', "").lower()
Also you didn't implement clear
. It's still the code from the Terminology implementation that's in there.
I tried your command to detect xfce4-terminal, it didn't work for me
Also, I'm not sure what the clear method is supposed to do. Should it reset the terminal to default, or set some colour instead of the picture?
clear() resets the terminal back to default.
The snippet I posted is Python code that would go in place of your is_available() function, and it's working for me:
Has this been resolved? What else needs to be done?
What needs to be implemented is the clear method and a better detection method, like the one I suggested.
Due to the latest PR being merged, this will be need to be redone for the new model @ThePotatoGod99
https://github.com/LazoCoder/Pokemon-Terminal/pull/138
I tried "xfce4-terminal" in os.environ.get('COLORTERM', "").lower()
and it did not work on my Arch Machine.