Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added compatibility with xfce4-terminal #110

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tran-simon
Copy link

It should work if the xfce4-terminal config files are stored at ~/.config/xfce4/terminal/terminalrc

@tran-simon
Copy link
Author

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.

@sylveon
Copy link
Collaborator

sylveon commented Sep 16, 2017

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.

@tran-simon
Copy link
Author

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?

@sylveon
Copy link
Collaborator

sylveon commented Sep 20, 2017

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.

@tran-simon
Copy link
Author

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?

@sylveon
Copy link
Collaborator

sylveon commented Sep 21, 2017

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:
image

@samuelhnrq
Copy link
Collaborator

Has this been resolved? What else needs to be done?

@sylveon
Copy link
Collaborator

sylveon commented Oct 10, 2017 via email

@sylveon
Copy link
Collaborator

sylveon commented Jan 7, 2018

Due to the latest PR being merged, this will be need to be redone for the new model @ThePotatoGod99

#138

@fionera
Copy link

fionera commented Apr 10, 2018

I tried "xfce4-terminal" in os.environ.get('COLORTERM', "").lower() and it did not work on my Arch Machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants