Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 1.37 KB

README.org

File metadata and controls

52 lines (38 loc) · 1.37 KB

on-demand-scroll-bar.el - Show scroll bars on demand in Emacs

Show scroll bars only when needed.

Enable on-demand-scroll-bar-mode to show the native graphical scroll bars when the buffer is not fully visible.

This is experimental and hacky. Expect breaking changes.

Installation

Clone the repository and put the path in your load path. Then, require on-demand-scroll-bar in your init file:

(add-to-list 'load-path "/path/to/~on-demand-scroll-bar")
(require 'on-demand-scroll-bar)

Enable on-demand-scroll-bar-mode:

(on-demand-scroll-bar-mode 1)

Emacs’s built-in scroll-bar-mode conflicts with on-demand-scroll-bar-mode and should be disabled:

(scroll-bar-mode -1)

Or use use-package:

(use-package on-demand-scroll-bar
 :load-path "path/to/on-demand-scroll-bar"
 :config
 (on-demand-scroll-bar-mode 1)
 (scroll-bar-mode -1))

Optionally, combine it with custom-css to adapt the scroll-bar appearance. https://github.com/florommel/custom-css

Issues

Hidden sections of the buffer (e.g., with org or magit) can result in “false positives” (the scroll-bar is shown despite the visible part of the buffer being contained within the window constraints). Narrowed buffers, however, are handled correctly.