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

How can I keep Nyan Cat always running in the touch bar? #15

Open
mark248am opened this issue Jan 21, 2017 · 29 comments
Open

How can I keep Nyan Cat always running in the touch bar? #15

mark248am opened this issue Jan 21, 2017 · 29 comments

Comments

@mark248am
Copy link

Is there a way to keep nyan cat always running in the touch bar no matter what application i am in? (preferably without sound)

@avatsaev
Copy link
Owner

unfortunately no.

@ryandesign
Copy link

Why not? iTunes can display a song scrubber in the Touch Bar, even when iTunes is not in front.

@shannonio
Copy link

I want this too!

@FrancescoSaverioZuppichini

Yes please :)

@kgotiwale
Copy link

This would be life-giving. Without sound tho.

@shannonio
Copy link

My touchbar is still useless, Nyan cat would make it better.

@looneym
Copy link

looneym commented Jul 23, 2018

image

@kilinkis
Copy link

totally need

@avatsaev
Copy link
Owner

I'm sorry guys, I have a full time job and not a lot of time, and I don't have a MacBook anymore to test this on 😂

@sanderfoobar
Copy link

@avatsaev Since you coded this and have more insight how it works, could you give a hint for anyone that is looking into making this feature? It is very important to me to have nyan visible at all times.

@andermattmarco
Copy link

According to the official documentation, the gif always staying on the touch bar is not possible.

@hmmhmmhm
Copy link

Finally in 2020, I found a solution.

GIF EXAMPLE

I've been able to use the GIF that was used in this project at the Better Touch Tool (BTT)
so that the nyan cat could remain on the touchbar anywhere.

스크린샷 2020-06-28 오전 3 14 47

The source code is as follows:

var basePath = `/Users/hm/Documents/Touchbar/` // YOUR PATH
var baseName = `nyan-`
var extension = `.png`
var startFrame = 0
var numFrames = 4

var frame = startFrame
var render = () => {
    if (frame == numFrames)
        frame = startFrame

    returnToBTT(JSON.stringify({
        text: ' ',
        icon_path: `${basePath}${baseName}${frame}${extension}`,
        background_color: ""
    }))
    frame++
}

render()
setInterval(render, 200)

Touchbar.zip

After downloading the resources below, you must place them
in the desired path and enter the path in basePath below.

Default.bttpreset.zip

If it's inconvenient to enter the above code,
I think it's a good idea to get my BTT preset.

@kilinkis
Copy link

kilinkis commented Jul 4, 2020

@hmmhmmhm sickkkk dudeeeee. Thanks!

@956MB
Copy link

956MB commented Jul 5, 2020

@hmmhmmhm What a phenomenal workaround! I assume this opens up possibilities for some of the other touchbar apps out there, or anything else really. 👍

EDIT:

For anyone who wants to use @hmmhmmhm 's workaround with the other popular touchbar KnightTouchBar2000:

Download the following zip containing the KITT frames:
kittFrames.zip

Add the files in 'kittFrames' to the directory where you saved the nyan cat touchbar frames.

Then change to these lines in the script (interval should be around 30 or less to be fast enough):

var baseName = `kitt-`
var numFrames = 87
setInterval(render, 30)

Note: The scale of the frames aren't quite exact to the original KnightTouchBar2000 app, being a bit smaller, but I think they look okay. I think its something to do with the area that images can be put into with this workaround.

kittFrames

@hmmhmmhm
Copy link

@Bloumbs Ohh... Wow... Thank you for sharing your wonderful resources. 🥳

@mikoyats
Copy link

mikoyats commented Jul 22, 2020

I just had an idea of creating and adding NyanCat to the touch bar and apparently, there was already one! Welp, time to add nyan cat to my touch bar 🤣 Thanks for the this and the workaround. 🥳

@DANRKX
Copy link

DANRKX commented Jul 28, 2021

@hmmhmmhm I'm really new to all this and am having trouble implementing your code. Do you have a preset for just the nyan cat 'button'

@DANRKX
Copy link

DANRKX commented Aug 18, 2021

@hmmhmmhm U got the download file?

@Taha101x
Copy link

wait wait , I attempted to do this and failed since there was nothing there and only some Japanese letters on my Touch Bar could someone help me out ?

@DANRKX
Copy link

DANRKX commented Sep 14, 2021

wait wait , I attempted to do this and failed since there was nothing there and only some Japanese letters on my Touch Bar could someone help me out ?

Same for me plz help

@avatsaev
Copy link
Owner

avatsaev commented Sep 14, 2021

Official downloads are here: https://github.com/avatsaev/touchbar_nyancat/releases

@DANRKX
Copy link

DANRKX commented Sep 14, 2021

We mean for the better touch tool version, I got that one already it’s rlly funny lol

@Taha101x
Copy link

yeah I want the btt always on but it just aint showing

@DANRKX
Copy link

DANRKX commented Sep 14, 2021

Mhm the @hmmhmmhm person said they were gonna help but never got round to it

@Taha101x
Copy link

also what does the guy mean by putting the images in the directory where's the directory in btt ??

@Taha101x
Copy link

lol this convo has been going on for 4 years

@hamza-salah
Copy link

Make sure that you check these in the 'Common' section :

  • Show only icon, no text
  • Icon Width = 600
  • Always show, even if other global actions are hidden.

@Jake-ops
Copy link

Jake-ops commented Sep 23, 2021

I did what you said but this what happened. SyntaxError: Unexpected identifier 'nyan'. Expected ';' after variable declaration.
Screen Shot 2021-09-23 at 10 19 49 AM

@Taha101x
Copy link

needs a new update stat

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

No branches or pull requests