Giter Site home page Giter Site logo

theme.sh's People

Contributors

brutusmcforce avatar cbilz avatar dinkelspiel avatar gryffyn avatar hegga avatar lemnos avatar luisdavim avatar metalelf0 avatar nadir-yttrium avatar napcok avatar nmqd avatar planet36 avatar rahumba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

theme.sh's Issues

Changing theme inside a tmux session

./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.

Question: How to re-define 16 base colors via command line?

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.

Sorting themes and some design changes

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:

  1. Keeping themes separate from the source file
  2. Copying design changes from gelacritty
    • replacing cmd line options with ones similar to gelacritty's(Can be seen by running gela h)
    • an interactive menu similar to gelacritty's when it is run with just 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.

Add keybinding for ZSH

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

Kiity "-a" (Annex) doesn't work

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.

Save and restore current theme

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.

Why test for history file in configuration snippets in README?

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.

tmux true colour support check

My tmux setup supports true colour:
image

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?

kiTTY for Windows also supported?

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?

theme.sh -p omits color index

☠ 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

License and credits

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

Externalize embedded theme data

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/

Doesn't work in tmux

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 !

tag releases

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.

Version bump

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.

awk problem on chromeOS

$ 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

Very wonderful tool

Hi,

Just wanted to tell you how wonderful your tool is, I love it ❤️

Keep adding more and more themes 👍

Fish shell config

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

Missing LICENSE file

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.

include owozsh/amora

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.

Konsole: garbled after applying theme

So theme.sh works great for me on terminals like alacritty or foot.

But on Konsole, it's completely garbled:
theme shVSkonsole

It is using libvte so shouldn't it support OSC 4/11 ?

macOS fails, warns about awk

./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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.