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

Argument to select theme #222

Open
tw1t611 opened this issue Apr 11, 2020 · 8 comments
Open

Argument to select theme #222

tw1t611 opened this issue Apr 11, 2020 · 8 comments

Comments

@tw1t611
Copy link

tw1t611 commented Apr 11, 2020

Hi,

could you please add an argument to select the theme automatically?
This would be useful for people, who want to set up their systems via a script.

It could be something like
bash -c "$(wget -qO- https://git.io/vQgMr) [number]"

@tfurf
Copy link

tfurf commented Jun 19, 2020

Alternatively/additionally to select by name(s). This is really useful for people who want to set up their environment/workspace non-interactively.

@selfup
Copy link

selfup commented Jun 21, 2020

I would assume something like:

if [[ ! $1 -eq "" ]]
then
  # check $1 is valid
  # apply theme
fi

Would be a good start.

You would then need to make sure it's within the number range to ensure the data is valid 🙃

@geodimm
Copy link
Contributor

geodimm commented Jun 21, 2020

I think a temporary workaround is

number=1
echo $number | bash -c "$(wget -qO- https://git.io/vQgMr)"

@tfurf
Copy link

tfurf commented Jun 23, 2020

@Mayccoll , would some light refactoring be welcome in a PR for this? Basically, in order to build a list of scripts, I need to separate out OPTIONS from the call of set_gogh. Then, depending on CLI arguments, we go to interactive mode (as is, query OPTIONS), numbered mode (use args as OPTIONS), or named mode (go straight from list of names to list of themes, not indices). The default user experience does not change in any way.

@marko-avlijas
Copy link
Contributor

marko-avlijas commented Aug 31, 2020

Argument to select theme by number is useless for scripting because as new themes are added numbers will change and scripts will get broken. Themes must be chosen by name.

It is not necessary to make any changes in code because this functionality is already there.

I would only add to readme section about how to install in non interactive mode:

# clone the repo into "$HOME/src/gogh"
mkdir -p "$HOME/src"
cd "$HOME/src"
git clone https://github.com/Mayccoll/Gogh.git gogh
cd gogh/themes

# necessary on ubuntu
export TERMINAL=gnome-terminal

# install themes
./atom.sh
./dracula.sh

# some themes are not executable so make them executable before you install them
chmod +x ./palenight.sh
./palenight.sh

This would have saved me a couple of hours.

@marko-avlijas
Copy link
Contributor

marko-avlijas commented Aug 31, 2020

I have created a pull request to fix this issue: #245

@trevor-moon
Copy link

Alternatively/additionally to select by name(s). This is really useful for people who want to set up their environment/workspace non-interactively.

I have a personal script gogh-themes that performs all the setup of non-interactive use case and installs themes by name (see below)

2021-11-12-01-43-25.mov

@stablestud
Copy link
Contributor

Alternatively/additionally to select by name(s). This is really useful for people who want to set up their environment/workspace non-interactively.

I have a personal script gogh-themes that performs all the setup of non-interactive use case and installs themes by name (see below)
2021-11-12-01-43-25.mov

Looks good! Link?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants