lemnos / theme.sh Goto Github PK
View Code? Open in Web Editor NEWA script which lets you set your $terminal theme.
License: Other
A script which lets you set your $terminal theme.
License: Other
Hi,
I just upgraded my Debian from 11 to 12 and noticed theme.sh doesn't work anymore in my setup.
Is this something which is being worked on ?
Cheers !
Just came across these https://github.com/projekt0n/github-nvim-theme/tree/main/extras I think they would be a nice addition to the collection.
./theme.sh -i
gives me an error message in the right pane:
awk: invalid -v option
I can work around this with:
brew install gawk
This is not an issue with theme.sh
, but a mere “how to” question as I did not succeed in finding any documentation.
Hello everyone. For quite some days I am trying to re-define the 16 base colors, set via e.g. my terminal emulator, via the command line (only) inside the currently active shell/session. Unfortunately, after lots of searching, reading, trying, and failing, I still did not succeed with this simple(?) task.
Yesterday I stumbled upon theme.sh
and read through the source code, especially the apply_theme()
function should be interesting with regards to my question, but I’m still a bit lost due to the many substitutions going on there.
Hence, may I ask you to please provide one, two, or three easy examples on how to re-define one of the 16 base colors?
I did succeed in changing the default foreground color via e.g. printf "\e[38;2;${r};${g};${b}m%s\e\\" "…"
where ${r}
${g}
${b}
are RGB values calculated from a hex color definition like #ffffff
or #000000
et cetera.
How would I re-define e.g. the color black, i.e. \e[30
or bold/bright black (grey), i.e. \e[1;30
or \e[90
for my current shell/session? Thank you so much for hopefully explaining a little bit the approaches of and goings-on in your script.
I am on macOS, and I was testing my color re-definition approaches in iTerm, Terminal, and also tmux — it seems there’s differences for many terminal emulators. Also there seems to be a difference between the direction the bracket is facing in \e[
and \e]
and for this I found even less documentation online.
Any chance to get these Base16 themes added to the script?
https://github.com/aarowill/base16-gnome-terminal
(old repo: https://github.com/chriskempson/base16-gnome-terminal)
Thank you.
LICENSE file:
MIT License
[…]
This license covers theme.sh.
theme.sh:
Licensed under the WTFPL provided this notice is preserved.
My tmux setup supports true colour:
But the output of:
$ tmux display-message -p '#{client_termfeatures}'
bpaste,ccolour,clipboard,cstyle,focus,RGB,title
Is not what this script expects.
I do have:
set -as terminal-features ",*256col*:RGB"
set -g default-terminal "tmux-256color"
So, when I try to run this script, I get:
This does not appear to be a truecolor terminal, try -i2 instead or set COLORTERM if your terminal has truecolor support.
Any idea of why I might be missing?
./theme.sh -i
allows me to select a theme on macOS. However, inside a tmux session, no colours change.
I have to detach from the tmux session, run theme.sh, and then re-attach to the tmux session.
When I enter theme.sh -a ~/.config/kitty/kitty.conf
the file/colors don't change at all. Yes, I looked at the code, and found that the add()
function searches for the # Themes
line. I added it, and it still didn't work. I tried debugging everything.
What the title says! It would be a nice feature!
☠ theme.sh -p
: #002831
: #d11c24
: #ffffff
: #a57706
: #2176c7
: #c61c6f
: #259286
: #eae3cb
: #006488
: #f5163b
: #51ef84
: #b27e28
: #178ec8
: #e24d8e
: #00b39e
: #fcf4dc
foreground: #9cc2c3
background: #001e27
cursor: #9cc2c3
☠ echo $SHELL $TERM $TMUX
/bin/bash screen /tmp/tmux-3942/default,59188,0
Hey, thank you for adding tokyonight!
I've got another suggestions: amora by owozsh.
It's originally a vim theme, but a kitty config is provided.
Thanks again.
Hi, thanks for your life-changing script. I especially admire anyone who tries to stay posix compliant and not bash out.
Unfortunately, I don't understand why the configuration snippets in the README test for the existence of the history file. After all, theme -l gives a valid output whether the file exists or not. The snippets didn't work for me at first because I set XDG_CONFIG_HOME and the awk statements in theme.sh determine the location of the history file with the environment variables:
config_dir = (ENVIRON["XDG_CONFIG_HOME"] ? ENVIRON["XDG_CONFIG_HOME"] : ENVIRON["HOME"])
histfile = config_dir"/.theme_history"
If there is no error in my logic, here is already a PR for the change.
It is always better to separate functionality from data.
It would be nice if we moved the theme data in some folder outside the script, preferably ~/.local/share/themes/
I was wondering if you could include tokyonight.nvim. Configs for Kitty and Alacritty are already provided by the author.
Hi,
Just wanted to tell you how wonderful your tool is, I love it ❤️
Keep adding more and more themes 👍
In case you would like to provide a default config for Fish shell users as well:
if type -q theme.sh
if test -e ~/.theme_history
theme.sh (theme.sh -l|tail -n1)
end
# Optional
# Bind C-o to the last theme.
function last_theme
theme.sh (theme.sh -l|tail -n2|head -n1)
end
bind \co last_theme
alias th='theme.sh -i'
# Interactively load a light theme
alias thl='theme.sh --light -i'
# Interactively load a dark theme
alias thd='theme.sh --dark -i'
end
As supported terminal also kiTTY is listed on your read.me-page
I did try the Windows-version KiTTY 074.3.1 @ 06/11/2020-17:31:06(GMT) while connecting via SSH to a device running armbian.
I installed fzf to the armbian device, but while scrolling the interactive mode (theme.sh -i2) the colors doenst change
and also using the sampe "theme.sh nord" cant change the color inside the terminal.
Is there anything else what I can try to use your script in my terminal?
I'm the maintainer of the theme.sh AUR package. Since the last release 0.2
a lot of good stuff has happened and it would be great if this can be released.
Great tool, but not so appropriate for my Windows dev setup. Works with WSL out of the box! How do I reset back to my old config and remove the script?
Is there a way to save the current theme from the terminal to a file, if set by a terminal profile, not by theme.sh?
I'd like to be able to save the current custom gnome-terminal theme, call theme.sh with some built-in theme, ssh to a remote host, restore original theme when the ssh session is done.
it would be nice these themes: https://github.com/catppuccin/catppuccin
$ awk -W version
mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan
compiled limits:
max NF 32767
sprintf buffer 2040
$ theme.sh/theme.sh -l
awk: line 24: illegal reference to array mru
I'm having a problem with -i as well but am trying to find out a bit more about truecolor on the chromeos terminal app before creating that ticket
bindkey -s "^[[O" '"theme.sh $(theme.sh -l|tail -n2|head -n1)"' #Binds C-o to the previously active theme.
I tried this but it doesn't seem to work on MacOS Iterm
If you're going to be using the themes originally cultivated by me in my https://github.com/mbadolato/iTerm2-Color-Schemes repository, please make sure that you're including the copy of the MIT license, and the credits for each of the authors of the themes that are in that repository. A link back to the original repository would be appreciated, as well
Thanks
mark
I like your script and what's really cool about it is that it works on most terminals regardless.
I'm not trying to be rude, these are just some suggestions.
I'm proposing 2 changes:
gela h
)gela
I'm sorry if the issue sounds irrelevant. Feel free to close. But, in case you liked my suggestions I will also be freed from having to maintain my script and use theme.sh everywhere.
I see you have no LICENSE file for this project. I see the license is WTFPL. You should add a LICENSE file to make it easier to identify at a glace.
I could make a PR for this if you would like.
To make theme.sh packagable for package systems like Snap, AUR, etc. releases should be tagged. Preferable with semver versioning, so you can communicate breaking changes.
Seems that #2 has re-emerged? Same error, same workaround (brew install gawk
).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.