Misterio77 / flavours

🎨💧 An easy to use base16 scheme manager that integrates with any workflow.
MIT License
501 stars 29 forks source link

changing colors for shell #43

Closed midick closed 2 years ago

midick commented 2 years ago

Hi, First of all flavours itself works like a charm and I could hardly be happier! My only problem is changing the colors of my shell. The actual updating works fine but I can not figure out a proper hook to apply. sourcing the bashrc can not change my current session of course so i am a bit dumbfounded.

Misterio77 commented 2 years ago

Hey!

Maybe theming your terminal (instead of shell) might work better for your use case? Both alacritty and kitty can easily have the theme updated on all running sessions.

Otherwise, I think the only way to reload base16-shell would be if your terminal supports some kind of remote control.

midick commented 2 years ago

makes sense I am using kitty anyways and this works beautifully now thank you!

midick commented 2 years ago

but just as a technical thing: there is a shell template which provedes a nice shell script which, when executed changes the color scheme. I there any way to execute this via hooks? I tried setting shell = "{}", but it didn't work

Misterio77 commented 2 years ago

If I'm not mistaken, base16-shell works by printing some escape codes into your terminal, thus changing the colors. For example, running it from one terminal won't affect any others (that's why running it a hook has no effect, we don't output stuff on hooks). I think you could get that working through some kind of remote control (kitty might have it), like remotely running that script on each open terminal.

n3oney commented 1 year ago

If I'm not mistaken, base16-shell works by printing some escape codes into your terminal, thus changing the colors. For example, running it from one terminal won't affect any others (that's why running it a hook has no effect, we don't output stuff on hooks). I think you could get that working through some kind of remote control (kitty might have it), like remotely running that script on each open terminal.

maybe you could technically echo the escape codes into /dev/pts/* to affect all pseudo ttys