reddit / emacs
New Package: KISSES (Keep It Simple Stupid Emacs Splash)
JustinSilverman · 2022-03-01 19:59
[https://github.com/jsilve24/kisses](https://github.com/jsilve24/kisses)
​
I found emacs-dashboard (dashboard.el) to be a bit to involved for my liking. I wanted a much more minmimalistic splash screen that achived the following goals:
1. Centered text (any arbitrary ascii banner) regardless of the current window size.
2. Used just a single buffer rather than requiring a bunch of duplicate buffers to achive requirement #1.
3. No flashy buttons or other things that I would never bother to click anyways.
​
Its probably not everyone's taste but it does what I need it to. Perhaps others will find it useful. If people want I can put on melpa.
Feedback welcome.
BettaGeorge · 2022-03-01 20:58
Out of curiosity, since I see the topic cropping back up regularly: why do people use splash screens at all? When I start emacs, it drops me either into scratch or a recent project. Why would I want an entirely useless screen instead?
Status-Detective-783 · 2022-03-01 21:23
First of all, congrats on learning elisp, and putting your heart into a project that interests you!
Here's a page that describes requirements for MELPA: https://github.com/melpa/melpa/blob/master/CONTRIBUTING.org
I'm fairly new to emacs, but I think MELPA is looking for projects that are a bit more featureful. But I could be wrong...
JustinSilverman · 2022-03-01 21:36
No good reason. Eye candy BS. Still, I like it as it’s kinda like an empty desktop. I like my scratch buffer to be different.
organic-bookworm · 2022-03-01 22:00
In Doom Emacs the [:ui doom-dashboard](https://github.com/hlissner/doom-emacs/tree/master/modules/ui/doom-dashboard#description) module is used to
* improve startup time
* preserve working directory of project in case of killing all the buffers
* eye candy :)
[deleted] · 2022-03-01 23:43
[deleted]
arthurno1 · 2022-03-02 01:20
> In Doom Emacs the :ui doom-dashboard module is used to
improve startup time
I am curious: how does a splash screen improve startup time???
arthurno1 · 2022-03-02 01:34
Looking at his screenshot, I could imagine something like that as the first slide of a presentation or if you do a video or something and wish to show you are a cool kid using Emacs :). Other than that, it is utterly useless.
arthurno1 · 2022-03-02 02:16
While I can't see much use for this, at least for myself, I do think that you have got ascii art very nice :).
You could also use an svg or png image as well.
Have you tried with three or four windows, resizing three windows horizontally and vertically and try scrolling the window with mouse or with keys. I don't know what is your targeted use-case, but it works as intended if windows are created prior to calling your splash, not so if you start scrolling and resizing around. But it is a cool idea to use same buffer and just scroll windows. However, you might wish to take a look at [indirect buffers](https://www.gnu.org/software/emacs/manual/html_node/emacs/Indirect-Buffers.html).
BettaGeorge · 2022-03-02 02:33
To each their own :)
JustinSilverman · 2022-03-02 02:56
Ya pretty much. I have a pretty niche use case. I use exwm and don’t really have a desktop in the standard Sense. I sometimes feel overwhelmed by number of open windows and want to clean up. Or when I switch between projects I want a “clean slate” first. In both cases a nice solution is to have a default clean fallback buffer. I liked the doom splash screen for this. But when I switched to my own config I couldn’t rationalize copying all the code and unneeded features I found in the doom splash screen. Hence KISSES. It’s silly but I find I miss it when I turn it off.
JustinSilverman · 2022-03-02 02:57
I think this is fixed by adding a hook to the reload function in window size change hook. I didn’t add that by default but think it might fix it.
organic-bookworm · 2022-03-02 08:34
For that bullet the description says:
(the dashboard is lighter than the scratch buffer in many cases)
This way Doom defers some of the features preset for prog modes, like `flycheck`, `git-gutter` and stuff.
But the improvement, if any, certainly, depends on one's setup and workflows.
arthurno1 · 2022-03-02 09:06
> (the dashboard is lighter than the scratch buffer in many cases)
In which way is that true?
More or less everything needed for the scratch buffer is already preloaded into Emacs when it starts (in the dump). If lisp-interaction-mode is in any way "heavy" (which is not) than put scratch initially in fundamental mode:
(setq initial-major-mode 'fundamental-mode)
Probably can't go lighter than this.
> This way Doom defers some of the features preset for prog modes, like flycheck, git-gutter and stuff.
"This way"? None of this stuff is used by scratch buffer by default. And none of this will be any faster because of loading some other buffer like dashboard. Flycheck, git-gutter etc should be lazy loaded on demand, when you actually use that functionality. Has nothing to do with some dashboard.
> But the improvement, if any, certainly, depends on one's setup and workflows.
Yes. Set it up properly and your Emacs will probably start faster without that dahsboard :).
arthurno1 · 2022-03-02 09:25
> I sometimes feel overwhelmed by number of open windows and want to clean up
Windows are easily cleaned up: C-x 1 in the default Emacs setup, which runs 'delete-other-windows'. You don't need a splash screen to achieve that.
> when I switch between projects I want a “clean slate” first.
I am pretty sure [there are better ways to "clean up" state](https://emacs.stackexchange.com/questions/10183/close-other-buffers-with-projectile), than creating a new useless buffer. You are not even killing other buffers, you are just piling up an additional buffer. But it is of course subjective, if it makes sense for you, so use it.
I suggest you to make it "hidden", so it at least does not come up in completion lists when you're switching buffers. You do this by giving it a name preceded by two spaces, like this:
> " *splash*".
arthurno1 · 2022-03-02 09:28
Perhaps, I don't know. You will have to test and experiment yourself.
vifon · 2022-03-02 11:32
Personally I have a custom mode for my splash/scratch with single letter keybindings for my common actions. It serves as a nice "springboard". https://github.com/vifon/scratch-mode
mklsls · 2022-03-02 15:49
I removed any dashboard from my config, and I configured to show my agenda at startup.
I improved my productivity like 1000%
mclearc · 2022-03-02 17:46
I think this is all very much to people's preferences. But I like having a simple info screen that has start times and packages loaded, along with some options like opening mail or a project. I have a persistent scratch buffer/file so I don't typically want to open to that. And since it is all just text there is no slowdown to my startup. Here's a screenshot of what it looks like: https://www.dropbox.com/s/pxv040sow6uwzdv/Screen%20Shot%202022-03-02%20at%2011.08.10.png?dl=0
mclearc · 2022-03-02 17:50
Cool! The window centering function is nice. I've been centering things less gracefully, so thanks for sharing this idea.
meain · 2022-03-02 18:27
I kinda use the scratch buffer as my dashboard. I have the first few lines reserved for messages which update periodically like open buffer, emails, weather etc in the scratch buffer. After that a few buttons which point to recent files. Below that, your normal scratch space.
Lazy-Snail · 2022-03-02 22:18
I think you should use a local hook declared by your mode with :
`(add-hook 'window-size-change-functions 'kisses-window-size-change-function)`
That way you receive directly a window instead of a frame for your function. Seems kisser.