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

Clock position #57

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

Clock position #57

wants to merge 5 commits into from

Conversation

slackhead
Copy link
Contributor

@slackhead slackhead commented Mar 28, 2018

Added -p [1-9] switch for clock position. (I went with 0-9 initially but since the keys are in 1-9 order it seemed more logical).
Added keys for shift + numbers - !"#$%^&*( to set postition on-the-fly.
Added support for GB keyboards using £ instead of # (wchar.h).

@slackhead
Copy link
Contributor Author

slackhead commented Mar 28, 2018

I've just thought. US keyboards have other differences to my UK one. Can you print out the top row here?

Never mind.

ttyclock.c Outdated
case '^':
case '&':
case '*':
case '(':
Copy link
Collaborator

Choose a reason for hiding this comment

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

we do we use shift here? this is bound to fail depending on the keyboard mapping... why not just use the normal digits?

README Outdated
@@ -18,3 +18,4 @@ usage : tty-clock [-iuvsScbtrahDBxn] [-C [0-7]] [-f format] [-d delay] [-a nsdel
-B Enable blinking colon
-d delay Set the delay between two redraws of the clock. Default 1s.
-a nsdelay Additional delay between two redraws in nanoseconds. Default 0ns.
-p [1-9] Position of clock in terminal: 1-9 starting top-left and ending bottom-right.
Copy link
Collaborator

Choose a reason for hiding this comment

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

"starting top-left and ending bottom-right"... how do we get to "bottom left"? :)

i guess we want to say something like "starting clockwise from the top-left" or something like that.

should we make 0 be "center" and remove the other flag? ;)

@slackhead
Copy link
Contributor Author

I used those characters because the numbers are already mapped for colours. I guess it would have some problems for people using keyboards with different number symbols. I'm not sure how to address that unless we use numbers and assign something else for colours?

It's not really clockwise though. I guess a diagram in the readme would help more:
123
456
789
Perhaps?

@anarcat
Copy link
Collaborator

anarcat commented Mar 28, 2018 via email

@slackhead
Copy link
Contributor Author

All I can say is that telephones and keyboards have been using
123
456
789

or

789
456
123

for years. Clockwise would be much harder to remember than simple rows imho.

I can take out the keybinds.

@anarcat
Copy link
Collaborator

anarcat commented Mar 28, 2018 via email

@slackhead
Copy link
Contributor Author

I think that
123
456
789
is the and easiest to understand and remember.

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.

2 participants