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

Display pokemon's name in terminal title bar #148

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

Conversation

jimmyorourke
Copy link
Contributor

Display's the current pokemon's name in the title bar, along with standard currently running process

screen shot 2018-07-10 at 11 46 19 pm

@jimmyorourke
Copy link
Contributor Author

Solution for #38

@giftig
Copy link

giftig commented Jul 11, 2018

...but what if you want to use the title of your terminal for something more useful than displaying the name of a pokemon?

@@ -71,7 +71,7 @@ def __init_wallpaper_provider():

def clear_terminal():
# clear any updates to the terminal window's title bar
sys.stdout.write("\x1b]2;\x07")
sys.stdout.write("\033]2;\007")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI this is octal, not decimal.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol true 😛 I can amend the commit message if that's something we really care about

@jimmyorourke
Copy link
Contributor Author

jimmyorourke commented Jul 11, 2018

Hmm I guess with enhancements like this we do start to hit all of the "what if the user doesn't actually want this" for whatever reasons.
The only real solutions to these kind of potential user preferences are to add more command line flags which gets real annoying, or to have a configuration file detailing which options are enabled.

@giftig
Copy link

giftig commented Jul 11, 2018

My point is less about making it configurable in case the user wants to use an aspect of their terminal, and more that using the title as a database is uncontroversially bad behaviour.

@jimmyorourke
Copy link
Contributor Author

"uncontroversially bad behaviour" seems a little strong and debatable. Your initial statement was what if a user wants to use the title bar of their terminal for something else. What makes that other use not "uncontroversially bad behaviour"?

@giftig
Copy link

giftig commented Jul 11, 2018

Wanting to use the title of your terminal as a title for your terminal is not bad behaviour. That is the use case I was referring to.

I don't think it's possible to rationally argue that it's good behaviour to use the title of the terminal as a data store for an application.

@sylveon
Copy link
Collaborator

sylveon commented Jul 11, 2018

I don't understand the point about using the terminal title as database. This change only writes to it, it does not reads it in any way.

Personally, a CLI application taking over my terminal title without my consent (such as by default) would be bad behavior.

@jimmyorourke
Copy link
Contributor Author

The point isn't to use it as a database. Nothing should read from it.
The point is user experience. This is solely for the user's benefit. At a glance they can immediately see what pokemon is being displayed if they don't recognize it, without having to run any extra commands or anything. All without obscuring the information about the foreground process.

In terms of consent, if the readme detailed this is the program's behaviour then using it would be giving it consent, the same as how you implicitly give consent to change your background.

All this being said, if people don't seem to agree I can keep it on my fork. Everyone who has seen me using it think it's a great addition but 🤷‍♂️ it doesn't have to become official.

@sylveon
Copy link
Collaborator

sylveon commented Jul 11, 2018 via email

@giftig
Copy link

giftig commented Jul 11, 2018

This change only writes to it, it does not reads it in any way.

The attached issue which this is meant to solve was about having this value accessible by pokemon-terminal so that it can tell the user what the current pokemon is on request, and potentially use the value for other purposes as well; if the idea was to read/write the title, as it seemed to be, then that's bizarre. If the idea is just to set the title so the user can see it then it's less of a hack but doesn't really provide any value imo. Devoting your title to telling you what your current background is seems silly, and it'd mess with the title you actually wanted the window to have.

Given the issue claimed to solve the related discussion it seemed the intention was to write it to the title to later read it - which would be fraught with issues.

@giftig
Copy link

giftig commented Jul 11, 2018

Besides, if you really just wanted to know what pokemon it is and you didn't care if pokemon-terminal could find out later, the easiest solution would just be to always output the name of the pokemon when you set the terminal. Want to remember that for later?

POKEMON=$(pokemon)

Well, that wasn't very hard.

@jimmyorourke
Copy link
Contributor Author

@giftig I don't want to argue semantics but it does solve the original issue which is just

Is there an easy way to tell which Pokemon is currently being featured?

I agree that it is definitely not the right solution for any of the evolve features that got mentioned later in the thread.

I also agree that your simple solution works too.
However from a UX perspective I think my method is a lot more elegant. If that's not what we want here then that's fine.

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.

None yet

3 participants