Jump to content

themes.sh -- An Interactive Terminal-Agnostic Theme Selection Script


abarbarian

Recommended Posts

An Interactive Terminal-Agnostic Theme Selection Script

 

Quote

I don’t know about you, but I think that the default look of the terminal is not always the best. And that’s valid if you’re running Linux or macOS.

Quote

The script comes with more than 400 themes, an interactive theme picker, and it’s terminal agnostic.

 

https://github.com/lemnos/theme.sh

 

the script itself

 

https://raw.githubusercontent.com/lemnos/theme.sh/master/bin/theme.sh

 

There are AUR packages but why on earth would you want to use it rather than installing directly I do not understand.

 

https://aur.archlinux.org/packages?O=0&SeB=nd&K=+theme.sh&outdated=&SB=p&SO=d&PP=50&submit=Go

 

This is the easiest way I have found for trying out different looks in the terminal. I gave the script a once over to see if it contained any naughties.Installed " fzf " so that I could use the interactive feature.Then I used the install code modified to suit my needs, I keep all  my scripts in /home/me/bin/, an in a couple of clicks I was trying out hundreds of different setups.

I ended up with " dracula " but quite like the look of " birds-of-paradise " . I may use some of the ideas I glean to tweak my set up slightly after I have played around for a while.  😎

 

lpwwMK7.png

 

cLDFJh1.png

Link to comment
Share on other sites

14 hours ago, sunrat said:

I just change my root prompt to red in /root/.bashrc so it's obvious when it is root.

 

First trick I learned for running a penguin was to have your root terminal in red. I used " su " instead of sudo when I first started out as it kept me on track if doing something as root. It helped me to stop making big mistakes, well most of the time.🤔I used to have it all in red but now I just have little red arrows to show I am in "root".

 

Quote

This is my root prompt. 2023

 

I had to create a /root/.bashrc file first. Also the PS1= has to be all on one line in the .bashrc if filling in the details when opening up .bashrc with nano from a terminal

 

export PS1="\[\033[38;5;75m\]\t\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;160m\]-->\[$(tput sgr0)\]\[\033[38;5;75m\]\d\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;160m\]-->\[$(tput sgr0)\]\[\033[38;5;2m\]\W\[$(tput sgr0)\]\n\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;160m\]-->\[$(tput sgr0)\]"

 

 

an this is my user prompt

 

Quote

This is my user prompt 2023

 

export PS1="\[$(tput sgr0)\]\[\033[38;5;75m\]\t\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;21m\]-->\[$(tput sgr0)\]\[\033[38;5;75m\]\d\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;21m\]-->\[$(tput sgr0)\]\[\033[38;5;2m\]\W\[$(tput sgr0)\]\n\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;21m\]-->\[$(tput sgr0)\]"

 

PROMPT_COMMAND="echo -n $(tput bold) $(tput setaf 6)Put brain in gear before pressing enter"

 

 

OeGAGBs.png

 

I gleaned information for " tput " from here,

 

https://linuxcommand.org/lc3_adv_tput.php

 

😎

Edited by abarbarian
  • Thanks 1
Link to comment
Share on other sites

18 hours ago, wa4chq said:

Very nice AB.  My root also changes colors.  My root is also patriotic.  Hope everyone has a safe Easter weekend.

 

Neat. I like that you change "wa4chq" to "root" in red. I might give that a try if I develop dementia or Alzheimer's. 😋

  • Haha 1
Link to comment
Share on other sites

securitybreach

Mine is visually simple but I am using zsh instead of bash with syntax highlighting/autocomplete and other tweaks. The odd resolutions are due to scaling.

 

zO3v9He.png

 

7VNGzlE.png

  • Like 1
Link to comment
Share on other sites

securitybreach
1 hour ago, wa4chq said:

SB, I also use zsh.....

 

Nice. I have been using it for years now but once I found it, I was surprised that it took me so long to switch.

Link to comment
Share on other sites

3 hours ago, securitybreach said:

The first thing that I do on a new install is install and setup zsh.

Yep, same here.  Then I install ranger.

Link to comment
Share on other sites

securitybreach
17 hours ago, wa4chq said:

Yep, same here.  Then I install ranger.

 

I prefer nnn as ranger will lag on large directories https://github.com/jarun/nnn

 

Its basically ranger but indexes fast and has a lot of other features like tabs and such. I also like fff which is a fork of nnn but that is mainly because of the name. ;)

  • Like 1
Link to comment
Share on other sites

1 hour ago, securitybreach said:

 

I prefer nnn as ranger will lag on large directories https://ithub.com/jarun/nnn

 

Its basically ranger but indexes fast and has a lot of other features like tabs and such. I also like fff which is a fork of nnn but that is mainly because of the name. ;)

I just had a look at nnn, thanks....looks nice.  I was a big fan of midnight commander for years.  I still use it but not as much anymore.  My head gets wonky if I use something like pcmanfm.... btw, I'm not having much luck with the link you provided...so I just googled nnn instead.

Edited by wa4chq
Link to comment
Share on other sites

17 hours ago, securitybreach said:

Mine is visually simple but I am using zsh instead of bash with syntax highlighting/autocomplete and other tweaks. The odd resolutions are due to scaling.

 

 

 

Can you help ?

 

I have downloaded the Jetbrains stuff and they show up in my WindowMaker so I can change font that way.

 

However I am stuck in font mud when it comes to changing the terminal font.

 

I have this in mkinitcpio.conf

 

Quote

HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck)

 

I found "/etc/vconsole.conf" and it has one entry

 

Quote

KEYMAP=uk

 

everywhere I look on the net it tells me to add something to that file like

 

Quote
KEYMAP=dvorak
FONT=ter-v18n

 

or  ( I realise that I do not need the Noto stuff could exclude that)

 

Quote

simply put a fontconfig under ~/.config/fontconfig/fonts.conf and force-refresh the font cache with fc-cache --really-force.

This fontconfig sets up a font alias terminal-font for both fonts in the desired order:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>

  <alias>
    <family>terminal-font</family>
    <prefer>
      <family>JetBrains Mono</family>
      <family>Noto Color Emoji</family>
     </prefer>
  </alias>

</fontconfig>

That’s how we can use this font family name in our terminal config.

 

I also have this in my ~/. Xrescources but have no idea why and do not know what to put in there to get Jetbrains.

 

Quote

! Use a nice truetype font and size by default... 

!xterm*faceName:       xft:DejavuSansMono:pixelsize=14

! Joshs terminal font - pretty neat

!xterm*faceName:        xft:source code pro:pixelsize=14:antialias=true

! Erics terminal font very neat - the non bold one is cool too.

xterm*faceName:        xft:Liberation Mono:bold:pixelsize=13:antialias=true:hinting=true

!xterm*faceName:        xft:Liberation Mono:pixelsize=13:antialias=true:hinting=true
 

 

So what do I do to get Jetbrains in the terminal.

 

Thanks. 😎

 

P.S I realise that at my age Jetbrains would probably burn out my last few reaming greycells , but hey I am a gambler and speed freak.

Edited by abarbarian
Link to comment
Share on other sites

securitybreach
9 hours ago, wa4chq said:

I just had a look at nnn, thanks....looks nice.  I was a big fan of midnight commander for years.  I still use it but not as much anymore.  My head gets wonky if I use something like pcmanfm.... btw, I'm not having much luck with the link you provided...so I just googled nnn instead.

 

Fixed link, sorry forgot the g in github

  • Haha 1
Link to comment
Share on other sites

securitybreach
6 hours ago, abarbarian said:

 

Can you help ?

 

I have downloaded the Jetbrains stuff and they show up in my WindowMaker so I can change font that way.

 

 

So I use urxvt and the config is via ~/.Xresources but this is the line for the font:

 

xft:jetbrains mono:pixelsize=14:antialias=true

  • Thanks 1
Link to comment
Share on other sites

Fonts don't you love em. I got confused with console, terminal and system fonts what with all the confusing reading out there. These two links helped a lot with prettying up and making xterm more useful.

 

https://www.futurile.net/2016/06/15/xterm-256color-themes-molokai-terminal-theme/

 

This link helped out with colours. I now have  a red cursor and pointer. His previous post has some useful tweaks too.

 

 

https://lukas.zapletalovi.com/posts/2013/hidden-gems-of-xterm/

 

This article has excellent tips. This set up lets you highlight web addresses or file paths with a double click. Add these to ~/.Xresources

Quote

By default clicking in xterm works in the following way:

  • one click - nothing (you can drag or use the other button to select)
  • double click - select word (alphanums plus few characters in the default configuration)
  • triple click - whole line

When working with files (/some/filename) or links (https://www.xyz.com) selecting is difficult. It is easy to change the behavior. The following setting changes what xterm considers as characters:

 

Quote
XTerm*charClass: 33:48,36-47:48,58-59:48,61:48,63-64:48,95:48,126:48
XTerm*on3Clicks: regex ([[:alpha:]]+://)?([[:alnum:]!#+,./=?@_~-]|(%[[:xdigit:]][[:xdigit:]]))+

 

I wish I had come across this tip years ago

 

Quote

Left and right selection

Some users prefer to select portions of text using left button for beginning and right button for end as an alternative to dragging. I sometimes use this when I want to be absolutely sure with the selection (selecting e.g. ssh key) or I want to select something really big (left click, scroll,right click). Learn this, it is nice feature.

 

ocZlFdL.png

 

Now if only I could have a red cursor and pointer when I am root and a blue cursor and pointer when as a user. Hmmmmmmmmmmmmm 😋

  • Like 1
Link to comment
Share on other sites

securitybreach
2 hours ago, wa4chq said:

This will give the red and blue plus orange and green if you really want to get fancy!

e0ca8c45bc9d095b52bc4dacb253d38b.jpg&sp=

 

 

Image seems broken

Link to comment
Share on other sites

37 minutes ago, securitybreach said:

 

Fixed for you :)

 

 

e0ca8c45bc9d095b52bc4dacb253d38b.jpg

Looks like I fixed it the same time you did!  lol  I had an aunt that used these things.  The tree was white angel hair.  I think she listened to Elvis too.

  • Like 2
Link to comment
Share on other sites

23 hours ago, wa4chq said:

This will give the red and blue plus orange and green if you really want to get fancy

xmas_wheel.jpg

 

 

Typical lazy American cousins automating everything. We over here still have the ability to use our hands and respect the old fashioned way of doing stuff.😛

 

414_414_901c6df0-c525-4475-bfbb-b395a16e

 

 

  • Like 1
  • Haha 1
Link to comment
Share on other sites

1 hour ago, V.T. Eric Layton said:

be08unQ.png

I remember getting pinwheels when I was a kid.  We'd hold 'em out the car window.  I can't remember if the wand had a removable cap at the end and the wand itself contain candy??? 

  • +1 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...