-
Notifications
You must be signed in to change notification settings - Fork 246
Display pokemon's name in terminal title bar #148
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
base: master
Are you sure you want to change the base?
Conversation
Solution for #38 |
...but what if you want to use the title of your terminal for something more useful than displaying the name of a pokemon? |
pokemonterminal/scripter.py
Outdated
@@ -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") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
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. |
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. |
"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"? |
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. |
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. |
The point isn't to use it as a database. Nothing should read from it. 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. |
I think that for things like that a config file is the best way to go, because as you've mentionned if you need to add a switch constantly to enable/disable this behavior because you like/don't like it, it's not user friendly.
On 2018-07-11 16:45:22, jimmyorourke <[email protected]> wrote:
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.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub [#148 (comment)], or mute the thread [https://github.com/notifications/unsubscribe-auth/AGJFtiOd_AOgTl843pgNPJ5nORq4etvZks5uFmPigaJpZM4VKc_x].
|
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. |
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. |
@giftig I don't want to argue semantics but it does solve the original issue which is just
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. |
Display's the current pokemon's name in the title bar, along with standard currently running process