Use sed to add background color to tabs?

Asked
Active3 hr before
Viewed126 times

5 Answers

background
90%

Stack Overflow en español, Meta Stack Overflow ,Stack Overflow em Português,Thanks for contributing an answer to Stack Overflow!

Yes:

#!/bin/bash

norm_bg = $(tput sgr0)
red_bg = $(tput setab 1)

echo - e "foo\tbar\tbaz" | sed "s/\t/$red_bg    $norm_bg/g"
load more v
88%

gnome-terminal does not let you change the tab color, and does not provide any automatic means of changing the background color based on the title. It provides an explicit means of changing the background color, e.g.:,Note that this approach changes the background color for all the history of the terminal (similarly to changing the background color in the profile settings), rather than just for the output produced on the given host.,Thankfully nothing went wrong, but I would like it if I could change the colours of the terminal (e.g. the background or the tab colour) based on the title of the terminal (in this case either pi@Kite or tim@Hairy17)., Probably easier to change the terminal background than the tab title. – muru May 25 '17 at 0:54

gnome-terminal does not let you change the tab color, and does not provide any automatic means of changing the background color based on the title. It provides an explicit means of changing the background color, e.g.:

echo - ne '\e]11;#abcdef\a'
72%

I have button in each tabs, when clicked , I want to mark that tab in different color.,I am doing this as below,but when I clicked another button in another tab, I want to revert back previously marked,when user mark another Tab as Final then , I have to mark all tabs to original style [which I have in my custom css file generated from Theme builder]

I am doing this as below

$('#jqxTabs .jqx-tabs-title:eq(' + index + ')').css("background-color", "Green");
load more v
65%

I would like to have control over the color of a TabBar item based on some event.,Your code: UITabBarItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName: UIColor.red], for: .selected),I tested in an App, by calling this in the viewController that will segue to the tabBarController.


UITabBarItem.appearance().setTitleTextAttributes([NSAttributedStringKey.foregroundColor: UIColor.red],
   for: .selected)
UITabBar.appearance().backgroundColor = UIColor(red: 1, green: 0, blue: 0, alpha: 1) /
   UITabBar.appearance().tintColor = UIColor(red: 1, green: 0, blue: 0, alpha: 1) // New!!


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any] ? ) - > Bool {
   ...
}


func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
      print("\nIn  >  MyTabBarViewController  >  tabBarController() ..................................9-9-9-9-9\n\n")

      if viewController is Tab1ViewController {

         print("Tab One Pressed")

      } else if viewController is Tab2ViewController {

         UITabBarItem.appearance().setTitleTextAttributes([NSAttributedStringKey.foregroundColor: UIColor.red],
            for: .selected)
         UITabBar.appearance().backgroundColor = UIColor(red: 1, green: 0, blue: 0, alpha: 1) /
            UITabBar.appearane().tintColor = UIColor(red: 1, green: 0, blue: 0, alpha: 1) /

            print("Tab Two Perssed")
      }
load more v
75%

Add the .vertical class to a tabstrip and tab contents to stack tabs vertically. You can also remove the .grid-margin-x class from the wrapping div to make them sit side-by-side.,Tabs are elements that help you organize and navigate multiple documents in a single container. They can be used for switching between items in the container.,Augments a tab container to have vertical tabs. Use this in conjunction with tabs-container().,Adds styles for an individual tab content panel within the tab content container.

<ul class="tabs" data-tabs id="example-tabs">
   <li class="tabs-title is-active"><a href="#panel1" aria-selected="true">Tab 1</a></li>
   <li class="tabs-title"><a data-tabs-target="panel2" href="#panel2">Tab 2</a></li>
</ul>
load more v

Other "background-undefined" queries related to "Use sed to add background color to tabs?"