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

Hide forward and back buttons #27

Open
wpcarro opened this issue Jun 29, 2017 · 3 comments
Open

Hide forward and back buttons #27

wpcarro opened this issue Jun 29, 2017 · 3 comments

Comments

@wpcarro
Copy link

wpcarro commented Jun 29, 2017

I'm new to tabbar and cannot find any information about hiding these forward and back buttons that load with tabbar by default.

Image:

screen shot 2017-06-29 at 11 34 34 am

I've tried the following but to no avail:

  (setq tabbar-hide-header-button t)
  (setq tabbar-use-images nil)

After this the images are removed, but the area persists. Is there a way to remove this area entirely? I do not foresee myself interacting with it.

screen shot 2017-06-29 at 11 38 24 am

@zumbalogy
Copy link

zumbalogy commented Nov 6, 2017

This is maybe a bit hackish, and may not work for you, I am new to emacs and this emac's tabbar. But, this works for me, and let me know if you have any problem with it. Also, I apologize that this answer is so late, but hopefully this info is useful to someone.

If I redefine "tabbar-line-buttons", found here https://github.com/dholm/tabbar/blob/master/tabbar.el#L1119
with something like

(defsubst tabbar-line-buttons (tabset)
  "Return a list of propertized strings for tab bar buttons.
TABSET is the tab set used to choose the appropriate buttons."
  (list
   (if tabbar-home-function
       (car tabbar-home-button-value)
     (cdr tabbar-home-button-value))
   tabbar-separator-value))

then I am able to get rid of the back and forth buttons.

I am also considering hiding the home button as well, since you can scroll while hovering over the tab bar to see other groups (and I only have 2 groups, one for default emacs buffers, and one for the rest of them (all the files I have opened))

Hope this helps!

PS: You might have to restart emacs to have this change take effect. Also, you can see my emacs settings here https://github.com/zumbalogy/emacs_settings/blob/master/tabs.el

@zumbalogy
Copy link

Hello again. If anybody wants to get rid of all 3 buttons, and they have button borders/dividers, but still want the left most tab to be flush against whatever its against, the following code might be best:

(defsubst tabbar-line-buttons (tabset)
  "Return a list of propertized strings for tab bar buttons.
TABSET is the tab set used to choose the appropriate buttons."
  (list (propertize "")))

and, if you set your tabbar-separator color to be the same as the tabbar background color, then it will appear as if you have no dangling right separator as well.

(set-face-attribute 'tabbar-separator nil
                    :box '(:line-width 5 :color "#1c1e24" :style nil))

but you will have to change #1c1e24 to whatever color works for you.

@yqrashawn
Copy link

  (customize-set-variable 'tabbar-scroll-right-button '(("") ""))
  (customize-set-variable 'tabbar-scroll-left-button '(("") ""))
  (customize-set-variable 'tabbar-buffer-home-button '(("") ""))

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

No branches or pull requests

3 participants