Skip to content

florommel/on-demand-scroll-bar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

Show scroll bars on demand in Emacs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published